Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Offer improved customization options for user subclasses of UPath (#173)
* customizable fsspec filesystem factory * upath.core: fix _default_accessor override error * upath.core: fix _fs_factory call * upath.core: create a patched subclass for _fs_factory * upath.core: fix has_custom_fs_factory check * upath._protocol: move to upath protocol parsing * tests: allow setting azurite port through envvar * upath._flavour: factor out FSSpecFlavour * upath._protocol: add 'data' protocol matching * upath: allow customization of init args for UPath 3.12+ * upath._protocol: add allow_unkown kwarg for strip_upath_protocol * upath.registry: correct class for fsspec file/local * upath._flavour: allow unknown protocol * upath: use single implementation * upath: make flavour compatible with py3.8+ * upath.implementations: simplify UPath subclasses * upath: provide single UPath implementation * tests: skip/xfail obsolete tests * tests: memory fs normalization now passes on py38+ * upath: typo fixes in implementations.local * upath.implementations.local: fix issues with py312 base * upath.implementations.local: fix minor issue in init for WindowsUPath * tests: update pathlib3.12 tests to register subclasses * upath.core: don't promote local paths with storage_options to FilePath * upath.implementations.webdav: fix webdav for older fsspec versions * upath.core: port glob fix for older fsspec version * upath.core: remove inconsistent typing * upath: fix typing issues * repo: update pre-commit-config * readme: adjust LocalPath -> FilePath * upath: deprecate accessors more gracefully * upath.core: _accessor shim can't use property * upath.implementations.local: fix iterdir for fsspec local paths when called on a file * upath._compat: fix warnings._deprecated is missing on older pythons * upath.core: try to provide backwards compatibility for custom __new__ methods * upath: align all migration related deprecation warnings * upath.core: add comment explainin _protocol_dispatch * tests: some subclassing tests in the pathlib3.12 test suite xpass * tests: test the migration compat code with a GitHub implementation * tests: add comment regarding webdav test * tests: run github migration test only if GITHUB_TOKEN in env * tests: make pathlib3.12 tests succeed * upath.core: warn when importing _UriFlavour or PT * upath.core: improve comment regarding storage_options combination * upath._compat: fix backwards compat for custom accessors * upath: backwards compat support for _drv, _root, and _parts * upath: add comment regarding _url * upath: backward compat support for _path * upath: provide missing deprecated classmethods on py312 * upath: provide storage_options customization classmethod
- Loading branch information