cpython/Misc
Barney Gale cf67ebfb31
GH-72904: Add `glob.translate()` function (#106703)
Add `glob.translate()` function that converts a pathname with shell wildcards to a regular expression. The regular expression is used by pathlib to implement `match()` and `glob()`.

This function differs from `fnmatch.translate()` in that wildcards do not match path separators by default, and that a `*` pattern segment matches precisely one path segment. When *recursive* is set to true, `**` pattern segments match any number of path segments, and `**` cannot appear outside its own segment.

In pathlib, this change speeds up directory walking (because `_make_child_relpath()` does less work), makes path objects smaller (they don't need a `_lines` slot), and removes the need for some gnarly code.

Co-authored-by: Jason R. Coombs <jaraco@jaraco.com>
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
2023-11-13 17:15:56 +00:00
..
NEWS.d GH-72904: Add `glob.translate()` function (#106703) 2023-11-13 17:15:56 +00:00
rhel7 gh-95957: Add instructions for Tcl/Tk and OpenSSL on RHEL/CentOS 7 (#95964) 2022-08-16 13:44:02 +02:00
ACKS gh-90890: New methods to access mailbox.Maildir message info and flags (#103905) 2023-11-11 17:41:33 +00:00
HISTORY Fix a misspelling of Interpeter -> Interpreter (GH-111040) 2023-10-18 15:09:45 -07:00
Porting
README gh-102809: Remove gdbinit mention in Misc/README (#103269) 2023-04-08 00:04:23 -07:00
README.AIX
README.coverity
README.valgrind
SpecialBuilds.txt gh-108634: Py_TRACE_REFS uses a hash table (#108663) 2023-08-31 18:33:34 +02:00
coverity_model.c
indent.pro
platform_triplet.c gh-108447: Detect platform triplets for x86_64 GNU/Hurd (#108045) 2023-08-24 22:37:20 +02:00
python-config.in gh-105407: Remove unused imports (#105554) 2023-06-09 12:50:31 +00:00
python-config.sh.in
python-embed.pc.in
python.man GH-92584: Remove references to Distutils in ``PYTHONUSERBASE`` (#108040) 2023-08-16 22:43:30 +02:00
python.pc.in gh-99942: python.pc on android/cygwin should link to libpython per configure.ac (GH-100356) 2023-02-21 17:21:24 -08:00
stable_abi.toml gh-111089: Revert PyUnicode_AsUTF8() changes (#111833) 2023-11-07 22:36:13 +00:00
svnmap.txt
valgrind-python.supp gh-105182: Remove PyEval_AcquireLock() and PyEval_InitThreads() (#105183) 2023-06-01 13:41:56 +02:00
vgrindefs

README

Python Misc subdirectory
========================

This directory contains files that wouldn't fit in elsewhere.  Some
documents are only of historic importance.

Files found here
----------------

ACKS                    Acknowledgements
HISTORY                 News from previous releases -- oldest last
indent.pro              GNU indent profile approximating my C style
NEWS                    News for this release (for some meaning of "this")
Porting                 Mini-FAQ on porting to new platforms
python-config.in        Python script template for python-config
python.man              UNIX man page for the python interpreter
python.pc.in            Package configuration info template for pkg-config
README                  The file you're reading now
README.AIX              Information about using Python on AIX
README.coverity         Information about running Coverity's Prevent on Python
README.valgrind         Information for Valgrind users, see valgrind-python.supp
SpecialBuilds.txt       Describes extra symbols you can set for debug builds
svnmap.txt              Map of old SVN revs and branches to hg changeset ids,
                        help history-digging
valgrind-python.supp    Valgrind suppression file, see README.valgrind
vgrindefs               Python configuration for vgrind (a generic pretty printer)