Skip to content

Migrate to UV and add Python 3.12+ support#4

Merged
h3r2on merged 6 commits intomainfrom
copilot/upgrade-python-support-3-12
Nov 7, 2025
Merged

Migrate to UV and add Python 3.12+ support#4
h3r2on merged 6 commits intomainfrom
copilot/upgrade-python-support-3-12

Conversation

Copy link
Copy Markdown

Copilot AI commented Nov 7, 2025

Modernizes package management by migrating from setuptools to UV and ensures compatibility with Python 3.12+.

Changes

Build System

  • Added pyproject.toml with hatchling backend (PEP 621 compliant)
  • Generated uv.lock for reproducible dependency resolution
  • Organized optional dependencies: test, docs, all

Python 3.12+ Compatibility

  • Replaced deprecated pkg_resources with importlib.metadata:
    # Before
    import pkg_resources
    __version__ = pkg_resources.get_distribution("jsonapi-client").version
    
    # After
    from importlib.metadata import version, PackageNotFoundError
    try:
        __version__ = version("jsonapi-client")
    except PackageNotFoundError:
        __version__ = "0.9.10"
  • Updated classifiers for Python 3.9-3.13

CI/CD

  • Added GitHub Actions workflow with UV for Python 3.9-3.13 matrix testing
  • Configured proper security permissions

Developer Experience

  • Updated README with UV installation and development workflows
  • Maintained backward compatibility via setup.py shim
  • Both uv sync --all-extras and pip install -e ".[all]" supported

Installation

# With UV (recommended)
uv pip install jsonapi-client

# Development
uv venv && uv sync --all-extras

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • astral.sh
    • Triggering command: curl -LsSf REDACTED (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Upgrade Python support for 3.12+</issue_title>
<issue_description>ensure compatibility with Python 3.12+</issue_description>

<agent_instructions>Propose a PR for migrating from setuptools to UV for package management</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI and others added 5 commits November 7, 2025 20:39
Co-authored-by: h3r2on <761983+h3r2on@users.noreply.github.com>
Co-authored-by: h3r2on <761983+h3r2on@users.noreply.github.com>
Co-authored-by: h3r2on <761983+h3r2on@users.noreply.github.com>
Co-authored-by: h3r2on <761983+h3r2on@users.noreply.github.com>
Co-authored-by: h3r2on <761983+h3r2on@users.noreply.github.com>
Copilot AI changed the title [WIP] Upgrade package management to support Python 3.12 Migrate to UV and add Python 3.12+ support Nov 7, 2025
Copilot AI requested a review from h3r2on November 7, 2025 20:52
@h3r2on h3r2on marked this pull request as ready for review November 7, 2025 20:55
Copy link
Copy Markdown
Owner

@h3r2on h3r2on left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems reasonable, looks like we have some work to do on those tests but that can be for another issue

@h3r2on h3r2on merged commit 724eaaf into main Nov 7, 2025
0 of 10 checks passed
@h3r2on h3r2on deleted the copilot/upgrade-python-support-3-12 branch November 7, 2025 21:02
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.

Upgrade Python support for 3.12+

2 participants