question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`ensure_python` deprecated in python 3.10

See original GitHub issue

Description

ensure_python deprecated in python 3.10, will kill sdist installation.

Reproduce

  1. Install python 3.10, pip, setuptools
  2. Run:
pip install --user https://files.pythonhosted.org/packages/27/f1/0d3a09c0069467ed9636faf3a9b5b758378216bb891066a0bc24799681e3/jupyterlab_widgets-1.0.2.tar.gz

Expected behavior

Doesn’t fail

Context

relevant logs:

    File "setup.py", line 18, in <module>
      ensure_python(">=3.6")
    File "/run/user/1000/pip-build-env-s322v3pd/overlay/lib/python3.10/site-packages/jupyter_packaging/setupbase.py", line 103, in ensure_python
      raise ValueError('Python version %s unsupported' % part)
  ValueError: Python version 3.10 unsupported
Full logs:
$ pip install --user https://files.pythonhosted.org/packages/27/f1/0d3a09c0069467ed9636faf3a9b5b758378216bb891066a0bc24799681e3/jupyterlab_widgets-1.0.2.tar.gz
Collecting https://files.pythonhosted.org/packages/27/f1/0d3a09c0069467ed9636faf3a9b5b758378216bb891066a0bc24799681e3/jupyterlab_widgets-1.0.2.tar.gz
  Using cached jupyterlab_widgets-1.0.2.tar.gz (118 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /nix/store/b798fp24zf2fdafmyyc4sxfr48ly5yy9-python3-3.10.1/bin/python3.10 /nix/store/37l3w8cibfijh8if4iy25ra37zi5pdds-python3.10-pip-21.3.1/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /run/user/1000/tmp1puyfj05
       cwd: /run/user/1000/pip-req-build-17ejtea5
  Complete output (18 lines):
  Traceback (most recent call last):
    File "/nix/store/37l3w8cibfijh8if4iy25ra37zi5pdds-python3.10-pip-21.3.1/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 363, in <module>
      main()
    File "/nix/store/37l3w8cibfijh8if4iy25ra37zi5pdds-python3.10-pip-21.3.1/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 345, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/nix/store/37l3w8cibfijh8if4iy25ra37zi5pdds-python3.10-pip-21.3.1/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py", line 130, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/run/user/1000/pip-build-env-s322v3pd/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 162, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/run/user/1000/pip-build-env-s322v3pd/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 143, in _get_build_requires
      self.run_setup()
    File "/run/user/1000/pip-build-env-s322v3pd/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 158, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 18, in <module>
      ensure_python(">=3.6")
    File "/run/user/1000/pip-build-env-s322v3pd/overlay/lib/python3.10/site-packages/jupyter_packaging/setupbase.py", line 103, in ensure_python
      raise ValueError('Python version %s unsupported' % part)
  ValueError: Python version 3.10 unsupported
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/27/f1/0d3a09c0069467ed9636faf3a9b5b758378216bb891066a0bc24799681e3/jupyterlab_widgets-1.0.2.tar.gz. Command errored out with exit status 1: /nix/store/b798fp24zf2fdafmyyc4sxfr48ly5yy9-python3-3.10.1/bin/python3.10 /nix/store/37l3w8cibfijh8if4iy25ra37zi5pdds-python3.10-pip-21.3.1/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /run/user/1000/tmp1puyfj05 Check the logs for full command output.
ERROR: Command errored out with exit status 1: /nix/store/b798fp24zf2fdafmyyc4sxfr48ly5yy9-python3-3.10.1/bin/python3.10 /nix/store/37l3w8cibfijh8if4iy25ra37zi5pdds-python3.10-pip-21.3.1/lib/python3.10/site-packages/pip/_vendor/pep517/in_process/_in_process.py get_requires_for_build_wheel /run/user/1000/tmp1puyfj05 Check the logs for full command output.
WARNING: You are using pip version 21.3.1; however, version 22.0.2 is available.
You should consider upgrading via the '/nix/store/b798fp24zf2fdafmyyc4sxfr48ly5yy9-python3-3.10.1/bin/python3.10 -m pip install --upgrade pip' command.

don’t worry about the /nix/store paths.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jasongroutcommented, Feb 8, 2022

We plan to release later this week or next week.

1reaction
jasongroutcommented, Feb 8, 2022

FIxed in #3368

Read more comments on GitHub >

github_iconTop Results From Across the Web

Initialization, Finalization, and Threads
Returns 0 if successful, a nonzero value on error (e.g. calling after the interpreter has already been initialized). New in version 3.4. Deprecated...
Read more >
Changelog - urllib3 2.0.0a2 documentation
Fixed deprecation warning when using cryptography v39.0.0. This fix requires using pyOpenSSL>=17.1.0 ... Fixed deprecation warnings emitted in Python 3.10.
Read more >
Python — Homebrew Documentation
This page describes how Python is handled in Homebrew for users. ... until the end of 2019, at which point it was removed...
Read more >
Released urllib3 v1.26.8
Please upgrade to a non-EOL Python version. ... Deprecated the Retry. ... to urllib3.util.ssl_match_hostname to ensure Python 3.10+ ...
Read more >
Python Roles — Zuul-Jobs documentation
Will be provided to tox via TOX_CONSTRAINTS_FILE (deprecated but currently still supported name is UPPER_CONSTRAINTS_FILE ) environment variable if it exists.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found