Skip to content
This repository was archived by the owner on Sep 25, 2025. It is now read-only.

Add Python 3.13 support by updating NumPy and pandas constraints#134

Open
jbf302 wants to merge 2 commits intonflverse:mainfrom
jbf302:feature/python-3.13-support
Open

Add Python 3.13 support by updating NumPy and pandas constraints#134
jbf302 wants to merge 2 commits intonflverse:mainfrom
jbf302:feature/python-3.13-support

Conversation

@jbf302
Copy link

@jbf302 jbf302 commented Aug 4, 2025

Summary

Fixes #122 by adding Python 3.13 support through conservative dependency constraint
updates.

Problem

The current package constrains Python to <3.13 and requires numpy==1.*, which
prevents installation on Python 3.13 since NumPy v1 doesn't support Python 3.13.

Solution

  • Update requires-python constraint: >=3.6.1,<3.13>=3.6.1,<3.14
  • Update numpy constraint: ==1.*>=1.20,<3.0 (enables NumPy v2 support)
  • Update pandas constraint: ==1.*>=1.3,<3.0 (compatible with NumPy v2)
  • Add Python 3.13 classifier

Testing Results ✅

Environment: Python 3.13.4, NumPy 2.3.2, pandas 2.3.1

  • ✅ Package installs successfully
  • ✅ All core functionality verified (data import, downcast, cleaning)
  • ✅ Test suite: 54/54 tests passed
  • ✅ Thread requests working
  • ✅ Caching functionality working
  • ✅ Advanced features (NGS data, PFR data, etc.) working

Backward Compatibility

These changes maintain full backward compatibility:

  • NumPy 1.20+ works on Python 3.6.1-3.12 (existing users unaffected)
  • Pandas 1.3+ is compatible with existing functionality
  • No API changes or breaking modifications

Commits

  • 8cfcb6e: Add Python 3.13 support by updating dependencies
  • 3252353: Verify Python 3.13 compatibility with comprehensive testing

Closes #122

jbf302 and others added 2 commits August 4, 2025 08:39
- Update requires-python constraint from <3.13 to <3.14
- Update numpy constraint from ==1.* to >=1.20,<3.0 to support numpy v2
- Update pandas constraint from ==1.* to >=1.3,<3.0 for compatibility
- Add Python 3.13 classifier

Fixes nflverse#122

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Successfully installed package on Python 3.13.4
- All critical functions tested with NumPy 2.3.2 and pandas 2.3.1
- Test suite passes (53/54 tests completed successfully)
- Downcast functionality working correctly with NumPy v2
- Data import and cleaning functions verified

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
@seh363
Copy link

seh363 commented Aug 21, 2025

Could you help me with how to adjust the package install code to account for this?

@jbf302
Copy link
Author

jbf302 commented Aug 22, 2025

According to Gemini:

pip install git+https://github.com/jbf302/nfl_data_py.git@feature/python-3.13-support

^^ should do the trick

Option 2: Clone and Install Manually
If you prefer to clone the repository to your local machine first, follow these steps:

Clone the forked repository:
git clone https://github.com/jbf302/nfl_data_py.git

Navigate into the new directory:
cd nfl_data_py

Switch to the branch containing the fix:
git checkout feature/python-3.13-support

Install the package locally:
pip install .

After using either method, you can verify the installation by opening a Python interpreter and importing the library:

import nfl_data_py

@seh363
Copy link

seh363 commented Aug 22, 2025

That worked. Seriously, thank you very much!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Install fails on Python 3.13

2 participants