-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 03/15/2017 02:34 PM, Lele Gaifax wrote:
> Lele Gaifax <[email protected]> writes:
>
>> If I switch back to the master branch[3], reinstall its
>> requirements.txt (thus running with Pyramid 1.6.1, waitress 0.9.0
>> and no hupper) and repeat the session, none of the above non-sense
>> happens!
>
> Uhm, now I'm really confused: going on with the investigation, I was
> eventually able to obtain the same "multiple sessions" even with
> Pyramid 1.6, and effectively a "ps H" shows that pserve starts four
> threads... I'm ashamed I never noticed this! :-\
>
> Anyway, for some strange reason, the interactive pdb session I get
> with 1.6 is /almost/ usable (the fact that I never noticed the issue
> before supports that), while under 1.8 it's always impeded...
>
> Well, I won't give up the investigation :-)
Maybe you can work around it using a temporary module-scope variable and
an if statement wrapping the 'import pdb; pdb.set_trace'? Or acquire a
lock before doing the 'pdb.set_trace()'?
- ------------------------- %< ---------------------------------
from threading import RLock # reentrant for just-in-case
pdb_guard = RLock()
def view_to_be_debugged(request):
...
with pbd_guard:
import pdb; pdb.set_trace()
...
- ------------------------- %< ---------------------------------
Tres.
- --
===================================================================
Tres Seaver +1 540-429-0999 [email protected]
Palladion Software "Excellence by Design" http://palladion.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAEBAgAGBQJYyZTjAAoJEPKpaDSJE9HYJwMP+wdg9K2BsKdymMm40x98miFA
0Rpc8Nnjaf831W2XObqCkxwm3GvPUxHM6jLiebfBZ9juWRBseExGiGMWPxjSTfgy
g8L+GDfPOtonKy0RkN8raqfcgSK8ZBZTzs+IEaVWZGobFFfiYOr/sFmd/zA5MQrc
Xn/oPEk1z7QbM7vEO8+aZxz/TzijdcFZ8Y0SMu8hjyuPq5OgMISFikssCZaIKuft
pniqxOTClEM02DpWV3lKHjcdBYj2kGYN2L31uXW0gdLSbLqdW/WnFLWFnNvuD7mX
VQ0T5SY1hHMdcvaZaib76qDZ4oKf5bmoQOhSUZcUSVDQEcFg59NAkDQP4i7HgED/
sPiJT4tp4gpOLcRinvPUxgehjV3pjNt0OfNascV7U/IH02ul/dlJdVM/eQj3h5b1
aJnI8pQA4m0CviOfhqyE3Pio5tQq8PCORtQ6wOSS2EFmePZiNhK4RmRI2Y49cOrm
qxgJMZ0LP/H02wINmznGFNhwSN/uvNeABQb4LjJxXFh0wFXR8JGmlHB58FxQZn1e
eaq8NXm7h5z8LPFVLCyPgYxfD5oZDSQqKl3BwMUTAnyfS6X8u5iHizgpksQfElDs
J1iYH40liX2eqgpLcehdaMguZiMrvMMNBAdeLZtxyf7v26CXELNoi6SnBKorHKHF
TTqEcb/vHADzFLAAAfdt
=86VW
-----END PGP SIGNATURE-----
--
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/pylons-discuss/oac4d3%24etq%241%40blaine.gmane.org.
For more options, visit https://groups.google.com/d/optout.