Skip to content

Conversation

@brandonschabell
Copy link
Owner

Changed

  • License changed from PSF-2.0 to MIT - More permissive and standard for open source libraries
  • Migrated from setuptools to modern UV/hatchling build system
  • Migrated README from RST to Markdown format with executable code examples
  • Dropped support for Python 3.4-3.8 (now requires Python 3.9+)
  • Replaced python -m doctest README.rst with pytest-markdown-docs for testing examples
  • Converted tests from unittest to pytest style (native assert statements, fixtures)
  • Restructured package from single file (urlpath.py) to proper package directory (urlpath/__init__.py)
  • Converted README examples from RST doctest format to executable Python code blocks
  • Reorganized test directory from test/ to tests/ (following pytest conventions)
  • Enhanced pytest configuration with strict mode and warning filters
  • Consolidated and cleaned up .gitignore file with modern Python tooling patterns
  • Replaced Travis CI with GitHub Actions for all CI/CD workflows
  • Updated GitHub Actions workflows to use modern actions and UV package manager
  • Modernized code formatting (improved consistency and readability)
  • Centralized all package metadata in pyproject.toml (removed from module docstring)

Added

  • .python-version file for Python version management
  • Comprehensive Makefile with development targets (test, lint, format, build, clean, etc.)
  • Ruff for both linting and code formatting
  • mypy for static type checking with relaxed configuration
  • pytest as the test runner (replacing unittest CLI)
  • pytest-markdown-docs for testing README code examples
  • conftest.py for pytest sys.path configuration
  • GitHub Actions workflow for automated releases to PyPI (release.yml)
  • Separate CI jobs for linting/formatting/type checking vs. tests
  • Pre-commit hooks configuration (.pre-commit-config.yaml)
  • Keywords in pyproject.toml for better PyPI discoverability
  • Downloads badge in README.md
  • MIT LICENSE file
  • CHANGELOG.md file (this file)
  • .github/copilot-instructions.md for AI-assisted development
  • uv.lock for reproducible dependency resolution

Removed

  • setup.py (replaced by pyproject.toml)
  • MANIFEST file (replaced by hatchling configuration)
  • README.rst (replaced by README.md)
  • deploy.yml workflow (replaced by release.yml)
  • Support for Python 3.4, 3.5, 3.6, 3.7, and 3.8
  • Travis CI configuration (replaced by GitHub Actions)

Copilot AI review requested due to automatic review settings October 12, 2025 03:25
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR modernizes the URLPath project by migrating from setuptools to UV/hatchling build system, restructuring from a single file to a proper package directory, and updating the development toolchain to use modern Python practices.

Key changes include:

  • Migration to UV/hatchling build system with centralized pyproject.toml configuration
  • Package restructuring from single file (urlpath.py) to package directory (urlpath/__init__.py)
  • Test framework conversion from unittest to pytest with README example testing

Reviewed Changes

Copilot reviewed 18 out of 21 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
urlpath/init.py Restructured main module with modernized formatting and type annotations
tests/test_url.py New pytest-style test suite converted from unittest
test/test_url.py Removed old unittest test file
pyproject.toml New centralized project configuration with modern tooling setup
setup.py Removed legacy setuptools configuration
README.md New Markdown format with executable code examples
README.rst Removed old reStructuredText documentation
Makefile Added development workflow automation
conftest.py Added pytest configuration for module imports

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@cached_property
def hostname(self):
"""The hostname of url."""
import contextlib
Copy link

Copilot AI Oct 12, 2025

Choose a reason for hiding this comment

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

Import statement should be moved to the top of the file with other imports rather than being placed inside a method.

Copilot uses AI. Check for mistakes.
@brandonschabell brandonschabell merged commit d1abe13 into master Oct 12, 2025
3 checks passed
@brandonschabell brandonschabell deleted the uv-modernization branch October 12, 2025 03:37
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