summaryrefslogtreecommitdiff
path: root/lib/sqlalchemy/ext/serializer.py
Commit message (Collapse)AuthorAgeFilesLines
* Unify Query and select() , move all processing to compile phaseMike Bayer2020-05-241-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert Query to do virtually all compile state computation in the _compile_context() phase, and organize it all such that a plain select() construct may also be used as the source of information in order to generate ORM query state. This makes it such that Query is not needed except for its additional methods like from_self() which are all to be deprecated. The construction of ORM state will occur beyond the caching boundary when the new execution model is integrated. future select() gains a working join() and filter_by() method. as we continue to rebase and merge each commit in the steps, callcounts continue to bump around. will have to look at the final result when it's all in. References: #5159 References: #4705 References: #4639 References: #4871 References: #5010 Change-Id: I19e05b3424b07114cce6c439b05198ac47f7ac10
* happy new yearMike Bayer2020-01-011-1/+1
| | | | Change-Id: I08440dc25e40ea1ccea1778f6ee9e28a00808235
* happy new yearMike Bayer2019-01-111-1/+1
| | | | Change-Id: I6a71f4924d046cf306961c58dffccf21e9c03911
* Post black reformattingMike Bayer2019-01-061-17/+23
| | | | | | | | | | | | | Applied on top of a pure run of black -l 79 in I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9, this set of changes resolves all remaining flake8 conditions for those codes we have enabled in setup.cfg. Included are resolutions for all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I4f72d3ba1380dd601610ff80b8fb06a2aff8b0fe
* Run black -l 79 against all source filesMike Bayer2019-01-061-9/+17
| | | | | | | | | | | | | | This is a straight reformat run using black as is, with no edits applied at all. The black run will format code consistently, however in some cases that are prevalent in SQLAlchemy code it produces too-long lines. The too-long lines will be resolved in the following commit that will resolve all remaining flake8 issues including shadowed builtins, long lines, import order, unused imports, duplicate imports, and docstring issues. Change-Id: I7eda77fed3d8e73df84b3651fd6cfcfe858d4dc9
* happy new yearMike Bayer2018-01-121-1/+1
| | | | Change-Id: I3ef36bfd0cb0ba62b3123c8cf92370a43156cf8f
* Improve serializer behaviorMike Bayer2017-03-141-1/+1
| | | | | | | | | | Fix an issue where the Annotated system needs to have a __reduce__ method, also see why we can't default to HIGHEST_PROTOCOL. This latter part might not be a good idea until 1.2 for compatibility reasons. Change-Id: I0239e38259fc768c9e3b6c448c29161e271a969c Fixes: #3918
* update for 2017 copyrightMike Bayer2017-01-041-1/+1
| | | | Change-Id: I4e8c2aa8fe817bb2af8707410fa0201f938781de
* - happy new yearMike Bayer2016-01-291-1/+1
|
* - copyright 2015Mike Bayer2015-03-101-1/+1
|
* PEP8 style fixesBrian Jarrett2014-07-131-5/+7
|
* - break up the <authors> copyright comment as part of a passMike Bayer2014-07-091-1/+2
| | | | to get all flake8 passing
* - happy new yearMike Bayer2014-01-051-1/+1
|
* - Fixed bug which prevented the ``serializer`` extension from workingMike Bayer2013-11-211-4/+4
| | | | | correctly with table or column names that contain non-ASCII characters. [ticket:2869]
* fix serializer tests. something is wrong with non-C pickle but for some ↵Mike Bayer2013-05-261-19/+2
| | | | | | reason py3k's pickle seems to be OK? not sure why that is, as this is all related to http://bugs.python.org/issue998998
* - the raw 2to3 runMike Bayer2013-04-271-12/+14
| | | | - went through examples/ and cleaned out excess list() calls
* fix here, was only failing in the py3k versionMike Bayer2013-04-261-1/+1
|
* Fixes to the ``sqlalchemy.ext.serializer`` extension, includingMike Bayer2013-04-261-2/+3
| | | | | | | that the "id" passed from the pickler is turned into a string to prevent against bytes being parsed on Py3K, as well as that ``relationship()`` and ``orm.join()`` constructs are now properly serialized. [ticket:2698] and some other observed issues.
* happy new year (see #2645)Diana Clarke2013-01-011-1/+1
|
* - refactor of pathing mechanics, to address #2614, #2617Mike Bayer2012-12-011-0/+8
| | | | | | | | | | | | | | | | | | | - paths now store Mapper + MapperProperty now instead of string key, so that the parent mapper for the property is known, supports same-named properties on multiple subclasses - the Mapper within the path is now always relevant to the property to the right of it. PathRegistry does the translation now, instead of having all the outside users of PathRegistry worry about it, to produce a path that is much more consistent. Paths are now consistent with mappings in all cases. Special logic to get at "with_polymorphic" structures and such added also. - AliasedClass now has two modes, "use_mapper_path" and regular; "use_mapper_path" is for all those situations where we put an AliasedClass in for a plain class internally, and want it to "path" with the plain mapper. - The AliasedInsp is now the first class "entity" for an AliasedClass, and is passed around internally and used as attr._parententity and such. it is the AliasedClass analogue for Mapper.
* just a pep8 pass of lib/sqlalchemy/extDiana Clarke2012-11-191-11/+12
|
* - move ext to relative importsMike Bayer2012-07-171-12/+12
|
* happy new yearMike Bayer2012-01-041-1/+1
|
* - whitespace removal bonanzaMike Bayer2011-01-021-13/+13
|
* - clean up copyright, update for 2011, stamp every file withMike Bayer2011-01-021-0/+6
| | | | | a consistent tag - AUTHORS file
* formattingMike Bayer2010-02-121-7/+8
|
* since I just got confused over my own serializer module, clarify its purposeMike Bayer2010-02-121-9/+18
|
* - make frozendict serializableMike Bayer2010-01-281-2/+2
| | | | - serialize tests use HIGHEST_PROTOCOL
* merge 0.6 series to trunk.Mike Bayer2009-08-061-7/+23
|
* - Fixed bug in Query involving order_by() in conjunction withMike Bayer2008-11-061-0/+129
multiple aliases of the same class (will add tests in [ticket:1218]) - Added a new extension sqlalchemy.ext.serializer. Provides Serializer/Deserializer "classes" which mirror Pickle/Unpickle, as well as dumps() and loads(). This serializer implements an "external object" pickler which keeps key context-sensitive objects, including engines, sessions, metadata, Tables/Columns, and mappers, outside of the pickle stream, and can later restore the pickle using any engine/metadata/session provider. This is used not for pickling regular object instances, which are pickleable without any special logic, but for pickling expression objects and full Query objects, such that all mapper/engine/session dependencies can be restored at unpickle time.