Opened 11 years ago
Last modified 11 years ago
#11097 closed defect
Use of deprecated env.get_version(db) in trac core — at Initial Version
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | normal | Milestone: | 1.0.2 |
Component: | general | Version: | |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
The docstring for Environment.get_version
in trac/env.py
states:
:since 1.0: deprecation warning: the `db` parameter is no longer used and will be removed in version 1.1.1 """
However, code in trac/env.py
on trunk calls get_version(db)
.
The following patch removes the deprecated db
argument in the function call. Trac's tests still pass after this patch is applied.
-
trac/env.py
diff --git a/trac/env.py b/trac/env.py index b63653b..d2d42b0 100644
a b class EnvironmentSetup(Component): 754 754 self._update_sample_config() 755 755 756 756 def environment_needs_upgrade(self, db): 757 dbver = self.env.get_version( db)757 dbver = self.env.get_version() 758 758 if dbver == db_default.db_version: 759 759 return False 760 760 elif dbver > db_default.db_version:
This is the only place in Trac core code where the old signature is used — all other calls to env.get_version
do not pass in the db argument.
Note:
See TracTickets
for help on using tickets.