Skip to content

Commit 2112930

Browse files
authored
Feat/update vendored packages 2025 part1 no code updates (#1944)
* chore: update vendor readme entry for yaml per previous py2 removal Signed-off-by: Stephen Mackenzie <[email protected]> * feat: update vendored module six: 1.12.0->1.17.0 Signed-off-by: Stephen Mackenzie <[email protected]> * feat: update vendored module yaml: 5.1->6.0.1 Signed-off-by: Stephen Mackenzie <[email protected]> * feat: update vendored module progress: 1.5->1.6 Signed-off-by: Stephen Mackenzie <[email protected]> * feat: update vendored module distro: 1.5.0->1.9.0 Signed-off-by: Stephen Mackenzie <[email protected]> * feat: update vendored module colorama: 0.4.1->0.4.6 Signed-off-by: Stephen Mackenzie <[email protected]> * feat: update vendored module atomicwrites: 1.2.1->1.4.1 Signed-off-by: Stephen Mackenzie <[email protected]> * feat: remove vendored module attr: unused Signed-off-by: Stephen Mackenzie <[email protected]> * feat: update vendored module distlib: 0.2.9.post0->0.3.9 Signed-off-by: Stephen Mackenzie <[email protected]> --------- Signed-off-by: Stephen Mackenzie <[email protected]>
1 parent 02f0132 commit 2112930

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

75 files changed

+2422
-9176
lines changed

src/rez/vendor/README.md

Lines changed: 23 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -39,57 +39,51 @@ Our version is patched.
3939
<tr><td>
4040
atomicwrites
4141
</td><td>
42-
1.2.1 (Aug 30, 2018)
42+
1.4.1 (Jul 8, 2022)
4343
</td><td>
4444
MIT
4545
</td><td>
46-
https://github.com/untitaker/python-atomicwrites
47-
</td></tr>
48-
49-
<!-- ######################################################### -->
50-
<tr><td>
51-
attrs
52-
</td><td>
53-
19.1.0 (Mar 3, 2019)
54-
</td><td>
55-
MIT
56-
</td><td>
57-
https://github.com/python-attrs/attrs<br>
58-
Added (July 2019) to enable the use of packaging lib that depends on it.
46+
https://github.com/untitaker/python-atomicwrites<br>
47+
No changes.<br>
48+
Updated (April 2025) to help address py3.12 update.
5949
</td></tr>
6050

6151
<!-- ######################################################### -->
6252
<tr><td>
6353
colorama
6454
</td><td>
65-
0.4.1 (Nov 25, 2018)
55+
0.4.6 (Oct 24, 2022)
6656
</td><td>
6757
BSD 3-Clause
6858
</td><td>
6959
https://github.com/tartley/colorama<br>
60+
No changes.<br>
61+
Updated (April 2025) to help address py3.12 update.
7062
</td></tr>
7163

7264
<!-- ######################################################### -->
7365
<tr><td>
7466
distlib
7567
</td><td>
76-
0.2.9.post0 (May 14, 2019)
68+
0.3.9 (Oct 29, 2024)
7769
</td><td>
7870
PYTHON SOFTWARE FOUNDATION LICENSE VERSION 2
7971
</td><td>
8072
https://bitbucket.org/pypa/distlib/src/master/<br>
81-
Updated (June 2019) to enable wheel distribution based installations.
73+
Updated (April 2025) to help address py3.12 update.
8274
</td></tr>
8375

8476
<!-- ######################################################### -->
8577
<tr><td>
8678
distro
8779
</td><td>
88-
1.5.0 (Mar 31, 2020)
80+
1.9.0 (Dec 24, 2023)
8981
</td><td>
9082
Apache 2.0
9183
</td><td>
92-
https://github.com/python-distro/distro
84+
https://github.com/python-distro/distro<br>
85+
No changes.<br>
86+
Updated (April 2025) to help address py3.12 update.
9387
</td></tr>
9488

9589
<!-- ######################################################### -->
@@ -161,12 +155,13 @@ https://github.com/pika/pika
161155
<tr><td>
162156
progress
163157
</td><td>
164-
1.5 (Mar 6, 2019)
158+
1.6 (July 28, 2021)
165159
</td><td>
166160
ISC
167161
</td><td>
168162
https://github.com/verigak/progress<br>
169-
Upgraded from 1.2 to 1.5 as of Oct 16 2019
163+
No changes.<br>
164+
Updated (April 2025) to help address py3.12 update.
170165
</td></tr>
171166

172167
<!-- ######################################################### -->
@@ -227,37 +222,26 @@ Our version is patched.
227222
<tr><td>
228223
six
229224
</td><td>
230-
1.12.0 (Dec 9, 2018)
225+
1.17.0 (Dec 4, 2024)
231226
</td><td>
232227
MIT
233228
</td><td>
234229
https://github.com/benjaminp/six<br>
235-
Updated (July 2019) to coincide with packaging lib addition that depends on.
236-
Also now required to support py2/3 interoperability.
237-
</td></tr>
238-
239-
<!-- ######################################################### -->
240-
<tr><td>
241-
yaml lib (PyYAML)
242-
</td><td>
243-
5.1 (May 30, 2011)
244-
</td><td>
245-
MIT
246-
</td><td>
247-
https://github.com/yaml/pyyaml<br>
248-
No changes but must maintain separate version between py2 and py3 for time being.
230+
Updated (April 2025) to help address py3.12 update.<br>
231+
No longer needed in rez itself, but still used by other vendored modules.
249232
</td></tr>
250233

251234
<!-- ######################################################### -->
252235
<tr><td>
253-
yaml lib3 (PyYAML)
236+
yaml (PyYAML)
254237
</td><td>
255-
5.1 (May 30, 2011)
238+
6.0.1 (July 17, 2023)
256239
</td><td>
257240
MIT
258241
</td><td>
259242
https://github.com/yaml/pyyaml<br>
260-
No changes but must maintain separate version between py2 and py3 for time being.
243+
No changes. Bounded to 6.0.1 by current py3.7.<br>
244+
Updated (April 2025) to help address py3.12 update.
261245
</td></tr>
262246

263247
</table>

src/rez/vendor/atomicwrites/__init__.py

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@
99
except ImportError:
1010
fcntl = None
1111

12-
__version__ = '1.2.1'
12+
# `fspath` was added in Python 3.6
13+
try:
14+
from os import fspath
15+
except ImportError:
16+
fspath = None
17+
18+
__version__ = '1.4.1'
1319

1420

1521
PY2 = sys.version_info[0] == 2
@@ -86,6 +92,7 @@ def replace_atomic(src, dst):
8692
'''
8793
Move ``src`` to ``dst``. If ``dst`` exists, it will be silently
8894
overwritten.
95+
8996
Both paths must reside on the same filesystem for the operation to be
9097
atomic.
9198
'''
@@ -97,6 +104,7 @@ def move_atomic(src, dst):
97104
Move ``src`` to ``dst``. There might a timewindow where both filesystem
98105
entries exist. If ``dst`` already exists, :py:exc:`FileExistsError` will be
99106
raised.
107+
100108
Both paths must reside on the same filesystem for the operation to be
101109
atomic.
102110
'''
@@ -106,14 +114,20 @@ def move_atomic(src, dst):
106114
class AtomicWriter(object):
107115
'''
108116
A helper class for performing atomic writes. Usage::
117+
109118
with AtomicWriter(path).open() as f:
110119
f.write(...)
120+
111121
:param path: The destination filepath. May or may not exist.
112122
:param mode: The filemode for the temporary file. This defaults to `wb` in
113123
Python 2 and `w` in Python 3.
114124
:param overwrite: If set to false, an error is raised if ``path`` exists.
115125
Errors are only raised after the file has been written to. Either way,
116126
the operation is atomic.
127+
:param open_kwargs: Keyword-arguments to pass to the underlying
128+
:py:func:`open` call. This can be used to set the encoding when opening
129+
files in text-mode.
130+
117131
If you need further control over the exact behavior, you are encouraged to
118132
subclass.
119133
'''
@@ -132,6 +146,10 @@ def __init__(self, path, mode=DEFAULT_MODE, overwrite=False,
132146
if 'w' not in mode:
133147
raise ValueError('AtomicWriters can only be written to.')
134148

149+
# Attempt to convert `path` to `str` or `bytes`
150+
if fspath is not None:
151+
path = fspath(path)
152+
135153
self._path = path
136154
self._mode = mode
137155
self._overwrite = overwrite
@@ -160,11 +178,13 @@ def _open(self, get_fileobject):
160178
except Exception:
161179
pass
162180

163-
def get_fileobject(self, dir=None, **kwargs):
181+
def get_fileobject(self, suffix="", prefix=tempfile.gettempprefix(),
182+
dir=None, **kwargs):
164183
'''Return the temporary file to use.'''
165184
if dir is None:
166185
dir = os.path.normpath(os.path.dirname(self._path))
167-
descriptor, name = tempfile.mkstemp(dir=dir)
186+
descriptor, name = tempfile.mkstemp(suffix=suffix, prefix=prefix,
187+
dir=dir)
168188
# io.open() will take either the descriptor or the name, but we need
169189
# the name later for commit()/replace_atomic() and couldn't find a way
170190
# to get the filename from the descriptor.
@@ -194,12 +214,15 @@ def rollback(self, f):
194214
def atomic_write(path, writer_cls=AtomicWriter, **cls_kwargs):
195215
'''
196216
Simple atomic writes. This wraps :py:class:`AtomicWriter`::
217+
197218
with atomic_write(path) as f:
198219
f.write(...)
220+
199221
:param path: The target path to write to.
200222
:param writer_cls: The writer class to use. This parameter is useful if you
201223
subclassed :py:class:`AtomicWriter` to change some behavior and want to
202224
use that new subclass.
225+
203226
Additional keyword arguments are passed to the writer class. See
204227
:py:class:`AtomicWriter`.
205228
'''

src/rez/vendor/attr/LICENSE

Lines changed: 0 additions & 22 deletions
This file was deleted.

src/rez/vendor/attr/__init__.py

Lines changed: 0 additions & 65 deletions
This file was deleted.

0 commit comments

Comments
 (0)