Functions re.sub() and re.subn() and corresponding re.Pattern methods
are now 2-3 times faster for replacement strings containing group references.
Closes#91524
Primarily authored by serhiy-storchaka Serhiy Storchaka
Minor-cleanups-by: Gregory P. Smith [Google] <greg@krypto.org>
Added os.setns and os.unshare to easily switch between namespaces
on Linux.
Co-authored-by: Christian Heimes <christian@python.org>
Co-authored-by: CAM Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Victor Stinner <vstinner@python.org>
Rely on the title of the linked internal page instead of putting the title. Sphinx will render with the title correctly, and this will reduce work for translators
* Link ZipFile in What's New entry discussing it
* Add entry for new ZipFile.mkdir method
* Add entry for new zipfile.Path.stem/suffix/suffixes methods
* Add missing line breaks between zipfile bullet list items
* Add entry for new logging.getLevelNamesMapping function
* Add entry for SysLogHandler.createSocket to whatsnew
* Add missing line break between logging bullet list items
The os module and the PyUnicode_FSDecoder() function no longer accept
bytes-like paths, like bytearray and memoryview types: only the exact
bytes type is accepted for bytes strings.
* Whatsnew: Convert literals in enum section to actual x-references
* Whatsnew: Rewrite enum section for clear and consistant phrasing
* Whatsnew: Combine directly related enum items instead of seperating them
* gh-98250: Describe __str__/__format__ changes more clearly/accurately
* Tweak enum section language per feedback from Ethan
* Add line breaks & ref targets to Whatsnew to prepare for future changes
* Use standard heading underbar symbols for H4 sections
* Flatten Porting subsection; clarify scope of/link Python->CAPI sections
* Move C API pending deprecations to C API section, to match the others
Part of #95913
Forward port of #93306, which was a backport of #93185, to address #84694
This adds the What's New entry for the removal of the subinterpreter-related env variable, build-time flag, etc. As @ericsnowcurrently was author of the original changes, I added him as a co-author to the commit.
This addition to the Python 3.11 What's New document were only made to the Python 3.11 branch during the backport process, and not added to the version in `main`. Forward-porting it ensures the docs retain these additions for the future, rather than being lost in a legacy Python versions, allows it to be be edited as part of #95913 , and avoids merge conflicts with routine back-ports of PRs touching it.
I've pulled in the addition exactly as-is with no modifications; any editing will be done in future PRs (and therefore can be reviewed and backported accordingly).
The one other such addition is forward-ported in #98344
This is the next step for deprecating child watchers.
Until we've removed the API completely we have to use it, so this PR is mostly suppressing a lot of warnings when using the API internally.
Once the child watcher API is totally removed, the two child watcher implementations we actually use and need (Pidfd and Thread) will be turned into internal helpers.
* Some formatting changes for general faq
* Use list for Python versioning
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
* New line for list, list for a/b/rc
* Line wrap for 80 chars
* More line wrap
* Remove PythonWin mention.
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
Co-authored-by: Ezio Melotti <ezio.melotti@gmail.com>
Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>