sorry it's just frustrating when things are out of my domain but under my control
Antibody joined the channel
Rotonen
though you'd rather not get a pull request using the library from above, right?
gawel has quit
raydeo
we avoid dependencies if possible, but I'd have to vet the library and ensure that it looks actively maintained / reputable versus some rando github repo
Rotonen
yep
sorry to stir the pot
raydeo
don't take my ranting personally please
x58
raydeo: i don't have https everywhere. Nor do I really care :P
raydeo
I'm sure it comes off that way
Rotonen
does not, actually
x58
I don't use colander anymore, but I will see about doing a PR for the regexes later tonight.
Rotonen
i know maintenance, upkeep and release cutting are hard
raydeo
I maintain colander only because it looks very bad for pylons as a whole to abandon projects
gawel joined the channel
x58
That's the reason I have been swooping in and doing releases of various projects...
Elmer joined the channel
raydeo
yeoman's work to be sure
gopar joined the channel
zepolen has quit
zepolen joined the channel
zepolen has quit
zepolen joined the channel
nilo joined the channel
zepolen has quit
nilo has quit
nilo joined the channel
nilo has quit
fearghal has quit
malthe_ joined the channel
Antibody has quit
postlogic has quit
postlogic joined the channel
postlogic has quit
postlogic joined the channel
malthe has quit
mvantellingen joined the channel
djdduty has quit
djdduty_ joined the channel
fearghal joined the channel
waveform has quit
ree has quit
nopf joined the channel
domenkozar joined the channel
rweir_ has quit
ree joined the channel
rweir joined the channel
postlogic has quit
postlogic joined the channel
postlogic has quit
postlogic joined the channel
natim joined the channel
Antibody joined the channel
mvantellingen joined the channel
Chinorro joined the channel
pingviini has quit
hyperknot joined the channel
pingviini joined the channel
hyperknot
hi, is it possible to get transaction.manager from a dbsession? I mean after get_tm_session / zope.sqlalchemy.register is done
zepolen joined the channel
varesa joined the channel
raydeo joined the channel
Charlie_X joined the channel
rweir
what are you trying to accomplish?
hyperknot
rweir: I just though of sparing an "import transaction" in multiple files, but I think it is needed. I'm running an async worker (huey) where I cannot just call functions under a main "with transaction.manager", and I thought transaction.manager might be accessible such as dbsession.tm or something similar
raydeo
hyperknot: request.tm is the easiest
there is not a way to get the transaction manager from the session though... it is a one-way relationship
... unless you tack it into the session yourself
hyperknot
raydeo: but I don't have a request, and also the input of my function is a dbsession not request. you are right I could convert my function to take a request instead of a dbsession and try to create a fake request, but "import transaction" in multple files seems to work fine
raydeo
yeah if you are using the threadlocal then you can just import transaction
the *right* solution is to pass them both around if they are both needed possibly by grouping them into a single object that you pass around
hyperknot
yes I wasn't sure if it is referring to the same transaction or not
raydeo
it's not necessarily
it depends on what you pass into get_tm_session
justsomedood1 has quit
hyperknot
raydeo: an "import transaction" in the main worker module, gets inserted as get_tm_session(session_factory, transaction.manager)
raydeo
right... in general you should try not to use the global transaction manager but it does work if you do
hyperknot
huey is configured to use one process per worker, so I believe evey python process can only see one transaction module
raydeo: your doc is more about web environments with app and so, isn't it?
raydeo
yes but the caveat on threadlocal manager is important regardless
the explicit manager can help find bugs
hyperknot
raydeo: but only in case i'd use multithreading or greenlet or gevents or something more exotic stuff, doesn't it?
raydeo
well certainly as the environment gets more complex the more it helps... it all depends :-)
I'm a big fan of starting out as complex as possible ;-)
hyperknot
I've just refactored everything in a project from older global DBSession to request.dbsession, so that's quite enough for today, I'll just stick with simple CLI scripts based on initdb
raydeo
sounds good!
I imagine that was a little tedious
you'll have to let me know if it was worth it
hyperknot
I just had to triple check how every single function is called. the trickiest one was this huey task queue which is so "magic" that it just cannot pass a dbsession to a function
raydeo: the result that I now have similar codebase between two projects I'm currently working on is definitely worth it
raydeo
great!
I hope dearly that plaster in pyramid 1.9 will help make scripts easier to write.
We need to make a new file format that supports better inheritance between config sections and then it definitely should.