> nevermind, try 2276. it was yet another cache that was contributed > by someone...
on 2280, still growing - something about sessions? $ py tt.py repeat=1000 leak ('leak' will do the gc.colect/print) > > On Jan 29, 4:12 pm, "Michael Bayer" <[EMAIL PROTECTED]> wrote: > > sorry, there was one more quoting fix that was needed. passes > > with PG on 2274. > > > > as far as the memory, ive no idea whats going on. well thats not > > true, my best guess is that unittest is holding onto every > > testcase it makes as a callable, with all of that callable's > > state. playing around with GC, i can ensure that all SA > > collections are empty, I also found another collection lying > > about to empty out when clear_mappers() is called (thats in > > 2275)...BUT...something is holding on to all the mappers, > > metadatas, etc, and it is not any global collection within SA. i > > call gc.collect(), insure all module-level collections are > > totally empty (theres three), and the number of Mapper instances > > inside of gc.get_objects() grows and grows. > > adding this to tearDown(): > > > > import gc > > gc.collect() > > print "MAPPER REG:", dict(mapperlib.mapper_registry) > > print "SESION REG:", dict(session._sessions) > > print "CLASSKEYS:", dict(util.ArgSingleton.instances) > > for x in gc.get_objects(): > > if isinstance(x, Mapper) or isinstance(x, > > BoundMetaData): print x > > > > On Jan 29, 2:42 pm, svilen <[EMAIL PROTECTED]> wrote: > > > huh? > > > Here is rev 2273, either the poly-branch, or the trunk - all > > > the same - that error. > > > Just in case, the files again. > > > > > > --------------- > > > And while on it, u can run the case with "repeat=1000" argument > > > and see how memusage grows. i've put some functionality to > > > reuse db-engine there - argument "reuse_db"; > > > but regardless if u specify "reuse_db" or not, or is it > > > db=sqlite:/// or postgres: memory goes up. > > > Either i'm doing something wrong, or there's something fishy. > > > > > > $ python _test-pg-punion-mixedcasename.py db=postgres:///proba > > > reuse_db repeat=1000 > > > > > > > mmmm nope i get this and it works: > > > > > > > > SELECT "pu_A"."linkA_id" AS "pu_A_linkA_id", pu_A.atype AS > > > > "pu_A_atype", "pu_A".name AS "pu_A_name", "pu_A".db_id AS > > > > "pu_A_db_id", "pu_A".data2 AS "pu_A_data2" > > > > FROM (SELECT "A"."linkA_id" AS "linkA_id", "A".name AS name, > > > > "A".db_id AS db_id, CAST(NULL AS TEXT) AS data2, 'A' AS atype > > > > FROM "A" UNION ALL SELECT "B"."linkA_id" AS "linkA_id", > > > > "B".name AS name, "B".db_id AS db_id, "B".data2 AS data2, 'B' > > > > AS atype FROM "B") AS "pu_A" ORDER BY "pu_A".oid > > > > > > > > On Jan 29, 1:42 pm, svilen <[EMAIL PROTECTED]> wrote: > > > > > here's something about postgres: > > > > > > > > > > pu_A = polymorphic_union( { > > > > > 'A': table_A, > > > > > 'B': table_B, > > > > > }, 'atype', 'pu_A', ) #concrete > > > > > > > > > > On postgres, the above fails - does not like the 'pu_A'. > > > > > If it's lowercase/omitted, it's ok. > > > > > > > > > > i think u did already say that about mixed casing in some > > > > > post above; should i just scratch that name/alias (it is > > > > > there only for clarity)? > > > > > > > > > > $ python _test_ABC_all.py db=postgres:///proba > > > > > > > > > > SQLError: (ProgrammingError) missing FROM-clause entry for > > > > > table "pu_a" > > > > > 'SELECT "pu_A".id AS pu_A_id, "pu_A"."linkA_id" AS > > > > > "pu_A_linkA_id", pu_A.atype AS "pu_A_atype", "pu_A".name AS > > > > > pu_A_name, "pu_A".data2 AS pu_A_data2 \nFROM (SELECT > > > > > CAST(NULL AS TEXT) AS data2, "A"."linkA_id" AS "linkA_id", > > > > > "A".name AS name, "A".id AS id, \'A\' AS atype \nFROM "A" > > > > > UNION ALL SELECT "B".data2 AS data2, "B"."linkA_id" AS > > > > > "linkA_id", "B".name AS name, "B".id AS id, \'B\' AS atype > > > > > \nFROM "B") AS "pu_A" \nWHERE "pu_A".id = %(pu_A_id)s ORDER > > > > > BY "pu_A".id \n LIMIT 1' {'pu_A_id': 1L} > > > > > > > > > > > all tests pass with rev 2267 of that branch. try that > > > > > > rev specifically, since i want to take whats there and do > > > > > > another pass. im trying to get it so that the entire > > > > > > science of "parent table, child table, polymorphic > > > > > > selectables, primary join -> polymorphic joins -> > > > > > > determine direction/lazy clause/eager clause/synchronize > > > > > > FKs" is super-well-nailed down. > > > > > > > > > > _test-pg-punion-mixedcasename.py > > > > > 3KDownload > > > > > > > > > > sa_gentestbase.py > > > > > 2KDownload > > > > > > _test-pg-punion-mixedcasename.py > > > 4KDownload > > > > > > sa_gentestbase.py > > > 4KDownload > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---
sa_gentestbase.py
Description: application/python
tt.py
Description: application/python