Edgewall Software

Opened 10 years ago

Closed 10 years ago

Last modified 8 years ago

#11796 closed defect (fixed)

DistributionNotFound: Pygments>=0.6" not found if Pygments==2.0rc1 — at Version 8

Reported by: Jun Omae Owned by: Jun Omae
Priority: normal Milestone: 1.0.3
Component: general Version: 1.0-stable
Severity: normal Keywords: pygments
Cc: Branch:
Release Notes:

Add support for Pygments 2.0.

API Changes:
Internal Changes:

Description (last modified by Jun Omae)

Currently, version of pypi:Pygments is 2.0rc1. If it is installed, cannot load trac.mimeview.pygments.

12:29:34 PM Trac[loader] DEBUG: Skipping "trac.mimeview.pygments = trac.mimeview.pygments [pygments]": ("DistributionNotFound: Pygments>=0.6" not found)

Instead, works well with Pygments 1.6.

$ /dev/shm/trac-1.0.2/bin/pip freeze
Babel==0.9.6
Genshi==0.6
Pygments==2.0rc1
Trac==1.0.2
argparse==1.2.1
distribute==0.6.24
wsgiref==0.1.2
Python 2.7.3 (default, Feb 27 2014, 19:58:35)
[GCC 4.6.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import trac.mimeview.pygments
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/dev/shm/trac-1.0.2/local/lib/python2.7/site-packages/trac/mimeview/pygments.py", line 37, in <module>
    HtmlFormatter = pygments.formatters.html.HtmlFormatter
  File "/dev/shm/trac-1.0.2/local/lib/python2.7/site-packages/pygments/formatters/__init__.py", line 111, in __getattr__
    raise AttributeError(name)
AttributeError: html

Change History (8)

comment:1 by Jun Omae, 10 years ago

Description: modified (diff)

comment:2 by Christian Boos, 10 years ago

Strange…

Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Module readline not available.

>>> import trac.mimeview.pygments
>>> import pygments
>>> pygments.__version__
'2.0rc1'

(installed via easy_install pygments)

I then used pip to uninstall/install it again, same result, no error for me.

comment:3 by Jun Omae, 10 years ago

Milestone: next-stable-1.0.x0.12.7
Owner: set to Jun Omae
Status: newassigned

The issue is reproduced with 0.12-stable and 1.0-stable. No error with trunk.

Proposed changes in [4580ae4f/jomae.git] (jomae.git@t11796_1.0) and [930ea97a/jomae.git] (jomae.git@t11796_0.12). Confirmed with Pygments 0.6 through 2.0rc1.

comment:4 by Jun Omae, 10 years ago

Hmmm, I get the error for me on both Linux and Windows.

Python 2.7.5 (default, May 15 2013, 22:43:36) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import trac.mimeview.pygments
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "trac\mimeview\pygments.py", line 37, in <module>
    HtmlFormatter = pygments.formatters.html.HtmlFormatter
  File "C:\usr\src\trac\venv\t11796\lib\site-packages\pygments\formatters\__init__.py", line 111, in __getattr__
    raise AttributeError(name)
AttributeError: html
>>> import pygments
>>> pygments.__version__
'2.0rc1'

comment:5 by Ryan J Ollos, 10 years ago

I can reproduce the issue shown in comment:4 for Trac 0.12.6 and Trac 1.0.2 with Python 2.7.6 and Pygments 2.0rc1 on Ubuntu 14.04. No error with Trac 1.1.2.

in reply to:  3 ; comment:6 by Christian Boos, 10 years ago

Replying to jomae:

The issue is reproduced with 0.12-stable and 1.0-stable. No error with trunk.

My bad, I checked trunk only.

Proposed changes in [4580ae4f/jomae.git] (jomae.git@t11796_1.0) and [930ea97a/jomae.git] (jomae.git@t11796_0.12). Confirmed with Pygments 0.6 through 2.0rc1.

What's your take on the question of having a last 0.12.7 bugfix release vs. keeping 0.12-stable as it is and save 0.12.7 for a security fix release, should the latter be needed?

in reply to:  6 comment:7 by Jun Omae, 10 years ago

Milestone: 0.12.71.0.3

Replying to cboos:

What's your take on the question of having a last 0.12.7 bugfix release vs. keeping 0.12-stable as it is and save 0.12.7 for a security fix release, should the latter be needed?

Retargeting 1.0.3 for this is okay to me. The issue is minor and it's easy to prevent it by a user.

However, I think we should have a last 0.12.7 bugfix release. We didn't import latest translations for 0.12-stable contributed by translators on Transifex in releasing 0.12.6. This is that we ignore contributors' work and time, I think.

IMO, I have interest on 0.12-stable because our company still uses 0.12-stable for Trac hosting. Of course, we have a plan which these migrate to 1.0-stable….

Last edited 10 years ago by Jun Omae (previous) (diff)

comment:8 by Jun Omae, 10 years ago

Release Notes: modified (diff)
Resolution: fixed
Status: assignedclosed

Committed in [13264] and record-only merge in [13265].

Pygments 2.0 has been released on 2014-11-09.

Note: See TracTickets for help on using tickets.