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

`VersionConstraint.version` is allowed to be `None`

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
32/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python

調査の方向性

Start with src/univers/version_constraint.py at the linked line where wildcard constraints produce a None version. Reproduce the examples with VersionRange.from_string("vers:npm/1.1|2.2") and VersionRange.from_string("vers:npm/*"), then read related issues #10 and #19 for the intended API. Done means the project has a clear, tested behavior for wildcard constraints instead of an unexpected raw None.

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

説明

Is is more of a design decision than an issue.

Let's consider that in a place far far away, someone writes a piece code to get versions from all the constraints:

>>> vr = VersionRange.from_string("vers:npm/1.1|2.2")
>>> range_versions = [c.version for c in vr.constraints]
>>> range_versions
[SemverVersion(string='1.1'), SemverVersion(string='2.2')]

Everything is nice and good until we meet vers:ANY/*

>>> vr = VersionRange.from_string("vers:npm/*")
>>> range_versions = [c.version for c in vr.constraints]
>>> range_versions
[None]

Suddenly, range_versions break all expectations and contains a value value of NoneType than Version
A possible fix would be to allow None versions, such as Version(None)

Introduced here:
https://github.com/nexB/univers/blob/83e4fa651da7868f5c6f7c05a006bfadaac8d1cd/src/univers/version_constraint.py#L70

Related:
https://github.com/nexB/univers/issues/10
https://github.com/nexB/univers/issues/19

主要言語
Python
スター
50
フォーク
31
PR マージ指標
30日以内にマージされた PR はありません

環境構築

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

はじめの一歩

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

aboutcode-org/univers のほかの issue

aboutcode-org/univers の issue をすべて見る

似ている issue

Python の issue をもっと見る

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

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