Skip to content
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

Add python 3.13 support #187

Merged
merged 10 commits into from
Nov 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8, 3.9, "3.10", 3.11, 3.12, 3.13]
python-version: [3.9, "3.10", 3.11, 3.12, 3.13]
steps:
- uses: actions/checkout@v2

Expand Down
34 changes: 2 additions & 32 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ __pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
build/
Expand Down Expand Up @@ -47,40 +44,15 @@ coverage.xml
.hypothesis/
.pytest_cache/

# Translations
*.mo
*.pot

# Django stuff:
*.log
local_settings.py
db.sqlite3

# Flask stuff:
instance/
.webassets-cache

# Scrapy stuff:
.scrapy

# Sphinx documentation
docs/_build/

# PyBuilder
target/

# Jupyter Notebook
.ipynb_checkpoints

# pyenv
.python-version

# celery beat schedule file
celerybeat-schedule

# SageMath parsed files
*.sage.py

# Environments
.env
.venv
Expand All @@ -97,13 +69,11 @@ venv.bak/
# Rope project settings
.ropeproject

# mkdocs documentation
/site

# mypy
.mypy_cache/

# PyCharm
.idea/

pyproject.toml
# Pipfile
Pipfile.lock
1 change: 1 addition & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"
python_version = "3.13"

[packages]
moto = "*"
Expand Down
1 change: 1 addition & 0 deletions docs/advance.rst
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ To enable the old (pathlib common) Algorithm you can configure it like this:
>>> path = PureS3Path('/')
>>> register_configuration_parameter(path, glob_new_algorithm=False)

**Note: from version 0.6.0 glob implementation will work only with the new algorithm, there for the glob_new_algorithm arg is in depreciation cycle**

.. _pathlib : https://docs.python.org/3/library/pathlib.html
.. _boto3 : https://github.com/boto/boto3
Expand Down
11 changes: 9 additions & 2 deletions docs/interface.rst
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ In other words, it enables recursive globbing:
S3Path('/pypi-proxy/boto3/index.html'),
S3Path('/pypi-proxy/botocore/index.html')]

New in version 0.4.0:

In version 0.4.0:
New Algorithm that better suited to s3 API.
Especially for recursive searches.

Expand All @@ -169,6 +170,9 @@ To enable the old (pathlib common) Algorithm you can configure it like this:

register_configuration_parameter(path, glob_new_algorithm=False)

New version 0.6.0:
glob implementation will work only with the new algorithm, there for the glob_new_algorithm arg is in depreciation cycle

For more configuration details please see this `Advanced S3Path configuration`_

**NOTE:** Using the "**" pattern in large Buckets may consume an inordinate amount of time in the old algorithm.
Expand Down Expand Up @@ -325,10 +329,13 @@ This is like calling S3Path.glob_ with ``"**/"`` added in front of the given rel
S3Path('/pypi-proxy/index.html'),
S3Path('/pypi-proxy/botocore/index.html')]

New in version 0.4.0:
Version 0.4.0:
New Algorithm that better suited to s3 API.
Especially for recursive searches.

New version 0.6.0:
glob implementation will work only with the new algorithm, there for the glob_new_algorithm arg is in depreciation cycle

S3Path.rmdir()
^^^^^^^^^^^^^^

Expand Down
2 changes: 1 addition & 1 deletion s3path/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from pathlib import Path
from . import accessor

__version__ = '0.5.8'
__version__ = '0.6.0'
__all__ = (
'Path',
'register_configuration_parameter',
Expand Down
3 changes: 3 additions & 0 deletions s3path/accessor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import sys
import importlib.util
from warnings import warn
from os import stat_result
from threading import Lock
from itertools import chain
Expand Down Expand Up @@ -493,6 +494,8 @@ def set_configuration(self, path, *, resource=None, arguments=None, glob_new_alg
if resource is not None:
self.resources[path_name] = resource
if glob_new_algorithm is not None:
warn(f'glob_new_algorithm Configuration is Deprecated, '
f'in the new version we use only the new algorithm for Globing', category=DeprecationWarning)
self.general_options[path_name] = {'glob_new_algorithm': glob_new_algorithm}
self.get_configuration.cache_clear()

Expand Down
Loading
Loading