Hi Martin I see this kind of message when I have made changes to Product code but haven't refreshed. Steven
-----Original Message----- Hi folks,
I am experiencing weird, sporadic errors while using and developing a Plone 2.0.5 site:
ValueError: Cache values may only be in one cache.
* Module ZPublisher.Publish, line 107, in publish * Module Zope.App.startup, line 222, in commit * Module ZODB.Transaction, line 241, in commit * Module ZODB.Transaction, line 356, in * _commit_objects * Module ZODB.Connection, line 459, in commit __traceback_info__: (('BTrees.OOBTree', 'OOBTree'), '\x00\x00\x00\x00\x00\x00\x00L', '')
What is going on, and how can I prevent these errors?
Thanks,
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net
"i have smoked pot. it is a stupid business, like masturbation." -- thomas pynchon
And there are products that can not be refreshes. Restarting Zope is then the only solution Robert Hayles, S. wrote:
Hi Martin
I see this kind of message when I have made changes to Product code but haven't refreshed.
Steven
-----Original Message----- Hi folks,
I am experiencing weird, sporadic errors while using and developing a Plone 2.0.5 site:
ValueError: Cache values may only be in one cache.
* Module ZPublisher.Publish, line 107, in publish * Module Zope.App.startup, line 222, in commit * Module ZODB.Transaction, line 241, in commit * Module ZODB.Transaction, line 356, in * _commit_objects * Module ZODB.Connection, line 459, in commit __traceback_info__: (('BTrees.OOBTree', 'OOBTree'), '\x00\x00\x00\x00\x00\x00\x00L', '')
What is going on, and how can I prevent these errors?
Thanks,
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net
"i have smoked pot. it is a stupid business, like masturbation." -- thomas pynchon
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
also sprach robert <robert@redcor.ch> [2005.02.02.2323 +0100]:
And there are products that can not be refreshes. Restarting Zope is then the only solution
What determines whether a product can be refreshed? -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net "welcome to american airlines, sir. here's your avocado - remember to keep it turned on and with you at all times. please turn your luggage over to the armadillos for rootling." -- http://azure.humbug.org.au/~aj/armadillos.txt
martin f krafft wrote:
also sprach robert <robert@redcor.ch> [2005.02.02.2323 +0100]:
And there are products that can not be refreshes. Restarting Zope is then the only solution
What determines whether a product can be refreshed?
Lots of complex things that can't be easily summed up ;-) In short, if it works, you're in luck, if not, then restart Zope... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
also sprach Chris Withers <chris@simplistix.co.uk> [2005.02.03.0917 +0100]:
Lots of complex things that can't be easily summed up ;-)
Now say I really wanted to know, where would I look? -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net the only difference between a car salesman and a computer salesman is that the car salesman knows he's lying.
Chris Withers wrote:
In short, if it works, you're in luck, if not, then restart Zope...
On a related note, what's the most graceful way to restart Zope on a Unix system? zopectl restart? ben ______________________________________________________________________ This email has been scanned by the MessageLabs Email Security System. For more information please visit http://www.messagelabs.com/email ______________________________________________________________________
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Ben Last (Zope) wrote: | Chris Withers wrote: | > In short, if it works, you're in luck, if not, then restart Zope... | | On a related note, what's the most graceful way to restart Zope on a | Unix system? zopectl restart? Yes. If that fails, fall back to 'zopectl stop && zopectl start'. Tres. - -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAj6PGqWXf00rNCgRApxIAJ9jlqHA3cyNGRjrX0+5Yr2q+2ObZQCfaZZS +1NS9SxyCm+MSIg3qporEr8= =GlWB -----END PGP SIGNATURE-----
Ben Last (Zope) wrote at 2005-2-3 09:55 +0000:
Chris Withers wrote:
In short, if it works, you're in luck, if not, then restart Zope...
On a related note, what's the most graceful way to restart Zope on a Unix system? zopectl restart?
Or the "restart" button in the control panel... -- Dieter
martin f krafft wrote:
also sprach robert <robert@redcor.ch> [2005.02.02.2323 +0100]:
And there are products that can not be refreshes. Restarting Zope is then the only solution
What determines whether a product can be refreshed?
It needs to have a refresh.txt file in its folder. The file can be empty. Only its existence is tested. Some products can not be refreshed for "internal" reasons. To my knowledge this is the case, when a product imports libraries as part one of its methods. Robert
On Thu, Feb 03, 2005 at 11:14:20AM +0100, robert wrote:
martin f krafft wrote:
also sprach robert <robert@redcor.ch> [2005.02.02.2323 +0100]:
And there are products that can not be refreshes. Restarting Zope is then the only solution
What determines whether a product can be refreshed?
It needs to have a refresh.txt file in its folder. The file can be empty. Only its existence is tested. Some products can not be refreshed for "internal" reasons. To my knowledge this is the case, when a product imports libraries as part one of its methods.
In my experience you can't refresh anything that uses MonkeyPatching (TM). After running into some other refresh glitches, which I did not have the time to track down, I stopped using it. -- Paul Winkler http://www.slinkp.com
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Paul Winkler wrote: | On Thu, Feb 03, 2005 at 11:14:20AM +0100, robert wrote: | |>martin f krafft wrote: |> |> |>>also sprach robert <robert@redcor.ch> [2005.02.02.2323 +0100]: |>> |>> |>> |>>>And there are products that can not be refreshes. |>>>Restarting Zope is then the only solution |>>> |>>> |>> |>>What determines whether a product can be refreshed? |>> |>> |> |>It needs to have a refresh.txt file in its folder. The file can be |>empty. Only its existence is tested. |>Some products can not be refreshed for "internal" reasons. To my |>knowledge this is the case, when a product imports libraries as part |>one of its methods. | | | In my experience you can't refresh anything that uses | MonkeyPatching (TM). | | After running into some other refresh glitches, which I | did not have the time to track down, I stopped using it. I don't even know what the big deal is about refresh anyway. I just run the 'zopect' shell in a terminal, using its 'fg' command, and hit '<Ctrl-C><Up><Enter>' to do a restart; it takes maybe 5 seconds to restart, and I *never* have to worry about chasing down weird reload-semantics-in-python-are-borked artifacts. BTW, I would argue checking in 'refresh.txt' to CVS is not good form (I even see *released* producte with that file included!) Tres. - -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAlLwGqWXf00rNCgRAvAGAKCYWKJBWENCvSI51kTGSXemlHEjyACghGg9 6m3Y+gHmDyH4mLz4oWetsz0= =DSYH -----END PGP SIGNATURE-----
On Feb 3, 2005, at 17:36, Tres Seaver wrote:
| After running into some other refresh glitches, which I | did not have the time to track down, I stopped using it.
I don't even know what the big deal is about refresh anyway. I just run the 'zopect' shell in a terminal, using its 'fg' command, and hit '<Ctrl-C><Up><Enter>' to do a restart; it takes maybe 5 seconds to restart, and I *never* have to worry about chasing down weird reload-semantics-in-python-are-borked artifacts.
BTW, I would argue checking in 'refresh.txt' to CVS is not good form (I even see *released* producte with that file included!)
The "big deal" is that many people assume it to be some magic cure-all. Well, sorry folks, it isn't. And it has a tendency to introduce its own problems to boot. I have always refused to use it myself. I have also gotten requests to include refresh.txt in the software I release from well-meaning people who are not aware of pitfalls. They never come back after I tell them my opinion about Refresh ;) jens P.S.: I follow the same procedure, zopectl fg/CTRL-C/up-arrow/enter. Unfortunately there is one persistent issue on OS X where the CTRL-C stops working after I have used pdb in the foregrounded process. I can only kill Zope with CTRL-Z and then kill -9 %
also sprach Tres Seaver <tseaver@zope.com> [2005.02.03.1736 +0100]:
I don't even know what the big deal is about refresh anyway. I just run the 'zopect' shell in a terminal, using its 'fg' command, and hit '<Ctrl-C><Up><Enter>' to do a restart; it takes maybe 5 seconds to restart, and I *never* have to worry about chasing down weird reload-semantics-in-python-are-borked artifacts.
That works, of course. However, here the Zope start sequence is between 10 and 30 seconds, without any errors or the like. Can I make this faster? -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net "i love deadlines. i like the whooshing sound they make as they fly by." -- douglas adams
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 martin f krafft wrote: | also sprach Tres Seaver <tseaver@zope.com> [2005.02.03.1736 +0100]: | |>I don't even know what the big deal is about refresh anyway. |>I just run the 'zopect' shell in a terminal, using its 'fg' |>command, and hit '<Ctrl-C><Up><Enter>' to do a restart; it takes |>maybe 5 seconds to restart, and I *never* have to worry about |>chasing down weird reload-semantics-in-python-are-borked |>artifacts. | | | That works, of course. However, here the Zope start sequence is | between 10 and 30 seconds, without any errors or the like. Can | I make this faster? Use ZEO, even for development sandboxes (a lot of the startup time without ZEO is spent opening the FileStorage). With ZEO, the appserver just connects to the storage server. Tres. - -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAm/4GqWXf00rNCgRAqpfAJ0fgCjBeCnWeeC/4A/M2u3kUrqd1ACfV91y lYnDqqFsLDhVCK9eAjrYgmo= =e+63 -----END PGP SIGNATURE-----
also sprach Tres Seaver <tseaver@zope.com> [2005.02.03.1939 +0100]:
Use ZEO, even for development sandboxes (a lot of the startup time without ZEO is spent opening the FileStorage). With ZEO, the appserver just connects to the storage server.
Ha! I have only just begun claiming I understand Zope. And my time is very limited as I have to deliver next week already. So unless ZEO is a breeze to set up (running Debian Linux here), I will need to pass this time around (but thanks for the hint, it's surely worth a look once I get some time...) -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net "it isn't pollution that's harming the environment. it's the impurities in our air and water that are doing it." - dan quayle
On Thu, Feb 03, 2005 at 08:05:02PM +0100, martin f krafft wrote:
also sprach Tres Seaver <tseaver@zope.com> [2005.02.03.1939 +0100]:
Use ZEO, even for development sandboxes (a lot of the startup time without ZEO is spent opening the FileStorage). With ZEO, the appserver just connects to the storage server.
Ha! I have only just begun claiming I understand Zope. And my time is very limited as I have to deliver next week already. So unless ZEO is a breeze to set up (running Debian Linux here), I will need to pass this time around (but thanks for the hint, it's surely worth a look once I get some time...)
It's really easy. To convert a Zope instance to a combination Zope/Zeo instance on *nix: 0) shut down Zope. 1) Where your zope software is installed, run this: ./bin/mkzeoinstance.py /path/to/your/instance 8100 That gives you etc/zeo.conf as well as bin/runzeo and bin/zeoctl. No need to edit anything in these. 2) edit etc/zope.conf: Uncomment the very last section, under the comment heading # ZEO Client Storage. Comment out the Filestorage section above that, which begins with <zodb_db main> and ends with </zodb_db>. 3) In your instance home, start ZEO first, then zope: ./bin/zeoctl start ./bin/zopectl start You're done. I don't know where Debian puts zope-related stuff, so if you're using their Zope packages you may have to use find or locate to figure out what's where. -- Paul Winkler http://www.slinkp.com
also sprach Paul Winkler <pw_lists@slinkp.com> [2005.02.03.2016 +0100]:
It's really easy.
This it was. Wow, thanks. I am submitting a patch to the Debian package to make the init.d script start the ZEO server if the instance has been prepared for it (by checking '-x bin/zeoctl'). One thing I wonder: when restarting with `z*ctl restart`, does it matter in what order I restart?
I don't know where Debian puts zope-related stuff, so if you're using their Zope packages you may have to use find or locate to figure out what's where.
Nah, everything like you said. :) Thanks a lot. -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net *** important disclaimer: by sending an email to any address, that will eventually cause it to end up in my inbox without much interaction, you are agreeing that: - i am by definition, "the intended recipient" - all information in the email is mine to do with as i see fit and make such financial profit, political mileage, or good joke as it lends itself to. in particular, i may quote it on usenet. - i may take the contents as representing the views of your company. - this overrides any disclaimer or statement of confidentiality that may be included on your message.
So now that I have ZEO running, a `zopectl restart` still takes 13 seconds until HTTP requests are serviced again. You can probably see how this is very inconvenient. What can I do to improve the situation further? Thanks, -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net "a mathematician is a device for turning coffee into theorems." -- paul erdös
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 martin f krafft wrote: | So now that I have ZEO running, a `zopectl restart` still takes 13 | seconds until HTTP requests are serviced again. You can probably see | how this is very inconvenient. What can I do to improve the | situation further? Off the top of my head: ~ - Ensure that your Python packages have current .pyc / .pyo files ~ (the root user may own the directories where they live, which would ~ prevent the Zope process from creating them on import). ~ - Remove products you aren't using, if any. ~ - Ensure that your DNS is either online, or that Zope doesn't try to ~ use it to reverse name lookups. Tres. - -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCApOxGqWXf00rNCgRArQ1AJ9dQKyOf2W8T2HxNQe/7Kuxgn2A8ACgmGc1 UEaPZxjtNyQC21V7oVDPp/0= =qx7P -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 martin f krafft wrote: | So now that I have ZEO running, a `zopectl restart` still takes 13 | seconds until HTTP requests are serviced again. You can probably see | how this is very inconvenient. What can I do to improve the | situation further? BTW, Andy McKay just posted a Plone-specific speedup recipe, involving a patch to PlacelessTranslationService: ~ http://www.zopezen.org/Members/andy/news_item.2005-02-02.4231683958 Tres. - -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAqS3GqWXf00rNCgRAsH8AJ0X7H4y4HXGaTyC7JsNSNQGbYsapgCfazkM auiNLMiV3flmbRaZCknNV38= =ZmDY -----END PGP SIGNATURE-----
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 martin f krafft wrote: | also sprach Paul Winkler <pw_lists@slinkp.com> [2005.02.03.2016 +0100]: | |>It's really easy. | | This it was. Wow, thanks. | | I am submitting a patch to the Debian package to make the init.d | script start the ZEO server if the instance has been prepared for it | (by checking '-x bin/zeoctl'). | | One thing I wonder: when restarting with `z*ctl restart`, does it | matter in what order I restart? You should practically never need to restart ZEO, because the ZEO server does not use / depend on any of the application code you are developing (unless you are Tim Peters ;). Logically, you want to have the storage running whenever the appserver is up, so start it first and stop it last. Tres. - -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAoz2GqWXf00rNCgRAuDKAJ4zwQ38+52suQQ+d6pJ3VjJqnU0DgCgmn75 Jwp9YM9h7f0IF1Cim6Kr2GY= =ihb4 -----END PGP SIGNATURE-----
Paul Winkler wrote:
It's really easy. To convert a Zope instance to a combination Zope/Zeo instance on *nix:
Wow, that was really easy, thanks! So if I wanted to have multiple servers using same zodb, I'd manage zope separately on each server, and just change zope.conf to point to a single server running zeo (so one might have localhost:8100, and the others might have zeoserver:8100)? And the mkzeoinstance.py step would only be necessary on the one server? Thanks, Tom
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Tom Trelvik wrote: | Paul Winkler wrote: | |> It's really easy. |> To convert a Zope instance to a combination Zope/Zeo instance |> on *nix: | | | Wow, that was really easy, thanks! | | So if I wanted to have multiple servers using same zodb, I'd manage | zope separately on each server, and just change zope.conf to point to a | single server running zeo (so one might have localhost:8100, and the | others might have zeoserver:8100)? And the mkzeoinstance.py step would | only be necessary on the one server? Yep. That is the original usecase for ZEO (scaling the appserver across hardware). Using for development (e.g., so you can run 'zopectl debug' even while the appserver is serving requests) is a serendipity. Tres. - -- =============================================================== Tres Seaver tseaver@zope.com Zope Corporation "Zope Dealers" http://www.zope.com -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFCAqRtGqWXf00rNCgRAtg0AJ9YVgR7Vag1+xvI3dwQSSMbATvcnACfTneG qjhTNATqCCxRPsib9jXOLKs= =Et4h -----END PGP SIGNATURE-----
martin f krafft wrote:
also sprach Tres Seaver <tseaver@zope.com> [2005.02.03.1939 +0100]:
Use ZEO, even for development sandboxes (a lot of the startup time without ZEO is spent opening the FileStorage). With ZEO, the appserver just connects to the storage server.
Ha! I have only just begun claiming I understand Zope. And my time is very limited as I have to deliver next week already. So unless ZEO is a breeze to set up (running Debian Linux here), I will need to pass this time around (but thanks for the hint, it's surely worth a look once I get some time...)
Very easy to set up with Zope 2.7. Run Zope-2.7.4-0/bin/mkzeoclient then Zope-2.7.4-0/bin/mkzopeclient You can give them the same directory. I often do. In instance/etc/zope.conf, go to the bottom, comment out the regular ZODB directive and uncomment the ZEO directive. Note the ZEO port. In instance/etc/zeo.conf, make sure the port number matches the one in zope.conf (which isn't true by default, strangely.) Then: $ instance/bin/zeoctl start $ instance/bin/zopectl start And you're done. --jcc
For me, refresh is a good feature so the other applications don't stop to serve. Often you have to change minor stuff - a CSS file for example or one/two line in the scrypt. Otherwise, 'zopectl restart' is much more convenient IMHO. isn't it ?. I remark that if I have created by hand a new product then there is no way to refresh the products list (whilst the other application servers eg. tomcat / jboss do this). Cheers --- martin f krafft <madduck@madduck.net> a écrit :
also sprach Tres Seaver <tseaver@zope.com> [2005.02.03.1736 +0100]:
I don't even know what the big deal is about refresh anyway. I just run the 'zopect' shell in a terminal, using its 'fg' command, and hit '<Ctrl-C><Up><Enter>' to do a restart; it takes maybe 5 seconds to restart, and I *never* have to worry about chasing down weird reload-semantics-in-python-are-borked artifacts.
That works, of course. However, here the Zope start sequence is between 10 and 30 seconds, without any errors or the like. Can I make this faster?
-- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net
"i love deadlines. i like the whooshing sound they make as they fly by."
-- douglas adams
ATTACHMENT part 1.2 application/pgp-signature name=signature.asc _______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Découvrez le nouveau Yahoo! Mail : 250 Mo d'espace de stockage pour vos mails ! Créez votre Yahoo! Mail sur http://fr.mail.yahoo.com/
On Thu, Feb 03, 2005 at 07:56:57PM +0100, Hoang-Vu PHUNG wrote:
For me, refresh is a good feature so the other applications don't stop to serve. Often you have to change minor stuff - a CSS file for example or one/two line in the scrypt.
If you run zope in debug mode, changes to filesystem Page Templates and DTML get picked up automagically, no restart needed. But it slows down Zope. -- Paul Winkler http://www.slinkp.com
Tres sent me some valuable advice in private email, which I want to share with the crowd. I now cut down my startup time to 5 seconds, and given the number of products I have installed and need, this is probably as good as it will get. I applied the patch from http://www.zopezen.org/Members/andy/news_item.2005-02-02.4231683958 and ensured that my zope user has write access to the Product directories. It did not previously, which had it recompile every Product on every start. Tres also said to deinstall any unneeded products and check DNS (or disable reverse lookups). Just for completeness. Thanks girls and guys! -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net if god is perfect, why did he create discontinuous functions?
martin f krafft wrote:
I applied the patch from http://www.zopezen.org/Members/andy/news_item.2005-02-02.4231683958 This is a Plone-specific optimisation, right? ben
also sprach Ben Last (Zope) <zope@benlast.com> [2005.02.04.0913 +0100]:
I applied the patch from http://www.zopezen.org/Members/andy/news_item.2005-02-02.4231683958 This is a Plone-specific optimisation, right?
Yes, sorry. It only affects sites using the PlacelessTranslationServices -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net the remote desktop feature of windows xp is really nice (and *novel*!). a micro$oft consultant can *remotely* disable the personal firewall and control the system. we'll ignore the fact that this tampering with the firewall is not logged, and more importantly, that the firewall isn't restored when the clowns from redmond are done with their job.
also sprach Paul Winkler <pw_lists@slinkp.com> [2005.02.03.1720 +0100]:
In my experience you can't refresh anything that uses MonkeyPatching (TM).
If by MonkeyPatch you mean run-time patching, then sure, I can imagine how that would screw up Zope. Maybe the Zope community has a different definition though? -- martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver! spamtraps: madduck.bogus@madduck.net "if there's anything more important than my ego, i want it caught and shot now." -- zaphod beeblebrox
On Thu, Feb 03, 2005 at 07:19:00PM +0100, martin f krafft wrote:
also sprach Paul Winkler <pw_lists@slinkp.com> [2005.02.03.1720 +0100]:
In my experience you can't refresh anything that uses MonkeyPatching (TM).
If by MonkeyPatch you mean run-time patching, then sure, I can imagine how that would screw up Zope. Maybe the Zope community has a different definition though?
No, that is exactly what I mean. -- Paul Winkler http://www.slinkp.com
Paul Winkler <pw_lists@slinkp.com> wrote:
In my experience you can't refresh anything that uses MonkeyPatching (TM).
There's usually no problem with using refresh and monkey-patching. Only badly written products that monkey patch by first unconditonnaly saving the old version of a function/method, then replacing it with some new one that does stuff and then calls the old one, may fail. But in general there's no problem. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
On Wed, Feb 23, 2005 at 06:22:30PM +0100, Florent Guillaume wrote:
There's usually no problem with using refresh and monkey-patching.
Only badly written products that monkey patch by first unconditonnaly saving the old version of a function/method, then replacing it with some new one that does stuff and then calls the old one, may fail.
That's probably what I saw. Aside from refresh, are there other reasons you consider that technique bad? I've often used it as a sort of in-place decorator. The obvious alternative is to copy/paste the code from the original method. Is that what you prefer? -- Paul Winkler http://www.slinkp.com
Paul Winkler <pw_lists@slinkp.com> wrote:
On Wed, Feb 23, 2005 at 06:22:30PM +0100, Florent Guillaume wrote:
There's usually no problem with using refresh and monkey-patching.
Only badly written products that monkey patch by first unconditonnaly saving the old version of a function/method, then replacing it with some new one that does stuff and then calls the old one, may fail.
That's probably what I saw.
Aside from refresh, are there other reasons you consider that technique bad? I've often used it as a sort of in-place decorator.
The obvious alternative is to copy/paste the code from the original method. Is that what you prefer?
It depends, sometimes I have no other option than modifying a copy/pasted method because it's big and the change I have to do is in the middle of it. Copy/pasting is also bad if you expect the 'original' method to change over time, so you'll get de-synced. Most of the time I prefer to do my stuff and call the original one (before or after). For small methods where's there's no risk of version drift though I just copy/paste them and change them. Florent -- Florent Guillaume, Nuxeo (Paris, France) CTO, Director of R&D +33 1 40 33 71 59 http://nuxeo.com fg@nuxeo.com
participants (14)
-
Ben Last (Zope) -
Chris Withers -
Dieter Maurer -
Florent Guillaume -
Hayles, S. -
Hoang-Vu PHUNG -
J Cameron Cooper -
Jens Vagelpohl -
martin f krafft -
martin f krafft -
Paul Winkler -
robert -
Tom Trelvik -
Tres Seaver