← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 2004263] [NEW] [sqlalchemy-20] Remove ORM "from_self"

 

Public bug reported:

The "from_self()" method in SQLAlchemy is deprecated in version 2.0.

The from_self() method takes an ORM query object, turns it into a
subquery, then returns a new query object that will SELECT from that
subquery, while transparently altering subsequent criteria added to the
query to be stated in terms of the subquery. The current design
direction of SQLAlchemy hopes to de-emphasize the "transparently
altering criteria" part of the above use case, and to move users towards
a more explicit and model of usage where a subquery should be created
and used explicitly using the aliased() construct, which is now very
mature and can be used in ways     that were not available when
from_self() was first introduced.

Reference: https://github.com/sqlalchemy/sqlalchemy/issues/5368

** Affects: neutron
     Importance: Undecided
     Assignee: Rodolfo Alonso (rodolfo-alonso-hernandez)
         Status: In Progress

** Changed in: neutron
     Assignee: (unassigned) => Rodolfo Alonso (rodolfo-alonso-hernandez)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to neutron.
https://bugs.launchpad.net/bugs/2004263

Title:
  [sqlalchemy-20] Remove ORM "from_self"

Status in neutron:
  In Progress

Bug description:
  The "from_self()" method in SQLAlchemy is deprecated in version 2.0.

  The from_self() method takes an ORM query object, turns it into a
  subquery, then returns a new query object that will SELECT from that
  subquery, while transparently altering subsequent criteria added to
  the query to be stated in terms of the subquery. The current design
  direction of SQLAlchemy hopes to de-emphasize the "transparently
  altering criteria" part of the above use case, and to move users
  towards a more explicit and model of usage where a subquery should be
  created and used explicitly using the aliased() construct, which is
  now very mature and can be used in ways     that were not available
  when from_self() was first introduced.

  Reference: https://github.com/sqlalchemy/sqlalchemy/issues/5368

To manage notifications about this bug go to:
https://bugs.launchpad.net/neutron/+bug/2004263/+subscriptions



Follow ups