GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — bpo-28837: Fix lib2to3 handling of map/zip/filter by stuarteberg · Pull Request #24 · python/cpython Conversation
|
Codecov Report@@ Coverage Diff @@ ## master #24 +/- ## ========================================== + Coverage 82.37% 82.37% +<.01% ========================================== Files 1427 1427 Lines 350948 351009 +61 ========================================== + Hits 289088 289144 +56 - Misses 61860 61865 +5 Continue to review full report at Codecov.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@benjaminp: Are you the right person to ping about |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
| | | ||
| power< | ||
| 'map' trailer< '(' [arglist=any] ')' > | ||
| 'map' args=trailer< '(' [any] ')' > |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this change?
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
What's the reason for this change?
On line 100 (below), I need to clone the argument list:
new = Node(syms.power, [Name("map"), args.clone()])
If I leave the above line unchanged, then I could have written this, instead:
new = Node(syms.power, [Name("map"), ArgList([args.clone()])])
...but there's a problem with that: It doesn't clone the ( and ) tokens -- it creates them from scratch. As a result, one of the tests fails, due to an unpreserved prefix before the ) token:
======================================================================
FAIL: test_prefix_preservation (Lib.lib2to3.tests.test_fixers.Test_map)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/bergs/Documents/workspace/cpython-git/Lib/lib2to3/tests/test_fixers.py", line 3036, in test_prefix_preservation
self.check(b, a)
File "/Users/bergs/Documents/workspace/cpython-git/Lib/lib2to3/tests/test_fixers.py", line 3031, in check
super(Test_map, self).check(b, a)
File "/Users/bergs/Documents/workspace/cpython-git/Lib/lib2to3/tests/test_fixers.py", line 36, in check
tree = self._check(before, after)
File "/Users/bergs/Documents/workspace/cpython-git/Lib/lib2to3/tests/test_fixers.py", line 32, in _check
self.assertEqual(after, str(tree))
AssertionError: "x = list(map( f, 'abc' ))\n\n" != "x = list(map( f, 'abc'))\n\n"
- x = list(map( f, 'abc' ))
? ---
+ x = list(map( f, 'abc'))
Hence, I think it's best to capture and clone the whole trailer. But if I'm missing something, please let me know.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Okay, thanks for the explanation.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Refactor into Python 3 and Python 2.7 submodules.
24: Warn for exception: move warning to ceval r=ltratt a=nanjekyejoannah This replaces the old PR: softdevteam#12 Moved the warning to ceval. I removed the three component warning because it was committed in an earlier PR here: softdevteam#14 Co-authored-by: Joannah Nanjekye <[email protected]>
Implemented type propagation
This PR pretty much completely refactors the Rust build system. There are now two main ways Rust code is built: # both - The Rust triple is deduced based on the preprocessor run on Misc/platform_triplet.c - A cpython-build-helper crate is used to pass the proper link arguments for each configuration - The proper Rust toolchain is downloaded for iOS/Android/WASI for CI on those platforms - cpython-sys is updated significantly to ensure bindgen properly generates the bindings for each platform # shared For shared builds, we build a crate into a cdylib and pass through link arguments from the makefile/configure and the linker executable so that the final link will match what is done for C programs. # static For static builds, a cpython-rust-staticlib crate is a built which depends on and re-exports the module initializers for each crate. This ensures there aren't duplicated Rust stdlib/core symbols. Fixes python#23
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.