Skip to content

Support python 3.13 #8255

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

Merged
merged 3 commits into from
May 22, 2025
Merged

Conversation

TomeHirata
Copy link
Collaborator

@TomeHirata TomeHirata commented May 22, 2025

Resolve #8253

@okhat okhat requested a review from Copilot May 22, 2025 03:30
Copy link
Contributor

@Copilot 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 updates the package metadata to officially support Python 3.13 by adjusting the version requirement.

  • Bumps the upper bound in requires-python to <3.14
  • Ensures the project can be installed on Python 3.13 environments

Copy link
Collaborator

@chenmoneygithub chenmoneygithub left a comment

Choose a reason for hiding this comment

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

Before merging, can we run a quick test locally on py 3.14? Feel free to leave this on me, I can handle it tomorrow.

@TomeHirata TomeHirata changed the title Support python 3.13 Support python 3.13, 3.14 May 22, 2025
@TomeHirata TomeHirata changed the title Support python 3.13, 3.14 Support python 3.13 May 22, 2025
@TomeHirata
Copy link
Collaborator Author

TomeHirata commented May 22, 2025

I exclude 3.14 due to the license error in xxhash. https://github.com/ifduyue/python-xxhash/blob/b3cc1b8bc1c27da0a0ed8bce2c1d92ae86966961/setup.py#L48

$ uv venv --python 3.14
$ uv sync --dev --extra dev 

Resolved 148 packages in 1.23s
  × Failed to build `xxhash==3.5.0`
  ├─▶ The build backend returned an error
  ╰─▶ Call to `setuptools.build_meta.build_wheel` failed (exit status: 1)

      [stdout]
      running bdist_wheel
      running build
      running build_py
      copying xxhash/version.py -> build/lib.macosx-11.0-arm64-cpython-314/xxhash
      copying xxhash/__init__.py -> build/lib.macosx-11.0-arm64-cpython-314/xxhash
      copying xxhash/__init__.pyi -> build/lib.macosx-11.0-arm64-cpython-314/xxhash
      copying xxhash/py.typed -> build/lib.macosx-11.0-arm64-cpython-314/xxhash
      running build_ext
      building '_xxhash' extension
      cc -fno-strict-overflow -Wsign-compare -Wunreachable-code -DNDEBUG -g -O3 -Wall -arch arm64 -mmacosx-version-min=11.0 -Wno-nullability-completeness
      -Wno-expansion-to-defined -Wno-undef-prefix -fPIC -Ideps/xxhash -I/Users/tomu.hirata/.cache/uv/builds-v0/.tmpYajWUL/include
      -I/Users/tomu.hirata/.local/share/uv/python/cpython-3.14.0a6-macos-aarch64-none/include/python3.14 -c deps/xxhash/xxhash.c -o
      build/temp.macosx-11.0-arm64-cpython-314/deps/xxhash/xxhash.o

      [stderr]
      /Users/tomu.hirata/.cache/uv/builds-v0/.tmpYajWUL/lib/python3.14/site-packages/setuptools/dist.py:759: SetuptoolsDeprecationWarning: License classifiers
      are deprecated.
      !!

              ********************************************************************************
              Please consider removing the following classifiers in favor of a SPDX license expression:

              License :: OSI Approved :: BSD License

              See https://packaging.python.org/en/latest/guides/writing-pyproject-toml/#license for details.
              ********************************************************************************

      !!
        self._finalize_license_expression()
      In file included from deps/xxhash/xxhash.c:43:
      deps/xxhash/xxhash.h:496:10: fatal error: cannot open file '/usr/local/include/stddef.h': Permission denied
        496 | #include <stddef.h>   /* size_t */
            |          ^
      1 error generated.
      error: command '/usr/bin/cc' failed with exit code 1

      hint: This usually indicates a problem with the package or the build environment.
  help: `xxhash` (v3.5.0) was included because `dspy` (v2.6.24) depends on `datasets` (v3.5.0) which depends on `xxhash`

@TomeHirata
Copy link
Collaborator Author

I've confirmed basic path works ok and all tests pass in python 3.13.

@TomeHirata TomeHirata merged commit b5d66a6 into stanfordnlp:main May 22, 2025
3 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.

[Bug] Python 3.13 Installation of DSPy Fails
2 participants