Edgewall Software

Opened 9 years ago

Last modified 9 years ago

#12096 closed enhancement

Specify MySQLdb and psycopg2 in extras_require — at Initial Version

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:
API Changes:
Internal Changes:

Description

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

Change History (0)

Note: See TracTickets for help on using tickets.