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

Improve py27 detection to avoid "No module named venv" when using plonecli

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

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

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
55/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
停滞
技術スタック
python
領域
cli

調査の方向性

Start in plonecli/cli.py around the linked detection logic at line 120 and reproduce the Python 2.7 case that reports "No module named venv". Check how the selected interpreter is identified when it is not named python2.7; done means Python 2 uses virtualenv reliably regardless of its path while newer Python uses the existing behavior.

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

説明

  • Plone CLI version: 2.1.2
  • Python version: 2.7
  • Operating System: Ubuntu 18.04

Right now, the logic to use virtualenv instead of venv is a bit fragile, since it tries to detect python 2 by comparing if the bin is python2.7

https://github.com/plone/plonecli/blob/b478678d7437f29db1f577994e6538982028cb3e/plonecli/cli.py#L120

A more robust condition using sys.version_info is better since you can use any compiled python in any path. A little hackish, but it works instead of comparing to python2.7string: if subprocess.call([python_bin, "-c", "import sys; sys.exit(0) if sys.version_info.major == 2 else sys.exit(1)"]) == 0

@jensens

主要言語
Python
スター
20
フォーク
12
平均マージ
11日 13時間
マージ済み PR(30日)
2

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

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

plone/plonecli のほかの issue

plone/plonecli の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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