Send2Trash 2.0.0__tar.gz → 2.2.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {send2trash-2.0.0 → send2trash-2.2.0}/CHANGES.rst +133 -119
- {send2trash-2.0.0 → send2trash-2.2.0}/LICENSE +10 -10
- send2trash-2.2.0/MANIFEST.in +1 -0
- {send2trash-2.0.0/Send2Trash.egg-info → send2trash-2.2.0}/PKG-INFO +104 -106
- {send2trash-2.0.0 → send2trash-2.2.0}/README.rst +70 -70
- {send2trash-2.0.0 → send2trash-2.2.0/Send2Trash.egg-info}/PKG-INFO +104 -106
- {send2trash-2.0.0 → send2trash-2.2.0}/Send2Trash.egg-info/SOURCES.txt +4 -2
- send2trash-2.2.0/Send2Trash.egg-info/requires.txt +11 -0
- send2trash-2.2.0/pyproject.toml +55 -0
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/__init__.py +24 -24
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/__main__.py +33 -36
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/exceptions.py +20 -20
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/mac/__init__.py +21 -20
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/mac/legacy.py +51 -52
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/mac/modern.py +25 -25
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/plat_gio.py +23 -23
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/plat_other.py +198 -196
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/util.py +17 -18
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/win/IFileOperationProgressSink.py +46 -46
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/win/__init__.py +19 -20
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/win/legacy.py +183 -181
- {send2trash-2.0.0 → send2trash-2.2.0}/send2trash/win/modern.py +64 -65
- send2trash-2.2.0/setup.cfg +4 -0
- send2trash-2.2.0/tests/conftest.py +26 -0
- send2trash-2.2.0/tests/test_plat_mac.py +45 -0
- {send2trash-2.0.0 → send2trash-2.2.0}/tests/test_plat_other.py +326 -210
- {send2trash-2.0.0 → send2trash-2.2.0}/tests/test_plat_win.py +214 -215
- {send2trash-2.0.0 → send2trash-2.2.0}/tests/test_script_main.py +15 -16
- send2trash-2.2.0/tests/test_win_legacy_diagnostics.py +24 -0
- send2trash-2.0.0/MANIFEST.in +0 -1
- send2trash-2.0.0/Send2Trash.egg-info/requires.txt +0 -18
- send2trash-2.0.0/pyproject.toml +0 -6
- send2trash-2.0.0/setup.cfg +0 -56
- {send2trash-2.0.0 → send2trash-2.2.0}/Send2Trash.egg-info/dependency_links.txt +0 -0
- {send2trash-2.0.0 → send2trash-2.2.0}/Send2Trash.egg-info/entry_points.txt +0 -0
- {send2trash-2.0.0 → send2trash-2.2.0}/Send2Trash.egg-info/top_level.txt +0 -0
|
@@ -1,119 +1,133 @@
|
|
|
1
|
-
Changes
|
|
2
|
-
=======
|
|
3
|
-
Version 2.
|
|
4
|
-
---------------------------
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
*
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
*
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
1
|
+
Changes
|
|
2
|
+
=======
|
|
3
|
+
Version 2.2.0 -- 2026/11/11
|
|
4
|
+
---------------------------
|
|
5
|
+
* Resolve path validation flaw (https://github.com/arsenetar/send2trash/security/advisories/GHSA-fgv9-r74r-hqmx) in 522bafe
|
|
6
|
+
* python2 removal: more clean up by @caspian-yez in https://github.com/arsenetar/send2trash/pull/107
|
|
7
|
+
* Handle unavailable macOS version during backend selection by @Neallin-917 in https://github.com/arsenetar/send2trash/pull/114
|
|
8
|
+
* Improve legacy Windows error diagnostics by @dajiaohuang in https://github.com/arsenetar/send2trash/pull/120
|
|
9
|
+
* Resolve symlink homes when choosing the trash device by @ac1982 in https://github.com/arsenetar/send2trash/pull/117
|
|
10
|
+
|
|
11
|
+
Version 2.1.0 -- 2026/01/14
|
|
12
|
+
---------------------------
|
|
13
|
+
* Add `conftest.py` to source distribution by @mgorny in https://github.com/arsenetar/send2trash/pull/106
|
|
14
|
+
* Replacing elif, which is always True, with else by @PalmtopTiger in https://github.com/arsenetar/send2trash/pull/104
|
|
15
|
+
* Migrate to pyproject.toml from setup.cfg
|
|
16
|
+
|
|
17
|
+
Version 2.0.0 -- 2025/12/30
|
|
18
|
+
---------------------------
|
|
19
|
+
* Drop suport for Python 2
|
|
20
|
+
* Fix `test_trash_topdir` failing on macOS by @denini08 in https://github.com/arsenetar/send2trash/pull/100
|
|
21
|
+
* Update source installation instructions by @gunSlaveUnit in https://github.com/arsenetar/send2trash/pull/102
|
|
22
|
+
* Update gio implemenation, should fix #5 by no longer using deprecated GObject.GError
|
|
23
|
+
|
|
24
|
+
Version 1.8.3 -- 2024/04/06
|
|
25
|
+
---------------------------
|
|
26
|
+
* Add support for any iterable type as input by @PalmtopTiger in https://github.com/arsenetar/send2trash/pull/88
|
|
27
|
+
* fix: Use os.fsdecode() for arguments to shutil.move() by @yogeshiitm in https://github.com/arsenetar/send2trash/pull/90
|
|
28
|
+
|
|
29
|
+
Version 1.8.2 -- 2023/04/27
|
|
30
|
+
---------------------------
|
|
31
|
+
* win/legacy: tiny logic simplification by @BoboTiG in https://github.com/arsenetar/send2trash/pull/77
|
|
32
|
+
* TravisCI is not used anymore by @sobolevn in https://github.com/arsenetar/send2trash/pull/73
|
|
33
|
+
* fix(ci): Update to latest actions, fix python versions by @arsenetar in https://github.com/arsenetar/send2trash/pull/78
|
|
34
|
+
|
|
35
|
+
Version 1.8.1b0 -- 2021/09/20
|
|
36
|
+
-----------------------------
|
|
37
|
+
* Add fallback to HOMETRASH when cross device errors happen in plat_other (#26, #41, #63)
|
|
38
|
+
|
|
39
|
+
Version 1.8.0 -- 2021/08/08
|
|
40
|
+
---------------------------
|
|
41
|
+
|
|
42
|
+
* Add compatibility with pathlib paths (#49)
|
|
43
|
+
* Fix thread compatibility of modern windows implementation (#59)
|
|
44
|
+
* Fix handling of UNC names in legacy windows implementation (#57)
|
|
45
|
+
|
|
46
|
+
Version 1.7.1 -- 2021/06/21
|
|
47
|
+
---------------------------
|
|
48
|
+
|
|
49
|
+
* Release stable version with changes from last 3 releases
|
|
50
|
+
* Fix handling of UNC names (#57)
|
|
51
|
+
|
|
52
|
+
Version 1.7.0a1 -- 2021/05/14
|
|
53
|
+
-----------------------------
|
|
54
|
+
|
|
55
|
+
* Changed conditional for when to try to use pyobjc version (#51)
|
|
56
|
+
|
|
57
|
+
Version 1.7.0a0 -- 2021/04/20
|
|
58
|
+
-----------------------------
|
|
59
|
+
|
|
60
|
+
* Add console_script entry point (#50)
|
|
61
|
+
* Increased python CI versions (#52, #54)
|
|
62
|
+
* Fix minor issue in setup.py (#53)
|
|
63
|
+
* Fix issue with windows tests importing modules on non-windows (#55)
|
|
64
|
+
* Unit test cleanups, rewrites, and flake8 cleanups
|
|
65
|
+
* Windows: Fix legacy windows platform for multi-byte unicode and add tests
|
|
66
|
+
* macOS: Add alternative pyobjc version to potentially improve compatibility (#51)
|
|
67
|
+
|
|
68
|
+
Version 1.6.0b1 -- 2020/06/18
|
|
69
|
+
-----------------------------
|
|
70
|
+
|
|
71
|
+
* Add main method which allows calling via ``python -m send2trash somefile``
|
|
72
|
+
* Windows: Add support for using IFileOperation when pywin32 is present on Vista and newer
|
|
73
|
+
* Add support for passing multiple files at once in a list
|
|
74
|
+
* Windows: Batch multi-file calls to improve performance (#42)
|
|
75
|
+
* Windows: Fix issue with SHFileOperation failing silently when path is not found (#33)
|
|
76
|
+
|
|
77
|
+
Version 1.5.0 -- 2018/02/16
|
|
78
|
+
---------------------------
|
|
79
|
+
|
|
80
|
+
* More specific error when failing to create XDG fallback trash directory (#20)
|
|
81
|
+
* Windows: Workaround for long paths (#23)
|
|
82
|
+
|
|
83
|
+
Version 1.4.2 -- 2017/11/17
|
|
84
|
+
---------------------------
|
|
85
|
+
|
|
86
|
+
* Fix incompatibility with Python 3.6 on Windows. (#18)
|
|
87
|
+
|
|
88
|
+
Version 1.4.1 -- 2017/08/07
|
|
89
|
+
---------------------------
|
|
90
|
+
|
|
91
|
+
* Fix crash on Windows introduced in v1.4.0. Oops... (#14)
|
|
92
|
+
|
|
93
|
+
Version 1.4.0 -- 2017/08/07
|
|
94
|
+
---------------------------
|
|
95
|
+
|
|
96
|
+
* Use ``bytes`` instead of ``str`` for internal path handling in ``plat_other``. (#13)
|
|
97
|
+
|
|
98
|
+
Version 1.3.1 -- 2017/07/31
|
|
99
|
+
---------------------------
|
|
100
|
+
|
|
101
|
+
* Throw ``WindowsError`` instead of ``OSError`` in ``plat_win``. (#7)
|
|
102
|
+
* Fix ``TypeError`` on python 2 in ``plat_other``. (#12)
|
|
103
|
+
|
|
104
|
+
Version 1.3.0 -- 2013/07/19
|
|
105
|
+
---------------------------
|
|
106
|
+
|
|
107
|
+
* Added support for Gnome's GIO.
|
|
108
|
+
* Merged Python 3 and Python 2 versions in a single codebase.
|
|
109
|
+
|
|
110
|
+
Version 1.2.0 -- 2011/03/16
|
|
111
|
+
---------------------------
|
|
112
|
+
|
|
113
|
+
* Improved ``plat_other`` to follow freedesktop.org trash specification.
|
|
114
|
+
|
|
115
|
+
Version 1.1.0 -- 2010/10/18
|
|
116
|
+
---------------------------
|
|
117
|
+
|
|
118
|
+
* Converted compiled modules to ctypes so that cross-platform compilation isn't necessary anymore.
|
|
119
|
+
|
|
120
|
+
Version 1.0.2 -- 2010/07/10
|
|
121
|
+
---------------------------
|
|
122
|
+
|
|
123
|
+
* Fixed bugs with external volumes in plat_other.
|
|
124
|
+
|
|
125
|
+
Version 1.0.1 -- 2010/04/19
|
|
126
|
+
---------------------------
|
|
127
|
+
|
|
128
|
+
* Fixed memory leak in OS X module.
|
|
129
|
+
|
|
130
|
+
Version 1.0.0 -- 2010/04/07
|
|
131
|
+
---------------------------
|
|
132
|
+
|
|
133
|
+
* Initial Release
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Copyright (c) 2017, Virgil Dupras
|
|
2
|
-
All rights reserved.
|
|
3
|
-
|
|
4
|
-
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
-
|
|
6
|
-
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
-
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
-
* Neither the name of Hardcoded Software Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
9
|
-
|
|
10
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
1
|
+
Copyright (c) 2017, Virgil Dupras
|
|
2
|
+
All rights reserved.
|
|
3
|
+
|
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
|
5
|
+
|
|
6
|
+
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
|
7
|
+
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
|
8
|
+
* Neither the name of Hardcoded Software Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
9
|
+
|
|
10
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
include CHANGES.rst LICENSE tests/conftest.py
|
|
@@ -1,106 +1,104 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: Send2Trash
|
|
3
|
-
Version: 2.
|
|
4
|
-
Summary: Send file to trash natively under Mac OS X, Windows and Linux
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Project-URL:
|
|
10
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
-
Classifier: Intended Audience :: Developers
|
|
12
|
-
Classifier:
|
|
13
|
-
Classifier: Operating System ::
|
|
14
|
-
Classifier: Operating System ::
|
|
15
|
-
Classifier:
|
|
16
|
-
Classifier: Programming Language :: Python :: 3
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.
|
|
20
|
-
Classifier: Programming Language :: Python :: 3.
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.
|
|
24
|
-
Classifier: Topic :: Desktop Environment :: File Managers
|
|
25
|
-
Requires-Python:
|
|
26
|
-
Description-Content-Type: text/x-rst
|
|
27
|
-
License-File: LICENSE
|
|
28
|
-
Provides-Extra:
|
|
29
|
-
Requires-Dist:
|
|
30
|
-
Provides-Extra:
|
|
31
|
-
Requires-Dist:
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
==================================================
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
>>>
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
``
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
..
|
|
105
|
-
.. _GIO: https://developer.gnome.org/gio/
|
|
106
|
-
.. _trash specifications from freedesktop.org: http://freedesktop.org/wiki/Specifications/trash-spec/
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: Send2Trash
|
|
3
|
+
Version: 2.2.0
|
|
4
|
+
Summary: Send file to trash natively under Mac OS X, Windows and Linux
|
|
5
|
+
Author-email: Andrew Senetar <arsenetar@voltaicideas.net>
|
|
6
|
+
License-Expression: BSD-3-Clause
|
|
7
|
+
Project-URL: Homepage, https://github.com/arsenetar/send2trash
|
|
8
|
+
Project-URL: Repository, https://github.com/arsenetar/send2trash.git
|
|
9
|
+
Project-URL: Issues, https://github.com/arsenetar/send2trash/issues
|
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: Operating System :: MacOS :: MacOS X
|
|
13
|
+
Classifier: Operating System :: Microsoft :: Windows
|
|
14
|
+
Classifier: Operating System :: POSIX
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
23
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
24
|
+
Classifier: Topic :: Desktop Environment :: File Managers
|
|
25
|
+
Requires-Python: >=3.8
|
|
26
|
+
Description-Content-Type: text/x-rst
|
|
27
|
+
License-File: LICENSE
|
|
28
|
+
Provides-Extra: test
|
|
29
|
+
Requires-Dist: pytest>=8; extra == "test"
|
|
30
|
+
Provides-Extra: nativelib
|
|
31
|
+
Requires-Dist: pywin32>=305; sys_platform == "win32" and extra == "nativelib"
|
|
32
|
+
Requires-Dist: pyobjc>=9.0; sys_platform == "darwin" and extra == "nativelib"
|
|
33
|
+
Dynamic: license-file
|
|
34
|
+
|
|
35
|
+
==================================================
|
|
36
|
+
Send2Trash -- Send files to trash on all platforms
|
|
37
|
+
==================================================
|
|
38
|
+
|
|
39
|
+
Send2Trash is a small package that sends files to the Trash (or Recycle Bin) *natively* and on
|
|
40
|
+
*all platforms*. On OS X, it uses native ``FSMoveObjectToTrashSync`` Cocoa calls or can use pyobjc
|
|
41
|
+
with NSFileManager. On Windows, it uses native ``IFileOperation`` call if on Vista or newer and
|
|
42
|
+
pywin32 is installed or falls back to ``SHFileOperation`` calls. On other platforms, if `PyGObject`_
|
|
43
|
+
and `GIO`_ are available, it will use this. Otherwise, it will fallback to its own implementation of
|
|
44
|
+
the `trash specifications from freedesktop.org`_.
|
|
45
|
+
|
|
46
|
+
``ctypes`` is used to access native libraries, so no compilation is necessary.
|
|
47
|
+
|
|
48
|
+
Send2Trash supports Python 3 (versions before 2.x support Python 2).
|
|
49
|
+
|
|
50
|
+
Status: Additional Help Welcome
|
|
51
|
+
-------------------------------
|
|
52
|
+
|
|
53
|
+
Additional help is welcome for supporting this package. Specifically help with the OSX and Linux
|
|
54
|
+
issues and fixes would be most appreciated.
|
|
55
|
+
|
|
56
|
+
Installation
|
|
57
|
+
------------
|
|
58
|
+
|
|
59
|
+
You can download it with pip:
|
|
60
|
+
|
|
61
|
+
python -m pip install -U send2trash
|
|
62
|
+
|
|
63
|
+
To install with pywin32 or pyobjc required specify the extra `nativeLib`:
|
|
64
|
+
|
|
65
|
+
python -m pip install -U send2trash[nativeLib]
|
|
66
|
+
|
|
67
|
+
or download the source from https://github.com/arsenetar/send2trash and install it with:
|
|
68
|
+
|
|
69
|
+
python -m pip install -e .
|
|
70
|
+
|
|
71
|
+
On systems where Python enforces PEP 668 (e.g., recent Linux distributions),
|
|
72
|
+
installing packages into the system Python may be restricted.
|
|
73
|
+
Use a virtual environment:
|
|
74
|
+
|
|
75
|
+
python -m venv .venv
|
|
76
|
+
|
|
77
|
+
GNU/Linux / macOS:
|
|
78
|
+
|
|
79
|
+
source .venv/bin/activate
|
|
80
|
+
|
|
81
|
+
Windows:
|
|
82
|
+
|
|
83
|
+
.venv\Scripts\activate
|
|
84
|
+
|
|
85
|
+
Usage
|
|
86
|
+
-----
|
|
87
|
+
|
|
88
|
+
>>> from send2trash import send2trash
|
|
89
|
+
>>> send2trash('some_file')
|
|
90
|
+
>>> send2trash(['some_file1', 'some_file2'])
|
|
91
|
+
|
|
92
|
+
On Freedesktop platforms (Linux, BSD, etc.), you may not be able to efficiently
|
|
93
|
+
trash some files. In these cases, an exception ``send2trash.TrashPermissionError``
|
|
94
|
+
is raised, so that the application can handle this case. This inherits from
|
|
95
|
+
``PermissionError``. Specifically, this affects
|
|
96
|
+
files on a different device to the user's home directory, where the root of the
|
|
97
|
+
device does not have a ``.Trash`` directory, and we don't have permission to
|
|
98
|
+
create a ``.Trash-$UID`` directory.
|
|
99
|
+
|
|
100
|
+
For any other problem, ``OSError`` is raised.
|
|
101
|
+
|
|
102
|
+
.. _PyGObject: https://wiki.gnome.org/PyGObject
|
|
103
|
+
.. _GIO: https://developer.gnome.org/gio/
|
|
104
|
+
.. _trash specifications from freedesktop.org: http://freedesktop.org/wiki/Specifications/trash-spec/
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
==================================================
|
|
2
|
-
Send2Trash -- Send files to trash on all platforms
|
|
3
|
-
==================================================
|
|
4
|
-
|
|
5
|
-
Send2Trash is a small package that sends files to the Trash (or Recycle Bin) *natively* and on
|
|
6
|
-
*all platforms*. On OS X, it uses native ``FSMoveObjectToTrashSync`` Cocoa calls or can use pyobjc
|
|
7
|
-
with NSFileManager. On Windows, it uses native ``IFileOperation`` call if on Vista or newer and
|
|
8
|
-
pywin32 is installed or falls back to ``SHFileOperation`` calls. On other platforms, if `PyGObject`_
|
|
9
|
-
and `GIO`_ are available, it will use this. Otherwise, it will fallback to its own implementation of
|
|
10
|
-
the `trash specifications from freedesktop.org`_.
|
|
11
|
-
|
|
12
|
-
``ctypes`` is used to access native libraries, so no compilation is necessary.
|
|
13
|
-
|
|
14
|
-
Send2Trash supports Python 3 (versions before 2.x support Python 2).
|
|
15
|
-
|
|
16
|
-
Status: Additional Help Welcome
|
|
17
|
-
-------------------------------
|
|
18
|
-
|
|
19
|
-
Additional help is welcome for supporting this package. Specifically help with the OSX and Linux
|
|
20
|
-
issues and fixes would be most appreciated.
|
|
21
|
-
|
|
22
|
-
Installation
|
|
23
|
-
------------
|
|
24
|
-
|
|
25
|
-
You can download it with pip:
|
|
26
|
-
|
|
27
|
-
python -m pip install -U send2trash
|
|
28
|
-
|
|
29
|
-
To install with pywin32 or pyobjc required specify the extra `nativeLib`:
|
|
30
|
-
|
|
31
|
-
python -m pip install -U send2trash[nativeLib]
|
|
32
|
-
|
|
33
|
-
or download the source from https://github.com/arsenetar/send2trash and install it with:
|
|
34
|
-
|
|
35
|
-
python -m pip install -e .
|
|
36
|
-
|
|
37
|
-
On systems where Python enforces PEP 668 (e.g., recent Linux distributions),
|
|
38
|
-
installing packages into the system Python may be restricted.
|
|
39
|
-
Use a virtual environment:
|
|
40
|
-
|
|
41
|
-
python -m venv .venv
|
|
42
|
-
|
|
43
|
-
GNU/Linux / macOS:
|
|
44
|
-
|
|
45
|
-
source .venv/bin/activate
|
|
46
|
-
|
|
47
|
-
Windows:
|
|
48
|
-
|
|
49
|
-
.venv\Scripts\activate
|
|
50
|
-
|
|
51
|
-
Usage
|
|
52
|
-
-----
|
|
53
|
-
|
|
54
|
-
>>> from send2trash import send2trash
|
|
55
|
-
>>> send2trash('some_file')
|
|
56
|
-
>>> send2trash(['some_file1', 'some_file2'])
|
|
57
|
-
|
|
58
|
-
On Freedesktop platforms (Linux, BSD, etc.), you may not be able to efficiently
|
|
59
|
-
trash some files. In these cases, an exception ``send2trash.TrashPermissionError``
|
|
60
|
-
is raised, so that the application can handle this case. This inherits from
|
|
61
|
-
``PermissionError``. Specifically, this affects
|
|
62
|
-
files on a different device to the user's home directory, where the root of the
|
|
63
|
-
device does not have a ``.Trash`` directory, and we don't have permission to
|
|
64
|
-
create a ``.Trash-$UID`` directory.
|
|
65
|
-
|
|
66
|
-
For any other problem, ``OSError`` is raised.
|
|
67
|
-
|
|
68
|
-
.. _PyGObject: https://wiki.gnome.org/PyGObject
|
|
69
|
-
.. _GIO: https://developer.gnome.org/gio/
|
|
70
|
-
.. _trash specifications from freedesktop.org: http://freedesktop.org/wiki/Specifications/trash-spec/
|
|
1
|
+
==================================================
|
|
2
|
+
Send2Trash -- Send files to trash on all platforms
|
|
3
|
+
==================================================
|
|
4
|
+
|
|
5
|
+
Send2Trash is a small package that sends files to the Trash (or Recycle Bin) *natively* and on
|
|
6
|
+
*all platforms*. On OS X, it uses native ``FSMoveObjectToTrashSync`` Cocoa calls or can use pyobjc
|
|
7
|
+
with NSFileManager. On Windows, it uses native ``IFileOperation`` call if on Vista or newer and
|
|
8
|
+
pywin32 is installed or falls back to ``SHFileOperation`` calls. On other platforms, if `PyGObject`_
|
|
9
|
+
and `GIO`_ are available, it will use this. Otherwise, it will fallback to its own implementation of
|
|
10
|
+
the `trash specifications from freedesktop.org`_.
|
|
11
|
+
|
|
12
|
+
``ctypes`` is used to access native libraries, so no compilation is necessary.
|
|
13
|
+
|
|
14
|
+
Send2Trash supports Python 3 (versions before 2.x support Python 2).
|
|
15
|
+
|
|
16
|
+
Status: Additional Help Welcome
|
|
17
|
+
-------------------------------
|
|
18
|
+
|
|
19
|
+
Additional help is welcome for supporting this package. Specifically help with the OSX and Linux
|
|
20
|
+
issues and fixes would be most appreciated.
|
|
21
|
+
|
|
22
|
+
Installation
|
|
23
|
+
------------
|
|
24
|
+
|
|
25
|
+
You can download it with pip:
|
|
26
|
+
|
|
27
|
+
python -m pip install -U send2trash
|
|
28
|
+
|
|
29
|
+
To install with pywin32 or pyobjc required specify the extra `nativeLib`:
|
|
30
|
+
|
|
31
|
+
python -m pip install -U send2trash[nativeLib]
|
|
32
|
+
|
|
33
|
+
or download the source from https://github.com/arsenetar/send2trash and install it with:
|
|
34
|
+
|
|
35
|
+
python -m pip install -e .
|
|
36
|
+
|
|
37
|
+
On systems where Python enforces PEP 668 (e.g., recent Linux distributions),
|
|
38
|
+
installing packages into the system Python may be restricted.
|
|
39
|
+
Use a virtual environment:
|
|
40
|
+
|
|
41
|
+
python -m venv .venv
|
|
42
|
+
|
|
43
|
+
GNU/Linux / macOS:
|
|
44
|
+
|
|
45
|
+
source .venv/bin/activate
|
|
46
|
+
|
|
47
|
+
Windows:
|
|
48
|
+
|
|
49
|
+
.venv\Scripts\activate
|
|
50
|
+
|
|
51
|
+
Usage
|
|
52
|
+
-----
|
|
53
|
+
|
|
54
|
+
>>> from send2trash import send2trash
|
|
55
|
+
>>> send2trash('some_file')
|
|
56
|
+
>>> send2trash(['some_file1', 'some_file2'])
|
|
57
|
+
|
|
58
|
+
On Freedesktop platforms (Linux, BSD, etc.), you may not be able to efficiently
|
|
59
|
+
trash some files. In these cases, an exception ``send2trash.TrashPermissionError``
|
|
60
|
+
is raised, so that the application can handle this case. This inherits from
|
|
61
|
+
``PermissionError``. Specifically, this affects
|
|
62
|
+
files on a different device to the user's home directory, where the root of the
|
|
63
|
+
device does not have a ``.Trash`` directory, and we don't have permission to
|
|
64
|
+
create a ``.Trash-$UID`` directory.
|
|
65
|
+
|
|
66
|
+
For any other problem, ``OSError`` is raised.
|
|
67
|
+
|
|
68
|
+
.. _PyGObject: https://wiki.gnome.org/PyGObject
|
|
69
|
+
.. _GIO: https://developer.gnome.org/gio/
|
|
70
|
+
.. _trash specifications from freedesktop.org: http://freedesktop.org/wiki/Specifications/trash-spec/
|