Opened 10 years ago

Closed 8 years ago

#6609 closed (wontfix)

pysco clears the stack - causes delayed_loader to fail

Reported by: pcoles@… Owned by: nobody
Component: Internationalization Version: master
Severity: Keywords: psyco, delayed_loader, stack
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:


The delayed_loader method (in will throw exceptions when an application has imported a module that uses psyco and psyco has managed to clear the stack. The explicit call that fails is:

caller = traceback.extract_stack(limit=2)[0][2]

If the exception is caught and the following code is run, it will show an empty list:

import traceback
raise Exception(traceback.extract_stack())

I am having trouble reproducing this - since psyco seems to only clear the stack in special cases, but I have seen it in multiple cases where one module is using psyco and a separate module is performing stack introspection. This bug has existed in django-users and been unreported for almost a year.

The django-users examples are:

Change History (3)

comment:1 Changed 10 years ago by Malcolm Tredinnick

Component: TranslationsInternationalization
Triage Stage: UnreviewedAccepted

comment:2 Changed 10 years ago by Hystrix

I've just upgraded from 0.96 to 1.0 and got bitten by this bug. Maybe there should be some footnote in the upgrade guide becuase is not easy to know where it comes from when you first see it.

comment:3 Changed 8 years ago by Ramiro Morales

Resolution: wontfix
Status: newclosed

It seems (as per the multiple problems documented PsycoMiddleware and the Psyco documentation itself) the first thing a (experienced, that's a requiremente for using Psyco in the first place) developer should do when seeing weird problems is to deactivate it to see if it is the piece that is introducing them.

Django itself dropped support for Psyco on r3877.

Because of this I don't think the Django documentation is the place where a note about this should be added. Closing the ticket as wontfix.

Note: See TracTickets for help on using tickets.
Back to Top