On Saturday, May 28, 2016 at 12:21:10 PM UTC-7, Jun Omae wrote:
>
> On Sat, May 28, 2016 at 4:48 PM, Jimbo <[email protected]> wrote:
> > Hi, I've added tracspamfilter but see in /var/log/syslog:
> >
> > svn Trac[loader] ERROR: Skipping "spamfilter.blogspam =
> > tracspamfilter.filters.blogspam [json]": (version conflict
> "VersionConflict:
> > (Python 2.7.11- (/usr/lib/python2.7/lib-dynload),
> > Requirement.parse('python>=2.6'))")
> >
> > Any help on this would be very gratefully received.
> >
> > Ubuntu 16.04 LTS, installed from default repos trac 1.0.9, Python
> 2.7.11+
> > Tracspamfilter from
> > https://trac.edgewall.org/browser/plugins/1.0/spam-filter?format=zip
> (builds
> > TracSpamFilter-1.0.9.dev0-py2.7.egg)
> >
> > Many thanks in advance.
>
> It seems that python's version via pkg_resources is broken.
> I consider that is a python2.7 ubuntu package issue.
>
> Ubuntu 16.04:
>
> Python 2.7.11+ (default, Apr 17 2016, 14:00:29)
> [GCC 5.3.1 20160413] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pkg_resources
> >>> dist = pkg_resources.get_distribution('python')
> >>> dist
> Python 2.7.11- (/usr/lib/python2.7/lib-dynload)
> >>> dist.version
> u'2.7.11-' # <== should be '2.7' or '2.7.11'
> >>> pkg_resources.require('python>=2.6')
> Traceback (most recent call last):
> File "<stdin>", line 1, in <module>
> File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py",
> line 943, in require
> needed = self.resolve(parse_requirements(requirements))
> File "/usr/lib/python2.7/dist-packages/pkg_resources/__init__.py",
> line 834, in resolve
> raise VersionConflict(dist, req).with_context(dependent_req)
> pkg_resources.VersionConflict: (Python 2.7.11-
> (/usr/lib/python2.7/lib-dynload), Requirement.parse('python>=2.6'))
>
> Ubuntu 14.04:
>
> Python 2.7.6 (default, Jun 22 2015, 17:58:13)
> [GCC 4.8.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import pkg_resources
> >>> dist = pkg_resources.get_distribution('python')
> >>> dist
> Python 2.7 (/usr/lib/python2.7/lib-dynload)
> >>> dist.version
> '2.7'
> >>> pkg_resources.require('python>=2.6')
> [Python 2.7 (/usr/lib/python2.7/lib-dynload)]
>
>
> Workaround is to remove json requirement from extra_requires in
> spam-filter/setup.py:
>
> Index: setup.py
> ===================================================================
> --- setup.py (revision 14809)
> +++ setup.py (working copy)
> @@ -60,7 +60,6 @@
> 'dns': ['dnspython>=1.3.5'],
> 'spambayes': ['spambayes'],
> 'pillow': ['pillow'],
> - 'json': ['python>=2.6'],
> 'account': ['TracAccountManager >= 0.4'],
> 'oauth': ['oauth2'],
> 'httplib2': ['httplib2']
> @@ -80,7 +79,7 @@
> spamfilter.stopforumspam = tracspamfilter.filters.stopforumspam
> spamfilter.botscout = tracspamfilter.filters.botscout
> spamfilter.fspamlist = tracspamfilter.filters.fspamlist
> - spamfilter.blogspam = tracspamfilter.filters.blogspam[json]
> + spamfilter.blogspam = tracspamfilter.filters.blogspam
> spamfilter.mollom = tracspamfilter.filters.mollom[oauth,httplib2]
> spamfilter.bayes = tracspamfilter.filters.bayes[spambayes]
> spamfilter.extlinks = tracspamfilter.filters.extlinks
>
>
> --
> Jun Omae <[email protected]> (大前 潤)
>
I considered reporting the issue, but it looks like it has been fixed now.
root@ubuntu:~# python
Python 2.7.12 (default, Jul 1 2016, 15:12:24)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pkg_resources
>>> pkg_resources.get_distribution('python')
Python 2.7.12 (/usr/lib/python2.7/lib-dynload)
>>> dist = pkg_resources.get_distribution('python')
>>> dist.version
'2.7.12'
>>> pkg_resources.require('python >= 2.6')
[Python 2.7.12 (/usr/lib/python2.7/lib-dynload)]
root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 16.04.1 LTS
Release: 16.04
Codename: xenial
- Ryan
--
You received this message because you are subscribed to the Google Groups "Trac
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/trac-users.
For more options, visit https://groups.google.com/d/optout.