release 0.5.5 breaks requirementslib
まだ誰も着手していません。
評価
調査の方向性
requirementslib の testsuite または isort を使って失敗を再現し、test_isort.py:2685 と isort/finders.py:199-332 の PipfileFinder パスから開始します。requirementslib が pipfile.get("packages", {}) にアクセスする方法を追跡し、対応する tomlkit の動作を調査します。報告されたテストで AttributeError が発生しなくなれば完了です。
索引モデルが issue の本文から書いたものです。
説明
This is exposed by the requirementslib testsuite or in isort:
[ 146s] _____________________________ test_pipfile_finder ______________________________
[ 146s]
[ 146s] tmpdir = local('/tmp/pytest-of-abuild/pytest-0/test_pipfile_finder0')
[ 146s]
[ 146s] def test_pipfile_finder(tmpdir):
[ 146s] pipfile = tmpdir.join('Pipfile')
[ 146s] pipfile.write(PIPFILE)
[ 146s] si = SortImports(file_contents="")
[ 146s] finder = finders.PipfileFinder(
[ 146s] config=si.config,
[ 146s] sections=si.sections,
[ 146s] > path=str(tmpdir)
[ 146s] )
[ 146s]
[ 146s] /home/abuild/rpmbuild/BUILD/isort-4.3.21/test_isort.py:2685:
[ 146s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 146s] /home/abuild/rpmbuild/BUILD/isort-4.3.21/isort/finders.py:199: in __init__
[ 146s] self.names = self._load_names()
[ 146s] /home/abuild/rpmbuild/BUILD/isort-4.3.21/isort/finders.py:221: in _load_names
[ 146s] for name in self._get_names(path):
[ 146s] /home/abuild/rpmbuild/BUILD/isort-4.3.21/isort/finders.py:332: in _get_names
[ 146s] for req in project.packages:
[ 146s] /usr/lib/python2.7/site-packages/requirementslib/models/pipfile.py:240: in __getattr__
[ 146s] return super(Pipfile, self).__getattribute__(k, *args, **kwargs)
[ 146s] /usr/lib/python2.7/site-packages/requirementslib/models/pipfile.py:326: in packages
[ 146s] return self.requirements
[ 146s] /usr/lib/python2.7/site-packages/requirementslib/models/pipfile.py:240: in __getattr__
[ 146s] return super(Pipfile, self).__getattribute__(k, *args, **kwargs)
[ 146s] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
[ 146s]
[ 146s] self = Pipfile(path=PosixPath('/tmp/pytest-of-abuild/pytest-0/test_pipfile_finder0/Pi...e=None, _pyproject={}, build_system={}, _requirements=[], _dev_requirements=[])
[ 146s]
[ 146s] @property
[ 146s] def requirements(self):
[ 146s] # type: () -> List[Requirement]
[ 146s] if not self._requirements:
[ 146s] > packages = tomlkit_value_to_python(self.pipfile.get("packages", {}))
[ 146s] E AttributeError: 'NoneType' object has no attribute 'get'
[ 146s]
[ 146s] /usr/lib/python2.7/site-packages/requirementslib/models/pipfile.py:344: AttributeError
The logic in requirementslib actually looks okayish so I suppose it is an issue inside tomlkit.
- 主要言語
- Python
- スター
- 850
- フォーク
- 163
- 平均マージ
- 13分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
python-poetry/tomlkit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
python-poetry/tomlkit#546 · コメント 2 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
python-poetry/tomlkit#603 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 52/100
python-poetry/tomlkit#580 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 72/100
python-poetry/tomlkit#577 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
python-poetry/tomlkit#574 · コメント 5 件 ·
python-poetry/tomlkit の issue をすべて見る
似ている issue
-
area: harness bug status: needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
Human-Agent-Society/reef#625 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 80/100
learningequality/kolibri#15351 · コメント 2 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
Name consistency オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
eellak/triplestore#65 · コメント 1 件 ·