Package: python-astor / 0.8.1-5

Metadata

Package Version Patches format
python-astor 0.8.1-5 3.0 (quilt)

Patch series

view the series file
Patch File delta Description
0001 Reduce huge int in test Closes 212.patch | (download)

tests/test_code_gen.py | 2 1 + 1 - 0 !
1 file changed, 1 insertion(+), 1 deletion(-)

 reduce huge int in test (closes: #212)

Int was above limits:

https://docs.python.org/3/library/stdtypes.html#int-max-str-digits

py314.patch | (download)

astor/code_gen.py | 9 7 + 2 - 0 !
tests/test_code_gen.py | 11 8 + 3 - 0 !
2 files changed, 15 insertions(+), 5 deletions(-)

 fix compatibility with python 3.14 (mostly)

Fix the code and the test suite to work with Python 3.14, where
deprecated constant-like AST nodes were removed. Notably:

1. Skip tests for deprecated nodes in Python 3.14.

2. Use `ast.Constant` over `ast.Num` for non-deprecated code
   in Python 3.6+.

3. Check for `ast.Str` only in Python < 3.14, and handle `ast.Constant`
   being used to represent a string instead.

With these changes, all tests except for:

    tests/test_rtrip.py::RtripTestCase::test_convert_stdlib

pass. However, this particular test also hanged for me with older Python
versions.

Related to #217