From 20ed8f83e76d8c7206615c9ce92bd6e9c7c0494f Mon Sep 17 00:00:00 2001 From: jcharlong <58079248+jcharlong@users.noreply.github.com> Date: Thu, 30 Jul 2020 12:06:03 -0400 Subject: [PATCH 1/6] Update base.py Support "__doc__" being set to `None`, as is done when `-OO` is supplied to the CPython interpreter. --- fs/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/base.py b/fs/base.py index a4b7aefb..2be0441e 100644 --- a/fs/base.py +++ b/fs/base.py @@ -84,7 +84,7 @@ def _method(*args, **kwargs): """.format( method.__name__ ) - if hasattr(_method, "__doc__"): + if hasattr(_method, "__doc__") and _method.__doc__ is not None: _method.__doc__ += deprecated_msg return _method From bcc8ea183e292de9a1dc73e6087bf8a89a4da905 Mon Sep 17 00:00:00 2001 From: jcharlong <58079248+jcharlong@users.noreply.github.com> Date: Thu, 30 Jul 2020 12:07:23 -0400 Subject: [PATCH 2/6] Update _version.py --- fs/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/_version.py b/fs/_version.py index 0e4134f2..7dc85736 100644 --- a/fs/_version.py +++ b/fs/_version.py @@ -1,3 +1,3 @@ """Version, used in module and setup.py. """ -__version__ = "2.4.11" +__version__ = "2.4.12" From cc8dd000b2e87f6ced9de7afbdc9bb7412d553cf Mon Sep 17 00:00:00 2001 From: jcharlong <58079248+jcharlong@users.noreply.github.com> Date: Thu, 30 Jul 2020 12:12:15 -0400 Subject: [PATCH 3/6] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7126b0a9..a54a1983 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,6 +12,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). - Start testing on PyPy. Due to [#342](https://github.com/PyFilesystem/pyfilesystem2/issues/342) we have to treat PyPy builds specially and allow them to fail, but at least we'll be able to see if we break something aside from known issues with FTP tests. +- Fixed crash when CPython's -OO flag is used ## [2.4.11] - 2019-09-07 From 1b1545031c5c672f2b89d8c08835a969329a455b Mon Sep 17 00:00:00 2001 From: jcharlong <58079248+jcharlong@users.noreply.github.com> Date: Fri, 31 Jul 2020 12:14:59 -0400 Subject: [PATCH 4/6] Update base.py Simplify if statement condition --- fs/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/base.py b/fs/base.py index 2be0441e..ae44e110 100644 --- a/fs/base.py +++ b/fs/base.py @@ -84,7 +84,7 @@ def _method(*args, **kwargs): """.format( method.__name__ ) - if hasattr(_method, "__doc__") and _method.__doc__ is not None: + if getattr(_method, "__doc__", None) is not None: _method.__doc__ += deprecated_msg return _method From 42caf6b6e742de845c3c04c9f282003fc9a12129 Mon Sep 17 00:00:00 2001 From: jcharlong <58079248+jcharlong@users.noreply.github.com> Date: Wed, 23 Sep 2020 16:28:31 -0400 Subject: [PATCH 5/6] Revert version bump Revert version bump since it is done as part of the merge/release process. --- fs/_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/_version.py b/fs/_version.py index 7dc85736..0e4134f2 100644 --- a/fs/_version.py +++ b/fs/_version.py @@ -1,3 +1,3 @@ """Version, used in module and setup.py. """ -__version__ = "2.4.12" +__version__ = "2.4.11" From f85985caad0755003e17265f0ad4100a8cc1430a Mon Sep 17 00:00:00 2001 From: jcharlong <58079248+jcharlong@users.noreply.github.com> Date: Wed, 23 Sep 2020 16:29:42 -0400 Subject: [PATCH 6/6] Add self to contributors Add self & maintain alphabetical order. --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 432bf23a..de54b668 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -6,6 +6,7 @@ Many thanks to the following developers for contributing to this project: - [Diego Argueta](https://github.com/dargueta) - [Geoff Jukes](https://github.com/geoffjukes) - [Giampaolo](https://github.com/gpcimino) +- [Justin Charlong](https://github.com/jcharlong) - [Louis Sautier](https://github.com/sbraz) - [Martin Larralde](https://github.com/althonos) - [Will McGugan](https://github.com/willmcgugan)