Skip to content

Commit 97b017b

Browse files
authored
APP-8146: Bumped deps to the latest and drop support for Python 3.8 (#700)
* APP-8146: Bumped deps to the latest and drop support for `Python 3.8` * [ci] Fixed conda publish and pyatlan image build workflows * APP-8066: Add python version in SDK headers * [release] Bumped to release `7.2.0`
1 parent 7ab85a2 commit 97b017b

File tree

16 files changed

+514
-1150
lines changed

16 files changed

+514
-1150
lines changed

.conda-envs/meta.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@ build:
1111

1212
requirements:
1313
host:
14-
- jinja2 ==3.1.5
14+
- jinja2 ~=3.1.6
1515
- lazy_loader~=0.4
1616
- pip
17-
- pydantic >=2.0.0,<3.0.0
17+
- pydantic ~=2.11.7
1818
- python
19-
- requests >=2.24
20-
- tenacity ==8.2.3
19+
- requests ~=2.32.4
20+
- tenacity ~=9.1.2
2121
- urllib3 >=1.26.0,<3
2222
run:
23-
- jinja2 ==3.1.5
23+
- jinja2 ~=3.1.6
2424
- lazy_loader~=0.4
25-
- pydantic >=2.0.0,<3.0.0
25+
- pydantic ~=2.11.7
2626
- python
27-
- requests >=2.24
28-
- tenacity ==8.2.3
27+
- requests ~=2.32.4
28+
- tenacity ~=9.1.2
2929
- urllib3 >=1.26.0,<3
3030

3131

.github/workflows/build_and_upload_conda_packages.yaml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
15+
python-version: ["3.9", "3.10", "3.11", "3.12"]
1616
steps:
1717
- uses: actions/checkout@v4
1818
with:
@@ -25,13 +25,27 @@ jobs:
2525
auto-update-conda: false
2626
auto-activate-base: false
2727
show-channel-urls: true
28-
- name: Build and upload the conda packages
29-
uses: uibcdf/[email protected]
30-
with:
31-
meta_yaml_dir: .conda-envs
32-
python-version: ${{ matrix.python-version }} # Values previously defined in `matrix`
33-
platform_all: true
34-
user: atlanhq
35-
label: main
36-
token: ${{ secrets.ANACONDA_API_TOKEN }}
37-
upload: true
28+
- name: Build conda package
29+
run: |
30+
conda build .conda-envs --python ${{ matrix.python-version }} --output-folder /tmp/conda-builds
31+
32+
- name: Convert to all platforms
33+
run: |
34+
# Find the built package
35+
PACKAGE_PATH=$(find /tmp/conda-builds -name "*.tar.bz2" | head -1)
36+
if [ -z "$PACKAGE_PATH" ]; then
37+
echo "No package found to convert"
38+
exit 1
39+
fi
40+
conda convert -p all "$PACKAGE_PATH" -o /tmp/conda-builds
41+
42+
- name: Upload to Anaconda
43+
run: |
44+
# Upload all platform packages
45+
for pkg in /tmp/conda-builds/*/*.tar.bz2; do
46+
if [ -f "$pkg" ]; then
47+
anaconda upload --user atlanhq --label main "$pkg"
48+
fi
49+
done
50+
env:
51+
ANACONDA_API_TOKEN: ${{ secrets.ANACONDA_API_TOKEN }}

.github/workflows/pyatlan-pr.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
matrix:
1212
# Specify version as a string
1313
# https://github.com/actions/setup-python/issues/160"
14-
python-version: ["3.8", "3.12", "3.13"]
14+
python-version: ["3.9", "3.12", "3.13"]
1515

1616
steps:
1717
- name: Checkout code
@@ -48,7 +48,7 @@ jobs:
4848
matrix:
4949
# Specify version as a string
5050
# https://github.com/actions/setup-python/issues/160"
51-
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
51+
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
5252

5353
steps:
5454
- name: Checkout code
@@ -63,7 +63,7 @@ jobs:
6363
uses: astral-sh/setup-uv@v6
6464

6565
- name: Install dependencies
66-
run: uv sync --extra dev
66+
run: uv sync --group dev
6767

6868
- name: QA checks (ruff-format, ruff-lint, mypy)
6969
run: uv run ./qa-checks
@@ -108,7 +108,7 @@ jobs:
108108
uses: astral-sh/setup-uv@v6
109109

110110
- name: Install dependencies
111-
run: uv sync --extra dev
111+
run: uv sync --group dev
112112

113113
- name: Run integration tests
114114
env: # Test tenant environment variables

.github/workflows/pyatlan-publish.yaml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- name: Install uv
3232
uses: astral-sh/setup-uv@v6
3333
- name: Install dependencies
34-
run: uv sync --extra dev
34+
run: uv sync --group dev
3535
- name: check tag
3636
id: check-tag
3737
run: uv run python check_tag.py
@@ -67,6 +67,22 @@ jobs:
6767
run: |
6868
TAG=$(cat pyatlan/version.txt)
6969
echo "IMAGE_TAG=$TAG" >> $GITHUB_ENV
70+
71+
- name: Wait for PyPI propagation
72+
uses: nick-fields/retry@v3
73+
with:
74+
max_attempts: 10
75+
timeout_minutes: 5
76+
command: |
77+
echo "Checking if pyatlan==${{ env.IMAGE_TAG }} is available on PyPI..."
78+
if pip index versions pyatlan | grep -q "${{ env.IMAGE_TAG }}"; then
79+
echo "Package is available on PyPI!"
80+
exit 0
81+
else
82+
echo "Package not available yet. Retrying..."
83+
exit 1
84+
fi
85+
7086
- name: Build and push
7187
uses: docker/build-push-action@v6
7288
with:

.github/workflows/pyatlan-test-cron.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
14-
python-version: [3.8, 3.12]
14+
python-version: [3.9, 3.12]
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -24,7 +24,7 @@ jobs:
2424
uses: astral-sh/setup-uv@v6
2525

2626
- name: Install dependencies
27-
run: uv sync --extra dev
27+
run: uv sync --group dev
2828

2929
- name: QA checks (ruff-format, ruff-lint, mypy)
3030
run: uv run ./qa-checks

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
3-
rev: v5.0.0
3+
rev: v6.0.0
44
hooks:
55
- id: check-yaml
66
- id: end-of-file-fixer
@@ -9,7 +9,7 @@ repos:
99

1010
# Use uv to run formatting and QA tools
1111
- repo: https://github.com/astral-sh/ruff-pre-commit
12-
rev: v0.9.7
12+
rev: v0.12.8
1313
hooks:
1414
- id: ruff
1515
- id: ruff

HISTORY.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
## 7.2.0 (August 13, 2025)
2+
3+
### New Features
4+
5+
- Added Python version info to SDK headers and API logger.
6+
7+
### Breaking Changes
8+
9+
- Dropped support for `Python 3.8`.
10+
11+
### QOL Improvements
12+
13+
- Bumped various `core` and `dev` dependencies to latest versions.
14+
- Fixed conda publish and pyatlan publish GitHub workflows.
15+
- Fixed integration test failures due to Elasticsearch eventual consistency using custom retries (`glossary_test`, `test_client`, `persona/purpose_test`)
16+
117
## 7.1.6 (August 7, 2025)
218

319
### Experimental

README.md

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
## 📊 Project Stats
2626

27-
- 🐍 **Python Versions**: 3.8, 3.9, 3.10, 3.11, 3.12, 3.13
27+
- 🐍 **Python Versions**: 3.9, 3.10, 3.11, 3.12, 3.13
2828
- 📦 **Package Size**: Optimized for fast installation
2929
- 🚀 **Performance**: Built with modern async/await support
3030
- 🔧 **Dependencies**: Minimal, modern stack
@@ -56,7 +56,7 @@ cd atlan-python
5656
curl -LsSf https://astral.sh/uv/install.sh | sh
5757

5858
# Install with development dependencies
59-
uv sync --extra dev
59+
uv sync --group dev
6060

6161
# Run quality checks
6262
uv run ./qa-checks
@@ -65,6 +65,23 @@ uv run ./qa-checks
6565
uv run pytest tests/unit
6666
```
6767

68+
### Dependency Groups
69+
70+
This project uses uv dependency groups for better dependency management:
71+
72+
- **Core dependencies**: Always installed (`uv sync`)
73+
- **Development dependencies**: Testing, linting, formatting (`uv sync --group dev`)
74+
- **Documentation dependencies**: Sphinx docs (`uv sync --group docs`)
75+
76+
You can install multiple groups:
77+
```bash
78+
# Install both dev and docs dependencies
79+
uv sync --group dev --group docs
80+
81+
# Install all dependencies
82+
uv sync --all-groups
83+
```
84+
6885
## 🐳 Docker
6986

7087
### Pre-built Images
@@ -140,7 +157,7 @@ cd atlan-python
140157
curl -LsSf https://astral.sh/uv/install.sh | sh
141158

142159
# Install development dependencies
143-
uv sync --extra dev
160+
uv sync --group dev
144161

145162
# Install pre-commit hooks
146163
uv run pre-commit install

docs/requirements.txt

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

pyatlan/client/atlan.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
APPLICATION_ENCODED_FORM,
8989
AuthorizationFilter,
9090
RequestIdAdapter,
91+
get_python_version,
9192
)
9293

9394
request_id_var = ContextVar("request_id", default=None)
@@ -132,6 +133,7 @@ def get_session():
132133
"x-atlan-agent": "sdk",
133134
"x-atlan-agent-id": "python",
134135
"x-atlan-client-origin": "product_sdk",
136+
"x-atlan-python-version": get_python_version(),
135137
"User-Agent": f"Atlan-PythonSDK/{VERSION}",
136138
}
137139
)
@@ -638,6 +640,7 @@ def _api_logger(self, api: API, path: str):
638640
LOGGER.debug("Call : %s %s", api.method, path)
639641
LOGGER.debug("Content-type_ : %s", api.consumes)
640642
LOGGER.debug("Accept : %s", api.produces)
643+
LOGGER.debug("Python-Version: %s", get_python_version())
641644
LOGGER.debug("User-Agent : %s", f"Atlan-PythonSDK/{VERSION}")
642645

643646
def _call_api(

0 commit comments

Comments
 (0)