Skip to content

Comments

GEOPY-2661: modernize code for Python >= 3.12#844

Merged
sebhmg merged 3 commits intodevelopfrom
GEOPY-2661_followup
Feb 19, 2026
Merged

GEOPY-2661: modernize code for Python >= 3.12#844
sebhmg merged 3 commits intodevelopfrom
GEOPY-2661_followup

Conversation

@sebhmg
Copy link
Contributor

@sebhmg sebhmg commented Feb 19, 2026

GEOPY-2661 - Update minimum requirement to python >=3.12, <3.15 and numpy 2.*

and point to newer numpy version in pre-commit config
(although it is still commented-out)
@github-actions github-actions bot changed the title Geopy 2661 GEOPY-2661: Update minimum requirement to python >=3.12, <3.15 and numpy 2.* Feb 19, 2026
@sebhmg sebhmg changed the title GEOPY-2661: Update minimum requirement to python >=3.12, <3.15 and numpy 2.* GEOPY-2661: modernize code for Python >= 3.12 Feb 19, 2026
@codecov
Copy link

codecov bot commented Feb 19, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.18%. Comparing base (972d1e3) to head (23c7d45).
⚠️ Report is 4 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #844      +/-   ##
===========================================
+ Coverage    91.14%   91.18%   +0.04%     
===========================================
  Files          115      115              
  Lines        10275    10272       -3     
  Branches      1898     1898              
===========================================
+ Hits          9365     9367       +2     
+ Misses         487      483       -4     
+ Partials       423      422       -1     
Files with missing lines Coverage Δ
geoh5py/shared/weakref_utils.py 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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

Updates project tooling configuration to align with Python 3.12 and modernizes internal typing utilities to use Python 3.12 generic syntax.

Changes:

  • Bump Ruff target version from Python 3.10 to 3.12 in pyproject.toml.
  • Update Pylint’s py-version to 3.12.
  • Refactor weakref_utils typing to use PEP 695 type parameters (Python 3.12+).

Reviewed changes

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

File Description
pyproject.toml Align Ruff target version with Python 3.12.
pylintrc Update Pylint’s minimum Python version checks to 3.12.
geoh5py/shared/weakref_utils.py Switch from TypeVar to PEP 695 type parameters for weakref helpers.
.pre-commit-config.yaml Adjust commented mypy extra dependency hint for numpy.
Comments suppressed due to low confidence (1)

geoh5py/shared/weakref_utils.py:63

  • The docstring for insert_once documents a return value (":return: Dictionary with clean weakref"), but the function mutates some_dict in place and returns None. Please adjust the docstring (and/or add an explicit -> None) so callers don’t assume there is a return value.
def insert_once[K](some_dict: dict[K, ReferenceType], key: K, value):
    """
    Check if the reference to an Entity with uuid is already in use.

    :param some_dict: Dictionary of UUID keys and weakref values.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

domfournier
domfournier previously approved these changes Feb 19, 2026
@sebhmg sebhmg merged commit 9e0a86e into develop Feb 19, 2026
10 of 11 checks passed
@sebhmg sebhmg deleted the GEOPY-2661_followup branch February 19, 2026 16:23
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