This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vinay.sajip
Recipients Alexandr, r.david.murray, vinay.sajip
Date 2011-08-10.15:33:05
SpamBayes Score 2.700134e-07
Marked as misclassified No
Message-id <1312990386.53.0.395153470579.issue12718@psf.upfronthosting.co.za>
In-reply-to
Content
@Александр: It still works for me without winpdb/rpdb2, so you should probably report this there. Can you confirm that it works as expected when you do "python manage.py help"?

vinay@eta-natty:/tmp$ virtualenv -p python2.7 bbbenv
Running virtualenv with interpreter /usr/bin/python2.7
New python executable in bbbenv/bin/python2.7
Also creating executable in bbbenv/bin/python
Installing setuptools............................done.
Installing pip...............done.
vinay@eta-natty:/tmp$ source bbbenv/bin/activate
(bbbenv)vinay@eta-natty:/tmp$ easy_install django
Searching for django
Reading http://pypi.python.org/simple/django/
Reading http://www.djangoproject.com/
Best match: Django 1.3
Downloading http://media.djangoproject.com/releases/1.3/Django-1.3.tar.gz
Processing Django-1.3.tar.gz

[output snipped]

Installed /tmp/bbbenv/lib/python2.7/site-packages/Django-1.3-py2.7.egg
Processing dependencies for django
Finished processing dependencies for django
(bbbenv)vinay@eta-natty:/tmp$ django-admin.py startproject bbbtest
(bbbenv)vinay@eta-natty:/tmp$ cd bbbtest
(bbbenv)vinay@eta-natty:/tmp/bbbtest$ python manage.py help
Usage: manage.py subcommand [options] [args]

[output snipped]

(bbbenv)vinay@eta-natty:/tmp/bbbtest$ grep LOGGING_CONFIG settings.py
LOGGING_CONFIG = 'logging.config.dictConfig'

@David: Marking as a static method simply ensures that the attribute is returned as a function, which is already happening:

>>> class C:
...     @staticmethod
...     def func(x): print x
...     def meth(self, x): print x
... 
>>> C.func, C.meth, C().func, C().meth
(<function func at 0xb783ddf4>, <unbound method C.meth>, <function func at 0xb783ddf4>, <bound method C.meth of <__main__.C instance at 0xb75cafcc>>)
>>> import logging.config
>>> DC = logging.config.DictConfigurator
>>> DC.importer, DC.configure, DC({}).importer, DC({}).configure
(<built-in function __import__>, <unbound method DictConfigurator.configure>, <built-in function __import__>, <bound method DictConfigurator.configure of <logging.config.DictConfigurator object at 0xb75b520c>>)

I have no objection to changing things to support PyPy, but what's the idiom? I don't believe importer = staticmethod(__import__) will work here, as it just creates a staticmethod object (which isn't callable).
History
Date User Action Args
2011-08-10 15:33:06vinay.sajipsetrecipients: + vinay.sajip, r.david.murray, Alexandr
2011-08-10 15:33:06vinay.sajipsetmessageid: <1312990386.53.0.395153470579.issue12718@psf.upfronthosting.co.za>
2011-08-10 15:33:05vinay.sajiplinkissue12718 messages
2011-08-10 15:33:05vinay.sajipcreate