Support local version identifiers
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 35/100
Hướng nghiên cứu
Start with PEP 440 local version identifiers and incremental's Version implementation, especially public() and short(). Compare the proposed local argument with the existing version behavior; done means a value such as local='lp1' produces 20.3.0+lp1 for distribution files without a subclass or downstream workaround.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
PEP 440 defines local version identifiers which can be used when applying local patches to upstream projects. For example, in Launchpad we occasionally have to backport fixes from later releases that we can't upgrade to wholesale yet, or apply patches that haven't been integrated yet upstream; we do this by making distributions with local version identifiers that we commit to a git repository containing our dependencies.
This works fine with most Python projects, but it's awkward for ones that use incremental because incremental doesn't directly support local version identifiers: there's a Version.local, but it's just equal to Version.public. Let's say we're making a fork of Twisted 20.3.0, which has:
__version__ = Version('Twisted', 20, 3, 0)
Ideally we'd just be able to change that to something like:
__version__ = Version('Twisted', 20, 3, 0, local='lp1')
... and have that generate 20.3.0+lp1. However, since incremental doesn't support local version identifiers and since Twisted uses __version__.short(), I guess we end up doing something like this (obviously incomplete, but just for the purpose of getting distribution files with the right version number in them):
class LocalVersion(Version):
def __init__(self, *args, **kwargs):
self._local = kwargs.pop('local')
super(LocalVersion, self).__init__(*args, **kwargs)
def public(self):
public = super(LocalVersion, self).public()
if self._local:
public += '+%s' % self._local
return public
__version__ = LocalVersion('Twisted', 20, 3, 0, local='lp1')
Or alternatively I suppose that we could make src/twisted/__init__.py say:
__version__ = version.short() + '+lp1'
Either way, this seems like a lot of awkwardness just to make a temporary local backport distribution! I think incremental could usefully help to make this easier.
- Ngôn ngữ chính
- Python
- Star
- 144
- Fork
- 21
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của twisted/incremental
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 55/100
twisted/incremental#209 ·
-
[24.11.0] Incorrect Version and GIT Tag for 25.11.0?Có thể đã có người làm @twm đã nhận 244 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
twisted/incremental#185 · 3 bình luận · 1 reaction ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
twisted/incremental#111 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 35/100
twisted/incremental#110 · 8 bình luận ·
-
enhancement
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
twisted/incremental#109 · 3 bình luận ·
Tất cả issue của twisted/incremental
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 86/100
NousResearch/hermes-agent#147104 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
premises-missing
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 88/100
WingedGuardian/GENesis-AGI#3801 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[oblt-aw][autodoc] Document new required `shared-org-key` input for `obs-aw-dependency-review`Có thể đã có người làm @github-actions đã nhận hôm nay. Đang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 90/100
Maintainer thường phản hồi trong vòng 1 ngày
-
bot-triaged module: inductor oncall: pt2 topic: fuzzer triaged
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
Maintainer thường phản hồi trong vòng 4 ngày