Skip to content

Commit b7621e8

Browse files
Revert "Merge v5 branch into master – Auth0 Python SDK v5.0.0 (#768)"
This reverts commit f966475.
1 parent f966475 commit b7621e8

2,438 files changed

Lines changed: 12557 additions & 223333 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.fern/metadata.json

Lines changed: 0 additions & 15 deletions
This file was deleted.

.fernignore

Lines changed: 0 additions & 27 deletions
This file was deleted.

.flake8

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[flake8]
2+
ignore = E501 F401
3+
max-line-length = 88

.github/workflows/v5-ci.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Test (v5)
2+
3+
on:
4+
push:
5+
branches:
6+
- v5
7+
pull_request:
8+
branches:
9+
- v5
10+
jobs:
11+
compile:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
- name: Set up python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: 3.8
20+
- name: Bootstrap poetry
21+
run: |
22+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
23+
- name: Install dependencies
24+
run: poetry install
25+
- name: Compile
26+
run: poetry run mypy .
27+
test:
28+
runs-on: ubuntu-latest
29+
steps:
30+
- name: Checkout repo
31+
uses: actions/checkout@v4
32+
- name: Set up python
33+
uses: actions/setup-python@v4
34+
with:
35+
python-version: 3.8
36+
- name: Bootstrap poetry
37+
run: |
38+
curl -sSL https://install.python-poetry.org | python - -y --version 1.5.1
39+
- name: Install dependencies
40+
run: poetry install
41+
42+
- name: Test
43+
run: poetry run pytest -rP .

