Skip to content

Commit b119be2

Browse files
authored
Merge branch 'RustPython:main' into main
2 parents 1b2a7f2 + e6bcd64 commit b119be2

File tree

21 files changed

+1092
-264
lines changed

21 files changed

+1092
-264
lines changed

Cargo.lock

Lines changed: 89 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,12 +156,19 @@ rustpython-sre_engine = { path = "crates/sre_engine", version = "0.5.0" }
156156
rustpython-wtf8 = { path = "crates/wtf8", version = "0.5.0" }
157157
rustpython-doc = { path = "crates/doc", version = "0.5.0" }
158158

159-
# Ruff tag 0.15.6 is based on commit e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675
159+
# Use RustPython-packaged Ruff crates from the published fork while keeping
160+
# existing crate names in the codebase.
161+
ruff_python_parser = { package = "rustpython-ruff_python_parser", version = "0.15.8" }
162+
ruff_python_ast = { package = "rustpython-ruff_python_ast", version = "0.15.8" }
163+
ruff_text_size = { package = "rustpython-ruff_text_size", version = "0.15.8" }
164+
ruff_source_file = { package = "rustpython-ruff_source_file", version = "0.15.8" }
165+
# To update ruff crates, comment out the above lines and uncomment the following lines to pull directly from the Ruff repository at the specified commit hash.
166+
# Ruff tag 0.15.8 is based on commit c2a8815842f9dc5d24ec19385eae0f1a7188b0d9
160167
# at the time of this capture. We use the commit hash to ensure reproducible builds.
161-
ruff_python_parser = { git = "https://github.com/astral-sh/ruff.git", rev = "e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675" }
162-
ruff_python_ast = { git = "https://github.com/astral-sh/ruff.git", rev = "e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675" }
163-
ruff_text_size = { git = "https://github.com/astral-sh/ruff.git", rev = "e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675" }
164-
ruff_source_file = { git = "https://github.com/astral-sh/ruff.git", rev = "e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675" }
168+
# ruff_python_parser = { git = "https://github.com/astral-sh/ruff.git", rev = "c2a8815842f9dc5d24ec19385eae0f1a7188b0d9" }
169+
# ruff_python_ast = { git = "https://github.com/astral-sh/ruff.git", rev = "c2a8815842f9dc5d24ec19385eae0f1a7188b0d9" }
170+
# ruff_text_size = { git = "https://github.com/astral-sh/ruff.git", rev = "c2a8815842f9dc5d24ec19385eae0f1a7188b0d9" }
171+
# ruff_source_file = { git = "https://github.com/astral-sh/ruff.git", rev = "c2a8815842f9dc5d24ec19385eae0f1a7188b0d9" }
165172

166173
phf = { version = "0.13.1", default-features = false, features = ["macros"]}
167174
ahash = "0.8.12"

Lib/test/test_contextlib.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ def woohoo():
9999
raise ZeroDivisionError()
100100
self.assertEqual(state, [1, 42, 999])
101101

102-
# TODO: RUSTPYTHON
103-
@unittest.expectedFailure
104102
def test_contextmanager_traceback(self):
105103
@contextmanager
106104
def f():

Lib/test/test_contextlib_async.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,7 +252,6 @@ async def woohoo():
252252
raise ZeroDivisionError(999)
253253
self.assertEqual(state, [1, 42, 999])
254254

255-
@unittest.expectedFailure # TODO: RUSTPYTHON
256255
async def test_contextmanager_except_stopiter(self):
257256
@asynccontextmanager
258257
async def woohoo():

Lib/test/test_descr.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4987,7 +4987,6 @@ class Inside:
49874987
self.assertEqual(Y.__qualname__, 'Y')
49884988
self.assertEqual(Y.Inside.__qualname__, 'Y.Inside')
49894989

4990-
@unittest.expectedFailure # TODO: RUSTPYTHON
49914990
def test_qualname_dict(self):
49924991
ns = {'__qualname__': 'some.name'}
49934992
tp = type('Foo', (), ns)

