-
Notifications
You must be signed in to change notification settings - Fork 807
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
Fixes for 2024 #180
Open
X0RW3LL
wants to merge
3
commits into
longld:master
Choose a base branch
from
X0RW3LL:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Fixes for 2024 #180
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
X0RW3LL
commented
Jul 25, 2024
•
edited
Loading
edited
- lib/six.py: Import upstream version 1.16.0
- peda.py: Refactor deprecated gdb logging command syntax
- peda:py: Fix Python 3.12 Syntax Warnings (use raw strings)
- lib/{nasm,utils}.py: Fix Python 3.12 Syntax Warnings (use raw strings)
This fixes the following traceback call on python3.12, Traceback (most recent call last): File "/usr/share/gdb-peda/peda.py", line 30, in <module> from six.moves import range ModuleNotFoundError: No module named 'six.moves' (gdb) which ends up with gdb not sourcing peda Signed-off-by: X0RW3LL <[email protected]>
This gets rid of the following deprecation warnings at the end of running a binary: [Inferior 1 (process 6642) exited normally] Warning: 'set logging off', an alias for the command 'set logging enabled', is deprecated. Use 'set logging enabled off'. Warning: 'set logging on', an alias for the command 'set logging enabled', is deprecated. Use 'set logging enabled on'. Warning: not running gdb-peda$
This commit addresses the python3.6 deprecation of invalid escape sequences in str/bytes by using raw strings, which in turn addresses DeprecationWarning and SyntaxWarning in later versions This change will also avoid a future SyntaxError as per the python3.12 release highlights Following is a complete dump of all the affected lines: $ find . -type f -name '*.py' -exec pycodestyle --select W605 {} \; ./lib/nasm.py:85:48: W605 invalid escape sequence '\s' ./lib/nasm.py:85:54: W605 invalid escape sequence '\s' ./lib/nasm.py:85:59: W605 invalid escape sequence '\s' ./lib/utils.py:526:42: W605 invalid escape sequence '\s' ./lib/utils.py:543:36: W605 invalid escape sequence '\s' ./lib/utils.py:592:28: W605 invalid escape sequence '\(' ./peda.py:151:29: W605 invalid escape sequence '\[' ./peda.py:151:35: W605 invalid escape sequence '\]' ./peda.py:373:41: W605 invalid escape sequence '\s' ./peda.py:550:27: W605 invalid escape sequence '\d' ./peda.py:550:31: W605 invalid escape sequence '\s' ./peda.py:550:48: W605 invalid escape sequence '\s' ./peda.py:550:61: W605 invalid escape sequence '\s' ./peda.py:550:69: W605 invalid escape sequence '\s' ./peda.py:550:81: W605 invalid escape sequence '\s' ./peda.py:554:31: W605 invalid escape sequence '\d' ./peda.py:554:35: W605 invalid escape sequence '\s' ./peda.py:554:47: W605 invalid escape sequence '\s' ./peda.py:554:60: W605 invalid escape sequence '\s' ./peda.py:554:68: W605 invalid escape sequence '\s' ./peda.py:567:33: W605 invalid escape sequence '\d' ./peda.py:596:29: W605 invalid escape sequence '\d' ./peda.py:916:33: W605 invalid escape sequence '\s' ./peda.py:916:49: W605 invalid escape sequence '\s' ./peda.py:916:59: W605 invalid escape sequence '\s' ./peda.py:918:38: W605 invalid escape sequence '\s' ./peda.py:918:46: W605 invalid escape sequence '\s' ./peda.py:918:56: W605 invalid escape sequence '\s' ./peda.py:937:36: W605 invalid escape sequence '\[' ./peda.py:937:45: W605 invalid escape sequence '\]' ./peda.py:969:26: W605 invalid escape sequence '\s' ./peda.py:969:36: W605 invalid escape sequence '\s' ./peda.py:1116:33: W605 invalid escape sequence '\s' ./peda.py:1223:29: W605 invalid escape sequence '\s' ./peda.py:1223:37: W605 invalid escape sequence '\s' ./peda.py:1226:33: W605 invalid escape sequence '\s' ./peda.py:1226:37: W605 invalid escape sequence '\s' ./peda.py:1226:48: W605 invalid escape sequence '\w' ./peda.py:1235:37: W605 invalid escape sequence '\s' ./peda.py:1235:45: W605 invalid escape sequence '\s' ./peda.py:1235:59: W605 invalid escape sequence '\[' ./peda.py:1235:65: W605 invalid escape sequence '\]' ./peda.py:1430:43: W605 invalid escape sequence '\s' ./peda.py:1430:60: W605 invalid escape sequence '\s' ./peda.py:1430:69: W605 invalid escape sequence '\s' ./peda.py:1430:75: W605 invalid escape sequence '\[' ./peda.py:1430:79: W605 invalid escape sequence '\]' ./peda.py:1430:81: W605 invalid escape sequence '\s' ./peda.py:2096:56: W605 invalid escape sequence '\s' ./peda.py:2114:48: W605 invalid escape sequence '\s' ./peda.py:2214:41: W605 invalid escape sequence '\s' ./peda.py:2242:25: W605 invalid escape sequence '\s' ./peda.py:2242:62: W605 invalid escape sequence '\s' ./peda.py:2242:72: W605 invalid escape sequence '\s' ./peda.py:2316:40: W605 invalid escape sequence '\s' ./peda.py:2416:27: W605 invalid escape sequence '\[' ./peda.py:2416:31: W605 invalid escape sequence '\]' ./peda.py:2416:35: W605 invalid escape sequence '\.' ./peda.py:2474:35: W605 invalid escape sequence '\s' ./peda.py:2474:64: W605 invalid escape sequence '\.' ./peda.py:2681:62: W605 invalid escape sequence '\ ' ./peda.py:2681:81: W605 invalid escape sequence '\?' ./peda.py:2832:65: W605 invalid escape sequence '\ ' ./peda.py:3414:26: W605 invalid escape sequence '\[' ./peda.py:3414:32: W605 invalid escape sequence '\]' ./peda.py:3519:38: W605 invalid escape sequence '\[' ./peda.py:3519:44: W605 invalid escape sequence '\]' ./peda.py:3529:32: W605 invalid escape sequence '\s' ./peda.py:3529:38: W605 invalid escape sequence '\s' ./peda.py:3531:30: W605 invalid escape sequence '\s' ./peda.py:3533:30: W605 invalid escape sequence '\s' ./peda.py:4125:29: W605 invalid escape sequence '\s' ./peda.py:4125:37: W605 invalid escape sequence '\s' Fix Python 3.12 Syntax Warnings (use raw strings)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.