-
-
Notifications
You must be signed in to change notification settings - Fork 30.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
gh-68320, gh-88302 - Allow for pathlib.Path
subclassing
#31691
gh-68320, gh-88302 - Allow for pathlib.Path
subclassing
#31691
Commits on Mar 5, 2022
-
bpo-24132, bpo-44136 - Fix
pathlib.Path
subclassing.Users may wish to define subclasses of `pathlib.Path` to add or modify existing methods. Before this change, attempting to instantiate a subclass raised an exception like: AttributeError: type object 'PPath' has no attribute '_flavour' Previously the `_flavour` attribute was assigned as follows: PurePath._flavour = xxx not set!! xxx PurePosixPath._flavour = _PosixFlavour() PureWindowsPath._flavour = _WindowsFlavour() This commit replaces it with a `_pathmod` attribute, set as follows: PurePath._pathmod = os.path PurePosixPath._pathmod = posixpath PureWindowsPath._pathmod = ntpath Functionality from `_PosixFlavour` and `_WindowsFlavour` is moved into `PurePath` as underscored-prefixed classmethods. Flavours are removed.
Configuration menu - View commit details
-
Copy full SHA for 7371220 - Browse repository at this point
Copy the full SHA 7371220View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8431d12 - Browse repository at this point
Copy the full SHA 8431d12View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf2ad3a - Browse repository at this point
Copy the full SHA bf2ad3aView commit details -
Update Misc/NEWS.d/next/Library/2022-03-05-02-14-09.bpo-24132.W6iORO.rst
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 4036e2e - Browse repository at this point
Copy the full SHA 4036e2eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0d08533 - Browse repository at this point
Copy the full SHA 0d08533View commit details -
Merge branch 'bpo-44136-remove-pathlib-flavour-2' of github.com:barne…
…ygale/cpython into bpo-44136-remove-pathlib-flavour-2
Configuration menu - View commit details
-
Copy full SHA for 0ad8022 - Browse repository at this point
Copy the full SHA 0ad8022View commit details
Commits on Mar 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 28992fc - Browse repository at this point
Copy the full SHA 28992fcView commit details -
Remove
_casefold()
and_casefold_parts()
methods.Makes the code a little more direct.
Configuration menu - View commit details
-
Copy full SHA for dbec230 - Browse repository at this point
Copy the full SHA dbec230View commit details
Commits on Apr 29, 2022
-
Configuration menu - View commit details
-
Copy full SHA for d814ee4 - Browse repository at this point
Copy the full SHA d814ee4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 63f1d68 - Browse repository at this point
Copy the full SHA 63f1d68View commit details -
Apply suggestions from code review
Co-authored-by: Brett Cannon <brett@python.org>
Configuration menu - View commit details
-
Copy full SHA for 8dddfdf - Browse repository at this point
Copy the full SHA 8dddfdfView commit details -
Configuration menu - View commit details
-
Copy full SHA for b4da721 - Browse repository at this point
Copy the full SHA b4da721View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7a166fd - Browse repository at this point
Copy the full SHA 7a166fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1f4dff1 - Browse repository at this point
Copy the full SHA 1f4dff1View commit details
Commits on Apr 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 51893c1 - Browse repository at this point
Copy the full SHA 51893c1View commit details -
Configuration menu - View commit details
-
Copy full SHA for 48b49b6 - Browse repository at this point
Copy the full SHA 48b49b6View commit details
Commits on May 3, 2022
-
Co-authored-by: Alex Waygood <Alex.Waygood@Gmail.com>
Configuration menu - View commit details
-
Copy full SHA for 3624c97 - Browse repository at this point
Copy the full SHA 3624c97View commit details
Commits on May 31, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ab54c14 - Browse repository at this point
Copy the full SHA ab54c14View commit details
Commits on Jun 10, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 2627417 - Browse repository at this point
Copy the full SHA 2627417View commit details -
Configuration menu - View commit details
-
Copy full SHA for bc7aded - Browse repository at this point
Copy the full SHA bc7adedView commit details
Commits on Jun 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 4d6e4f3 - Browse repository at this point
Copy the full SHA 4d6e4f3View commit details
Commits on Jun 13, 2022
-
Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
Configuration menu - View commit details
-
Copy full SHA for 70ca838 - Browse repository at this point
Copy the full SHA 70ca838View commit details
Commits on Jun 16, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a2cc74f - Browse repository at this point
Copy the full SHA a2cc74fView commit details
Commits on Jun 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 0e2478b - Browse repository at this point
Copy the full SHA 0e2478bView commit details
Commits on Jul 29, 2022
-
Apply suggestions from code review
Co-authored-by: Brett Cannon <brett@python.org>
Configuration menu - View commit details
-
Copy full SHA for 0d0cf60 - Browse repository at this point
Copy the full SHA 0d0cf60View commit details -
Clarify
_pparts
and_ncparts
naming.- `_pparts` --> `_parts_tuple` - `_ncparts` --> `_parts_normcase` - `_cached_ncparts` --> `_parts_normcase_cached`
Configuration menu - View commit details
-
Copy full SHA for f3048d3 - Browse repository at this point
Copy the full SHA f3048d3View commit details
Commits on Jul 30, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 8a213ae - Browse repository at this point
Copy the full SHA 8a213aeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 402dafe - Browse repository at this point
Copy the full SHA 402dafeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 5cc3ab2 - Browse repository at this point
Copy the full SHA 5cc3ab2View commit details -
Configuration menu - View commit details
-
Copy full SHA for 19a8804 - Browse repository at this point
Copy the full SHA 19a8804View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9da46bc - Browse repository at this point
Copy the full SHA 9da46bcView commit details
Commits on Aug 1, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 29f9f81 - Browse repository at this point
Copy the full SHA 29f9f81View commit details
Commits on Aug 5, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 52851b8 - Browse repository at this point
Copy the full SHA 52851b8View commit details
Commits on Aug 12, 2022
-
Configuration menu - View commit details
-
Copy full SHA for b39da53 - Browse repository at this point
Copy the full SHA b39da53View commit details
Commits on Aug 13, 2022
-
Configuration menu - View commit details
-
Copy full SHA for c7b18b1 - Browse repository at this point
Copy the full SHA c7b18b1View commit details
Commits on Aug 23, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 806ad15 - Browse repository at this point
Copy the full SHA 806ad15View commit details -
Use
os.path.normcase()
when globbing.This removes a `flavour is posixpath` check in `_WildcardSelector`. Instead, we normalise the case of both the pattern and the `os.scandir()` entries, and then perform a case-sensitive comparison. The same approach is taken by `fnmatch.fnmatch()`.
Configuration menu - View commit details
-
Copy full SHA for a350009 - Browse repository at this point
Copy the full SHA a350009View commit details
Commits on Aug 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 799b40e - Browse repository at this point
Copy the full SHA 799b40eView commit details
Commits on Aug 26, 2022
-
Configuration menu - View commit details
-
Copy full SHA for a6b25ea - Browse repository at this point
Copy the full SHA a6b25eaView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac6f6e2 - Browse repository at this point
Copy the full SHA ac6f6e2View commit details
Commits on Aug 27, 2022
-
Revert "Move
is_reserved()
implementation intoos.path
as a priva……te function." This reverts commit 806ad15.
Configuration menu - View commit details
-
Copy full SHA for b8874df - Browse repository at this point
Copy the full SHA b8874dfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d5e18a - Browse repository at this point
Copy the full SHA 9d5e18aView commit details -
Remove test that
/b/c/d
and///b/c/d
are equivalent.This is no longer true as of 99fcf15, see python#96290
Configuration menu - View commit details
-
Copy full SHA for f73f426 - Browse repository at this point
Copy the full SHA f73f426View commit details
Commits on Sep 16, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 37e4bc1 - Browse repository at this point
Copy the full SHA 37e4bc1View commit details
Commits on Nov 7, 2022
-
Apply suggestions from code review
Co-authored-by: Eryk Sun <eryksun@gmail.com> Co-authored-by: Brett Cannon <brett@python.org>
Configuration menu - View commit details
-
Copy full SHA for e3f13ef - Browse repository at this point
Copy the full SHA e3f13efView commit details
Commits on Nov 15, 2022
-
Configuration menu - View commit details
-
Copy full SHA for ff4e1b3 - Browse repository at this point
Copy the full SHA ff4e1b3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 07c67d0 - Browse repository at this point
Copy the full SHA 07c67d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 950aa47 - Browse repository at this point
Copy the full SHA 950aa47View commit details -
Remove test that
/b/c/d
and///b/c/d
are equivalent.This is no longer true as of 99fcf15, see python#96290
Configuration menu - View commit details
-
Copy full SHA for d5f6f03 - Browse repository at this point
Copy the full SHA d5f6f03View commit details -
Configuration menu - View commit details
-
Copy full SHA for b66a4fb - Browse repository at this point
Copy the full SHA b66a4fbView commit details -
Configuration menu - View commit details
-
Copy full SHA for fbaadf4 - Browse repository at this point
Copy the full SHA fbaadf4View commit details
Commits on Nov 25, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 3692fdf - Browse repository at this point
Copy the full SHA 3692fdfView commit details
Commits on Dec 17, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 40dc514 - Browse repository at this point
Copy the full SHA 40dc514View commit details