Skip to content

Modernize packaging: migrate setup.py to PEP 621 pyproject.toml#645

Merged
axellpadilla merged 7 commits into
dbt-msft:masterfrom
joshmarkovic:jm/modernize-packaging
May 20, 2026
Merged

Modernize packaging: migrate setup.py to PEP 621 pyproject.toml#645
axellpadilla merged 7 commits into
dbt-msft:masterfrom
joshmarkovic:jm/modernize-packaging

Conversation

@joshmarkovic
Copy link
Copy Markdown
Contributor

  • Replace setup.py with pyproject.toml (setuptools backend), reading version dynamically from dbt/adapters/sqlserver/version.py.
  • Restore pyodbc>=4.0.35,<5.2.0 as a direct dependency. It was previously pulled in transitively via dbt-fabric; that dep was dropped in 1.9.1rc1 but the runtime import pyodbc was not, leaving fresh installs broken.
  • Move azure-identity to an azure extra. The code already guards azure imports with try/except ModuleNotFoundError, so this makes the optionality first-class: pip install dbt-sqlserver[azure].
  • Move dev tooling to a dev extra; retire dev_requirements.txt. Use pip install -e .[dev].
  • Drop MANIFEST.in in favor of [tool.setuptools.package-data].
  • Ship dbt/adapters/sqlserver/py.typed.
  • requires-python = ">=3.10"; drop the Python 3.9 classifier (3.9 reached EOL in October 2025).
  • Update unit/integration/release workflows + Makefile accordingly. The release workflow now uses python -m build and an inline tag/version match instead of python setup.py sdist bdist_wheel and the old VerifyVersionCommand.

- Replace setup.py with pyproject.toml (setuptools backend), reading
  version dynamically from dbt/adapters/sqlserver/__version__.py.
- Restore pyodbc>=4.0.35,<5.2.0 as a direct dependency. It was
  previously pulled in transitively via dbt-fabric; that dep was
  dropped in 1.9.1rc1 but the runtime `import pyodbc` was not,
  leaving fresh installs broken.
- Move azure-identity to an `azure` extra. The code already guards
  azure imports with try/except ModuleNotFoundError, so this makes
  the optionality first-class: pip install dbt-sqlserver[azure].
- Move dev tooling to a `dev` extra; retire dev_requirements.txt.
  Use pip install -e .[dev].
- Drop MANIFEST.in in favor of [tool.setuptools.package-data].
- Ship dbt/adapters/sqlserver/py.typed.
- requires-python = ">=3.10"; drop the Python 3.9 classifier
  (3.9 reached EOL in October 2025).
- Update unit/integration/release workflows + Makefile accordingly.
  The release workflow now uses `python -m build` and an inline
  tag/version match instead of `python setup.py sdist bdist_wheel`
  and the old VerifyVersionCommand.
Comment thread .github/workflows/release-version.yml
Comment thread pyproject.toml
@axellpadilla
Copy link
Copy Markdown
Collaborator

@axellpadilla axellpadilla added this to the v1.10.0 milestone May 15, 2026
joshmarkovic and others added 2 commits May 19, 2026 02:49
Resolved conflicts by adopting PEP 735 [dependency-groups] for dev
tooling, matching the uv migration on master:
- workflows + Makefile + devcontainer install via
  `uv pip install [--system] -e . --group dev`
- pyproject.toml: dev moved out of [project.optional-dependencies]
  into [dependency-groups]; azure stays an extra
- release workflow: inline tag/version verify replaced with
  .github/scripts/verify_version.py so it can be tested and run
  through pre-commit
- integration-tests path filters: dropped removed files
  (dev_requirements.txt, setup.py, setup.cfg, MANIFEST.in)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Comment thread pyproject.toml
joshmarkovic and others added 2 commits May 19, 2026 17:54
Resolve setup.py conflict by keeping deletion (replaced by pyproject.toml).
Upstream's pyodbc>=5.2.0 bump is preserved in our optional [pyodbc] extra.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@axellpadilla axellpadilla merged commit 8454112 into dbt-msft:master May 20, 2026
53 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants