Skip to content

Commit

Permalink
fix pydantic validation compatiblity
Browse files Browse the repository at this point in the history
Pydantic now requires typing_extensions use on all pre-3.12 Python
versions.
See
https://github.com/pydantic/pydantic/pull/6370/files#diff-4b71c6b75773e0ee81bdfe8a88a4f2d4eb9eba8b0548ccb190a7a6adffec3d07R293-R294
for details.
  • Loading branch information
mjurbanski-reef committed Jul 25, 2023
1 parent 50f37cc commit 64a9d52
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed
* Require `typing_extensions` on Python 3.11 (already required on earlier versinons) for better compatiblity with pydantic v2

Check failure on line 10 in CHANGELOG.md

View workflow job for this annotation

GitHub Actions / lint

compatiblity ==> compatibility

## [1.22.1] - 2023-07-24

### Fixed
Expand Down
4 changes: 2 additions & 2 deletions b2sdk/raw_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
from typing import Any

try:
from typing import NotRequired, TypedDict
except ImportError:
from typing_extensions import NotRequired, TypedDict
except ImportError:
from typing import NotRequired, TypedDict

from b2sdk.http_constants import FILE_INFO_HEADER_PREFIX
from b2sdk.utils.docs import ensure_b2sdk_doc_urls
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ importlib-metadata>=3.3.0; python_version < '3.8'
logfury>=1.0.1,<2.0.0
requests>=2.9.1,<3.0.0
tqdm>=4.5.0,<5.0.0
typing-extensions>=4.7.1; python_version < '3.11'
typing-extensions>=4.7.1; python_version < '3.12'

0 comments on commit 64a9d52

Please sign in to comment.