Skip to content

Commit

Permalink
add release note and update _internal/datetime.py
Browse files Browse the repository at this point in the history
  • Loading branch information
mabdinur committed Apr 29, 2022
1 parent 99dae37 commit ba969e0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ their individual contributions.
* `Maxim Kulkin <https://www.github.com/maximkulkin>`_ (maxim.kulkin@gmail.com)
* `Michel Alexandre Salim <https://github.com/michel-slm>`_ (michel@michel-slm.name)
* `mulkieran <https://www.github.com/mulkieran>`_
* `Munir Abdinur <https://www.github.com/mabdinur>`_
* `Nicholas Chammas <https://www.github.com/nchammas>`_
* `Nick Anyos <https://www.github.com/NickAnyos>`_
* `Nikita Sobolev <https://github.com/sobolevn>`_ (mail@sobolevn.me)
Expand Down
6 changes: 6 additions & 0 deletions hypothesis-python/RELEASE.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
RELEASE_TYPE: patch
This release catches a ValueError when `importlib.abc.Traversable.read_text` attempts to read a DegenerateFile in python 3.10. To avoid raising this error we should fallback to using `importlib.resources.read_text`.

Note: `importlib.resources.read_text` is deprecated in python 3.10 and this error will resurface when python 3.8 support is dropped.

Thanks to Munir Abdinur for this contribution.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ def _valid_key_cacheable(tzpath, key):
try:
traversable = resources.files(package) / resource_name
return traversable.exists()
except AttributeError:
except (AttributeError, ValueError):
# .files() was added in Python 3.9
return resources.is_resource(package, resource_name)
except ModuleNotFoundError:
Expand Down

0 comments on commit ba969e0

Please sign in to comment.