IRC log of #zope for Wednesday, 2015-01-21

*** roq_ has joined #zope00:28
*** Jan_Garaj3 has quit IRC00:40
*** Jan_Garaj3 has joined #zope00:46
*** m8 has quit IRC01:16
*** menesis has quit IRC01:34
*** J1m_ has quit IRC02:00
*** Jan_Garaj3 has quit IRC04:35
*** bosim has joined #zope08:24
*** bosim has joined #zope08:28
*** __mac__ has joined #zope08:35
mgedminanyone alive?08:48
mgedmincan anybody test the new zope.testrunner release I just made?08:48
mgedminok I think I stumbled upon some weird setuptools bug wrt namespace packages09:01
mgedminand now I cannot reproduce it09:09
*** tisto has joined #zope09:15
*** agroszer has joined #zope09:24
*** MrTango has joined #zope09:29
*** MrTango has quit IRC09:34
*** menesis has joined #zope09:52
*** giacomos has joined #zope10:19
*** Jan_Garaj3 has joined #zope10:36
*** MrTango has joined #zope10:49
*** giacomos has quit IRC11:18
*** giacomos has joined #zope11:18
*** Jan_Garaj3 has quit IRC12:03
*** projekt01 has joined #zope12:05
*** fredvd has joined #zope12:17
*** maurits has joined #zope13:00
*** fRiSi has joined #zope13:04
*** MrTango has quit IRC13:10
*** projekt01 has quit IRC13:26
*** projekt01 has joined #zope13:27
*** MrTango has joined #zope13:28
*** bosim has quit IRC13:30
*** bosim has joined #zope13:31
*** tisto has quit IRC13:38
*** MrTango has quit IRC13:40
*** MrTango has joined #zope13:44
*** menesis has quit IRC14:14
*** projekt01 has quit IRC14:45
*** J1m has joined #zope14:47
*** bosim has quit IRC14:51
*** bosim has joined #zope14:54
*** projekt01 has joined #zope14:55
*** J1m has quit IRC14:56
*** menesis has joined #zope15:12
*** J1m_ has joined #zope15:27
*** tisto has joined #zope15:55
*** tiwula has joined #zope16:18
*** agroszer has quit IRC16:35
*** yvl has quit IRC17:35
*** bosim has quit IRC17:41
*** tisto has quit IRC17:58
*** tisto has joined #zope18:00
*** Jan_Garaj3 has joined #zope18:24
*** malinoff has joined #zope18:34
malinoffHi! Can someone explain what's the type of `context` object that getSiteManager accepts?18:36
malinoffTalking about this line:
malinoffanyone alive here?:)18:42
*** fredvd has quit IRC18:48
projekt01malinoff, the documentation says18:49
projekt01Get the nearest site manager in the given context.18:49
projekt01If context is None, return the global site manager.18:49
projekt01If the context is not None, it is expected that an adapter18:49
projekt01from the context to IComponentLookup can be found. If no18:49
projekt01adapter is found, a ComponentLookupError is raised.18:49
projekt01see: zope.component.interfaces.IComponentArchitecture <getSiteManager>18:49
malinoffprojekt01, i don't really understand that "context" definition. What is context? What it should provide in order to be used to find the nearest site manager?18:52
malinoffHowever, i guess i just found what i need here
projekt01this means that an object could return it0's parent by access context.__parent__18:52
malinoffReally? The previous link i pasted says that __conform__ method is used18:53
projekt01malinoff, what do you need to do?18:53
malinoffprojekt01, I just trying to figure out the best way to not use the global registry, i'd rather pass a custom instance everywhere explicitly18:54
malinoffbecause i don't like globals, because it won't work with multiprocessing, because i should think about thread safety when using gevent and friends, etc, etc18:55
projekt01why should a global not work with gevent?18:56
*** tisto has quit IRC18:56
malinoffi don't think it won't work with gevent, i'm saying that i *should think* about it18:56
projekt01the global registry is not writable18:57
projekt01are you using the ZODB or not?18:57
malinoffit's really not a question "should i use the global registry or not", the answer is definitely "no"18:57
malinoffI just found that zca is suitable for my needs at first glance18:58
malinoffI'm not very familiar with zope infrastructure18:59
malinoff(yet, i think)18:59
projekt01the global registry is just a dispatcher for lookup the right thing, it works with gevent with threads or no threads18:59
malinoffwill it work with multiprocessing stuff correctly? and with fork + exec?19:00
projekt01how do you call mutliprocessing?19:01
projekt01with subprocess?19:01
malinoffi mean `import multiprocessing` thing19:01
malinoffbilliard, actually19:01
malinoffbut it doesn't matter19:01
projekt01normaly the only problem is the python environment which you can loose in a subprocess19:02
projekt01I use gevent, celery, rabittmq and the global registry all in one19:02
projekt01it's just a question of the enironment setup19:02
projekt01if you setup the subprocess with the right global registry and what you need, then it's just there19:03
malinoffimagine that the parent process registered a named utility in the global registry; then i set up a multiprocessing.Pool instance which uses fork+exec, will i be able to get the registered utility in a pool worker?19:04
projekt01take a look at the z3c.rml package, there we use the subprocess module and support the environment too given from the main process19:05
projekt01it depends on when you setup the utility19:05
malinoffas i said, before instantiating Pool instance19:06
projekt01normaly you will setup the global registry with all utilities and then use it19:06
projekt01if this global registr is avaliable in the subprocess, then the utilities are just there19:06
projekt01same as a global variable defined in a module19:06
projekt01ok, yes, then it is available19:07
malinoffright, but when using fork+exec the memory of the main process is not copied to the workers, so they'll have *different* instance of the global registry19:07
projekt01if you define a module with a global registry and some utilities and a global variable in the same module, both are available at any time19:08
projekt01yes, different instances19:08
projekt01as everything else19:08
malinoffthat's why i need to pass the registry explicitly to the worker pool - so if i need to do that, why should i use the global at all? It's much simpler to have a custom instance passed everywhere explicitly than defining edge cases when a user should use the global one and when he shouldn't19:10
malinoffmore than that, I want to have a command line option to switch between registries19:11
malinoffsimilar to celery -A otherapp19:11
projekt01I guess I have to less info to help you, but as allways it's a question about memory, cpu and how to scale19:12
projekt01I don't say that using a global registry is the right concept, but it will work if you do so19:13
malinoffi agree, i just have a bad times using globals and i want to avoid it as much as possible19:15
malinoffeven if they works *now*, some new concurrency library will break it19:16
malinoffanyway, thanks for your input19:17
projekt01no problem, see you later...19:17
malinoffi'll take a look on z3c.rml19:17
projekt01it's just a hack to support the minimal environment for generate the pdf in a subprocess19:18
*** projekt01 has quit IRC19:19
malinoffyou mean this line ?19:19
*** Jan_Garaj3 has quit IRC19:43
malinoffprojekt01, just found this pyramid doc describing almost all my concerns about thread locals:
*** maurits has quit IRC19:49
*** giacomos has quit IRC19:51
*** Jan_Garaj3 has joined #zope19:56
*** J1m has joined #zope20:16
*** J1m_ has quit IRC20:16
*** J1m_ has joined #zope20:30
*** MrTango has quit IRC20:30
*** J1m_ has quit IRC20:35
*** supton has joined #zope20:55
*** menesis has quit IRC21:16
*** fdrake has quit IRC21:29
*** malinoff has quit IRC21:31
*** Jan_Garaj3 has quit IRC21:35
*** Jan_Garaj3 has joined #zope22:02
*** menesis has joined #zope22:17
*** fredvd has joined #zope22:43
*** __mac__ has quit IRC23:04
*** alecm has joined #zope23:08
*** alecm has joined #zope23:08

Generated by 2.15.1 by Marius Gedminas - find it at!