Skip to content

Commit 45014f1

Browse files
author
Diego Argueta
committed
Merge branch 'master' into fix-484
2 parents 1faf0f4 + 79a7367 commit 45014f1

File tree

11 files changed

+43
-11
lines changed

11 files changed

+43
-11
lines changed

CHANGELOG.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,21 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
88

99
## Unreleased
1010

11+
12+
## [2.4.14] - 2021-11-16
13+
1114
### Added
1215

13-
- Added `fs.copy.copy_file_if`, `fs.copy.copy_dir_if`, and `fs.copy.copy_fs_if`.
16+
- Added `fs.copy.copy_file_if`, `fs.copy.copy_dir_if`, and `fs.copy.copy_fs_if`.
1417
Closes [#458](https://github.com/PyFilesystem/pyfilesystem2/issues/458).
1518
- Added `fs.base.FS.getmodified`.
16-
19+
1720
### Changed
1821

1922
- FTP servers that do not support the MLST command now try to use the MDTM command to
20-
retrieve the last modification timestamp of a resource.
23+
retrieve the last modification timestamp of a resource.
2124
Closes [#456](https://github.com/PyFilesystem/pyfilesystem2/pull/456).
22-
25+
2326
### Fixed
2427

2528
- Fixed performance bugs in `fs.copy.copy_dir_if_newer`. Test cases were adapted to catch those bugs in the future.

CONTRIBUTORS.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Many thanks to the following developers for contributing to this project:
66
- [Andreas Tollkötter](https://github.com/atollk)
77
- [Andrew Scheller](https://github.com/lurch)
88
- [Andrey Serov](https://github.com/zmej-serow)
9+
- [Ben Lindsay](https://github.com/benlindsay)
910
- [Bernhard M. Wiedemann](https://github.com/bmwiedemann)
1011
- [@chfw](https://github.com/chfw)
1112
- [Dafna Hirschfeld](https://github.com/kamomil)
@@ -17,6 +18,7 @@ Many thanks to the following developers for contributing to this project:
1718
- [George Macon](https://github.com/gmacon)
1819
- [Giampaolo Cimino](https://github.com/gpcimino)
1920
- [@Hoboneer](https://github.com/Hoboneer)
21+
- [Jon Hagg](https://github.com/jon-hagg)
2022
- [Joseph Atkins-Turkish](https://github.com/Spacerat)
2123
- [Joshua Tauberer](https://github.com/JoshData)
2224
- [Justin Charlong](https://github.com/jcharlong)

docs/requirements.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
# the bare requirements for building docs
22
Sphinx ~=3.0
33
sphinx-rtd-theme ~=0.5.1
4+
recommonmark ~=0.6

docs/source/conf.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@
3939
'sphinx.ext.autodoc',
4040
'sphinx.ext.viewcode',
4141
'sphinx.ext.napoleon',
42-
'sphinx.ext.intersphinx'
42+
'sphinx.ext.intersphinx',
43+
"recommonmark",
4344
]
4445

4546
# Add any paths that contain templates here, relative to this directory.
@@ -63,7 +64,7 @@
6364

6465
# General information about the project.
6566
project = u'PyFilesystem'
66-
copyright = u'2016-2017, Will McGugan'
67+
copyright = u'2016-2021, Will McGugan and the PyFilesystem2 contributors'
6768
author = u'Will McGugan'
6869

6970
# The version info for the project you're documenting, acts as replacement for

docs/source/contributing.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../CONTRIBUTING.md

docs/source/extension.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ Here's an example taken from an Amazon S3 Filesystem::
2929

3030
__all__ = ['S3FSOpener']
3131

32-
from fs.opener import Opener, OpenerError
32+
from fs.opener import Opener
33+
from fs.opener.errors import OpenerError
3334

3435
from ._s3fs import S3FS
3536

docs/source/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Contents:
2525
external.rst
2626
interface.rst
2727
reference.rst
28-
28+
contributing.md
2929

3030

3131
Indices and tables

docs/source/openers.rst

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,3 +56,25 @@ To open a filesysem with a FS URL, you can use :meth:`~fs.opener.registry.Regist
5656

5757
from fs import open_fs
5858
projects_fs = open_fs('osfs://~/projects')
59+
60+
61+
Manually registering Openers
62+
----------------------------
63+
64+
The ``fs.opener`` registry uses an entry point to install external openers
65+
(see :ref:`extension`), and it does so once, when you import `fs` for the first
66+
time. In some rare cases where entry points are not available (for instance,
67+
when running an embedded interpreter) or when extensions are installed *after*
68+
the interpreter has started (for instance in a notebook, see
69+
`PyFilesystem2#485 <https://github.com/PyFilesystem/pyfilesystem2/issues/485>`_).
70+
71+
However, a new opener can be installed manually at any time with the
72+
`fs.opener.registry.install` method. For instance, here's how the opener for
73+
the `s3fs <https://github.com/PyFilesystem/s3fs>`_ extension can be added to
74+
the registry::
75+
76+
import fs.opener
77+
from fs_s3fs.opener import S3FSOpener
78+
79+
fs.opener.registry.install(S3FSOpener)
80+
# fs.open_fs("s3fs://...") should now work

fs/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
"""Version, used in module and setup.py.
22
"""
3-
__version__ = "2.4.13"
3+
__version__ = "2.4.14"

fs/base.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -910,7 +910,8 @@ def geturl(self, path, purpose="download"):
910910
to retrieve for the given path (if there is more than
911911
one). The default is ``'download'``, which should return
912912
a URL that serves the file. Other filesystems may support
913-
other values for ``purpose``.
913+
other values for ``purpose``: for instance, `OSFS` supports
914+
``'fs'``, which returns a FS URL (see :ref:`fs-urls`).
914915
915916
Returns:
916917
str: a URL.

0 commit comments

Comments
 (0)