Edgewall Software

Opened 9 years ago

Closed 9 years ago

#12096 closed enhancement (fixed)

Specify MySQLdb and psycopg2 in extras_require

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: low Milestone: 1.1.6
Component: database backend Version:
Severity: normal Keywords: postgresql mysql
Cc: Branch:
Release Notes:

psycopg2 and MySQLdb are specified as dependencies in setup.py's extras_require.

API Changes:
Internal Changes:


The optional dependencies are specified in tags/trac-1.1.5/setup.py@:105-110,126-128#L98 for all optional dependencies except MySQLdb and psycopg2. Any particular reason for that, or is it just an oversight?

With the proposed change, the components are skipped when the dependencies are not installed, and they don't appear on the plugin admin page:

15:21:16 Trac[loader] DEBUG: Loading trac.db.mysql from /Users/rjollos/Documents/Workspace/trac-dev/pve-test/lib/python2.7/site-packages
15:21:16 Trac[loader] DEBUG: Skipping "trac.db.mysql = trac.db.mysql_backend [mysql]": ("DistributionNotFound: MySQLdb>=1.2.2" not found)
15:21:16 Trac[loader] DEBUG: Loading trac.db.postgres from /Users/rjollos/Documents/Workspace/trac-dev/pve-test/lib/python2.7/site-packages
15:21:16 Trac[loader] DEBUG: Skipping "trac.db.postgres = trac.db.postgres_backend [postgresql]": ("DistributionNotFound: psycopg2>=2.0" not found)

In both cases an error is displayed when using a database string containing postgres or mysql:

Trac Error

Cannot load Python bindings for PostgreSQL

TracGuide — The Trac User and Administration Guide

Attachments (0)

Change History (4)

comment:1 by Ryan J Ollos, 9 years ago

Proposed changes tested so far on Mac OSX 10.10 with Python 2.7: log:rjollos.git:t12096-extras-require.

comment:2 by Ryan J Ollos, 9 years ago

Priority: normallow

comment:3 by figaro, 9 years ago

Keywords: postgresql added; postgres removed

comment:4 by Ryan J Ollos, 9 years ago

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

Also tested on Ubuntu 14.04 with setuptools 2.2 and Python 2.7. Committed to trunk in [14103].

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Ryan J Ollos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Ryan J Ollos to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .
Note: See TracTickets for help on using tickets.