Comments (7)
this isn't the first time this has happened. 3.8.0 was also completely broken in some very niche cases that we can't really work around either
from flake8.
I think I have located the problematic part of code:
print(
'''Id,ProgramId,ProgramName,ProfileId,IpAddress,EventDate,MediaId,MediaName,AdId,AdName,AdType
"clickId1",14006,Test,"profileId1",ip1,2022-08-20T13:27:35+0200,1,"Joe Doeツ",adId1,Online,1
"clickId2",14006,Test,"profileId1",ip1,2022-08-20T13:39:51+0200,1,"Joe Doeツ",adId2,Online,2'''
)
save this under somename bla.py and run flake8 bla.py
Moving last ) to previous line ... fixes the problem (but black is not happy).
from flake8.
there's a bug in python 3.12.0 and 3.12.1 with multiline strings containing non-ascii characters -- would it be too much to ask if your error is fixed with the unreleased cpython main branch?
from flake8.
Yes I have tried and it works.
3.12.1 -> borked with IndexError: string index out of range
pyenv install 3.12-dev
3.12-dev -> runned OK
Any idea how to work around this or handle this error gracefully on every 3.12 version?
Like ignoring the error or skipping the checks for such strings.
from flake8.
@matejsp when the underlying language is so broken that all prior versions and newer versions work, why would we attempt to fix such a narrow use-case when people are likely to get the fixed version? We can't possibly maintain tiny papercut fixes for every fundamental language flaw
from flake8.
The only reason that comes to my mind is that you can't get a working version of 3.12. Well not yet anyway. Not to mention waiting for distros to catchup. It will take another month to be relesed (every two months for bugfix release). And couple of months for all the distros.
I understand that you can't maintain papercut fixed for language flaws. But this is official and latest and current release of python. This is hinders the upgrade to latest python version (just my opinion anyway). If you would get something like false positive or negative it would be fine. But it completely crashes flake8 making it unusable. I see it more about making flake8 code more resiliant (even for unexpected input than maintaining papercut fixes).
Can you point me to upstream bug? Tried searching https://github.com/python/cpython/issues but was not able to find the issue. Is this specific to flake8 ast analysis or poses more deep runtime problem so whole python 3.12 should be avoided as a whole? If it would be so critial they would probably scrape the 3.12 release or make immediate hotfix.
from flake8.
from flake8.
Related Issues (20)
- Q: List of available/active rules HOT 4
- Support newer versions of pycodestyle HOT 2
- Use setuptools.build_meta HOT 1
- E231 when using f-string HOT 1
- Export current configuration HOT 1
- --append-config does not extend defaults HOT 1
- Throwing a lint error when there isn't one HOT 2
- Allow the enforcing of some type hint practices HOT 1
- Docu: Lookup location for ".flake8" unclear HOT 3
- Ignore "SyntaxWarning: invalid escape sequence" HOT 6
- pycodestyle entry point means "noqa" is not populated HOT 1
- Allow TODO issue with pound sign anywhere in text HOT 6
- pre-commit cache contains tests folder HOT 2
- Trailing slash breaks exclude and extend-exclude config HOT 1
- Update plugin registration documentation about entry points HOT 4
- E704 false positives with one line overload def HOT 2
- E713 thrown for f-strings HOT 3
- E704 is now conflicting with new black formatting rules HOT 4
- flake8 E704 Errors Triggered by Inline Ellipsis Formatting in Newer black Versions 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 flake8.