Ticket #92 (closed defect: fixed)

Opened 4 years ago

Last modified 4 years ago

Session.mapper is deprecated

Reported by: guest Owned by: ged
Priority: major Milestone: 0.8
Component: core Version:
Keywords: Cc:

Description

I'm not sure if this is a documentation issue (with an easy workaround) or a code issue, but I can't get the tutorial to run with a brand new easy_install'ed copy of elixir. It appears that elixir 0.6.1 (and the 0.7 trunk as well) are incompatible with sqlalchemy 0.5.5. I get the following error:

entity.py:412: SADeprecationWarning: Session.mapper is deprecated. Please see http://www.sqlalchemy.org/trac/wiki/UsageRecipes/SessionAwareMapper for information on how to replicate its behavior.

*args, **kwargs)

Change History

Changed 4 years ago by ged

  • owner set to ged
  • status changed from new to accepted

Holy cow. I saw that one coming but thought it would only come to the 0.6 line of SQLAlchemy and hence I had some time left to fix that. Either way I thought it was only deprecated (and thus should only output an harmless warning message and run fine). I'll test this as soon as possible.

Changed 4 years ago by guest

  • priority changed from blocker to major
  • version deleted

Hi I'm working with 0.5.5, too and still everything works fine with elixir. It is only a warning, session.mapper is still there, but will be disappear in 0.6. N.N.

Changed 4 years ago by guest

If the warning bothers you now, you can do what I did to work around the message by suppressing it. Just put the following code somewhere before you setup your mappers:

# suppress the deprecation warning in elixir 0.6.1 import warnings warnings.simplefilter('ignore', DeprecationWarning, 412)

Changed 4 years ago by ged

  • milestone set to 0.8

Changed 4 years ago by ged

  • status changed from accepted to closed
  • resolution set to fixed

fixed in r480.

Note: See TracTickets for help on using tickets.