1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2024-10-31 22:05:58 +00:00
Commit Graph

116 Commits

Author SHA1 Message Date
c8bcaea1e8
Update version and changelog for release 2021-04-20 17:35:59 -05:00
530e9b4bc6
Add initial pyobjc version for macOS
This is to help with issue #51.  Will not help in the case of python 2 or
older python 3 version < 3.6.
2021-04-13 22:36:10 -05:00
10c7693d11
Minor fixes to tests 2021-03-17 21:51:51 -05:00
356509120b
Add some checks to catch test failure
Really just checking that the setup is able to create test files so it
is known they were there then removed.
Windows tests really need verification of
recycle, which is not present.
2021-03-17 20:52:16 -05:00
f9fcdb8d8c
Fix legacy windows platform for multibyte unicode
- Add handling to create correctly sized buffer even with multibyte
characters as len() in python does not line up with what
create_unicode_buffer() needs for length.
- Add test for single and multiple files
2021-03-10 21:41:30 -06:00
af0c1ba704
More test fixes
- Fix travis windows env
- Fix exception type in test_plat_win
- Finish converting tests in test_plat_other, fix exception type
2021-03-10 18:57:35 -06:00
37be84d46e
Update .travis.yml 2021-03-02 22:48:48 -06:00
9f76fbf036
Updates for tests on windows
- Other platform tests WIP
- Windows long directory tests WIP
2021-03-02 19:33:44 -06:00
a324923ffa
Add IFileOperationProgressSink
- Add sink to allow detection of times when the file would be deleted
- Currently can detect, but not stop operations, more work needed
2021-03-02 19:23:43 -06:00
dbdcce8b04
First batch of updates to unit tests
- Remove content from __init__.py
- Change test_script_main to use pytest
- Update test_script_main to run on windows as well as linux
2021-03-02 00:26:29 -06:00
054d56c564
Update Tox and Travis configurations 2021-03-02 00:24:59 -06:00
33ed07811b
Cleanup flake8 issues 2021-03-01 23:44:03 -06:00
5d3835735e
Merge pull request #55 from juliangilbey/fix-win-test
Only import Windows-specific modules when on Windows
2021-01-28 23:53:24 -06:00
Julian Gilbey
741c7ad51f Only import Windows-specific modules when on Windows 2021-01-29 05:42:11 +00:00
2eb3242cd9
Merge pull request #54 from asellappen/master
Adding power support for this package to support arch independent
2021-01-21 19:11:15 -06:00
60bcb2c834
Merge pull request #47 from pracedru/master
Update plat_other.py
2021-01-21 19:00:46 -06:00
c411f4eae4
Merge branch 'master' into master 2021-01-21 19:00:33 -06:00
f64c69f905
Merge branch 'master' into master 2021-01-21 18:57:39 -06:00
00dfe77e40
Add console_script entry point, close #50 2021-01-12 18:22:23 -06:00
16a7115ff1
Merge pull request #52 from BoboTiG/impr-expand-ci
Expand supported Python versions
2021-01-12 16:58:09 -06:00
ec73b44c43
Merge pull request #53 from BoboTiG/fix-resource-warning
Fix ResourceWarning: unclosed file in setup.py
2021-01-12 16:53:59 -06:00
Arumugam
f62b4f1ffd Adding power support for this package to support arch indepentant 2020-12-15 06:08:33 +00:00
Mickaël Schoentgen
38ae2b63d2 Expand supported Python versions 2020-12-01 09:16:20 +01:00
Mickaël Schoentgen
cd8d9fb95e Fix ResourceWarning: unclosed file in setup.py
Also prevent potential identical warning in `plat_other.py`.
2020-12-01 08:45:46 +01:00
Magnus Møller Jørgensen
20bbab0b4c
Update plat_other.py
The trash info file needs to exist before the file is moved into the trash folder. 
This is to conform to the events based detection of trashed files in gnome and other file managers.
2020-07-23 03:57:15 +02:00
49bc438546
Update files to release a new package 2020-06-18 21:49:42 -05:00
2e9fa38f56
Fix some flake8 errors and cleanup
- Fix some flake8 formatting errors
- Auto-format files edited
- Also ignore some flake8 errors when they are intented
- Update .gitignore to ingore local env
2020-06-18 21:47:06 -05:00
1e099724c5
Fix a typo in tox.ini for windows 2020-06-11 23:23:54 -05:00
6ac20bc4f6
Fix new issues with unit tests
- Create custom test suite based on platform
- Use the custom suite for all tests
- Update tox.ini to install pywin32
2020-06-11 23:20:16 -05:00
e3d2be3243
Update windows tests to test both versions
This fixes #44 by testing the automatic import, the legacy version, and
the modern version directtly.
2020-06-11 22:42:00 -05:00
d078554052
Windows Performance Improvement & Multi-Item support (#43)
* Initial IFileOperation for Windows

- Try using IFileOperation instead of SHFileOperation
  - Use pywin32 to accomplish this
  - Implement fallback when pywin32 not available
- Handles paths like `C:\` just fine bu the `\\?\` paths in the test
  cause issue
- Add batching for IFileOperation version (performance)
- Minor formatting applied by editor

* Fix issue with paths starting with \\?\

- Strip these characters off if present just like old implementation

* Add windows version check, legacy list support

- Add check for windows version for IFileOperation
- Add list support to legacy version
- Remove some debugging code
- Fix bug in path converson

Not sure if there is a better way to layout this file

* Split plat_win into legacy and modern

* Update other platforms for list support

Formatter also ran on these so some other minor changes.

* Add unit tests for multi-file calls
2020-06-03 12:49:41 -04:00
Matthew D. Scholefield
9ede898c3e
Create __main__.py (Fixes #15) (#38)
This adds a main method that mimics the behavior of `rm`. It can be called via `python -m send2trash somefile`.
2020-05-27 07:52:00 -04:00
sharkykh
66afce7252 Fix silently failing on Windows (#33)
* Fix #31: Silently failing on Windows

* Update Windows test

* Fix test folders not getting removed
2019-04-30 12:28:09 -04:00
sharkykh
8f684a9c8b Add Python 3.7 and Windows to Travis-CI (#34)
* Add Python 3.7 and Windows to Travis-CI

* Reorder environments
2019-04-30 12:22:28 -04:00
Virgil Dupras
1c32d471f2 README: Maintainer wanted 2019-01-04 10:27:27 -05:00
Virgil Dupras
74352462f5 Fix broken tests on py2 2018-07-26 08:30:39 -04:00
Virgil Dupras
0d7b4b4ad9 v1.5.0 2018-02-16 09:57:27 -05:00
Thomas Kluyver
1dded4f572 Raise TrashPermissionError from gio backend (#22) 2018-02-16 09:30:26 -05:00
Mickaël Schoentgen
020d05979d Windows: Workaround for long paths (#23)
By using the short path version of a file, we can
manage to move long paths to the trash.

Limitations:
1/ If the final short path is longer than what
    `SHFileOperationW` can handle, it will fail
2/ Still not able to trash long path from another
    drive, ie: trying to delete C:\temp\foo.txt
    while the script is running from D:\trash.py
2018-02-16 09:07:05 -05:00
Thomas Kluyver
6b0bd46036 Define TrashPermissionError (#21) 2018-02-06 17:28:47 -05:00
Nicholas Bollweg
f6897609ba Include LICENSE in package (#19) 2018-01-06 08:19:31 -05:00
Virgil Dupras
7d38de269a v1.4.2 2017-11-17 13:50:29 -05:00
5733670fc2 Workaround embedded null character (#18)
Workaround embedded null characters in strings.  This fixes 17.
2017-11-01 08:28:22 -04:00
Virgil Dupras
22ed5dc09b v1.4.1 2017-08-07 23:12:36 -04:00
Virgil Dupras
3071684f73 Fix newly-introduced crash under Windows
ref #14
2017-08-07 22:51:37 -04:00
Virgil Dupras
75a9cd6b55 v1.4.0 2017-08-07 21:32:38 -04:00
Virgil Dupras
f38aec6569 Reindent test_plat_other 2017-08-03 21:03:34 -04:00
Virgil Dupras
072e28cb1e Update classification in setup.py 2017-08-03 20:52:34 -04:00
Virgil Dupras
016b90c1ac Update copyright 2017-08-03 20:52:19 -04:00
Virgil Dupras
f324ff491e Properly reuse the "compat" unit 2017-08-03 20:47:58 -04:00