-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fail2ban: fix 2to3 error #17341
fail2ban: fix 2to3 error #17341
Conversation
3ab4064
to
c930586
Compare
@BKPepe |
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Requirements: python-toolz (lang/python/host-pip-requirements/lib2to3.txt) Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Requirements: python-toolz (lang/python/host-pip-requirements/lib2to3.txt) Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
c930586
to
de66dc9
Compare
May not compile correctly without the required 2to3/host package from PR #17429 |
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
de66dc9
to
111a706
Compare
Not sure why https://github.com/openwrt/packages/actions/runs/1662159088 passed even though the 2to3 package wasn't merged into master yet - ping @aparcar @erdoukki please rebase on current master to pick up 2to3 |
111a706
to
fcd4544
Compare
It now works with the add of the fail2ban/fail2ban@196c55e commit from fail2ban upstream |
fcd4544
to
a4292db
Compare
TEST IN PROGRESS,
I am looking at to solve it. Will update the PR with a fix. @jefferyto @commodo Not very "clean" but I am now trying to build with a simple tweak of python3-version.mk to build for the correct target version:
Will it be sufficient to get packages for 21.02.x and 19.07.x targets to be built and tested !? |
a4292db
to
1653020
Compare
I suggest:
|
94d9e28
to
c4ed554
Compare
Issue: 2to3 support has been removed in setuptools since version 58.0.0. Fix: openwrt#17311 Requirements: 2to3/host openwrt#17429 Add upstream patch: fail2ban/fail2ban@196c55e To install/build for python3 from source, it is necessary to convert to py3 codebase before setup (invoke 2to3 or ./fail2ban-2to3 firstly). > ./fail2ban-2to3 > python3 setup.py build Signed-off-by: Kerma Gérald <gandalf@gk2.net>
c4ed554
to
ad0e1a1
Compare
BUILD and TEST compatibility issue fixed with the correct version of Python.
OpenWrt-21.02:
Tests done. |
@jefferyto test successful on 21.02. |
@jefferyto |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt/packages#17311 openwrt/packages#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net> Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults (cherry picked from commit 2f91e1c) Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt/packages#17311 openwrt/packages#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults (cherry picked from commit 2f91e1c) Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
2to3 is a Python program that reads Python 2.x source code and applies a series of fixers to transform it into valid Python 3.x code. The standard library contains a rich set of fixers that will handle almost all code. 2to3 supporting library lib2to3 is, however, a flexible and generic library, so it is possible to write your own fixers for 2to3. lib2to3 could also be adapted to custom applications in which Python code needs to be edited automatically. This tool is necessary for fail2ban package because of issue openwrt#17311 openwrt#17341 Simple 2to3.py script from Debian, thanks to Matthias Klose <doko@ubuntu.com> From: https://salsa.debian.org/cpython-team/python3-defaults Co-authored-by: Jeffery To <jeffery.to@gmail.com> Signed-off-by: Kerma Gérald <gandalf@gk2.net>
Maintainer: me / @erdoukki
Run tested: (test done on MVEBU arch53 EspressoBin & EspressoBin-ULTRA, OpenWrt 21.02.x)
Compile tested: (arch=cortexa53, host=amd64)
Issue: 2to3 support has been removed in setuptools since version 58.0.0.
Fix: #17311
Requirements: 2to3/host #17429
To install/build for python3 from source, it is necessary to convert to py3
codebase before setup (invoke 2to3 or ./fail2ban-2to3 firstly).
Signed-off-by: Kerma Gérald gandalf@gk2.net