Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modernize project: Use pyproject.toml, uv package manager, update Python support, and revise examples #38

Merged
merged 2 commits into from
Oct 15, 2024

Conversation

Paillat-dev
Copy link
Contributor

This pull request modernizes the aiocron project with several significant changes:

  1. Package management and build system:

    • Introduced pyproject.toml for project configuration and dependency management.
    • Adopted astral-sh/uv as the package manager, replacing pip and virtualenv.
    • Removed Pipfile and Pipfile.lock in favor of pyproject.toml and uv.lock.
    • Removed setup.py and setup.cfg, consolidating configuration in pyproject.toml.
  2. Python version support:

    • Dropped support for Python 3.7 (end-of-life) and 3.8 (end-of-life in one month) - see the Python release cycle.
    • Added support for Python 3.12.
    • Updated classifiers in pyproject.toml to reflect new Python version support.
  3. CI/CD updates:

    • Updated GitHub Actions workflow (tox.yml) to use uv for dependency installation and test running.
    • Updated Python versions in the CI matrix to 3.9, 3.10, 3.11, and 3.12.
  4. Project structure and configuration:

    • Simplified MANIFEST.in file.
    • Updated .gitignore to include uv-related entries.
  5. Dependency updates:

    • Updated versions of test dependencies (pytest, coverage, etc.).
    • Added tox and tox-uv as project dependencies.
  6. Code changes:

    • Minor syntax updates and formatting changes in aiocron/__init__.py and other files.
  7. Testing:

    • Updated tox configuration in pyproject.toml to use uv-venv-lock-runner.
  8. Documentation:

    • README and other documentation may need updates to reflect these changes.
  9. Example updates:

    • Revised the example scripts (simple.py and threaded.py) to use modern async/await syntax.
    • Updated examples to work with Python 3.9+.
    • Fixed issues related to event loop handling in the examples.

New files added:

  • pyproject.toml
  • uv.lock

Files removed:

  • setup.py
  • setup.cfg
  • Pipfile
  • Pipfile.lock
  • tox.ini (content moved to pyproject.toml)

Files updated:

  • examples/simple.py
  • examples/threaded.py

These changes modernize the project's infrastructure, potentially improving build times and dependency management while ensuring compatibility with newer Python versions. The shift to pyproject.toml and uv aligns the project with current Python packaging best practices. The updated examples demonstrate the correct usage of aiocron with modern Python async features.

Reviewers should pay special attention to the Python version changes, ensuring that no critical functionality is lost by dropping 3.7 and 3.8 support. Additionally, the new uv-based workflow should be thoroughly tested to ensure it works as expected across all supported Python versions. The revised examples should be reviewed to confirm they accurately represent the intended usage of aiocron.

@gawel gawel merged commit a94c8bf into gawel:master Oct 15, 2024
4 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.

2 participants