1
0
mirror of https://github.com/arsenetar/send2trash.git synced 2024-12-21 10:59:03 +00:00
Commit Graph

91 Commits

Author SHA1 Message Date
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
Virgil Dupras
f3231ef857 Merge branch 'unicode-trash' of https://github.com/takluyver/send2trash into takluyver-unicode-trash 2017-08-03 20:37:13 -04:00
Virgil Dupras
b7e3057853 Fix tests, add tox.ini and travis.yml 2017-08-03 20:34:10 -04:00
Thomas Kluyver
7fece243d8 Use bytes throughout plat_other 2017-08-01 12:26:09 +01:00
Thomas Kluyver
4181ed65e9 Add failing test (on Python 2) for unicode file names 2017-08-01 11:28:40 +01:00
Thomas Kluyver
dd69edad3b Fix test on Python 3 2017-08-01 11:07:04 +01:00
Virgil Dupras
bd9183afe9 v1.3.1 2017-07-31 14:21:18 -04:00
Kfir Hadas
f6f63b1796 Use text_type (unicode for PY2, str for PY3) (#12) 2017-07-07 16:09:16 -04:00
Virgil Dupras
0974912e78 Merge pull request #7 from julian-r/master
throwing a WindowsError with the code
2016-06-04 19:22:46 -04:00
Julian David Rath
6c01453fd3 throwing a WindowsError with the code 2016-04-12 08:53:04 +02:00
Virgil Dupras
7cbefa4317 Merge pull request #6 from glensc/patch-1
Update plat_other.py
2016-04-10 19:04:38 -04:00
Elan Ruusamäe
72bc94b48d Update plat_other.py
minor typo fix
2016-04-10 11:09:46 +03:00
Virgil Dupras
35ad95bcd5 Fixed typo in changelog 2013-07-19 19:33:09 -04:00
Virgil Dupras
a568370c6a v1.3.0 2013-07-19 19:26:34 -04:00
Virgil Dupras
baf125ff61 Added support for Gnome's gio
Instead of using our own Freedesktop's trash implementation,
use gio when it's available.
2013-07-19 19:16:11 -04:00
Virgil Dupras
bb8ed834da Add same-codebase support for python 2.7.
When I opted for two codebases for python2/python3,
Send2Trash used C modules and it was easier to just have two
packages. With the ctypes version, supporting both python
versions becomes trivial and it's much more convenient to
merge them back into a single codebase.

I've only tested this code on Linux. I've converted plat_osx and
plat_win, but they only work theoretically.
2013-07-19 18:42:32 -04:00
Virgil Dupras
a8dbb1ac63 Renamed CHANGES --> CHANGES.rst
And fixed setup.py which was broken since README rename.
2013-07-19 18:23:00 -04:00
Virgil Dupras
bfd8f6e024 Updated repo URL to point to GH. 2013-07-19 18:18:16 -04:00
Virgil Dupras
8996fb9eac Renamed README --> README.rst 2013-07-19 18:14:27 -04:00
Virgil Dupras
f7a6f217ce Converted to git. 2013-07-19 18:12:18 -04:00
Virgil Dupras
a4936be846 Added tag 1.2.0 for changeset 2cba92b88b1d 2011-03-16 10:27:52 +01:00
Virgil Dupras
0f95d7506e v1.2.0 2011-03-16 10:27:41 +01:00
gbn
b415ac86e3 Modification to symlink test case (that will actually fail when it should -- find_mount_point using abspath instead of realpath.) 2011-03-13 15:35:14 -04:00
gbn
eeaf4e8ffa Add a test case for a path containing a symlink. 2011-03-13 15:17:13 -04:00
gbn
798893215c Make the (still ugly) test no longer rely on ramfs/being root 2011-03-13 14:43:24 -04:00
gbn
aee2b7a8af Check access and devices before attempting trash. 2011-03-13 14:40:52 -04:00