bpo-39939: Add str.removeprefix and str.removesuffix#18939
Conversation
serhiy-storchaka
left a comment
There was a problem hiding this comment.
The code LGTM. But I am not sure about adding these method for bytearray.
Needed also updates of the documentation.
Sorry, something went wrong.
Currently the bytearray api is almost a strict superset of the bytes api: >>> set(dir(bytes)) - set(dir(bytearray))
{'__getnewargs__'}and I didn't want to break that.
I will work on the docs tonight and tomorrow. |
Sorry, something went wrong.
|
Thank you. All this LGTM, and I am impressed by the quality of code from a new contributor. I do not press the "Approve" button only because I did not follow the discussion. You need an approve from a core developer more interested in this feature. Please add also a What's New entry. And add your name in Misc/ACKS. |
Sorry, something went wrong.
Co-Authored-By: Serhiy Storchaka <storchaka@gmail.com>
sweeneyde
left a comment
There was a problem hiding this comment.
Change 'cut" --> "remove" in NEWS and whatsnew
Sorry, something went wrong.
…39.NwCnAM.rst Change method names in NEWS
|
Does someone know how to make the docs escape the slice |
Sorry, something went wrong.
vstinner
left a comment
There was a problem hiding this comment.
Overall, I like the change. Here is my second review on the doc, which is IMO the most important part here ;-)
Sorry, something went wrong.
Sadly, your documentation syntax is correct. It's a bug in the "make suspicious" target of Doc/Makefile: We could try to fix "make suspicious". But first I suggest you to write |
Sorry, something went wrong.
|
Congrats @sweeneyde, I merged your PR! Maybe the documentation could still be enhanced even more, but I think that it's now good enough for an alpha release ;-) I built the documentation locally to check if it is rendered correctly and it was the case. I didn't see any obvious Sphinx syntax issue. |
Sorry, something went wrong.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️Hi! The buildbot AMD64 Fedora Stable LTO + PGO 3.x has failed when building commit a81849b. What do you need to do:
You can take a look at the buildbot page here: https://buildbot.python.org/all/#builders/64/builds/656 Failed tests:
Failed subtests:
Summary of the results of the build (if available): == Tests result: FAILURE then FAILURE == 406 tests OK. 10 slowest tests:
1 test failed: 14 tests skipped: 1 re-run test: Total duration: 5 min 46 sec Click to see traceback logsTraceback (most recent call last):
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/test/test_concurrent_futures.py", line 130, in tearDown
self.executor.shutdown(wait=True)
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/concurrent/futures/process.py", line 724, in shutdown
self._executor_manager_thread_wakeup.wakeup()
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/concurrent/futures/process.py", line 80, in wakeup
self._writer.send_bytes(b"")
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/multiprocessing/connection.py", line 205, in send_bytes
self._send_bytes(m[offset:offset + size])
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/multiprocessing/connection.py", line 416, in _send_bytes
self._send(header + buf)
File "/home/buildbot/buildarea/3.x.cstratak-fedora-stable-x86_64.lto-pgo/build/Lib/multiprocessing/connection.py", line 373, in _send
n = write(self._handle, buf)
OSError: [Errno 9] Bad file descriptor
|
Sorry, something went wrong.
https://bugs.python.org/issue39939