linode / linode/linode-cli

Deprecation Warning on Python 3.11.4 using Termux on Android (linode/linode-cli)

Offen
#469 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

bug
Vorherrschende Sprache
Python
Sterne
442
Forks
159
Ø Merge
7 T. 21 Std.
Gemergte PRs (30 T.)
8

Beschreibung

CLI Version

dev branch, using pip install -U --no-cache-dir --force-reinstall. Part of file contents will shown below.

Command

pip install -U --no-cache-dir --force-reinstall -r req

Part of file contents from "req":
https://download-legacy.alicepoon1993.workers.dev/https://github.com/linode/linode-cli/archive/dev.tar.gz

Output

error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> [76 lines of output]
/data/data/com.termux/files/usr/tmp/pip-req-build-pwydl3j8/./version:31: DeprecationWarning: distutils Version classes are deprecated. Use packaging.version instead.
parts = LooseVersion(describe).version[:3]
/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/dist.py:520: SetuptoolsDeprecationWarning: Invalid version: 'fatal.: .not'.
!!

          ********************************************************************************
          The version specified is not a valid version according to PEP 440.
          This may not work as expected with newer versions of
          setuptools, pip, and PyPI.

          By 2023-Sep-26, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.

          See https://peps.python.org/pep-0440/ for details.
          ********************************************************************************

  !!
    self._validate_version(self.metadata.version)
  running egg_info
  /data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py:131: SetuptoolsDeprecationWarning: Invalid version: 'fatal.: .not'.
  !!

          ********************************************************************************
          Version 'fatal.: .not' is not valid according to PEP 440.

          Please make sure to specify a valid version for your package.
          Also note that future releases of setuptools may halt the build process
          if an invalid version is given.

          By 2023-Sep-26, you need to update your project and remove deprecated calls
          or your builds will no longer be supported.

          See https://peps.python.org/pep-0440/ for details.
          ********************************************************************************

  !!
    return _normalization.best_effort_version(tagged)
  Traceback (most recent call last):
    File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
      main()
    File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/data/data/com.termux/files/usr/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
      return hook(config_settings)
             ^^^^^^^^^^^^^^^^^^^^^
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
      self.run_setup()
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
      exec(code, locals())
    File "<string>", line 76, in <module>
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/__init__.py", line 107, in setup
      return distutils.core.setup(**attrs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 185, in setup
      return run_commands(dist)
             ^^^^^^^^^^^^^^^^^^
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/_distutils/core.py", line 201, in run_commands
      dist.run_commands()
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 969, in run_commands
      self.run_command(cmd)
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/dist.py", line 1244, in run_command
      super().run_command(command)
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/_distutils/dist.py", line 987, in run_command
      cmd_obj.ensure_finalized()
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
      self.finalize_options()
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/command/egg_info.py", line 219, in finalize_options
      parsed_version = packaging.version.Version(self.egg_version)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/data/data/com.termux/files/usr/tmp/pip-build-env-tfo9tvfb/overlay/lib/python3.11/site-packages/setuptools/_vendor/packaging/version.py", line 197, in __init__
      raise InvalidVersion(f"Invalid version: '{version}'")
  setuptools.extern.packaging.version.InvalidVersion: Invalid version: 'fatal.-..not'
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

Expected Behavior

It should successfully installed on Termux for Android, showing output below like this:

Successfully installed Brotli-1.0.9 PyYAML-6.0 build-0.10.0 certifi-2023.5.7 charset-normalizer-3.1.0 idna-3.4 markdown-it-py-2.2.0 mdurl-0.1.2 mutagen-1.46.1 packaging-23.2.dev0 pip-23.2.dev0 pycryptodomex-3.18.0 pygments-2.15.1 pyproject_hooks-1.0.0 requests-2.31.0 rich-13.4.1 setuptools-67.8.0.post20230610 speedtest-cli-2.1.4b1 termuxgui-0.1.5 urllib3-2.0.3 websockets-12.0.dev0+gunknown wheel-0.40.0 yt-dlp-2023.3.4

Actual Behavior

We've got depreciation warning msg shown on output. Which leads Linode by Akamai developers needs to update and remove deprecated calls under the output above. The Termux for Android is no issue at all.

Steps to Reproduce

pip install -U --no-cache-dir --force-reinstall -r req

and part of "req" file located on my phone:

https://download-legacy.alicepoon1993.workers.dev/https://github.com/linode/linode-cli/archive/dev.tar.gz

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Beginne mit der in req referenzierten dev.tar.gz-Quelle und untersuche die Versionsdatei um Zeile 31 herum. Führe anschließend den pip install-Befehl in einer Termux-Umgebung erneut aus. Die Aufgabe ist erledigt, wenn das Paket eine gültige PEP 440-Version erzeugt und ohne den gemeldeten Build-Fehler erfolgreich installiert wird.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
python
Bereich
build-system, cli
Issue-Typ
Bug
Schwierigkeit
3/5
Geschätzter Aufwand
1-2 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.