.github/workflows/v5-publish.yml

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
name: Publish Release (v5)
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: 'Target environment'
8+
type: choice
9+
required: true
10+
options:
11+
- testpypi
12+
- pypi
13+
default: 'testpypi'
14+
pull_request:
15+
branches:
16+
- v5
17+
18+
permissions:
19+
contents: write
20+
id-token: write
21+
22+
jobs:
23+
publish-pypi:
24+
name: "PyPI"
25+
runs-on: ubuntu-latest
26+
environment: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.environment || 'testpypi' }}
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v5
31+
with:
32+
fetch-depth: 0
33+
fetch-tags: true
34+
35+
- id: get_version
36+
name: Get version from pyproject.toml
37+
run: |
38+
VERSION=$(grep '^version = ' pyproject.toml | sed 's/version = "\(.*\)"/\1/')
39+
echo "version=$VERSION" >> $GITHUB_OUTPUT
40+
echo "Version: $VERSION"
41+
42+
- id: get_prerelease
43+
name: Determine if pre-release
44+
run: |
45+
VERSION="${{ steps.get_version.outputs.version }}"
46+
if [[ "$VERSION" =~ (a|alpha|b|beta|rc)[0-9]* ]]; then
47+
echo "prerelease=true" >> $GITHUB_OUTPUT
48+
echo "Pre-release: true"
49+
else
50+
echo "prerelease=false" >> $GITHUB_OUTPUT
51+
echo "Stable release"
52+
fi
53+
54+
- name: Create GitHub Release
55+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'pypi'
56+
id: create_release
57+
uses: actions/create-release@v1
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
with:
61+
tag_name: v${{ steps.get_version.outputs.version }}
62+
release_name: v${{ steps.get_version.outputs.version }}
63+
body: |
64+
See [v5_MIGRATION_GUIDE.md](https://github.com/${{ github.repository }}/blob/main/v5_MIGRATION_GUIDE.md) for migration instructions.
65+
draft: false
66+
prerelease: ${{ steps.get_prerelease.outputs.prerelease }}
67+
68+
- name: Configure Python
69+
uses: actions/setup-python@v6
70+
with:
71+
python-version: "3.10"
72+
73+
- name: Configure dependencies
74+
run: |
75+
pip install --user --upgrade pip
76+
pip install --user pipx
77+
pipx ensurepath
78+
pipx install poetry
79+
poetry config virtualenvs.in-project true
80+
poetry install
81+
82+
- name: Build release
83+
run: |
84+
poetry build
85+
ls -lh dist/
86+
echo "Build successful! Artifacts created:"
87+
ls -lh dist/
88+
89+
- name: Publish to Test PyPI
90+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'testpypi'
91+
uses: pypa/gh-action-pypi-publish@release/v1
92+
with:
93+
repository-url: https://test.pypi.org/legacy/
94+
skip-existing: true
95+
print-hash: true
96+
97+
- name: Publish to PyPI
98+
if: github.event_name == 'workflow_dispatch' && github.event.inputs.environment == 'pypi'
99+
uses: pypa/gh-action-pypi-publish@release/v1
100+
with:
101+
print-hash: true
102+
103+
- name: Summary
104+
run: |
105+
echo "### Release Summary" >> $GITHUB_STEP_SUMMARY
106+
echo "" >> $GITHUB_STEP_SUMMARY
107+
echo "- Version: ${{ steps.get_version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
108+
echo "- Environment: ${{ github.event.inputs.environment }}" >> $GITHUB_STEP_SUMMARY
109+
echo "- Pre-release: ${{ steps.get_prerelease.outputs.prerelease }}" >> $GITHUB_STEP_SUMMARY

.gitignore

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ bin/
2727
.pypirc
2828
pyvenv.cfg
2929
.python-version
30-
poetry.toml
3130

3231
# Installer logs
3332
pip-log.txt
@@ -43,11 +42,7 @@ nosetests.xml
4342
coverage.xml
4443
*,cover
4544
.hypothesis/
46-
.pytest_cache/
47-
.mypy_cache/
48-
49-
# Linting
50-
.ruff_cache/
45+
.pytest_cache
5146

5247
# Translations
5348
*.mo
@@ -56,10 +51,12 @@ coverage.xml
5651
# Sphinx documentation
5752
docs/build/
5853

59-
# IDEs
54+
# IDEA
6055
.idea/
6156
*.iml
57+
58+
# VSCode
6259
.vscode/
6360

6461
# OS-specific files
65-
.DS_Store
62+
.DS_Store

.pre-commit-config.yaml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.1.0
4+
hooks:
5+
- id: check-yaml
6+
- id: end-of-file-fixer
7+
- id: trailing-whitespace
8+
9+
- repo: https://github.com/pycqa/flake8
10+
rev: 5.0.4
11+
hooks:
12+
- id: flake8
13+
14+
- repo: https://github.com/asottile/pyupgrade
15+
rev: v3.3.2
16+
hooks:
17+
- id: pyupgrade
18+
args: [--keep-runtime-typing]
19+
20+
- repo: https://github.com/pycqa/isort
21+
rev: 5.11.5
22+
hooks:
23+
- id: isort
24+
args: ["--profile", "black"]
25+
26+
- repo: https://github.com/psf/black
27+
rev: 23.3.0
28+
hooks:
29+
- id: black
30+
31+
- repo: https://github.com/python-poetry/poetry
32+
rev: 1.4.2
33+
hooks:
34+
- id: poetry-check
35+
- id: poetry-lock
36+
- id: poetry-export
37+
args: ["--with", "dev", "--without-hashes", "--format", "requirements.txt", "--output", "requirements.txt"]

.version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
5.0.0b0
1+
4.13.0

CHANGELOG.md

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,5 @@
11
# Change Log
22

3-
## [5.0.0b0](https://github.com/auth0/auth0-python/tree/5.0.0b0) (2025-12-18)
4-
[Full Changelog](https://github.com/auth0/auth0-python/compare/4.13.0...5.0.0b0)
5-
6-
⚠️ **BETA RELEASE** - This is a beta release with significant breaking changes. Please test thoroughly before upgrading production systems.
7-
8-
**Breaking Changes**
9-
10-
- **Complete rewrite of Management API client** - Generated from Auth0's OpenAPI specifications using [Fern](https://buildwithfern.com)
11-
- **Python 3.7 support dropped** - Minimum required version is now Python 3.8
12-
- **Management API client restructured** - Methods organized into modular sub-clients for better discoverability
13-
- **Method signatures changed** - Consistent and predictable naming conventions across all endpoints
14-
- **Response types changed** - Strongly-typed Pydantic models replace generic dictionaries
15-
- **Import paths changed** - `from auth0.management.core.api_error import ApiError` instead of `from auth0.exceptions import Auth0Error`
16-
- **Pagination defaults changed** - `include_totals=True` is now the default for list operations
17-
- **Client initialization simplified** - `ManagementClient` takes `domain` instead of full `base_url`
18-
19-
**Added**
20-
21-
- First-class async support with `AsyncAuth0` and `AsyncManagementClient`
22-
- Automatic token management with client credentials in `ManagementClient`
23-
- Built-in pagination support with `include_totals=True` by default
24-
- Type-safe request/response objects using Pydantic models
25-
- Better IntelliSense and code completion support
26-
- Comprehensive API reference documentation
27-
- Migration guide for upgrading from v4.x
28-
29-
**Changed**
30-
31-
- Management API client fully regenerated using Fern
32-
- Package structure reorganized with hierarchical sub-clients
33-
- Error handling updated to use `ApiError` base class
34-
- Documentation updated with v5 examples
35-
36-
**Note**
37-
38-
- Authentication API remains **fully backward compatible** - no changes required
39-
- See [v5_MIGRATION_GUIDE.md](https://github.com/auth0/auth0-python/blob/v5/v5_MIGRATION_GUIDE.md) for detailed upgrade instructions
40-
41-
423
## [4.13.0](https://github.com/auth0/auth0-python/tree/4.13.0) (2025-09-17)
434
[Full Changelog](https://github.com/auth0/auth0-python/compare/4.12.0...4.13.0)
445

DEVELOPMENT.rst

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Instructions to upload auth0-python to PyPI
2+
===========================================
3+
4+
1) Create a ``.pypirc`` file in your home directory with the following
5+
contents (replace ``<username>`` and ``<password>`` with your PyPI
6+
credentials):
7+
8+
.. code-block::
9+
10+
[distutils]
11+
index-servers =
12+
pypi
13+
14+
[pypi]
15+
repository: https://pypi.python.org/pypi
16+
username=<username>
17+
password=<password>
18+
19+
2) Bump the version number in ``auth0/__init__.py``.
20+
21+
3) Make sure you add changes to the `changelog <./CHANGELOG.md>`__.
22+
23+
4) Run the following command:
24+
25+
.. code-block:: bash
26+
27+
python3 setup.py sdist bdist_wheel --universal
28+
twine upload --repository-url https://upload.pypi.org/legacy/ dist/*
29+
30+
or do it using docker:
31+
32+
.. code-block:: bash
33+
34+
sh publish.sh

0 commit comments

Comments
 (0)