From 932b63be79d8b714c783ffa9c7a957d49b38dbb3 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Cong Date: Wed, 9 Apr 2025 12:11:38 +0200 Subject: [PATCH 1/7] chore: Support Python 3.12 and 3.13 --- .github/workflows/build.yml | 6 ++++-- tox.ini | 18 +++++++++++------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 570266547..da8bb9cb7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,6 +19,8 @@ jobs: - '3.9' - '3.10' - '3.11' + - '3.12' + - '3.13' name: Build with Python ${{ matrix.python-version }} steps: - name: Checkout @@ -39,10 +41,10 @@ jobs: steps: - name: Checkout uses: actions/checkout@v2 - - name: Set up Python 3.6 + - name: Set up Python 3.11 uses: actions/setup-python@v2 with: - python-version: '3.6' + python-version: '3.11' - name: Install dependencies run: | python -m pip install --upgrade pip diff --git a/tox.ini b/tox.ini index 88c7a32dd..68baa0994 100644 --- a/tox.ini +++ b/tox.ini @@ -16,6 +16,8 @@ envlist = py39, py310, py311, + py312, + py313, coverage, integration-tests @@ -30,6 +32,8 @@ python = 3.9: py39 3.10: py310 3.11: py311 + 3.12: py312 + 3.13: py313 [testenv] commands = @@ -53,21 +57,21 @@ deps = -rrequirements-test.txt [testenv:coverage] -basepython = python3.6 +basepython = python3.11 commands = py.test --cov boxsdk --cov-report term-missing test/unit test/integration deps = coverage -rrequirements-test.txt -[testenv:py36-build] +[testenv:py311-build] description = Build the source and binary wheel packages for distribution. pypi_dist_dir = {toxinidir}/pypi-dist commands = - rm -rf "{[testenv:py36-build]pypi_dist_dir}" + rm -rf "{[testenv:py311-build]pypi_dist_dir}" {envpython} setup.py -vv \ - sdist --formats=gztar --keep-temp --dist-dir="{[testenv:py36-build]pypi_dist_dir}" \ - bdist_wheel --keep-temp --dist-dir="{[testenv:py36-build]pypi_dist_dir}" + sdist --formats=gztar --keep-temp --dist-dir="{[testenv:py311-build]pypi_dist_dir}" \ + bdist_wheel --keep-temp --dist-dir="{[testenv:py311-build]pypi_dist_dir}" skip_install = True sitepackages = False recreate = True @@ -77,10 +81,10 @@ deps = virtualenv<20.22.0 allowlist_externals = rm -[testenv:py36-upload] +[testenv:py311-upload] description = Upload packages to PyPI. commands = - twine upload --config-file="{toxinidir}/.pypirc" {posargs} {[testenv:py36-build]pypi_dist_dir}/* + twine upload --config-file="{toxinidir}/.pypirc" {posargs} {[testenv:py311-build]pypi_dist_dir}/* skip_install = True sitepackages = False recreate = True From 87de000ed83f1ed3277a3c2c602c3677479bdc89 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Cong Date: Wed, 9 Apr 2025 12:24:48 +0200 Subject: [PATCH 2/7] Update setuptools --- setup.py | 2 +- tox.ini | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index 8c9dba0db..cb4c1bc80 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ def main(): redis_requires = ['redis>=2.10.3'] jwt_requires = ['pyjwt>=1.7.0', 'cryptography>=3'] coveralls_requires = ['coveralls'] - dev_requires = ['tox<=3.28.0'] + dev_requires = ['tox<=3.28.0', 'setuptools'] gh_requires = ['tox-gh-actions'] test_requires = [ 'bottle', diff --git a/tox.ini b/tox.ini index 68baa0994..b9be35746 100644 --- a/tox.ini +++ b/tox.ini @@ -77,7 +77,6 @@ sitepackages = False recreate = True deps = wheel - setuptools virtualenv<20.22.0 allowlist_externals = rm From 46f35ecc6598095febb3fc5d86107ef0e9f5e229 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Cong Date: Wed, 9 Apr 2025 12:26:46 +0200 Subject: [PATCH 3/7] Remove pypy --- tox.ini | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tox.ini b/tox.ini index b9be35746..146d3258d 100644 --- a/tox.ini +++ b/tox.ini @@ -8,11 +8,8 @@ envlist = pycodestyle, pylint, py36, - pypy36, py37, - pypy37, py38, - pypy38, py39, py310, py311, @@ -24,11 +21,8 @@ envlist = [gh-actions] python = 3.6: py36, pycodestyle, pylint - pypy-3.6: pypy36 3.7: py37 - pypy-3.7: pypy37 3.8: py38 - pypy-3.8: pypy38 3.9: py39 3.10: py310 3.11: py311 From 80bd8e6e8def59170684c426a4086438819809ad Mon Sep 17 00:00:00 2001 From: Minh Nguyen Cong Date: Wed, 9 Apr 2025 12:33:00 +0200 Subject: [PATCH 4/7] Update code --- .github/workflows/build.yml | 2 -- tox.ini | 2 -- 2 files changed, 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index da8bb9cb7..30c78a4ca 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,8 +19,6 @@ jobs: - '3.9' - '3.10' - '3.11' - - '3.12' - - '3.13' name: Build with Python ${{ matrix.python-version }} steps: - name: Checkout diff --git a/tox.ini b/tox.ini index 146d3258d..c3062087d 100644 --- a/tox.ini +++ b/tox.ini @@ -13,8 +13,6 @@ envlist = py39, py310, py311, - py312, - py313, coverage, integration-tests From fc2bed2b641d04689a13ff41b733a006e3cd4e26 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Cong Date: Wed, 9 Apr 2025 12:34:02 +0200 Subject: [PATCH 5/7] Update code --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index cb4c1bc80..8c9dba0db 100644 --- a/setup.py +++ b/setup.py @@ -63,7 +63,7 @@ def main(): redis_requires = ['redis>=2.10.3'] jwt_requires = ['pyjwt>=1.7.0', 'cryptography>=3'] coveralls_requires = ['coveralls'] - dev_requires = ['tox<=3.28.0', 'setuptools'] + dev_requires = ['tox<=3.28.0'] gh_requires = ['tox-gh-actions'] test_requires = [ 'bottle', From 67f8e0cb924df5f74e9884e4618edfee9857abee Mon Sep 17 00:00:00 2001 From: Minh Nguyen Cong Date: Wed, 9 Apr 2025 12:40:19 +0200 Subject: [PATCH 6/7] Update docs --- README.md | 9 +++++++-- setup.py | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index dd6e2821f..16f1d01a9 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,17 @@ Getting Started Docs: +- [Deprecation notice](#deprecation-notice) +- [Box Python SDK](#box-python-sdk) - [Installing](#installing) - [Getting Started](#getting-started) - [Authorization](#authorization) - [Server-to-Server Auth with JWT](#server-to-server-auth-with-jwt) - [Traditional 3-legged OAuth2](#traditional-3-legged-oauth2) + - [Get the Authorization URL](#get-the-authorization-url) + - [Authenticate (Get Access/Refresh Tokens)](#authenticate-get-accessrefresh-tokens) + - [Create an Authenticated Client](#create-an-authenticated-client) + - [Instantiate a Client Given an Access and a Refresh Token](#instantiate-a-client-given-an-access-and-a-refresh-token) - [Other Auth Options](#other-auth-options) - [Usage Documentation](#usage-documentation) - [Making API Calls Manually](#making-api-calls-manually) @@ -451,8 +457,7 @@ tox The tox tests include code style checks via pep8 and pylint. -The tox tests are configured to run on Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 -and PyPy (our CI is configured to run PyPy tests on pypy-3.6, pypy-3.7, pypy-3.8). +The tox tests are configured to run on Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11. # Questions, Bugs, and Feature Requests? diff --git a/setup.py b/setup.py index 8c9dba0db..6245fc7db 100644 --- a/setup.py +++ b/setup.py @@ -20,7 +20,6 @@ 'Programming Language :: Python :: 3.11', 'Programming Language :: Python :: 3.12', 'Programming Language :: Python :: Implementation :: CPython', - 'Programming Language :: Python :: Implementation :: PyPy', 'Operating System :: OS Independent', 'Operating System :: POSIX', 'Operating System :: Microsoft :: Windows', From a22efead13511501af7c97d084c7e13004f370c2 Mon Sep 17 00:00:00 2001 From: Minh Nguyen Cong Date: Wed, 9 Apr 2025 14:07:52 +0200 Subject: [PATCH 7/7] update tox --- tox.ini | 2 -- 1 file changed, 2 deletions(-) diff --git a/tox.ini b/tox.ini index c3062087d..182803998 100644 --- a/tox.ini +++ b/tox.ini @@ -24,8 +24,6 @@ python = 3.9: py39 3.10: py310 3.11: py311 - 3.12: py312 - 3.13: py313 [testenv] commands =