Skip to content

Commit 74a300d

Browse files
MrQubopeace-maker
andauthoredDec 10, 2024
Deprecate 'keepends' argument in favor of 'drop' (#2476)
* Replace 'keepends' with 'drop' Add 'drop' argument in place of 'keepends' for tubes. 'keepends' still works but raises depreciation warning. * changelog * Ignore line numbers in PyLint check --------- Co-authored-by: peace-maker <peacemakerctf@gmail.com>
1 parent 57b9eb9 commit 74a300d

File tree

4 files changed

+109
-52
lines changed

4 files changed

+109
-52
lines changed
 

‎.github/workflows/pylint.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,11 @@ jobs:
2626
set -x
2727
pip install pylint
2828
pip install --upgrade -e .
29-
pylint --exit-zero --errors-only pwnlib -f parseable | cut -d ' ' -f2- > current.txt
29+
run_pylint() { pylint --exit-zero --errors-only pwnlib -f parseable | cut -d ' ' -f2- | sed 's/line [0-9]\+/line XXXX/g'; }
30+
run_pylint > current.txt
3031
git fetch origin
3132
git checkout origin/"$GITHUB_BASE_REF"
32-
pylint --exit-zero --errors-only pwnlib -f parseable | cut -d ' ' -f2- > base.txt
33+
run_pylint > base.txt
3334
if diff base.txt current.txt | grep '>'; then
3435
false
3536
fi

‎CHANGELOG.md

+2
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ The table below shows which release corresponds to each branch, and what date th
8787
- [#2291][2291] Fix attaching to a gdbserver with tuple `gdb.attach(('0.0.0.0',12345))`
8888
- [#2410][2410] Add `tube.upload_manually` to upload files in chunks
8989
- [#2502][2502] Fix loading ELF files without valid .dynamic section
90+
- [#2476][2476] Deprecate 'keepends' argument in favor of 'drop' in `tube.recvline*`
9091

9192
[2471]: https://github.com/Gallopsled/pwntools/pull/2471
9293
[2358]: https://github.com/Gallopsled/pwntools/pull/2358
@@ -102,6 +103,7 @@ The table below shows which release corresponds to each branch, and what date th
102103
[2291]: https://github.com/Gallopsled/pwntools/pull/2291
103104
[2410]: https://github.com/Gallopsled/pwntools/pull/2410
104105
[2502]: https://github.com/Gallopsled/pwntools/pull/2502
106+
[2476]: https://github.com/Gallopsled/pwntools/pull/2476
105107

106108
## 4.14.0 (`beta`)
107109

‎pwnlib/context/__init__.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,9 @@ def quiet(self, function=None):
594594
... log.debug("DEBUG")
595595
... log.info("INFO")
596596
... log.warn("WARN")
597-
[DEBUG] DEBUG
598-
[*] INFO
599-
[!] WARN
597+
[...] DEBUG
598+
[...] INFO
599+
[...] WARN
600600
"""
601601
level = 'error'
602602
if context.log_level <= logging.DEBUG:
@@ -664,7 +664,7 @@ def verbose(self):
664664
information is printed.
665665
666666
>>> with context.verbose: func()
667-
[DEBUG] Hello
667+
[...] Hello
668668
669669
"""
670670
return self.local(log_level='debug')

0 commit comments

Comments
 (0)