mirror of
https://github.com/gentoo-mirror/gentoo.git
synced 2026-07-25 21:08:35 -07:00
dev-python/sqlalchemy: Clean old
obsoletes Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=481426 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=481634 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=489488 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=546892 Gentoo-Bug: https://bugs.gentoo.org/show_bug.cgi?id=547260 Package-Manager: portage-2.2.25 Signed-off-by: Justin Lecher <jlec@gentoo.org>
This commit is contained in:
@@ -1,38 +0,0 @@
|
||||
From 405c223ae50e78dacac08783c414619db20df0b7 Mon Sep 17 00:00:00 2001
|
||||
From: Mike Bayer <mike_mp@zzzcomputing.com>
|
||||
Date: Tue, 29 Jul 2014 13:32:05 -0400
|
||||
Subject: [PATCH] - Fixed 0.9.7 regression caused by :ticket:`3067` in
|
||||
conjunction with a mis-named unit test such that so-called "schema" types
|
||||
like :class:`.Boolean` and :class:`.Enum` could no longer be pickled. fixes
|
||||
#3144
|
||||
|
||||
diff --git a/lib/sqlalchemy/sql/elements.py b/lib/sqlalchemy/sql/elements.py
|
||||
index 6114460..6cbf583 100644
|
||||
--- a/lib/sqlalchemy/sql/elements.py
|
||||
+++ b/lib/sqlalchemy/sql/elements.py
|
||||
@@ -3276,6 +3276,9 @@ class _defer_name(_truncated_label):
|
||||
else:
|
||||
return super(_defer_name, cls).__new__(cls, value)
|
||||
|
||||
+ def __reduce__(self):
|
||||
+ return self.__class__, (util.text_type(self), )
|
||||
+
|
||||
|
||||
class _defer_none_name(_defer_name):
|
||||
"""indicate a 'deferred' name that was ultimately the value None."""
|
||||
diff --git a/test/sql/test_types.py b/test/sql/test_types.py
|
||||
index 03d3997..efa0f90 100644
|
||||
--- a/test/sql/test_types.py
|
||||
+++ b/test/sql/test_types.py
|
||||
@@ -234,9 +234,9 @@ class TypeAffinityTest(fixtures.TestBase):
|
||||
assert t1.dialect_impl(d)._type_affinity is postgresql.UUID
|
||||
|
||||
|
||||
-class PickleMetadataTest(fixtures.TestBase):
|
||||
+class PickleTypesTest(fixtures.TestBase):
|
||||
|
||||
- def testmeta(self):
|
||||
+ def test_pickle_types(self):
|
||||
for loads, dumps in picklers():
|
||||
column_types = [
|
||||
Column('Boo', Boolean()),
|
||||
@@ -1,33 +0,0 @@
|
||||
diff -r d1c7b3df098a lib/sqlalchemy/util/_collections.py
|
||||
|
||||
Index: lib/sqlalchemy/util/_collections.py
|
||||
===================================================================
|
||||
--- a/lib/sqlalchemy/util/_collections.py Wed Jan 18 12:42:54 2012 -0500
|
||||
+++ b/lib/sqlalchemy/util/_collections.py Thu Jan 19 10:01:28 2012 -0500
|
||||
@@ -769,10 +769,15 @@
|
||||
def __init__(self, capacity=100, threshold=.5):
|
||||
self.capacity = capacity
|
||||
self.threshold = threshold
|
||||
+ self._counter = 0
|
||||
+
|
||||
+ def _inc_counter(self):
|
||||
+ self._counter += 1
|
||||
+ return self._counter
|
||||
|
||||
def __getitem__(self, key):
|
||||
item = dict.__getitem__(self, key)
|
||||
- item[2] = time_func()
|
||||
+ item[2] = self._inc_counter()
|
||||
return item[1]
|
||||
|
||||
def values(self):
|
||||
@@ -788,7 +793,7 @@
|
||||
def __setitem__(self, key, value):
|
||||
item = dict.get(self, key)
|
||||
if item is None:
|
||||
- item = [key, value, time_func()]
|
||||
+ item = [key, value, self._inc_counter()]
|
||||
dict.__setitem__(self, key, item)
|
||||
else:
|
||||
item[1] = value
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
https://bitbucket.org/sqlalchemy/sqlalchemy/pull-request/41
|
||||
--- a/test/engine/test_execute.py
|
||||
+++ b/test/engine/test_execute.py
|
||||
@@ -9,7 +9,7 @@
|
||||
import sqlalchemy as tsa
|
||||
from test.lib import testing, engines
|
||||
from test.lib.engines import testing_engine
|
||||
-import logging
|
||||
+import logging, logging.handlers
|
||||
from sqlalchemy.dialects.oracle.zxjdbc import ReturningParam
|
||||
from sqlalchemy.engine import base, default
|
||||
from sqlalchemy.engine.base import Connection, Engine
|
||||
@@ -1,50 +0,0 @@
|
||||
# http://www.sqlalchemy.org/trac/ticket/2719
|
||||
diff -ur SQLAlchemy-0.8.1.orig/test/ext/test_serializer.py SQLAlchemy-0.8.1/test/ext/test_serializer.py
|
||||
--- test/ext/test_serializer.py 2013-04-28 05:24:34.000000000 +0800
|
||||
+++ test/ext/test_serializer.py 2013-05-02 01:02:25.376203511 +0800
|
||||
@@ -114,6 +114,7 @@
|
||||
Address(email='ed@lala.com'),
|
||||
Address(email='ed@bettyboop.com')])
|
||||
|
||||
+ @testing.skip_if(lambda: util.pypy, "problems with pypy pickle reported")
|
||||
def test_query_two(self):
|
||||
q = \
|
||||
Session.query(User).join(User.addresses).\
|
||||
@@ -123,6 +124,7 @@
|
||||
eq_(q2.all(), [User(name='fred')])
|
||||
eq_(list(q2.values(User.id, User.name)), [(9, u'fred')])
|
||||
|
||||
+ @testing.skip_if(lambda: util.pypy, "problems with pypy pickle reported")
|
||||
def test_query_three(self):
|
||||
ua = aliased(User)
|
||||
q = \
|
||||
@@ -136,6 +138,7 @@
|
||||
ua_2 = q2._entities[0].entity_zero.entity
|
||||
eq_(list(q2.values(ua_2.id, ua_2.name)), [(9, u'fred')])
|
||||
|
||||
+ @testing.skip_if(lambda: util.pypy, "problems with pypy pickle reported")
|
||||
def test_orm_join(self):
|
||||
from sqlalchemy.orm.util import join
|
||||
|
||||
diff -ur SQLAlchemy-0.8.1.orig/test/orm/test_manytomany.py SQLAlchemy-0.8.1/test/orm/test_manytomany.py
|
||||
--- test/orm/test_manytomany.py 2013-04-28 05:24:34.000000000 +0800
|
||||
+++ test/orm/test_manytomany.py 2013-05-02 01:05:08.073213015 +0800
|
||||
@@ -233,6 +233,9 @@
|
||||
p2 = Place('place2')
|
||||
p3 = Place('place3')
|
||||
|
||||
+ sess = Session()
|
||||
+ sess.add_all([p3, p1, t1, t2, p2, t3])
|
||||
+
|
||||
t1.inputs.append(p1)
|
||||
t1.inputs.append(p2)
|
||||
t1.outputs.append(p3)
|
||||
@@ -240,8 +243,6 @@
|
||||
p2.inputs.append(t2)
|
||||
p3.inputs.append(t2)
|
||||
p1.outputs.append(t1)
|
||||
- sess = Session()
|
||||
- sess.add_all((t1, t2, t3, p1, p2, p3))
|
||||
sess.commit()
|
||||
|
||||
self.assert_result([t1],
|
||||
Reference in New Issue
Block a user