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

オープン
#469 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
build-system, cli

調査の方向性

req で参照されている dev.tar.gz ソースから始め、31 行付近のバージョンファイルを調査してから、Termux 環境で pip install コマンドを再現します。パッケージが有効な PEP 440 バージョンを生成し、報告されたビルド失敗なしで正常にインストールできれば完了です。

索引モデルが issue の本文から書いたものです。

説明

bug
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

主要言語
Python
スター
442
フォーク
159
平均マージ
7日 21時間
マージ済み PR(30日)
8

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

linode/linode-cli のほかの issue

linode/linode-cli の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。