Hi mike, On 17.11.2017 14:45, Mike Bayer wrote:
> how about we add a standalone function with a guaranteed behavioral > contract, like sqlalchemy.orm.new_instance() or something like that. > it will call class.mapper.new_instance() but new tests in > test/orm/test_session will ensure it maintains the exact behavioral > contract you need. it can also fail correctly if the class is > unmapped (or perhaps just call __new__), etc. > > would you be able to propose a pull req ? Gladly so! I especially like the idea that it would work for unmapped classes as well. Greetings, Torsten -- $---+----1----+----2----+----3----+----4----+----5----+----6----+ SCALE GmbH Niederlassung Dresden Torsten Landschoff Pohlandstraße 19 01309 Dresden Tel: +49-351-312002-10 Fax: +49-351-312002-29 SCALE GmbH Registergericht und Sitz: Ingolstadt, HRB 6384 Geschäftsführer: Dr.-Ing. Heiner Müllerschön, Dipl.-Math. Ulrich Franz -- SQLAlchemy - The Python SQL Toolkit and Object Relational Mapper http://www.sqlalchemy.org/ To post example code, please provide an MCVE: Minimal, Complete, and Verifiable Example. See http://stackoverflow.com/help/mcve for a full description. --- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.
