pythomnic3k-questions Mailing List for Pythomnic3k
Brought to you by:
targeted
You can subscribe to this list here.
2009 |
Jan
|
Feb
|
Mar
(8) |
Apr
|
May
|
Jun
(9) |
Jul
(2) |
Aug
(4) |
Sep
(18) |
Oct
(7) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2010 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(12) |
Nov
(3) |
Dec
(17) |
2011 |
Jan
(1) |
Feb
(2) |
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(2) |
Nov
|
Dec
|
2014 |
Jan
(5) |
Feb
|
Mar
(4) |
Apr
(12) |
May
|
Jun
|
Jul
(1) |
Aug
(6) |
Sep
|
Oct
|
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
(3) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: <dm...@ta...> - 2017-02-14 09:44:50
|
> But since both smsc and php app are mission critical I > need to be notified when any of them goes down. Basically when > connection to smpp fails, bind fails, enquire ping, submitSm/deliverSm > commands fail and etc., also on any timeouts to php application. If I > remember correctly - all those are logged as ERR messages. So the > easiest solution (from my point of view) would be to attach my custom > module/function to a logger. Yes, I see the problem. Philosophically, log errors that you are trying to intercept are too low level and application agnostic. You will be getting noise and have trouble filtering it out. In my opinion the right way to do it with Pythomnic would be this: 1. Start a separate health_monitor cage. 2. It starts periodically probing all the cages it discovers around itself, ex. once in 30 seconds. Each probe comes as an RPC call to a particular cage, see health_monitor_event.py::probe() 3. That probe method is empty by default, therefore from health_monitor's point of view, any cage that is accessible via RPC is doing well. Therefore you get for free monitoring of the cage itself. 4. Then in cage's probe() you implement some application-specific testing, which in your case would be sending some SMPP packet (or, better yet a complete SMS to some test number) and seeing whether it goes through. 5. If probe() throws, health_monitor reports that the cage is down by invoking *its own* health_monitor_event.py::cage_down() in which you should put anything, like regular e-mail sending. 6. How do you "probe" the liveness of the PHP client, I can't tell as I have no idea how it speaks to the cage. But I'm sure you got the idea and can figure something out. 7. You can even use that memory buffered queue of errors for detecting failures. This way it will be in probe() that you read the error queue and you wouldn't need local scheduled calls. So, health_monitor is useful for just that kind of monitoring that you need, at least give it a thought. If you have any questions, don't hesitate to ask. Sincerely, Dmitry Dvoinikov On 2017-02-13 08:53, Egidijus | Canarius wrote: > Hello, > > thank you for such comprehensive and quick response. > > I think I'll go with suggestion number five. > I'm gonna describe my use case and why I need such functionality - > maybe I'm looking at a problem from wrong direction. > > I need to "connect" sms center server (accessed trough smpp) and a php > application (accessed trough http). Both of them are quite unstable. I > need to route messages (smpp and http requests) from one to another. > Pythomnic works perfectly for this use case. I've already have a > working cage. But since both smsc and php app are mission critical (I > hope stability issues will be fixed at some point in the future) - I > need to be notified when any of them goes down. Basically when > connection to smpp fails, bind fails, enquire ping, submitSm/deliverSm > commands fail and etc., also on any timeouts to php application. If I > remember correctly - all those are logged as ERR messages. So the > easiest solution (from my point of view) would be to attach my custom > module/function to a logger. > > Your suggestion about queue for logs got me thinking - maybe it could > be added to Pythomnic3k itself? Like an in memory (or in state) buffer > of logs that can be accessed from schedule (or any) cage. So instead > logging directly to file pythomnic3k would log to this buffer and > buffer would emit an event, call attached custom functions, notify > health monitor or broadcast a rpc message - and then log to a file. > This would allow to easily attach custom logic to critical events of > the system. > I see one downside to it - if for some reason pythomnic/buffer object > crashes some logs would be gone. But I think this could happen with > current implementation also - if pythomnic3k crashes while log file is > not yet synced (correct me if I'm wrong). > > Anyway, I'll let you know how it goes when I implement > InterlockedQueue suggestion. Also I'm gonna send notification emails > not using pmnc.transaction, so no infinite loop of errors. > |
From: <dm...@ta...> - 2017-02-11 16:26:07
|
Hello, thank you for using the framework. I will give you some advises and you decide which is best in your case. 1. pmnc.log is a "low level" facility for writing to the local log file. It is the last resort and all the errors in it are ignored. So that for example if the disk is full an attempt to write to a log file will fail but the failure will be ignored. You can't call anything complex from it, like e-mail sending. Consider what happens it if an attempt to send an email itself fails or otherwise generates log messages. Infinite recursion. 2. Sending all ERR messages to some e-mail may flood it with useless information. You will be receiving messages about connections being disconnected etc. Is it what you need ? 3. For collecting messages that are relevant to the application, there exists a separate facility: pmnc.notify. It is to be used not in the framework itself but in your application code. For example in your application code you write pmnc.notify.error("foobar") and that message is sent to the health_monitor cage. That cage you run precisely for the purpose of collecting messages from all other cages in your application. On that cage you implement any kind of processing for the received messages, e-mail, sms or anything else. 4. Having an external script tailing the log file is one option and it is a viable one. Just don't do it from the within the same cage. 5. If you still need to have it in the cage, I would suggest using an instance of InterlockedQueue class. Create a single global instance of that class in startup.py before starting the cage, and in the log function in startup.py do err_queue.push(message). This will be very fail-safe and would not disturb normal logging. Then all the messages will accumulate in memory. And you can have a separate schedule interface (ex. interface_send_errors) that polls that queue once in N seconds and sends an e-mail: def process_request(request, response): msg = err_queue.pop(1.0) while msg != None: pmnc.transaction.email.send(message) msg = err_queue.pop(1.0) Again, beware that errors generated during sending will also be logged, put to the queue and create a positive feedback avalanche. To prevent that, there must be a way of disabling logging temporarily. For example, currently you can temporarily disable logging of anything but ERRORs using with pmnc.log.level("ERROR"): pmnc.transaction.email.send(message) but unfortunately there is no way to disable logging ERRORs. I will have to think about it. Sincerely, Dmitry Dvoinikov On 2017-02-10 22:42, Egidijus | Canarius wrote: > Hello, > > I have a cage set up which uses few interfaces/resources (smpp, http). > I would like to be notified by email if there are any level 1 (error) > events on the cage (if http request times out, smpp bind fails and > etc.). > I have a module ready for sending email, which works fine when calling > pmnc.emailer.send() from within the cage. Is there a way to attach it > to logger somehow? > > I've tried to modify log() function in both startup.py and > module_loader.py (_log() in there), but did not get it working. Not > that it'll be a good way to achieve my desired functionality, anyway > :) > > Also I'm thinking on just scanning log file with schedule interface > each second for ERR lines. But this would be not the most accurate > method. > > I'm looking now in config_resource_callable.py, but not sure yet if it > will help me somehow. > > Could someone, please, advise me on how I should do this? > > Thank you for any feedback and for this great framework! > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, SlashDot.org! http://sdm.link/slashdot > _______________________________________________ > Pythomnic3k-questions mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythomnic3k-questions |
From: Egidijus | C. <ez...@ca...> - 2017-02-10 22:20:41
|
Hello, I have a cage set up which uses few interfaces/resources (smpp, http). I would like to be notified by email if there are any level 1 (error) events on the cage (if http request times out, smpp bind fails and etc.). I have a module ready for sending email, which works fine when calling pmnc.emailer.send() from within the cage. Is there a way to attach it to logger somehow? I've tried to modify log() function in both startup.py and module_loader.py (_log() in there), but did not get it working. Not that it'll be a good way to achieve my desired functionality, anyway :) Also I'm thinking on just scanning log file with schedule interface each second for ERR lines. But this would be not the most accurate method. I'm looking now in config_resource_callable.py, but not sure yet if it will help me somehow. Could someone, please, advise me on how I should do this? Thank you for any feedback and for this great framework! |
From: <dm...@ta...> - 2016-01-26 16:22:55
|
Hi Eric, I can give you an example which you should be able to incorporate into your rc.d start/stop framework. A few words about shutting down a Pythomnic application in general. First, there actually are two python processes - one "external", which executes startup.py and whose pid you have in cages/foo/logs/foo.pid and one "internal" which actually executes your application. External process monitors the internal one and restarts it if it crashes. Therefore you don't have access to the internal process directly. Second, shutting down is not immediate. When a shutdown is initiated, all the interfaces are signaled to stop accepting requests, but the requests already being executed are allowed to finish. This means that in the worst case shutdown process can take up to "request_timeout" seconds. As to how it is done. You kill the external process using its pid and then wait for the internal process to complete shutdown. The former is easy, and the latter is ugly, because you have no pid for the external process. As a hack, you could tail the log file until successful shutdown message appears in it. So, something like this: --- cage=foo timeout=10 /bin/echo -n "shutting down $cage:" kill `cat pythomnic3k/cages/$cage/logs/$cage.pid` for i in `jot - $timeout 0`; do tail pythomnic3k/cages/$cage/logs/$cage-`date +%Y%m%d`.log | grep -q 'properly shut down' && /bin/echo 'ok' && break if [ $i -eq 0 ]; then /bin/echo 'timeout' break fi /bin/echo -n '.' && sleep 1 done --- Dmitry On 22.01.2016 10:18, Eric Livingston wrote: > Dmitry, > > Do you have a handy template script that can start/stop cages under > linux (Debian Wheezy, in this case, so the rc.d structure) as you can > other services? I'd like to be able to something like > "/etc/init.d/cage start" and "stop" and put in in the default startup > sequence, etc. > > Starting a cage is easy, but I can't find a good way to cleanly shut > one down, unless startup.py also doubles as "shutdown.py"! > > Eric > ------------------------------------------------------------------------------ > Site24x7 APM Insight: Get Deep Visibility into Application Performance > APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month > Monitor end-to-end web transactions and take corrective actions now > Troubleshoot faster and improve end-user experience. Signup Now! > http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140 > > _______________________________________________ > Pythomnic3k-questions mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythomnic3k-questions |
From: Eric L. <Er...@th...> - 2016-01-22 16:19:01
|
Dmitry, Do you have a handy template script that can start/stop cages under linux (Debian Wheezy, in this case, so the rc.d structure) as you can other services? I'd like to be able to something like "/etc/init.d/cage start" and "stop" and put in in the default startup sequence, etc. Starting a cage is easy, but I can't find a good way to cleanly shut one down, unless startup.py also doubles as "shutdown.py"! Eric |
From: John P. <joh...@se...> - 2015-03-05 16:04:42
|
Thank you for the reply We implemented something very like this. Regards JP John Pettit VP of Architecture Separation Degrees – One, Inc. 77 Geary Street, 5th Floor San Francisco, CA 94108 p. 949.630.5015 e. joh...@se... w. www.separationdegrees.com From: Dmitry Dvoinikov <dm...@ta...> Date: Thursday, March 5, 2015 3:11 AM To: <pyt...@li...>, John Pettit <joh...@se...> Subject: Re: [Pythomnic3k-questions] SSL пишет: |
From: Dmitry D. <dm...@ta...> - 2015-03-05 14:41:06
|
Hello, There is no configuration for that in current version. As a quick fix, copy protocol_tcp.py from /.shared into /yourcage then patch the copy from --------------------- def _wrap_socket(s, *, ciphers, **kwargs): if wrap_socket_has_ciphers: return wrap_socket(s, ciphers = ciphers, **kwargs) .... --------------------- into --------------------- def _wrap_socket(s, *, ciphers, **kwargs): kwargs["ssl_version"] = ssl.PROTOCOL_TLSv1 if wrap_socket_has_ciphers: return wrap_socket(s, ciphers = ciphers, **kwargs) .... --------------------- You can also play with ssl_ciphers parameter in interface/resource configuration file to exclude all SSLv3 ciphersuites, although this is crude and will only leave you with TLSv12 ciphers as per http://security.stackexchange.com/a/70842 Sincerely, Dmitry Dvoinikov 04.03.2015 3:58, John Pettit ?????: > Hello > > How would I > > "This server is vulnerable to the POODLE attack. If possible, disable > SSL 3 to mitigate." > > In our pythomnic stack? > > Regards > > JP > |
From: John P. <joh...@se...> - 2015-03-03 23:11:37
|
Hello How would I "This server is vulnerable to the POODLE attack. If possible, disable SSL 3 to mitigate." In our pythomnic stack? Regards JP |
From: Dmitry D. <dm...@ta...> - 2014-08-27 09:01:09
|
Hello all, Talk about premature pessimization :) In a recent commit to pythomnic code I have fixed a plain stupid problem which has been slowing down every single pythomnic application since the beginning of times. The problem was that each time pmnc.module.method is encountered, both the cage directory and the shared directory have been rescanned (listdir-ed), which is a slow filesystem operation. Now I have added several lines of code to have directory contents cached for a few seconds. The speedup is more than 4x. Before an empty http server maxed out at 150-170 requests/sec, now it's 650-700 requests/sec. Please give it a try if you like. Dmitry |
From: Angelo H. <an...@de...> - 2014-08-22 12:19:59
|
Cool! What was the issue? Angelo -- Delphino Consultancy - software architecture, training and coaching T 06 2531 9743 / E an...@de... W http://www.delphino-consultancy.nl / KVK Eindhoven 17228522 / GPG 487A55D0 On 22 Aug 2014, at 12:26, Dmitry Dvoinikov <dm...@ta...> wrote: > Wiki is fixed I hope. If you have any further questions please ask. > > Dmitry > > 20.08.2014 0:17, Kirill Ratkin пишет: >> Hi guys, >> >> >> >> Why did you hide your wiki? >> >> There was very good stuff there. I've read it some time ago. Recently I wanted to show pythomnic3k to my CTO to discuss how we could use it. But 'wiki' link was missed (it goes to project root in sourceforge) >> >> >> >> Could you publish it again or share some how else? >> >> -- >> Kirill RATKIN >> Best Regards >> >> >> ------------------------------------------------------------------------------ >> >> >> _______________________________________________ >> Pythomnic3k-questions mailing list >> Pyt...@li... >> https://lists.sourceforge.net/lists/listinfo/pythomnic3k-questions > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/_______________________________________________ > Pythomnic3k-questions mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythomnic3k-questions |
From: Dmitry D. <dm...@ta...> - 2014-08-22 11:48:23
|
You were right, sourceforge moved to a different platform and all the existing wiki needed to be ported manually. 22.08.2014 17:23, Angelo Hulshout пишет: > Cool! What was the issue? > > Angelo |
From: Dmitry D. <dm...@ta...> - 2014-08-22 10:26:24
|
Wiki is fixed I hope. If you have any further questions please ask. Dmitry 20.08.2014 0:17, Kirill Ratkin ?????: > Hi guys, > > > > Why did you hide your wiki? > > There was very good stuff there. I've read it some time ago. Recently I wanted to show pythomnic3k to my CTO to discuss how we could use it. But 'wiki' link was missed (it goes to project root in sourceforge) > > > > Could you publish it again or share some how else? > > -- > Kirill RATKIN > Best Regards > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Pythomnic3k-questions mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythomnic3k-questions |
From: Dmitry D. <dm...@ta...> - 2014-08-20 05:18:49
|
Hello Kirill, Thank you for the heads up, I never noticed something was wrong with the wiki. I'll take a look right away. Sincerely, Dmitry Dvoinikov 20.08.2014 0:17, Kirill Ratkin ?????: > Hi guys, > > > > Why did you hide your wiki? > > There was very good stuff there. I've read it some time ago. Recently I wanted to show pythomnic3k to my CTO to discuss how we could use it. But 'wiki' link was missed (it goes to project root in sourceforge) > > > > Could you publish it again or share some how else? > > -- > Kirill RATKIN > Best Regards > > > ------------------------------------------------------------------------------ > > > _______________________________________________ > Pythomnic3k-questions mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythomnic3k-questions |
From: Kirill R. <kir...@te...> - 2014-08-19 18:37:27
|
Hi guys, Why did you hide your wiki? There was very good stuff there. I've read it some time ago. Recently I wanted to show pythomnic3k to my CTO to discuss how we could use it. But 'wiki' link was missed (it goes to project root in sourceforge) Could you publish it again or share some how else? -- Kirill RATKIN Best Regards |
From: Eric L. <Er...@Th...> - 2014-07-25 16:20:53
|
Dmitry, I'm getting these errors every 10 seconds in my log, don't know how to stop it. Tried re-starting my cage, but the retry interface of course makes an effort to be persistant, so this error is... persistant. How can I clear the db? 12:08:30.79 ERR [retry:mnt] DBNotFoundError("(-30987, 'DB_NOTFOUND: No matching key/data pair found')") in remove() (protocol_retry.py:238) <- _txn_pop_done_queue() (protocol_retry.py:572) <- _implicit_transaction() (state.py:367) <- implicit_transaction() (state.py:356) <- typecheck_invocation_proxy() (typecheck.py:356) <- __call__() (module_loader.py:87) <- _clean_up_filter() (protocol_retry.py:509) <- _maintainer_thread_proc() (protocol_retry.py:482) # protocol_retry.py:484 in _maintainer_thread_proc() Thanks! Eric |
From: Badoo <nor...@ba...> - 2014-04-27 18:42:40
|
Puedes responder immediatamente usando nuestro sistema de intercambio de mensajes. Descubre tu mensaje... http://us1.badoo.com/01281377824/in/htn1y0T8eFk/?lang_id=7&g=57-0-4&m=61&mid=535d4f98000000000007004d036dbc980276eb38007d Otras personas esperando: Si el link no funciona, copia y pégalo en la barra de tu buscador. Has recibido este email de Badoo Trading Limited (dirección postal a continuación). Si no desea recibir futuras comunicaciones por parte de Badoo, haz clic aquí para desactivarlas: https://us1.badoo.com/impersonation.phtml?lang_id=7&email=pythomnic3k-questions%40lists.sourceforge.net&block_code=945f62&m=61&mid=535d4f98000000000007004d036dbc980276eb38007d&g=0-0-4. Badoo Trading Limited es una sociedad de responsabilidad limitada registrada en Inglaterra y Gales con número 7540255 y domicilio en Media Village, 131 - 151 Great Titchfield Street, Londres, W1W 5BB. |
From: Dmitry D. <dm...@ta...> - 2014-04-22 06:18:09
|
Angelo, About the elimination of excessive debug messages, here is what I did: 1. Added new log level NOISE even below DEBUG, method pmnc.log.noise(...) and replaced most of the framework's own debug's with noise's. 2. Made pmnc.log.foobar "methods" behave like predicates, so you now logging level can be checked as follows: if pmnc.log.debug: pmnc.log.debug("BLAH") which can be used for any processing if pmnc.log.debug: pmnc.log.debug("BLAH") write something to a temp file This seems like a clean and readable solution. Please pull the source SVN and tell me what you think. Dmitry > Hi Angelo, > >> non-declared variable 'value', which seems should be 'result'. > Yes, I believe I've already fixed that, but whether or not it is > committed to public SVN, I do not recall. Check it out. > >> if(debug): >> logdebug = lambda: x: pmnc.log.debug(x) >> else: >> logdebug = lamda: '' > The problem is that I want to eliminate *evaluation* of the parameters > to the pmnc.log.debug call. More often than not it builds a huge string > using multiple nested calls to format() and after it is materialized it > is passed to debug() and discarded. Therefore changing how debug() > behaves won't help because as soon as it is called the string has > already been evaluated, it is too late. > > The bigger problem is that logging level can be changed at runtime by > modifying config_interfaces.py which is a great benefit and very > convenient. Therefore making debug refer to different callables at > runtime would also be tricky. > > Therefore I don't see any other simple solution except for the "if > in_debug(): log_debug()" > >> Putting 'pass' in the else branch would even be better, but is not >> allowed in a lambda. > Just out of curiosity I'd say lambda: None is the same as lambda: pass > would have been :) > > What do you think ? > > Sincerely, > Dmitry Dvoinikov > > On 2014-04-04 11:00, Angelo Hiulshout wrote: >> Hi Dimitry, >> >> Sounds fair, but I have to add that some module tests contain errors >> that make the guarantee that 'if the test runs we're ok' a bit >> awkward. Example: in transaction.py there's a reference to a >> non-declared variable 'value', which seems should be 'result'. >> >> As for conditional debug statements, a lambda that replaces >> pmnc.log.debug (and calls it internally depending on debug settings) >> would be a nicer solution - and requires less discipline. >> >> if(debug): >> logdebug = lambda: x: pmnc.log.debug(x) >> else: >> logdebug = lamda: '' >> >> Putting 'pass' in the else branch would even be better, but is not >> allowed in a lambda. >> >> Regards, >> >> Angelo >> > > ------------------------------------------------------------------------------ > _______________________________________________ > Pythomnic3k-questions mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythomnic3k-questions |
From: Dmitry D. <dm...@ta...> - 2014-04-22 06:10:14
|
Angelo, Returning to the matter of {0:s}, I have inspected the source and it seems to me now that overhauling the entire code base replacing {0:s} with {0!s} would have been wrong. It is just this one file transaction.py that contains {0:s} against a class instance (well, there also was one case in module_loader.py but I had it fixed too), therefore it is easier to add __format__ method to Transaction class and have it done. And so I did. Please update from SVN and test the fixed source with Python 3.4 again. Dmitry 08.04.2014 18:35, Angelo Hulshout пишет: > > You're right, I was a bit quick. > > Angelo > > Op 8 apr. 2014 13:45 schreef "Dmitry Dvoinikov" <dm...@ta... > <mailto:dm...@ta...>>: > > Do you think it is necessary to use {0!s:s} ? I was thinking of > just {0!s} because > this already returns string representation and is shorter and > easier to read. > > 08.04.2014 17:24, Angelo Hulshout пишет: >> Here it is. It doesn't pass the self test, for a reason >> unrelated to string formatting. Might by a bug in my set up (I'm >> sending this from a conference, so I made the changes on a >> different setup than my regular development system). >> >> Angelo >> >> > |
From: Dmitry D. <dm...@ta...> - 2014-04-08 10:29:03
|
Sure, please do. 07.04.2014 19:50, Angelo Hulshout пишет: > @Dmitry: I can send you the updated transaction.py tonight or > tomorrow, after rerunning the failimg self test. > > Angelo > > |
From: Angelo H. <an...@de...> - 2014-04-07 13:50:09
|
Both Svn and Git integrate with my tools, I was only asking. @Dmitry: I can send you the updated transaction.py tonight or tomorrow, after rerunning the failimg self test. Angelo Op 7 apr. 2014 14:21 schreef "Dmitry Dvoinikov" <dm...@ta...>: > Eric, > > I will incorporate those changes and perhaps some other ones during > regular preparation to a version release. If some incompatibility comes > out I will have to fix it anyway. When exactly will it happen, I couldn't > promise, pehaps within a month or two. Still have to give the caching > code enough production testing :) > > Sincerely, > Dmitry Dvoinikov > > 07.04.2014 17:40, Eric Livingston пишет: > > I've used svn for years now, haven't had any trouble, and it's integrated > into my editors, which is nice, whereas GIT is not. > > Speaking of SVN, Dmitry, will you be updating the repository with the > fixes discussed recently? Though I'm not sure when I'll be moving to 3.4, > I'm still on 3.2. Have to check if all my libraries are compatible. > On Apr 7, 2014 1:13 AM, "Dmitry Dvoinikov" <dm...@ta...> wrote: > >> Ok, I will go and replace {:} with {!} then. >> >> Migrating to GIT is possible of course, but what's the point ? :) >> Do you think having it in SVN is a major obstacle ? >> >> Sincerely, >> Dmitry Dvoinikov >> > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees_APR > _______________________________________________ > Pythomnic3k-questions mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythomnic3k-questions > > |
From: Dmitry D. <dm...@ta...> - 2014-04-07 12:24:39
|
Eric, I will incorporate those changes and perhaps some other ones during regular preparation to a version release. If some incompatibility comes out I will have to fix it anyway. When exactly will it happen, I couldn't promise, pehaps within a month or two. Still have to give the caching code enough production testing :) Sincerely, Dmitry Dvoinikov 07.04.2014 17:40, Eric Livingston пишет: > > I've used svn for years now, haven't had any trouble, and it's > integrated into my editors, which is nice, whereas GIT is not. > > Speaking of SVN, Dmitry, will you be updating the repository with the > fixes discussed recently? Though I'm not sure when I'll be moving to > 3.4, I'm still on 3.2. Have to check if all my libraries are compatible. > > On Apr 7, 2014 1:13 AM, "Dmitry Dvoinikov" <dm...@ta... > <mailto:dm...@ta...>> wrote: > > Ok, I will go and replace {:} with {!} then. > > Migrating to GIT is possible of course, but what's the point ? :) > Do you think having it in SVN is a major obstacle ? > > Sincerely, > Dmitry Dvoinikov > |
From: Eric L. <Er...@Th...> - 2014-04-07 11:40:15
|
I've used svn for years now, haven't had any trouble, and it's integrated into my editors, which is nice, whereas GIT is not. Speaking of SVN, Dmitry, will you be updating the repository with the fixes discussed recently? Though I'm not sure when I'll be moving to 3.4, I'm still on 3.2. Have to check if all my libraries are compatible. On Apr 7, 2014 1:13 AM, "Dmitry Dvoinikov" <dm...@ta...> wrote: > Ok, I will go and replace {:} with {!} then. > > Migrating to GIT is possible of course, but what's the point ? :) > Do you think having it in SVN is a major obstacle ? > > Sincerely, > Dmitry Dvoinikov > > 06.04.2014 16:41, Angelo Hulshout пишет: > > The issue with value instead of result is indeed fixed. I should switch > to the SVN repository at some point, but in our product I still use the > 'current' download from the web site. > > As for the lambda you're 100% correct (on both the logdebug proposal and > the use of None) - I was aiming to remove the call through the lambda, but > the evaluation of x will still take place in that case. My bad - and I see > no other way out than "if in_debug()". First step would be to fix the > format strings though. > > Just out of curiosity: would it be useful/possible to migrate the > framework archive from Subversion to Git? I found a repository in Git, but > it's lagging 3 years behind the SVN. > > Regards, > > Angelo > > > > > ------------------------------------------------------------------------------ > Put Bad Developers to Shame > Dominate Development with Jenkins Continuous Integration > Continuously Automate Build, Test & Deployment > Start a new project now. Try Jenkins in the cloud. > http://p.sf.net/sfu/13600_Cloudbees_APR > _______________________________________________ > Pythomnic3k-questions mailing list > Pyt...@li... > https://lists.sourceforge.net/lists/listinfo/pythomnic3k-questions > > |
From: Dmitry D. <dm...@ta...> - 2014-04-07 05:13:36
|
Ok, I will go and replace {:} with {!} then. Migrating to GIT is possible of course, but what's the point ? :) Do you think having it in SVN is a major obstacle ? Sincerely, Dmitry Dvoinikov 06.04.2014 16:41, Angelo Hulshout ?????: > The issue with value instead of result is indeed fixed. I should > switch to the SVN repository at some point, but in our product I still > use the 'current' download from the web site. > > As for the lambda you're 100% correct (on both the logdebug proposal > and the use of None) - I was aiming to remove the call through the > lambda, but the evaluation of x will still take place in that case. My > bad - and I see no other way out than "if in_debug()". First step > would be to fix the format strings though. > > Just out of curiosity: would it be useful/possible to migrate the > framework archive from Subversion to Git? I found a repository in Git, > but it's lagging 3 years behind the SVN. > > Regards, > > Angelo > |
From: Angelo H. <an...@de...> - 2014-04-06 11:08:13
|
The issue with value instead of result is indeed fixed. I should switch to the SVN repository at some point, but in our product I still use the 'current' download from the web site. As for the lambda you're 100% correct (on both the logdebug proposal and the use of None) - I was aiming to remove the call through the lambda, but the evaluation of x will still take place in that case. My bad - and I see no other way out than "if in_debug()". First step would be to fix the format strings though. Just out of curiosity: would it be useful/possible to migrate the framework archive from Subversion to Git? I found a repository in Git, but it's lagging 3 years behind the SVN. Regards, Angelo On Sat, Apr 5, 2014 at 4:36 PM, <dm...@ta...> wrote: > Hi Angelo, > > > non-declared variable 'value', which seems should be 'result'. >> > > Yes, I believe I've already fixed that, but whether or not it is committed > to public SVN, I do not recall. Check it out. > > > if(debug): >> logdebug = lambda: x: pmnc.log.debug(x) >> else: >> logdebug = lamda: '' >> > > The problem is that I want to eliminate *evaluation* of the parameters to > the pmnc.log.debug call. More often than not it builds a huge string using > multiple nested calls to format() and after it is materialized it is passed > to debug() and discarded. Therefore changing how debug() behaves won't help > because as soon as it is called the string has already been evaluated, it > is too late. > > The bigger problem is that logging level can be changed at runtime by > modifying config_interfaces.py which is a great benefit and very > convenient. Therefore making debug refer to different callables at runtime > would also be tricky. > > Therefore I don't see any other simple solution except for the "if > in_debug(): log_debug()" > > > Putting 'pass' in the else branch would even be better, but is not >> allowed in a lambda. >> > > Just out of curiosity I'd say lambda: None is the same as lambda: pass > would have been :) > > > What do you think ? > > Sincerely, > Dmitry Dvoinikov > > On 2014-04-04 11:00, Angelo Hiulshout wrote: > >> Hi Dimitry, >> >> Sounds fair, but I have to add that some module tests contain errors >> that make the guarantee that 'if the test runs we're ok' a bit >> awkward. Example: in transaction.py there's a reference to a >> non-declared variable 'value', which seems should be 'result'. >> >> As for conditional debug statements, a lambda that replaces >> pmnc.log.debug (and calls it internally depending on debug settings) >> would be a nicer solution - and requires less discipline. >> >> if(debug): >> logdebug = lambda: x: pmnc.log.debug(x) >> else: >> logdebug = lamda: '' >> >> Putting 'pass' in the else branch would even be better, but is not >> allowed in a lambda. >> >> Regards, >> >> Angelo >> >> > -- *Delphino Consultancy* - software architecture, training and coaching *T* 06 2531 9743 / *E* an...@de... *W* http://www.delphino-consultancy.nl / *KVK* Eindhoven 17228522 / *GPG * 487A55D0 |
From: <dm...@ta...> - 2014-04-05 14:36:40
|
Hi Angelo, > non-declared variable 'value', which seems should be 'result'. Yes, I believe I've already fixed that, but whether or not it is committed to public SVN, I do not recall. Check it out. > if(debug): > logdebug = lambda: x: pmnc.log.debug(x) > else: > logdebug = lamda: '' The problem is that I want to eliminate *evaluation* of the parameters to the pmnc.log.debug call. More often than not it builds a huge string using multiple nested calls to format() and after it is materialized it is passed to debug() and discarded. Therefore changing how debug() behaves won't help because as soon as it is called the string has already been evaluated, it is too late. The bigger problem is that logging level can be changed at runtime by modifying config_interfaces.py which is a great benefit and very convenient. Therefore making debug refer to different callables at runtime would also be tricky. Therefore I don't see any other simple solution except for the "if in_debug(): log_debug()" > Putting 'pass' in the else branch would even be better, but is not > allowed in a lambda. Just out of curiosity I'd say lambda: None is the same as lambda: pass would have been :) What do you think ? Sincerely, Dmitry Dvoinikov On 2014-04-04 11:00, Angelo Hiulshout wrote: > Hi Dimitry, > > Sounds fair, but I have to add that some module tests contain errors > that make the guarantee that 'if the test runs we're ok' a bit > awkward. Example: in transaction.py there's a reference to a > non-declared variable 'value', which seems should be 'result'. > > As for conditional debug statements, a lambda that replaces > pmnc.log.debug (and calls it internally depending on debug settings) > would be a nicer solution - and requires less discipline. > > if(debug): > logdebug = lambda: x: pmnc.log.debug(x) > else: > logdebug = lamda: '' > > Putting 'pass' in the else branch would even be better, but is not > allowed in a lambda. > > Regards, > > Angelo > |