Title: GH-110109: Drop use of new regex features in `pathlib._abc`. by barneygale · Pull Request #113292 · python/cpython · GitHub
Open Graph Title: GH-110109: Drop use of new regex features in `pathlib._abc`. by barneygale · Pull Request #113292 · python/cpython
X Title: GH-110109: Drop use of new regex features in `pathlib._abc`. by barneygale · Pull Request #113292 · python/cpython
Description: A regex group with a ?+ possessive quantifier was used to match empty paths, which were represented as a single dot, preventing the dot from being matched by other wildcards. This quantifier is only available from Python 3.11+, but pathlib's _abc.py file will be made available as a PyPI package for Python 3.8+. This commit adds a new private _pattern_str property that works like __str__() but represents empty paths as '' rather than '.'. This string is used for pattern matching, which removes the need for the possessive group. We also replace re.NOFLAG with 0, again for backwards-compatibility with older Python. Improves compatibility with older Python; no other change of behaviour. See external pathlib_abc issue: barneygale/pathlib-abc#8 Issue: gh-110109
Open Graph Description: A regex group with a ?+ possessive quantifier was used to match empty paths, which were represented as a single dot, preventing the dot from being matched by other wildcards. This quantifier is onl...
X Description: A regex group with a ?+ possessive quantifier was used to match empty paths, which were represented as a single dot, preventing the dot from being matched by other wildcards. This quantifier is onl...
Opengraph URL: https://github.com/python/cpython/pull/113292
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:3a4754d8-9b65-4222-be65-2a988e543689 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | BFFC:2D2FEF:90B7B2:C2F57E:69697BB8 |
| html-safe-nonce | 624a38ab52b939733be4d0392619cafecba7c3f66c0b6629d53a190bc7f52d43 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRkZDOjJEMkZFRjo5MEI3QjI6QzJGNTdFOjY5Njk3QkI4IiwidmlzaXRvcl9pZCI6IjgxNDU1MDEwNDU5NDk4MjM5MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c6acf9d8e9977309b72c1ae73276e743eebe9b8258057ad5de70cd5d57c5ff8c |
| hovercard-subject-tag | pull_request:1650890829 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/python/cpython/pull/113292/files |
| twitter:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/960340?s=400&v=4 |
| og:image:alt | A regex group with a ?+ possessive quantifier was used to match empty paths, which were represented as a single dot, preventing the dot from being matched by other wildcards. This quantifier is onl... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | f33e4b94c8824ab2b434d82a94139432fb5ebee9df4b75304140ad22508c4a77 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 48f380098b30acbb700b04f1724481ca10d574fc |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width