Skip to content

Commit 4d6ac3f

Browse files
authored
Merge branch 'RustPython:main' into fix-systemexit-code
2 parents 58652ba + a9c2c52 commit 4d6ac3f

19 files changed

Lines changed: 277 additions & 94 deletions

File tree

‎.gitignore‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ __pycache__/
88
.repl_history.txt
99
.vscode/
1010
wasm-pack.log
11-
.idea/
11+
.idea/*
12+
!.idea/icon.svg
13+
!.idea/vcs.xml
1214
.envrc
1315

1416
flame-graph.html

‎.idea/icon.svg‎

Lines changed: 3 additions & 0 deletions
Loading

‎.idea/vcs.xml‎

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

‎Lib/test/test_csv.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -857,7 +857,6 @@ class TestEscapedExcel(TestCsvBase):
857857
def test_escape_fieldsep(self):
858858
self.writerAssertEqual([['abc,def']], 'abc\\,def\r\n')
859859

860-
@unittest.expectedFailure # TODO: RUSTPYTHON
861860
def test_read_escape_fieldsep(self):
862861
self.readerAssertEqual('abc\\,def\r\n', [['abc,def']])
863862

@@ -881,7 +880,6 @@ class TestQuotedEscapedExcel(TestCsvBase):
881880
def test_write_escape_fieldsep(self):
882881
self.writerAssertEqual([['abc,def']], '"abc,def"\r\n')
883882

884-
@unittest.expectedFailure # TODO: RUSTPYTHON
885883
def test_read_escape_fieldsep(self):
886884
self.readerAssertEqual('"abc\\,def"\r\n', [['abc,def']])
887885

‎Lib/test/test_itertools.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,6 @@ def test_count(self):
538538
#check proper internal error handling for large "step' sizes
539539
count(1, maxsize+5); sys.exc_info()
540540

541-
@unittest.expectedFailure # TODO: RUSTPYTHON; 'count(10.5)' != 'count(10.5, 1.0)'
542541
def test_count_with_step(self):
543542
self.assertEqual(lzip('abc',count(2,3)), [('a', 2), ('b', 5), ('c', 8)])
544543
self.assertEqual(lzip('abc',count(start=2,step=3)),

‎Lib/test/test_minidom.py‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,6 @@ def testProcessingInstruction(self):
659659
self.assertIsNone(pi.localName)
660660
self.assertEqual(pi.namespaceURI, xml.dom.EMPTY_NAMESPACE)
661661

662-
@unittest.expectedFailure # TODO: RUSTPYTHON
663662
def testProcessingInstructionRepr(self):
664663
dom = parseString('<e><?mypi \t\n data \t\n ?></e>')
665664
pi = dom.documentElement.firstChild
@@ -957,11 +956,9 @@ def check_clone_pi(self, deep, testName):
957956
self.confirm(clone.target == pi.target
958957
and clone.data == pi.data)
959958

960-
@unittest.expectedFailure # TODO: RUSTPYTHON
961959
def testClonePIShallow(self):
962960
self.check_clone_pi(0, "testClonePIShallow")
963961

964-
@unittest.expectedFailure # TODO: RUSTPYTHON
965962
def testClonePIDeep(self):
966963
self.check_clone_pi(1, "testClonePIDeep")
967964

@@ -1219,7 +1216,6 @@ def testBug1433694(self):
12191216
self.assertIsNone(node.childNodes[-1].nextSibling,
12201217
"Final child's .nextSibling should be None")
12211218

1222-
@unittest.expectedFailure # TODO: RUSTPYTHON
12231219
def testSiblings(self):
12241220
doc = parseString("<doc><?pi?>text?<elm/></doc>")
12251221
root = doc.documentElement
@@ -1792,7 +1788,6 @@ def test_toprettyxml_with_attributes_ordered(self):
17921788
'<?xml version="1.0" ?>\n'
17931789
'<curriculum status="public" company="example"/>\n')
17941790

1795-
@unittest.expectedFailure # TODO: RUSTPYTHON
17961791
def test_toprettyxml_with_cdata(self):
17971792
xml_str = '<?xml version="1.0" ?><root><node><![CDATA[</data>]]></node></root>'
17981793
doc = parseString(xml_str)

‎Lib/test/test_pyexpat.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,6 @@ def test6(self):
560560
["<a>", "1", "<b>", "</b>", "2", "<c>", "</c>", "345", "</a>"],
561561
"buffered text not properly split")
562562

563-
@unittest.expectedFailure # TODO: RUSTPYTHON
564563
def test7(self):
565564
self.setHandlers(["CommentHandler", "EndElementHandler",
566565
"StartElementHandler"])

‎Lib/test/test_re.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,6 @@ def test_groupdict(self):
726726
'first second').groupdict(),
727727
{'first':'first', 'second':'second'})
728728

729-
@unittest.expectedFailure # TODO: RUSTPYTHON
730729
def test_expand(self):
731730
self.assertEqual(re.match("(?P<first>first) (?P<second>second)",
732731
"first second")

‎Lib/test/test_xml_etree.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1800,7 +1800,6 @@ def test_events_comment(self):
18001800
self._feed(parser, "<!-- text here -->\n")
18011801
self.assert_events(parser, [('comment', (ET.Comment, ' text here '))])
18021802

1803-
@unittest.expectedFailure # TODO: RUSTPYTHON
18041803
def test_events_pi(self):
18051804
parser = ET.XMLPullParser(events=('start', 'pi', 'end'))
18061805
self._feed(parser, "<?pitarget?>\n")
@@ -3821,7 +3820,6 @@ class TreeBuilderSubclass(ET.TreeBuilder):
38213820
a = parser.close()
38223821
self.assertEqual(a.text, "texttail")
38233822

3824-
@unittest.expectedFailure # TODO: RUSTPYTHON
38253823
def test_late_tail_mix_pi_comments(self):
38263824
# Issue #37399: The tail of an ignored comment could overwrite the text before it.
38273825
# Test appending tails to comments/pis.

‎crates/host_env/src/crt_fd.rs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -355,9 +355,8 @@ pub fn ftruncate(fd: Borrowed<'_>, len: Offset) -> io::Result<()> {
355355
cfg_select! {
356356
windows => {
357357
if ret != 0 {
358-
// _chsize_s returns errno directly, convert to Windows error code
359-
let winerror = crate::os::errno_to_winerror(ret);
360-
return Err(io::Error::from_raw_os_error(winerror));
358+
// _chsize_s returns errno directly; preserve it exactly.
359+
return Err(crate::os::io_error_from_errno(ret));
361360
}
362361
}
363362
_ => cvt(ret)?,

0 commit comments

Comments
 (0)