Skip to content

updates the dependency PyExt for python3.11\3.12 support#1985

Open
ShaohonChen wants to merge 1 commit into
open-compass:mainfrom
ShaohonChen:py311Compatibility
Open

updates the dependency PyExt for python3.11\3.12 support#1985
ShaohonChen wants to merge 1 commit into
open-compass:mainfrom
ShaohonChen:py311Compatibility

Conversation

@ShaohonChen

Copy link
Copy Markdown

Description

This PR updates the dependency PyExt to use a pyext compatibility fork that supports Python 3.10, 3.11, and 3.12, ensuring compatibility with modern Python versions while maintaining existing functionality.

The original PyExt package was incompatible with Python 3.10+, causing runtime errors below:

Collecting pyext (from opencompass[full])
  Using cached https://mirror.nju.edu.cn/pypi/web/packages/b0/be/9b6005ac644aaef022527ce49617263379e49dbdbd433d1d3dd66d71f570/pyext-0.7.tar.gz (7.8 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [9 lines of output]
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-1og4krgl/pyext_1a3ddddf62ac4f1f8409c43687c247bb/setup.py", line 6, in <module>
          import pyext
        File "/tmp/pip-install-1og4krgl/pyext_1a3ddddf62ac4f1f8409c43687c247bb/pyext.py", line 117, in <module>
          oargspec = inspect.getargspec
                     ^^^^^^^^^^^^^^^^^^
      AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Note: I’ve also submitted a PR to the original PyExt repository (refi64/PyExt#5) to address these issues upstream, including previously overlooked ipykernel support. This fork serves as an interim solution until upstream merges the changes.

Modification

  • Replaced the original PyExt dependency in requirements/runtime.txt and requirements/extra.txt with the forked version:
    git+https://github.com/ShaohonChen/PyExt.git@a95f488490fc57ec17d0c00a99c6bc0a4726824f

Testing

Tested locally with Python 3.10, 3.11, and 3.12.

Tested locally with ipykernel be installed, which

Related Issues

Closes #1976

Close #1234

References: refi64/PyExt#5

@ShaohonChen ShaohonChen changed the title updates the dependency PyExt updates the dependency PyExt for python3.11\3.12 support Mar 29, 2025
@tonysy tonysy requested a review from Copilot April 10, 2025 06:56

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

Files not reviewed (2)
  • requirements/extra.txt: Language not supported
  • requirements/runtime.txt: Language not supported

@tonysy

tonysy commented Apr 11, 2025

Copy link
Copy Markdown
Collaborator

Please fix the lint issue

@ShaohonChen

Copy link
Copy Markdown
Author

OK! thanks for review. I will fix it soon

@tonysy

tonysy commented Jun 5, 2025

Copy link
Copy Markdown
Collaborator

Hi, would you like to update for resolving the lint issue?

@LukeLIN-web

Copy link
Copy Markdown

meet this problem when using python 3.11

          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1zvylqoi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=[])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/tmp/pip-build-env-1zvylqoi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-1zvylqoi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 512, in run_setup
          super().run_setup(setup_script=setup_script)
        File "/tmp/pip-build-env-1zvylqoi/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 317, in run_setup
          exec(code, locals())
        File "<string>", line 6, in <module>
        File "/tmp/pip-install-nay6k4ts/pyext_ee43df4d225248829869787107c70bb8/pyext.py", line 117, in <module>
          oargspec = inspect.getargspec
                     ^^^^^^^^^^^^^^^^^^
      AttributeError: module 'inspect' has no attribute 'getargspec'. Did you mean: 'getargs'?
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed to build 'pyext' when getting requirements to build wheel

@LukeLIN-web LukeLIN-web mentioned this pull request Nov 26, 2025
2 tasks
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] opencompass install error on python 3.11 [Bug] 不支持python3.10以上安装

4 participants