Comments (7)
Confirmed on Python 3.6.6 (Debian Buster), I'm actually wondering if this syntax isn't python >= 3.7...
from astunparse.
--- astunparse-1.5.0.orig/tests/common.py
+++ astunparse-1.5.0/tests/common.py
@@ -288,7 +288,7 @@ class AstunparseCommonTestCase:
def test_bytes(self):
self.check_roundtrip("b'123'")
- @unittest.skipIf(sys.version_info < (3, 6), "Not supported < 3.6")
+ @unittest.skipIf(sys.version_info < (3, 7), "Not supported < 3.7")
def test_joined_str(self):
self.check_roundtrip('f"{key}={value!s}"')
self.check_roundtrip('f"{key}={value!r}"')
from astunparse.
The f-strings are certainly a 3.6 syntax.
That f'''{key:f'''4'''}={value!s}'''
should be f'{key:f4}={value!s}'
(or something like that) instead.
I think that error might be occurring because implementation of unparsing of f-strings in astunparse is very simplistic. I think I did the first f-string unparsing implementation for argunparse. Maybe it's still around, and in such case I guess I'm the culprit here ;) We all could use a proper f-string unparser...
But why does this test pass on Travis where python version is 3.6.3 and not on 3.6.5 or 3.6.6? I have no idea...
from astunparse.
I still get this (and one more f-string error) on Python 3.7.0
from astunparse.
This is now (should now) be fixed in v1.6.0. (Please reopen if I missed something.)
from astunparse.
Hello,
The patch still applies on 1.6.2 so I guess it is not fixed.
Btw, I have no idea how to re-open a GitHub ticket...
Regards,
from astunparse.
Retested and v1.6.2 tests still work on Python 3.7.2.
from astunparse.
Related Issues (20)
- Version number was not bumped to 1.6.2 with latest release HOT 4
- Please clarify the actual license HOT 6
- extra parens on every expression
- --dump flag is broken HOT 1
- python 3.6 support HOT 1
- 'astunparse.unparse' error with Python 3.8.1 HOT 10
- _Return Function does not check if a return statement has a value in unparse.py HOT 2
- JFYI: Looks like this functionality is finally coming to the ast module
- Better support for docstrings HOT 1
- Clarify Python version compatibility HOT 2
- Skipped test for Python 3.6 is valid code
- Missing 1.6.3 tag HOT 1
- Contributing f-string fixes to CPython HOT 1
- Test issues with Python 3.9 HOT 7
- incorrect escaped string unparse
- Unknown name "kind" on Constant for Python 3.7 HOT 4
- pkg_resources.DistributionNotFound: The 'wheel<1.0,>=0.23.0' distribution was not found and is required by astunparse HOT 6
- Incorrect unparsing of extended slices in Python 3.9 HOT 2
- `if`s are unparsed inconsistently to `ast.unparse`, which breaks tests of the libs using `astunparse.unparse` as a fallback impl.
- internal tests failing under Python 3.11 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from astunparse.