Edgewall Software

Changes between Version 5 and Version 6 of TracDev/ApiChanges/1.1.2


Ignore:
Timestamp:
Aug 4, 2014, 5:56:32 AM (10 years ago)
Author:
Ryan J Ollos
Comment:

More info on database API changes.

Legend:

Unmodified
Added
Removed
Modified
  • TracDev/ApiChanges/1.1.2

    v5 v6  
    7272==== `Environment.get_db_cnx` has been removed #get_db_cnx
    7373
    74 Following the [../0.12#get_db_cnx deprecation] made in 0.12, using `Environment.get_db_cnx` for obtaining a database connection has now been removed.
     74Following the [../0.12#get_db_cnx deprecation] made in 0.12, the method `Environment.get_db_cnx` has been removed.
    7575
    7676One should now only use the //context managers// for retrieving a database Connection
     
    9191   queries; they will be committed when the last such automatic transaction
    9292   in the control flow completes successfully. See DatabaseApi for the full details.
     93
     94`Environment.get_read_db` and the decorators `@with_transaction(env)` and `env.with_transaction()` have been [../1.0#with_transaction deprecated] since Trac 1.0 and will be removed in Trac 1.3.1.
     95
     96
     97==== `db` parameters removed from function and method signatures
     98
     99With the introduction of `@with_transaction(env)` context managers in 0.12 and continuing with the introduction of the database connection context managers in 1.0, the `db` parameters passed as function and method arguments became [../0.12#Othernews deprecated].
     100
     101The `db` parameters have been removed from nearly all function and method signatures. The `db` arguments are still present on methods of `IEnvironmentParticipant` implementations, but are deprecated and should no longer be used. They will be removed in 1.3.1.
    93102
    94103