Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

setup.py still declares Python 2.7 support

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

メンテナーはふだん 1 日以内に返信

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

評価

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

調査の方向性

Start with python_requires and the classifiers in setup.py, then compare them with the CI matrix in main.yml, tests.yml and tox.ini. The Python 2 shims to remove are in nodeenv.py: the pipes.quote fallback, the py2 import block, is_PY3, to_utf8() and its call sites. Check whether PR #429 or #434 has already changed the same lines. Done means the metadata matches the CI-tested versions and no Python 2 compatibility code remains.

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

説明

setup.py still declares Python 2.7 and 3.7+ (master, ecb4b74):

    python_requires=(
        ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*"
    ),

The classifiers list 2, 2.7, 3.7, 3.8, 3.9, 3.10 and PyPy, and nothing after 3.10.

CI (main.yml, tests.yml) and tox.ini (envlist = py310,py311,py312,py313,py314) only test CPython 3.10-3.14.

Python 2.7 is already broken. Since 1.10.0 (e868dbe, #355), find_system_node() calls shutil.which, which 2.7 doesn't have, so --node=system and --prefer-system fail with AttributeError.

PR #434 changes the README to "Python 3 (CI tests CPython 3.10 through 3.14)". Once it is merged, the README and the package metadata will disagree.

To do:

  • pick the minimum supported version and update python_requires
  • update the classifiers to match it (they stop at 3.10)
  • drop the Python 2 compatibility code in nodeenv.py:
    • the pipes.quote fallback for Python < 3.3
    • the try/except ImportError block with the py2 imports (ConfigParser, urllib2, urlparse, urllib.unquote, httplib) and the iteritems helper; urllib.request is still imported as urllib2
    • is_PY3 and to_utf8(), which returns the text unchanged on Python 3 (7 call sites)
    • the sys.version_info major check in build_node_from_src; PR #429 already rewrites it
主要言語
Python
スター
1.8k
フォーク
225
平均マージ
17時間 18分
マージ済み PR(30日)
26

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

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

ekalinin/nodeenv のほかの issue

ekalinin/nodeenv の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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