[SRU] flake8 cause trace error on double keyword argument

Bug #1697447 reported by George Shuklin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-flake8 (Ubuntu)
Fix Released
Undecided
Unassigned
Artful
Won't Fix
Undecided
Unassigned

Bug Description

Context of the file:

#!/usr/bin/python
foobar(value=1, value=2)

flake8 bad_flake8.py
Process Process-1:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 501, in run_ast_checks
    ast = self.processor.build_ast()
  File "/usr/lib/python3/dist-packages/flake8/processor.py", line 211, in build_ast
    return compile(''.join(self.lines), '', 'exec', PyCF_ONLY_AST)
  File "<string>", line 2
SyntaxError: keyword argument repeated

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3.5/multiprocessing/process.py", line 249, in _bootstrap
    self.run()
  File "/usr/lib/python3.5/multiprocessing/process.py", line 93, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 666, in _run_checks_from_queue
    checker.run_checks(results_queue, statistics_queue)
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 606, in run_checks
    self.run_ast_checks()
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 504, in run_ast_checks
    row, column = self._extract_syntax_information(exception)
  File "/usr/lib/python3/dist-packages/flake8/checker.py", line 488, in _extract_syntax_information
    lines = physical_line.rstrip('\n').split('\n')
AttributeError: 'NoneType' object has no attribute 'rstrip'

ProblemType: Bug
DistroRelease: Ubuntu 17.04
Package: flake8 3.2.1-1
ProcVersionSignature: Ubuntu 4.4.0-21.37-generic 4.4.6
Uname: Linux 4.4.0-21-generic x86_64
ApportVersion: 2.20.4-0ubuntu4.1
Architecture: amd64
CurrentDesktop: X-Cinnamon
Date: Mon Jun 12 15:44:52 2017
EcryptfsInUse: Yes
InstallationDate: Installed on 2013-07-19 (1423 days ago)
InstallationMedia: Xubuntu 13.04 "Raring Ringtail" - Release i386 (20130423.1)
PackageArchitecture: all
SourcePackage: python-flake8
UpgradeStatus: Upgraded to zesty on 2017-05-31 (12 days ago)

Revision history for this message
George Shuklin (george-shuklin) wrote :
Revision history for this message
George Shuklin (george-shuklin) wrote :
Revision history for this message
dino99 (9d9) wrote :

Upstream says it was fixed into v3.3.0
so closing that report now as zesty has also reached EOL

That version is now dead
http://news.softpedia.com/news/ubuntu-17-04-zesty-zapus-has-reached-end-of-life-upgrade-to-ubuntu-17-10-now-519360.shtml

tags: added: artful upgrade-software-version
removed: zesty
Revision history for this message
dino99 (9d9) wrote :

But Artful still needs a SRU

summary: - flake8 cause trace error on double keyword argument
+ [SRU] flake8 cause trace error on double keyword argument
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :
Changed in python-flake8 (Ubuntu):
status: New → Fix Released
tags: added: server-next
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

I was just about to prep an upload, but given we have approx 1-3 weeks left until EOL and the SRU would take at least 1 week I think this makes no sense anymore - story would be way different if Xenial would be affected.

But on Xenial it is ok:
root@x:~# vim bad_flake8.py
root@x:~# flake8 bad_flake8.py
bad_flake8.py:2:16: E999 SyntaxError: keyword argument repeated

I want to thank you for reporting it, especially the the upstream report that is what made it be fixed in all newer Ubuntu releases already.

Changed in python-flake8 (Ubuntu Artful):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.