support for PEP 572 assignment expressions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pyflakes (Ubuntu) |
Fix Released
|
Low
|
Unassigned | ||
Focal |
Fix Released
|
Low
|
Chris Johnston |
Bug Description
[ Impact ]
Pyflakes is missing PEP572 support, which causes failed validation for valid code. Support has been added upstream [1] to support PEP572 expressions.
[ Test Plan ]
Create a simple test.py:
def f(x):
if (y := x.upper()) :
print()
Run `flake8 test.py`
Result:
"pyflakes" failed during execution due to "'FlakesChecker' object has no attribute 'NAMEDEXPR'"
Run flake8 with greater verbosity to see more details
test.py:2:10: E203 whitespace before ':'
test.py:2:11: E231 missing whitespace after ':'
test.py:2:24: E203 whitespace before ':'
After applying this patch, the error should go away.
[ Where problems could occur ]
The risks related to this patch are minimal due to only adding support for new expressions.
Changed in pyflakes (Ubuntu Focal): | |
importance: | Undecided → Low |
Changed in pyflakes (Ubuntu): | |
status: | New → Fix Released |
importance: | Undecided → Low |
Changed in pyflakes (Ubuntu Focal): | |
status: | New → In Progress |
assignee: | nobody → Chris Johnston (cjohnston) |
description: | updated |
Hello Chris, or anyone else affected,
Accepted pyflakes into focal-proposed. The package will build now and be available at https:/ /launchpad. net/ubuntu/ +source/ pyflakes/ 2.1.1-2ubuntu1 in a few hours, and then in the -proposed repository.
Please help us by testing this new package. See https:/ /wiki.ubuntu. com/Testing/ EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.
If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification- needed- focal to verification- done-focal. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification- failed- focal. In either case, without details of your testing we will not be able to proceed.
Further information regarding the verification process can be found at https:/ /wiki.ubuntu. com/QATeam/ PerformingSRUVe rification . Thank you in advance for helping!
N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.