#11993 closed defect (fixed)
Mercurial plugin not loaded with setuptools>=8
Reported by: | Peter Suter | Owned by: | Peter Suter |
---|---|---|---|
Priority: | normal | Milestone: | 0.12.7 |
Component: | general | Version: | |
Severity: | normal | Keywords: | setuptools tag_svn_revision |
Cc: | Dirk Stöcker | Branch: | |
Release Notes: |
Removed |
||
API Changes: | |||
Internal Changes: |
Description
Trac[loader] ERROR: Skipping "TracMercurial 1.0.0.6.dev0": (version conflict "ContextualVersionConflict: (trac 1.1.3dev-r13332, Requirement.parse('Trac>=1.0dev'), set(['TracMercurial']))"
The mercurial plugin requires Trac >=1.0dev.
But it seems setuptools 8 has changed version parsing:
from pkg_resources import parse_version parse_version('1.1.3dev-r13332') > parse_version('1.1dev')
In setuptools 7 and below this was True
. In setuptools 8 and above this is False
.
It seems one of these versions must be changed to be compliant with PEP:0440?
Attachments (0)
Change History (10)
comment:1 by , 10 years ago
Component: | plugin/mercurial → general |
---|---|
Milestone: | plugin - mercurial → next-dev-1.1.x |
follow-up: 3 comment:2 by , 10 years ago
The tag_svn_revision
option requires pypi:setuptools_svn since setuptools 10.0. See https://bitbucket.org/pypa/setuptools/issue/313.
Even without the changing from dev
to .dev
, it seems that both version strings are compatible with PEP:0440 and the same value. Unfortunately, tag_svn_revision
option currently generates incompatible version string with PEP:0440.
>>> import setuptools >>> setuptools.__version__ '12.0.5' >>> parse_version('1.0.3dev') <Version('1.0.3.dev0')> >>> parse_version('1.0.3.dev') <Version('1.0.3.dev0')> >>> parse_version('1.0.3dev') == parse_version('1.0.3.dev') True >>> parse_version('1.0.3dev-r12345') <LegacyVersion('1.0.3dev-r12345')> >>> parse_version('1.0.3.dev-r12345') <LegacyVersion('1.0.3.dev-r12345')>
follow-ups: 4 5 comment:3 by , 10 years ago
Replying to jomae:
Unfortunately,
tag_svn_revision
option currently generates incompatible version string with PEP:0440.
Given the issues we've seen with that option (e.g. th:#10778 seen with plugins - assuming a similar issue could be seen installing Trac), it seems better to just remove it. Do you guys agree?
comment:4 by , 10 years ago
Replying to rjollos:
it seems better to just remove it. Do you guys agree?
Sadly yes, I don't see a good alternative.
comment:5 by , 10 years ago
Replying to rjollos:
…, it seems better to just remove it. Do you guys agree?
Agreed. Otherwise, adding inherited egg_info
command.
-
setup.py
15 15 import sys 16 16 17 17 from setuptools import setup, find_packages 18 from setuptools.command.egg_info import egg_info 18 19 19 20 min_python = (2, 6) 20 21 if sys.version_info < min_python: … … 53 54 # give some context to the warnings we might get when installing Genshi 54 55 55 56 57 class svn_egg_info(egg_info): 58 59 def tags(self): 60 import re 61 return re.sub(r'\Adev-r([0-9]+)', r'dev\1', egg_info.tags(self)) 62 63 64 extra.setdefault('cmdclass', {})['egg_info'] = svn_egg_info 65 66 56 67 setup( 57 68 name = 'Trac', 58 69 version = '1.1.4',
Of course, I don't recommend to use it because the base class of egg_info
might be modified in the future.
$ PYTHONPATH=. /dev/shm/venv/bin/python setup.py egg_info running egg_info writing requirements to Trac.egg-info/requires.txt writing Trac.egg-info/PKG-INFO writing top-level names to Trac.egg-info/top_level.txt writing dependency_links to Trac.egg-info/dependency_links.txt writing entry points to Trac.egg-info/entry_points.txt writing manifest file 'Trac.egg-info/SOURCES.txt' $ grep '^Version:' Trac.egg-info/PKG-INFO Version: 1.1.4.dev13863
comment:6 by , 10 years ago
Removed in [13902:13906]. I didn't look closely yet at whether #10658 should be closed.
comment:7 by , 10 years ago
Keywords: | tag_svn_revision added |
---|---|
Milestone: | next-dev-1.1.x → 0.12.7 |
Release Notes: | modified (diff) |
Resolution: | → fixed |
Status: | new → closed |
Seems to me both #10658 and this ticket can be closed. Please reopen if I missed something.
comment:8 by , 10 years ago
Owner: | set to |
---|
follow-up: 10 comment:9 by , 10 years ago
Cc: | added |
---|
SpamFilter also has a tag_svn_revision
in setup.cfg.
comment:10 by , 10 years ago
Replying to rjollos:
SpamFilter also has a
tag_svn_revision
in setup.cfg.
I opened #12038 after encountering a problem due to the invalid version number.
Apparently
1.1.3dev-r13332
should become1.1.3.dev13332
. In egg_info we can changetag_build
fromdev
to.dev
, but withtag_svn_revision
setuptools adds the-r
automatically so far. (Though since setuptools 10 that doesn't work anymore out of the box anyway.)