Opened 6 years ago

Closed 4 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:

Attachments (0)

Change History (3)

comment:1 Changed 6 years ago by mtredinnick

  • Component changed from Translations to Internationalization
  • Triage Stage changed from Unreviewed to Accepted

comment:2 Changed 6 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 4 years ago by ramiro

  • Resolution set to wontfix
  • Status changed from new to closed

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.