| Summary: | [abrt] pyflakes-0.7.2-1.fc19: checker.py:722:LAMBDA:AttributeError: 'arguments' object has no attribute 'kwonlyargs' | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Bengt Lüers <Bengt.Lueers> | ||||||||
| Component: | pyflakes | Assignee: | Ville Skyttä <ville.skytta> | ||||||||
| Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||||
| Severity: | unspecified | Docs Contact: | |||||||||
| Priority: | unspecified | ||||||||||
| Version: | 19 | CC: | Bengt.Lueers, jeff, timothy.crosley, ville.skytta | ||||||||
| Target Milestone: | --- | ||||||||||
| Target Release: | --- | ||||||||||
| Hardware: | x86_64 | ||||||||||
| OS: | Unspecified | ||||||||||
| URL: | https://retrace.fedoraproject.org/faf/reports/bthash/34e60168f152c9177f13df2e2591d9eeeb33a0d1 | ||||||||||
| Whiteboard: | abrt_hash:ad0e2d2a17fb2789a2af624c4b0d800ca3543bce | ||||||||||
| Fixed In Version: | pyflakes-0.7.3-4.fc19 | Doc Type: | Bug Fix | ||||||||
| Doc Text: | Story Points: | --- | |||||||||
| Clone Of: | Environment: | ||||||||||
| Last Closed: | 2013-12-21 02:19:44 UTC | Type: | --- | ||||||||
| Regression: | --- | Mount Type: | --- | ||||||||
| Documentation: | --- | CRM: | |||||||||
| Verified Versions: | Category: | --- | |||||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||||
| Attachments: |
|
||||||||||
|
Description
Bengt Lüers
2013-12-09 20:33:43 UTC
Created attachment 834520 [details]
File: backtrace
Created attachment 834521 [details]
File: environ
The code where the problem occurs should never be run with python 2.x, so I suppose something's tripping pyflakes' check for python version. Do you happen to have a module named "builtins" in your python path? Yes, the module builtins exists.
I added this code at the top of my setup.py:
[...]
import builtins
print(builtins)
import sys
sys.exit()
[...]
With it I get the following output when running as usual:
$ python setup.py flake8
<module 'builtins' from '/usr/lib/python2.7/site-packages/builtins.pyc'>
Note that I am running python2.7 while in the linked flake8 issue, someone is getting a similar error using python2.6.
Created attachment 834794 [details]
Workaround patch
Oh, a module named builtins from something else besides python itself doesn't sound like a good idea to me. I suppose it doesn't come from a Fedora package (repoquery produces no hits), maybe it's from some other package? "rpm -qf /usr/lib/python2.7/site-packages/builtins.pyc" would tell.
Anyway, I guess the attached patch would work around it in pyflakes, but it's just trading the name "builtins" for "__builtin__" which can be (ab)used the same way so it's not really a good fix, IMHO this should be fixed in whatever installs the "builtins" module in your setup in the first place.
No, the file did not come from a Fedora or another rpm package. I managed to find the PyPI package using pip:
$ pip show -f pies2overrides
---
Name: pies2overrides
Version: 2.0.1
Location: /usr/lib/python2.7/site-packages
Requires: ipaddress
Files:
../configparser.py
../builtins.py
../_thread.py
../copyreg.py
../queue.py
../reprlib.py
../socketserver.py
../html/entities.py
../html/__init__.py
../html/parser.py
../http/cookies.py
../http/client.py
../http/cookiejar.py
../http/server.py
../http/__init__.py
../xmlrpc/client.py
../xmlrpc/__init__.py
../configparser.pyc
../builtins.pyc
../_thread.pyc
../copyreg.pyc
../queue.pyc
../reprlib.pyc
../socketserver.pyc
../html/entities.pyc
../html/__init__.pyc
../html/parser.pyc
../http/cookies.pyc
../http/client.pyc
../http/cookiejar.pyc
../http/server.pyc
../http/__init__.pyc
../xmlrpc/client.pyc
../xmlrpc/__init__.pyc
./
top_level.txt
SOURCES.txt
dependency_links.txt
requires.txt
PKG-INFO
Removing pies2overrides fixes the problem with flake8. I do not need pies2overrides anymore, so that is possible for me. Thanks for helping me, I will report this compatibility issue to pies.
Hi, Just adding my 2 cents as the maintainer of the pies package: Defining a builtins module in Python2 is entirely valid as it is not a reserved module in that version of Python. Python has a standard way to lookup it's version (sys.version) which should be used in all cases, and this is the first time I have ever seen that approach not followed. In fact there are two pull requests existing to fix this in the pyflakes source - but it appears to longer be actively maintained: https://github.com/pyflakes/pyflakes/pull/18/files https://github.com/pyflakes/pyflakes/pull/17/files If you take a second to look over the pies documentation it's reason for needing to define builtins should become clear: https://github.com/timothycrosley/pies The approach taking by pyflakes (if encouraged) would mean that any attempt to backport any module would not work. Agreed, that's a valid use case for a module named like that. pyflakes-0.7.3-4.fc20 has been submitted as an update for Fedora 20. https://admin.fedoraproject.org/updates/pyflakes-0.7.3-4.fc20 pyflakes-0.7.3-4.fc19 has been submitted as an update for Fedora 19. https://admin.fedoraproject.org/updates/pyflakes-0.7.3-4.fc19 Package pyflakes-0.7.3-4.fc19: * should fix your issue, * was pushed to the Fedora 19 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing pyflakes-0.7.3-4.fc19' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2013-23286/pyflakes-0.7.3-4.fc19 then log in and leave karma (feedback). pyflakes-0.7.3-4.fc20 has been pushed to the Fedora 20 stable repository. If problems still persist, please make note of it in this bug report. pyflakes-0.7.3-4.fc19 has been pushed to the Fedora 19 stable repository. If problems still persist, please make note of it in this bug report. |