From e67a1ffca687f86492fedb9dbea50f4948a33fd0 Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Tue, 5 Dec 2023 13:44:14 +0000 Subject: [PATCH 1/8] Fix py 3.12 build --- .github/workflows/test.yml | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index d9827e92..9c5de110 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Build and Test on: merge_group: - pull_request_target: + pull_request: types: - opened - synchronize @@ -18,12 +18,6 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: - authorize: - name: Authorize - environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }} - runs-on: ubuntu-latest - steps: - - run: true run: needs: authorize # Require approval before running on forked pull requests @@ -47,13 +41,11 @@ jobs: strategy: matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] + python-version: ["3.12"] steps: - name: Checkout code uses: actions/checkout@v4 - with: - ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: Configure Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -62,7 +54,6 @@ jobs: - name: Configure dependencies run: | - sudo apt install bubblewrap pip install --user --upgrade pip pip install --user pipx pip install --user setuptools @@ -86,7 +77,3 @@ jobs: # flake8 . --count --show-source --statistics # isort . --diff --profile black # pyupgrade . --py37-plus --keep-runtime-typing - - - if: ${{ matrix.python-version == '3.10' }} - name: Upload coverage - uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # pin@3.1.4 From 89498440aebfc04d407559897213419b228c6428 Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Tue, 5 Dec 2023 14:25:38 +0000 Subject: [PATCH 2/8] Fix py 3.12 build II --- .github/workflows/adamtest.yml | 62 ++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 17 ++++++++-- 2 files changed, 77 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/adamtest.yml diff --git a/.github/workflows/adamtest.yml b/.github/workflows/adamtest.yml new file mode 100644 index 00000000..03965d73 --- /dev/null +++ b/.github/workflows/adamtest.yml @@ -0,0 +1,62 @@ +name: Adam Test + +on: + merge_group: + pull_request: + types: + - opened + - synchronize + push: + branches: + - py12-build-fix + +permissions: + contents: read + +jobs: + + run: + name: Run + runs-on: ubuntu-latest + + env: + BUBBLEWRAP_ARGUMENTS: | + --unshare-all \ + --clearenv \ + --ro-bind / / \ + --bind ${{ github.workspace }} ${{ github.workspace }} \ + --tmpfs $HOME \ + --tmpfs /tmp \ + --tmpfs /var \ + --dev /dev \ + --proc /proc \ + --die-with-parent \ + --new-session \ + + strategy: + matrix: + python-version: ["3.12"] + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Configure Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: "${{ matrix.python-version }}" + + - name: Configure dependencies + run: | + pip install --user --upgrade pip + pip install --user pipx + pip install --user setuptools + pipx ensurepath + pipx install poetry==1.4.2 + poetry config virtualenvs.in-project true + poetry install --with dev + poetry self add "poetry-dynamic-versioning[plugin]==1.1.1" + + - name: Run tests + run: | + poetry run pytest --cov=auth0 --cov-report=term-missing:skip-covered --cov-report=xml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9c5de110..63dd4aba 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -2,7 +2,7 @@ name: Build and Test on: merge_group: - pull_request: + pull_request_target: types: - opened - synchronize @@ -18,6 +18,12 @@ concurrency: cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} jobs: + authorize: + name: Authorize + environment: ${{ github.actor != 'dependabot[bot]' && github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }} + runs-on: ubuntu-latest + steps: + - run: true run: needs: authorize # Require approval before running on forked pull requests @@ -41,11 +47,13 @@ jobs: strategy: matrix: - python-version: ["3.12"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - name: Checkout code uses: actions/checkout@v4 + with: + ref: ${{ github.event.pull_request.head.sha || github.ref }} - name: Configure Python ${{ matrix.python-version }} uses: actions/setup-python@v4 @@ -54,6 +62,7 @@ jobs: - name: Configure dependencies run: | + sudo apt install bubblewrap pip install --user --upgrade pip pip install --user pipx pip install --user setuptools @@ -77,3 +86,7 @@ jobs: # flake8 . --count --show-source --statistics # isort . --diff --profile black # pyupgrade . --py37-plus --keep-runtime-typing + + - if: ${{ matrix.python-version == '3.10' }} + name: Upload coverage + uses: codecov/codecov-action@eaaf4bedf32dbdc6b720b63067d99c4d77d6047d # pin@3.1.4 \ No newline at end of file From e8ab0649269972250c9bf88a86f824016785d853 Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Tue, 5 Dec 2023 14:28:00 +0000 Subject: [PATCH 3/8] Fix py 3.12 build III --- .github/workflows/adamtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/adamtest.yml b/.github/workflows/adamtest.yml index 03965d73..7fde9662 100644 --- a/.github/workflows/adamtest.yml +++ b/.github/workflows/adamtest.yml @@ -50,7 +50,6 @@ jobs: run: | pip install --user --upgrade pip pip install --user pipx - pip install --user setuptools pipx ensurepath pipx install poetry==1.4.2 poetry config virtualenvs.in-project true @@ -59,4 +58,5 @@ jobs: - name: Run tests run: | + pip install setuptools poetry run pytest --cov=auth0 --cov-report=term-missing:skip-covered --cov-report=xml From 6b34150515650eb9a37616b0cbad2323da11b771 Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Tue, 5 Dec 2023 14:30:16 +0000 Subject: [PATCH 4/8] Fix py 3.12 build IV --- .github/workflows/adamtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/adamtest.yml b/.github/workflows/adamtest.yml index 7fde9662..147d296f 100644 --- a/.github/workflows/adamtest.yml +++ b/.github/workflows/adamtest.yml @@ -51,6 +51,7 @@ jobs: pip install --user --upgrade pip pip install --user pipx pipx ensurepath + pip install setuptools pipx install poetry==1.4.2 poetry config virtualenvs.in-project true poetry install --with dev @@ -58,5 +59,4 @@ jobs: - name: Run tests run: | - pip install setuptools poetry run pytest --cov=auth0 --cov-report=term-missing:skip-covered --cov-report=xml From d40fec8256285240cbac318aac2fff2529c4e0de Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Tue, 5 Dec 2023 14:33:35 +0000 Subject: [PATCH 5/8] Fix py 3.12 build V --- .github/workflows/adamtest.yml | 1 - poetry.lock | 19 ++++++++++++++++++- pyproject.toml | 1 + 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/adamtest.yml b/.github/workflows/adamtest.yml index 147d296f..77b49451 100644 --- a/.github/workflows/adamtest.yml +++ b/.github/workflows/adamtest.yml @@ -51,7 +51,6 @@ jobs: pip install --user --upgrade pip pip install --user pipx pipx ensurepath - pip install setuptools pipx install poetry==1.4.2 poetry config virtualenvs.in-project true poetry install --with dev diff --git a/poetry.lock b/poetry.lock index f0a4b02f..14174e3f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -976,6 +976,23 @@ urllib3 = ">=1.25.10,<3.0" [package.extras] tests = ["coverage (>=6.0.0)", "flake8", "mypy", "pytest (>=7.0.0)", "pytest-asyncio", "pytest-cov", "pytest-httpserver", "tomli", "tomli-w", "types-requests"] +[[package]] +name = "setuptools" +version = "69.0.2" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "dev" +optional = false +python-versions = ">=3.8" +files = [ + {file = "setuptools-69.0.2-py3-none-any.whl", hash = "sha256:1e8fdff6797d3865f37397be788a4e3cba233608e9b509382a2777d25ebde7f2"}, + {file = "setuptools-69.0.2.tar.gz", hash = "sha256:735896e78a4742605974de002ac60562d286fa8051a7e2299445e8e8fbb01aa6"}, +] + +[package.extras] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv]", "filelock (>=3.4.0)", "flake8-2020", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "pip (>=19.1)", "pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff", "pytest-timeout", "pytest-xdist", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] +testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.1)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] + [[package]] name = "tomli" version = "2.0.1" @@ -1124,4 +1141,4 @@ multidict = ">=4.0" [metadata] lock-version = "2.0" python-versions = ">=3.8" -content-hash = "9ef8b2e393a47e4a8d2fd4bd5a703cb91f92218bafe14a0b57c937fecf7ade50" +content-hash = "b1a07194f3bc6a36905d6292b76b2ba1ee5ed63dcc400b9094776a407cc12b2b" diff --git a/pyproject.toml b/pyproject.toml index 8508ce54..25294e2a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -43,3 +43,4 @@ pytest-aiohttp = "^1.0.4" pytest-asyncio = "^0.21.1" pytest-cov = "^4.1.0" responses = "^0.23.3" +setuptools = "^69.0.2" From ba6d720762de00e106826c021add61ac6bf5aa4f Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Tue, 5 Dec 2023 14:45:43 +0000 Subject: [PATCH 6/8] Fix py 3.12 build VI --- .github/workflows/test.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 63dd4aba..200265a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -69,8 +69,8 @@ jobs: pipx ensurepath pipx install poetry==1.4.2 poetry config virtualenvs.in-project true - poetry install --with dev - poetry self add "poetry-dynamic-versioning[plugin]==1.1.1" + poetry install --with dev --verbose + poetry self add "poetry-dynamic-versioning[plugin]==1.1.1" --verbose - name: Run tests run: | From f92b675cbec6b10e3024c4c258b9a4d1189bbb31 Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Tue, 5 Dec 2023 14:46:40 +0000 Subject: [PATCH 7/8] Fix py 3.12 build VII --- .github/workflows/adamtest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/adamtest.yml b/.github/workflows/adamtest.yml index 77b49451..31a2761f 100644 --- a/.github/workflows/adamtest.yml +++ b/.github/workflows/adamtest.yml @@ -53,8 +53,8 @@ jobs: pipx ensurepath pipx install poetry==1.4.2 poetry config virtualenvs.in-project true - poetry install --with dev - poetry self add "poetry-dynamic-versioning[plugin]==1.1.1" + poetry install --with dev --verbose + poetry self add "poetry-dynamic-versioning[plugin]==1.1.1" --verbose - name: Run tests run: | From 843132a1cd5993cdf9792b2df7bc7ab57fa49ce3 Mon Sep 17 00:00:00 2001 From: Adam Mcgrath Date: Tue, 5 Dec 2023 14:54:58 +0000 Subject: [PATCH 8/8] Fix py 3.12 build VIII --- .github/workflows/adamtest.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/adamtest.yml b/.github/workflows/adamtest.yml index 31a2761f..12b65f9f 100644 --- a/.github/workflows/adamtest.yml +++ b/.github/workflows/adamtest.yml @@ -51,7 +51,7 @@ jobs: pip install --user --upgrade pip pip install --user pipx pipx ensurepath - pipx install poetry==1.4.2 + pipx install poetry poetry config virtualenvs.in-project true poetry install --with dev --verbose poetry self add "poetry-dynamic-versioning[plugin]==1.1.1" --verbose