Bug 1194545 - Review Request: python-cached_property - A cached-property for decorating methods in Python classes.
Summary: Review Request: python-cached_property - A cached-property for decorating me...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: Package Review
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Nobody's working on this, feel free to take it
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1194428
TreeView+ depends on / blocked
 
Reported: 2015-02-20 06:45 UTC by Pete Travis
Modified: 2015-05-04 19:20 UTC (History)
2 users (show)

Fixed In Version: python-cached_property-1.0.0-4.fc22
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-04-17 18:15:23 UTC
Type: ---
adamw+fedora: fedora-review+
gwync: fedora-cvs+


Attachments (Terms of Use)

Description Pete Travis 2015-02-20 06:45:20 UTC
Spec URL: https://immanetize.fedorapeople.org/python-cached-property.spec
SRPM URL: https://immanetize.fedorapeople.org/python-cached-property-1.0.0-1.fc23.src.rpm
Description: cached_property allows properties in Python classes to be cached until the cache is invalidated or expired.
Fedora Account System Username: immanetize

Comment 1 Adam Williamson 2015-02-21 00:58:05 UTC
you don't need to define sitearch, and it's 'good practice' to make sitelib/sitearch definition conditional on old EL and version specific:

%if 0%{?rhel} && 0%{?rhel} <= 6
%{!?python2_sitelib: %global python2_sitelib %(%{__python2} -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())")}
%endif

then use python2_sitelib not python_sitelib (this is all from https://fedoraproject.org/wiki/Packaging:Python ).

The packaging guidelines require using commit-based tarballs when using github-generated sources, not versions:

https://fedoraproject.org/wiki/Packaging:SourceURL#Github

that can be a bit tricky to read, but yes, it really does mean you should use a tarball derived from a commit hash even for stable releases, unless upstream provides tarballs in some way *other* than github's generation system. The justification is that commit hashes are less mutable and thus more predictable, so we should take advantage of that when we can. You can still version the package as 1.0.0-1 , but the Source0 URL should use a commit hash. See http://pkgs.fedoraproject.org/cgit/php-google-apiclient.git/tree/php-google-apiclient.spec for an example.

Comment 2 Pete Travis 2015-02-21 06:02:04 UTC
Thanks for the thorough explanation, Adam. I've made the suggested changes, and a few more minor ones after reviewing rpmlint and the python guidelines again.

Were you envisioning this package in EPEL, or is the conditional only for best practices?

Also, I'm wavering on the package name - "python-cached-property" to match the upstream project, or "python-cached_property" to match the module. Leaning towards the latter - any thoughts?

Comment 3 Adam Williamson 2015-02-21 16:03:06 UTC
I find the guidelines wonderfully unhelpful on the topic:

"When naming packages for Fedora, the maintainer must use the dash '-' as the delimiter for name parts. The maintainer must NOT use an underscore '_', a plus '+', or a period '.' as a delimiter."

But:

"packages where the upstream name naturally contains an underscore are excluded from this."

and the Python section says:

"Packages of python modules (thus they rely on python as a parent) use a slightly different naming scheme. They should take into account the upstream name of the python module. This makes a package name format of python-$NAME. When in doubt, use the name of the module that you type to import it in a script."

it also says:

"When a module has a dot in its name, the usual rule about changing "." to "-" applies." (with 'usual rule' as a link to the Separators section), but does *not* say anything about changing _ to -.

So....???

I recommend asking devel@. :P

Comment 4 Pete Travis 2015-03-04 21:22:45 UTC
After some thought, I'm going to go with matching the name of the module, following the spirit of the Python naming guidelines, which specify matching the module and don't mention the upstream project name.  I'll update the SRPM soon, or on the next bump if you see more room for improvement.

Comment 5 Pete Travis 2015-03-13 05:43:27 UTC
Spec URL: https://immanetize.fedorapeople.org/python-cached_property.spec
SRPM URL: https://immanetize.fedorapeople.org/python-cached_property-1.0.0-2.fc23.src.rpm

* Fri Mar 13 2015 Pete Travis <me@petetravis.com> - 1.0.0-2
- Use the module name for the package name.

* Fri Feb 20 2015 Pete Travis <me@petetravis.com> 1.0.0-1
- Initial packaging.

Comment 6 Adam Williamson (Fedora) 2015-03-20 19:49:58 UTC
Looks fine. I'm not sure what the Party Line is on whether we're supposed to make 'python-foo' the py3 version and have a 'python2-foo' these days, or vice versa, or have just 'python2-foo' and 'python3-foo' and have a virtual Provides: for 'python-foo' which we can switch over at will; but I don't think that needs to block the review.

[adamw@adam SRPMS]$ rpmlint python-cached_property-1.0.0-2.fc23.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
[adamw@adam SRPMS]$ rpmlint /var/lib/mock/fedora-rawhide-x86_64/result/python-cached_property-1.0.0-2.fc23.noarch.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
[adamw@adam SRPMS]$ rpmlint python-cached_property-1.0.0-2.fc23.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
[adamw@adam SRPMS]$ rpmlint ../SPECS/python-cached_property.spec 
0 packages and 1 specfiles checked; 0 errors, 0 warnings.

All must-have items on the review checklist pass => APPROVED.

Comment 7 Pete Travis 2015-03-20 19:52:55 UTC
Thanks, Adam.  IMO the only sane way to make python-foo be the py3 version would be for *all* python packages to follow this convention; we'll know for sure that day has come when the mass bug filing comes :)

Comment 8 Pete Travis 2015-03-20 20:01:16 UTC
New Package SCM Request
=======================
Package Name: python-cached_property
Short Description: A cached-property for decorating methods in Python classes.
Upstream URL: https://github.com/pydanny/cached-property
Owners: immanetize adamwill
Branches: f22 f21
InitialCC:

Comment 9 Pete Travis 2015-03-20 21:20:55 UTC
New Package SCM Request
=======================
Package Name: python-cached_property
Short Description: A cached-property for decorating methods in Python classes.
Upstream URL: https://github.com/pydanny/cached-property
Owners: immanetize adamwill
Branches: f22 f21 epel6 epel7
InitialCC:

Comment 10 Gwyn Ciesla 2015-03-21 16:42:22 UTC
Git done (by process-git-requests).

Comment 11 Fedora Update System 2015-03-26 00:45:14 UTC
python-cached_property-1.0.0-4.fc22 has been submitted as an update for Fedora 22.
https://admin.fedoraproject.org/updates/python-cached_property-1.0.0-4.fc22

Comment 12 Fedora Update System 2015-03-26 00:46:23 UTC
python-cached_property-1.0.0-4.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/python-cached_property-1.0.0-4.fc21

Comment 13 Fedora Update System 2015-03-26 00:47:31 UTC
python-cached_property-1.0.0-4.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/python-cached_property-1.0.0-4.el7

Comment 14 Fedora Update System 2015-03-26 00:48:40 UTC
python-cached_property-1.0.0-4.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/python-cached_property-1.0.0-4.el6

Comment 15 Fedora Update System 2015-03-26 00:48:46 UTC
python-cached_property-1.0.0-4.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/python-cached_property-1.0.0-4.fc20

Comment 16 Fedora Update System 2015-03-28 18:37:40 UTC
Package python-cached_property-1.0.0-4.el6:
* should fix your issue,
* was pushed to the Fedora EPEL 6 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=epel-testing python-cached_property-1.0.0-4.el6'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-EPEL-2015-1434/python-cached_property-1.0.0-4.el6
then log in and leave karma (feedback).

Comment 17 Fedora Update System 2015-04-17 18:15:23 UTC
python-cached_property-1.0.0-4.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 18 Fedora Update System 2015-04-17 18:19:15 UTC
python-cached_property-1.0.0-4.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 19 Fedora Update System 2015-04-18 09:30:19 UTC
python-cached_property-1.0.0-4.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 20 Fedora Update System 2015-04-18 09:44:32 UTC
python-cached_property-1.0.0-4.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 21 Fedora Update System 2015-04-21 19:25:47 UTC
python-cached_property-1.0.0-4.fc22 has been pushed to the Fedora 22 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.