-
Notifications
You must be signed in to change notification settings - Fork 264
Add support for Python 3.14 #7240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
f490e6a
c876974
fac9607
3e6e2a3
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ classifiers = [ | |
| dependencies = [ | ||
| 'alembic~=1.8', | ||
| 'archive-path~=0.4.2', | ||
| "asyncssh~=2.19.0", | ||
| "asyncssh~=2.21.0", | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd go for
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ok I see. |
||
| 'circus~=0.19.0', | ||
| 'click-spinner~=0.1.8', | ||
| 'click>=8.1.0,<8.3', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -10,6 +10,8 @@ | |
|
|
||
| from __future__ import annotations | ||
|
|
||
| __all__ = ('url2pathname',) | ||
|
|
||
| import filecmp | ||
| import inspect | ||
| import io | ||
|
|
@@ -659,3 +661,25 @@ def batch_iter( | |
| # balance between memory efficiency and database round-trip overhead. Setting it too low increases | ||
| # the number of database queries needed, while setting it too high increases memory consumption. | ||
| DEFAULT_BATCH_SIZE: int = 1000 | ||
|
|
||
| # To obtain pre py3.14 behavior of url2pathname we copied the code to here | ||
| # https://github.com/python/cpython/blob/1a2b0fb3e5eac4e767e6bbb0b2c3cedaedafc07b/Lib/urllib/request.py#L1664-L1679 | ||
| # Only minor changes were applied to conform with mypy | ||
| if os.name == 'nt': | ||
| from nturl2path import url2pathname | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This still has the same behavior as before?
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. So this is a 1to1 copy from as from py3.13, where this function seemed to still have worked in profile code. The if case is probably not needed because it is for Window NT but i just kept it to be sure to have the same behavior. |
||
| else: | ||
| from urllib.parse import unquote | ||
|
|
||
| def url2pathname(url: str) -> str: | ||
| """OS-specific conversion from a relative URL of the 'file' scheme | ||
| to a file system path; not recommended for general use.""" | ||
| if url[:3] == '///': | ||
| # URL has an empty authority section, so the path begins on the | ||
| # third character. | ||
| url = url[2:] | ||
| elif url[:12] == '//localhost/': | ||
| # Skip past 'localhost' authority. | ||
| url = url[11:] | ||
| encoding = sys.getfilesystemencoding() | ||
| errors = sys.getfilesystemencodeerrors() | ||
| return unquote(url, encoding=encoding, errors=errors) | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| content: QbStrField('content', dtype=<class 'str'>, is_attribute=False) | ||
| ctime: QbNumericField('ctime', dtype=typing.Optional[datetime.datetime], is_attribute=False) | ||
| mtime: QbNumericField('mtime', dtype=typing.Optional[datetime.datetime], is_attribute=False) | ||
| ctime: QbNumericField('ctime', dtype=datetime.datetime | None, is_attribute=False) | ||
| mtime: QbNumericField('mtime', dtype=datetime.datetime | None, is_attribute=False) | ||
| node: QbNumericField('node', dtype=<class 'int'>, is_attribute=False) | ||
| pk: QbNumericField('pk', dtype=typing.Optional[int], is_attribute=False) | ||
| pk: QbNumericField('pk', dtype=int | None, is_attribute=False) | ||
| user: QbNumericField('user', dtype=<class 'int'>, is_attribute=False) | ||
| uuid: QbStrField('uuid', dtype=typing.Optional[str], is_attribute=False) | ||
| uuid: QbStrField('uuid', dtype=str | None, is_attribute=False) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,9 +1,9 @@ | ||
| description: QbStrField('description', dtype=typing.Optional[str], is_attribute=False) | ||
| extras: QbDictField('extras', dtype=typing.Optional[typing.Dict[str, typing.Any]], | ||
| is_attribute=False, is_subscriptable=True) | ||
| description: QbStrField('description', dtype=str | None, is_attribute=False) | ||
| extras: QbDictField('extras', dtype=typing.Dict[str, typing.Any] | None, is_attribute=False, | ||
| is_subscriptable=True) | ||
| label: QbStrField('label', dtype=<class 'str'>, is_attribute=False) | ||
| pk: QbNumericField('pk', dtype=typing.Optional[int], is_attribute=False) | ||
| time: QbNumericField('time', dtype=typing.Optional[datetime.datetime], is_attribute=False) | ||
| pk: QbNumericField('pk', dtype=int | None, is_attribute=False) | ||
| time: QbNumericField('time', dtype=datetime.datetime | None, is_attribute=False) | ||
| type_string: QbStrField('type_string', dtype=<class 'str'>, is_attribute=False) | ||
| user: QbNumericField('user', dtype=<class 'int'>, is_attribute=False) | ||
| uuid: QbStrField('uuid', dtype=<class 'str'>, is_attribute=False) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,20 +1,20 @@ | ||
| arrays: QbDictField('arrays', dtype=typing.Optional[dict[str, bytes]], is_attribute=True) | ||
| attributes: QbDictField('attributes', dtype=typing.Optional[typing.Dict[str, typing.Any]], | ||
| is_attribute=False, is_subscriptable=True) | ||
| computer: QbNumericField('computer', dtype=typing.Optional[int], is_attribute=False) | ||
| ctime: QbNumericField('ctime', dtype=typing.Optional[datetime.datetime], is_attribute=False) | ||
| description: QbStrField('description', dtype=typing.Optional[str], is_attribute=False) | ||
| extras: QbDictField('extras', dtype=typing.Optional[typing.Dict[str, typing.Any]], | ||
| is_attribute=False, is_subscriptable=True) | ||
| label: QbStrField('label', dtype=typing.Optional[str], is_attribute=False) | ||
| mtime: QbNumericField('mtime', dtype=typing.Optional[datetime.datetime], is_attribute=False) | ||
| node_type: QbStrField('node_type', dtype=typing.Optional[str], is_attribute=False) | ||
| pk: QbNumericField('pk', dtype=typing.Optional[int], is_attribute=False) | ||
| process_type: QbStrField('process_type', dtype=typing.Optional[str], is_attribute=False) | ||
| repository_content: QbDictField('repository_content', dtype=typing.Optional[dict[str, | ||
| bytes]], is_attribute=False) | ||
| repository_metadata: QbDictField('repository_metadata', dtype=typing.Optional[typing.Dict[str, | ||
| typing.Any]], is_attribute=False) | ||
| source: QbDictField('source', dtype=typing.Optional[dict], is_attribute=True, is_subscriptable=True) | ||
| user: QbNumericField('user', dtype=typing.Optional[int], is_attribute=False) | ||
| uuid: QbStrField('uuid', dtype=typing.Optional[str], is_attribute=False) | ||
| arrays: QbDictField('arrays', dtype=dict[str, bytes] | None, is_attribute=True) | ||
| attributes: QbDictField('attributes', dtype=typing.Dict[str, typing.Any] | None, is_attribute=False, | ||
| is_subscriptable=True) | ||
| computer: QbNumericField('computer', dtype=int | None, is_attribute=False) | ||
| ctime: QbNumericField('ctime', dtype=datetime.datetime | None, is_attribute=False) | ||
| description: QbStrField('description', dtype=str | None, is_attribute=False) | ||
| extras: QbDictField('extras', dtype=typing.Dict[str, typing.Any] | None, is_attribute=False, | ||
| is_subscriptable=True) | ||
| label: QbStrField('label', dtype=str | None, is_attribute=False) | ||
| mtime: QbNumericField('mtime', dtype=datetime.datetime | None, is_attribute=False) | ||
| node_type: QbStrField('node_type', dtype=str | None, is_attribute=False) | ||
| pk: QbNumericField('pk', dtype=int | None, is_attribute=False) | ||
| process_type: QbStrField('process_type', dtype=str | None, is_attribute=False) | ||
| repository_content: QbDictField('repository_content', dtype=dict[str, bytes] | None, | ||
| is_attribute=False) | ||
| repository_metadata: QbDictField('repository_metadata', dtype=typing.Dict[str, typing.Any] | ||
| | None, is_attribute=False) | ||
| source: QbDictField('source', dtype=dict | None, is_attribute=True, is_subscriptable=True) | ||
| user: QbNumericField('user', dtype=int | None, is_attribute=False) | ||
| uuid: QbStrField('uuid', dtype=str | None, is_attribute=False) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,31 +1,30 @@ | ||
| array_labels: QbArrayField('array_labels', dtype=typing.Optional[typing.List[str]], | ||
| is_attribute=True) | ||
| arrays: QbDictField('arrays', dtype=typing.Optional[dict[str, bytes]], is_attribute=True) | ||
| attributes: QbDictField('attributes', dtype=typing.Optional[typing.Dict[str, typing.Any]], | ||
| is_attribute=False, is_subscriptable=True) | ||
| array_labels: QbArrayField('array_labels', dtype=typing.List[str] | None, is_attribute=True) | ||
| arrays: QbDictField('arrays', dtype=dict[str, bytes] | None, is_attribute=True) | ||
| attributes: QbDictField('attributes', dtype=typing.Dict[str, typing.Any] | None, is_attribute=False, | ||
| is_subscriptable=True) | ||
| cell: QbArrayField('cell', dtype=typing.List[typing.List[float]], is_attribute=True) | ||
| computer: QbNumericField('computer', dtype=typing.Optional[int], is_attribute=False) | ||
| ctime: QbNumericField('ctime', dtype=typing.Optional[datetime.datetime], is_attribute=False) | ||
| description: QbStrField('description', dtype=typing.Optional[str], is_attribute=False) | ||
| extras: QbDictField('extras', dtype=typing.Optional[typing.Dict[str, typing.Any]], | ||
| is_attribute=False, is_subscriptable=True) | ||
| label: QbStrField('label', dtype=typing.Optional[str], is_attribute=False) | ||
| computer: QbNumericField('computer', dtype=int | None, is_attribute=False) | ||
| ctime: QbNumericField('ctime', dtype=datetime.datetime | None, is_attribute=False) | ||
| description: QbStrField('description', dtype=str | None, is_attribute=False) | ||
| extras: QbDictField('extras', dtype=typing.Dict[str, typing.Any] | None, is_attribute=False, | ||
| is_subscriptable=True) | ||
| label: QbStrField('label', dtype=str | None, is_attribute=False) | ||
| label_numbers: QbArrayField('label_numbers', dtype=typing.List[int], is_attribute=True) | ||
| labels: QbArrayField('labels', dtype=typing.List[str], is_attribute=True) | ||
| mesh: QbArrayField('mesh', dtype=typing.List[int], is_attribute=True) | ||
| mtime: QbNumericField('mtime', dtype=typing.Optional[datetime.datetime], is_attribute=False) | ||
| node_type: QbStrField('node_type', dtype=typing.Optional[str], is_attribute=False) | ||
| mtime: QbNumericField('mtime', dtype=datetime.datetime | None, is_attribute=False) | ||
| node_type: QbStrField('node_type', dtype=str | None, is_attribute=False) | ||
| offset: QbArrayField('offset', dtype=typing.List[float], is_attribute=True) | ||
| pbc1: QbField('pbc1', dtype=<class 'bool'>, is_attribute=True) | ||
| pbc2: QbField('pbc2', dtype=<class 'bool'>, is_attribute=True) | ||
| pbc3: QbField('pbc3', dtype=<class 'bool'>, is_attribute=True) | ||
| pk: QbNumericField('pk', dtype=typing.Optional[int], is_attribute=False) | ||
| process_type: QbStrField('process_type', dtype=typing.Optional[str], is_attribute=False) | ||
| repository_content: QbDictField('repository_content', dtype=typing.Optional[dict[str, | ||
| bytes]], is_attribute=False) | ||
| repository_metadata: QbDictField('repository_metadata', dtype=typing.Optional[typing.Dict[str, | ||
| typing.Any]], is_attribute=False) | ||
| source: QbDictField('source', dtype=typing.Optional[dict], is_attribute=True, is_subscriptable=True) | ||
| pk: QbNumericField('pk', dtype=int | None, is_attribute=False) | ||
| process_type: QbStrField('process_type', dtype=str | None, is_attribute=False) | ||
| repository_content: QbDictField('repository_content', dtype=dict[str, bytes] | None, | ||
| is_attribute=False) | ||
| repository_metadata: QbDictField('repository_metadata', dtype=typing.Dict[str, typing.Any] | ||
| | None, is_attribute=False) | ||
| source: QbDictField('source', dtype=dict | None, is_attribute=True, is_subscriptable=True) | ||
| units: QbStrField('units', dtype=<class 'str'>, is_attribute=True) | ||
| user: QbNumericField('user', dtype=typing.Optional[int], is_attribute=False) | ||
| uuid: QbStrField('uuid', dtype=typing.Optional[str], is_attribute=False) | ||
| user: QbNumericField('user', dtype=int | None, is_attribute=False) | ||
| uuid: QbStrField('uuid', dtype=str | None, is_attribute=False) |
Uh oh!
There was an error while loading. Please reload this page.