Lib/test/test_exceptions.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2519,7 +2519,6 @@ def test_attributes_old_constructor(self):
25192519
self.assertEqual(error, the_exception.text)
25202520
self.assertEqual("bad bad", the_exception.msg)
25212521

2522-
@unittest.expectedFailure # TODO: RUSTPYTHON
25232522
def test_incorrect_constructor(self):
25242523
args = ("bad.py", 1, 2)
25252524
self.assertRaises(TypeError, SyntaxError, "bad bad", args)

Lib/test/test_gettext.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -385,7 +385,6 @@ def _test_plural_forms(self, ngettext, gettext,
385385
x = ngettext(singular, plural, None)
386386
self.assertEqual(x, tplural)
387387

388-
@unittest.expectedFailure # TODO: RUSTPYTHON
389388
def test_plural_forms(self):
390389
self._test_plural_forms(
391390
self.ngettext, self.gettext,
@@ -396,7 +395,6 @@ def test_plural_forms(self):
396395
'%d file deleted', '%d files deleted',
397396
'%d file deleted', '%d files deleted')
398397

399-
@unittest.expectedFailure # TODO: RUSTPYTHON
400398
def test_plural_context_forms(self):
401399
ngettext = partial(self.npgettext, 'With context')
402400
gettext = partial(self.pgettext, 'With context')
@@ -409,7 +407,6 @@ def test_plural_context_forms(self):
409407
'%d file deleted', '%d files deleted',
410408
'%d file deleted', '%d files deleted')
411409

412-
@unittest.expectedFailure # TODO: RUSTPYTHON
413410
def test_plural_wrong_context_forms(self):
414411
self._test_plural_forms(
415412
partial(self.npgettext, 'Unknown context'),
@@ -442,7 +439,6 @@ def setUp(self):
442439
self.pgettext = partial(gettext.dpgettext, 'gettext')
443440
self.npgettext = partial(gettext.dnpgettext, 'gettext')
444441

445-
@unittest.expectedFailure # TODO: RUSTPYTHON
446442
def test_plural_forms_wrong_domain(self):
447443
self._test_plural_forms(
448444
partial(gettext.dngettext, 'unknown'),
@@ -451,7 +447,6 @@ def test_plural_forms_wrong_domain(self):
451447
'There is %s file', 'There are %s files',
452448
numbers_only=False)
453449

454-
@unittest.expectedFailure # TODO: RUSTPYTHON
455450
def test_plural_context_forms_wrong_domain(self):
456451
self._test_plural_forms(
457452
partial(gettext.dnpgettext, 'unknown', 'With context'),
@@ -472,7 +467,6 @@ def setUp(self):
472467
self.pgettext = t.pgettext
473468
self.npgettext = t.npgettext
474469

475-
@unittest.expectedFailure # TODO: RUSTPYTHON
476470
def test_plural_forms_null_translations(self):
477471
t = gettext.NullTranslations()
478472
self._test_plural_forms(
@@ -481,7 +475,6 @@ def test_plural_forms_null_translations(self):
481475
'There is %s file', 'There are %s files',
482476
numbers_only=False)
483477

484-
@unittest.expectedFailure # TODO: RUSTPYTHON
485478
def test_plural_context_forms_null_translations(self):
486479
t = gettext.NullTranslations()
487480
self._test_plural_forms(

Lib/test/test_inspect/test_inspect.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,6 @@ def test_range_traceback_toplevel_frame(self):
961961
class TestDecorators(GetSourceBase):
962962
fodderModule = mod2
963963

964-
@unittest.expectedFailure # TODO: RUSTPYTHON; pass
965964
def test_wrapped_decorator(self):
966965
self.assertSourceEqual(mod2.wrapped, 14, 17)
967966

@@ -1259,7 +1258,6 @@ def test_class(self):
12591258
class TestComplexDecorator(GetSourceBase):
12601259
fodderModule = mod2
12611260

1262-
@unittest.expectedFailure # TODO: RUSTPYTHON; return foo + bar()
12631261
def test_parens_in_decorator(self):
12641262
self.assertSourceEqual(self.fodderModule.complex_decorated, 273, 275)
12651263

0 commit comments

Comments
 (0)