[issue12541] Accepting Badly formed headers in urllib HTTPBasicAuth
Alex Leon ael...@gmail.com added the comment: It could have a 2 phase regex match. We match the first one, and if it fails, match the second and produce a warning. I think producing a warning is a good idea, as it allows the programmer to know that the implementation of basic auth they are trying to connect to is broken, and might help with future connection attempts. Also there are currently no warnings produced by python if it fails to parse the auth header, and its hard for a developer to know why. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12541 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12541] Accepting Badly formed headers in urllib HTTPBasicAuth
shevegen sheve...@linuxmail.org added the comment: I think a warning would be quite nice to have. -- nosy: +shevegen ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12541 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10744] ctypes arrays have incorrect buffer information (PEP-3118)
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10744 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: It works as expected for me: vinay@eta-jaunty:~/projects/python/2.7$ python2.7 Python 2.7.2+ (2.7:7d5a37ce42d5, Aug 10 2011, 09:20:30) [GCC 4.3.3] on linux2 Type help, copyright, credits or license for more information. import logging.config [62163 refs] c = logging.config.BaseConfigurator({}) [62173 refs] c.importer('pickle') module 'pickle' from '/home/vinay/projects/python/2.7/Lib/pickle.py' [65944 refs] c.importer built-in function __import__ [65944 refs] c.__class__.importer built-in function __import__ [65944 refs] c.__class__.importer('marshal') module 'marshal' (built-in) [65944 refs] Can you provide an example script which demonstrates failure? I'll mark this as invalid and pending, and close soon if no further information is forthcoming. -- resolution: - invalid status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12721] Chaotic use of helper functions in test_shutil for reading and writing files
New submission from Hynek Schlawack h...@ox.cx: While working on #12715 I noticed that the tests of shutil aren't exactly consistent concerning reading and writing files. There were no less than two function to read files (one of them not being used at all) and two methods to write them. Additionally lots of code simply reads/writes by hand. I've unified the functionality in module functions read_file and write_file which can be told to open the file as binaries. -- components: Tests files: cleanup-test_shutil.diff keywords: patch messages: 141856 nosy: hynek priority: normal severity: normal status: open title: Chaotic use of helper functions in test_shutil for reading and writing files type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file22871/cleanup-test_shutil.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12721 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12687] Python 3.2 fails to load protocol 0 pickle
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- hgrepos: +58 resolution: - accepted stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12687] Python 3.2 fails to load protocol 0 pickle
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- keywords: +patch Added file: http://bugs.python.org/file22872/6394321ef4ec.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator
Александр alexandr.s@gmail.com added the comment: Install rpdb2 or winpdb for you python. And install django to you python path. Create empty djnago-project: django-admin createproject bbbtest Add line LOGGING_CONFIG = 'logging.config.dictConfig' to setting.py for use python logging.config for logging. Execute rpdb2 ./manage.py help And you get traceback: Traceback (most recent call last): File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/rpdb2.py, line 14499, in module ret = rpdb2.main() File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/rpdb2.py, line 14470, in main StartServer(_rpdb2_args, fchdir, _rpdb2_pwd, fAllowUnencrypted, fAllowRemote, secret) File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/rpdb2.py, line 14220, in StartServer imp.load_source('__main__', _path) File /tmp/bbbtest/manage.py, line 11, in module execute_manager(settings) File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/core/management/__init__.py, line 438, in execute_manager utility.execute() File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/core/management/__init__.py, line 368, in execute sys.stderr.write(self.main_help_text() + '\n') File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/core/management/__init__.py, line 239, in main_help_text commands = get_commands().keys() File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/core/management/__init__.py, line 101, in get_commands apps = settings.INSTALLED_APPS File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/utils/functional.py, line 276, in __getattr__ self._setup() File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/conf/__init__.py, line 42, in _setup self._wrapped = Settings(settings_module) File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/site-packages/django/conf/__init__.py, line 139, in __init__ logging_config_func(self.LOGGING) File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/logging/config.py, line 782, in dictConfig dictConfigClass(config).configure() File /home/alex/.pythonbrew/pythons/Python-2.7.1/lib/python2.7/logging/config.py, line 581, in configure '%r: %s' % (name, e)) ValueError: Unable to configure handler 'mail_admins': __import__() argument 1 must be string, not DictConfigurator -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Changes by Stefan Krah stefan-use...@bytereef.org: Added file: http://bugs.python.org/file22873/78fb1181787a.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)
Stefan Krah stefan-use...@bytereef.org added the comment: I thought it might be productive to switch to documentation/test driven development for PEP-3118 in general. So I updated the documentation, trying to spell out the responsibilities of both exporter and consumer as clearly as possible. In order to have a PEP-3118 reference implementation, I wrote Modules/_testbuffer.c and Lib/test/test_buffer.py. The test module contains an ndarray object (independent from NumPy's ndarray) with these features: o Full base object capabilities, including responding to flag specific requests. o Full re-exporter capability: The object obtains a buffer from another exporter and poses as a base object. o Optional capability to change layout while buffers are exported. o Full support for arbitrary format strings using the struct module. o Fortran style arrays. o Arbitrary multidimensional structures, including offsets and negative strides. o Support for converting arrays to suboffset representations. o Support for multidimensional indexing, slicing and tolist(). o Optional support for testing against NumPy. In memoryobject.c I only fixed the buffer release issues that came up. Before proceeding with allocating private arrays for each memoryview, it would be great to have agreement on the revised documentation and a couple of other issues. Documentation - I'll highlight some changes here: 1) view-obj: Must be a new reference to the provider if the buffer is obtained via getbuffer(), otherwise NULL. In case of failure the field MUST be set to NULL (was: undefined). So, logically this should be seen the same way as returning a new reference from a standard Python function. 2) view-buf: This can (and _does_ for Numpy arrays) point to any location in the underlying memory block. If a consumer doesn't request one of the simple or contiguous buffers, all bets are off. 3) view-len: Make it clear that the PEP defines it as product(shape) * itemsize. 4) Ownership for shape, strides, internal: read-only for the consumer. 5) Flag explanations: The new section puts emphasis on which fields a consumer can expect in response to a buffer request, starting with the fields that will always be set. 6) Rule for writable/read-only requests. Only raise if the buffer is read-only and the request is 'writable'. This seems to be the most practical solution. 7) Add NumPy-style and PIL-style sections to make clear what a consumer must be able to handle if complicated structures are requested (thanks Pauli Virtanen for clarifying what valid NumPy arrays may look like). What I would like to spell out clearly: 8) A PEP-3118 compliant provider MUST always be able to respond to a PyBUF_FULL_RO request (i.e. fill in shape AND strides). ctypes doesn't currently do that, but could be fixed easily. This is easy to implement for the exporter (see how PyBuffer_FillInfo() does it in a few lines). Memoryview -- 8) Add PyMemoryView_FromBytes(). This could potentially replace PyMemoryView_FromBuffer(). 9) I've come to think that memoryviews should only be created from PyBUF_FULL_RO requests (this also automatically succeeds if an object is writable, see above). One reason is that we don't constantly have to check for the presence of shape and strides and format (unless ndim = 0). Currently it is possible to create any kind of view via PyMemoryView_FromBuffer(). It would be possible to deprecate it or make it a rule that the buffer argument must have full information. 10) NumPy has a limit of ndim = 64. It would be possible to use that limit as well and make shape, strides and suboffsets static arrays of size 64. Perhaps this is a bit wasteful, it depends on how many views are typically created. 11) test_buffer.py contains an example (see: test_memoryview_release()) that Antoine's test case will not work if a re-exporter is involved. Should we leave that or fix it, too? My apologies for the long list, but it'll be easier to proceed if some rules are written in stone. :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10181 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1
Stefan Krah stefan-use...@bytereef.org added the comment: This should be fixed with the ManagedBuffer implementation from #10181. -- dependencies: +Problems with Py_buffer management in memoryobject.c (and elsewhere?) nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9990 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8305] memoview[0] creates an invalid view if ndim != 1
Stefan Krah stefan-use...@bytereef.org added the comment: The crash is fixed in the features/pep-3118 repo: from numpy import array y=array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) y.shape = 3,4 view=memoryview(y) view2 = view[0] Traceback (most recent call last): File stdin, line 1, in module NotImplementedError: multi-dimensional sub-views are not implemented [182251 refs] -- dependencies: +Problems with Py_buffer management in memoryobject.c (and elsewhere?) nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8305 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7433] MemoryView memory_getbuf causes segfaults, double call to tp_releasebuffer
Stefan Krah stefan-use...@bytereef.org added the comment: This should be fixed in features/pep-3118. -- dependencies: +Problems with Py_buffer management in memoryobject.c (and elsewhere?) nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7433 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10746] ctypes c_long c_bool have incorrect PEP-3118 type codes
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +skrah ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10746 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12722] Link to heapq source from docs.python.org not working
New submission from Senthil Kumaran sent...@uthcode.com: http://mail.python.org/pipermail/docs/2011-August/005336.html I see that it is a problem with viewvc software which is not handling unicode text in HTML markup properly. Probably we can reference the text version of that module till the viewvc bug is fixed. -- assignee: docs@python components: Documentation messages: 141862 nosy: docs@python, orsenthil priority: normal severity: normal status: open title: Link to heapq source from docs.python.org not working ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12722 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12722] Link to heapq source from docs.python.org not working
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 9f482b957d77 by Senthil Kumaran in branch '2.7': Fix closes Issue12722 - link heapq source in the text format in the documentation. http://hg.python.org/cpython/rev/9f482b957d77 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12722 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1492704] distinct error type from shutil.move()
Gennadiy Zlobin gennad.zlo...@gmail.com added the comment: This patch should fix the issue -- nosy: +gennad Added file: http://bugs.python.org/file22874/1492704.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1492704 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12714] argparse.ArgumentParser.add_argument() documentation error
R. David Murray rdmur...@bitdance.com added the comment: optionals only means the same thing as options only, but 'optionals' is what argparse calls them (as contrasted with positionals). 'optionals' is only used two places in the doc and isn't defined, but its meaning is implied by the section heading (optional arguments). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12714 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator
R. David Murray rdmur...@bitdance.com added the comment: Vinay: you want to mark importer as a static method anyway, otherwise it won't work with pypy. I don't know why this would show up on CPython, though. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12608] crash in PyAST_Compile when running Python code
Meador Inge mead...@gmail.com added the comment: I have verified that the code checked in for issue12575 keep the test case from this issue from crashing the interpreter: [meadori@motherbrain cpython]$ ./python test.py Traceback (most recent call last): File test.py, line 14, in module compiled = compile(exprAst, foo, single) ValueError: empty body on FunctionDef Do we have any intent on fixing this crasher for 3.2 and 2.7? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12608 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12723] tkSimpleDialog.askstring shouldn't allow empty string input
New submission from Matthew Hemke mghe...@gmail.com: tkSimpleDialog.askstring allows empty input. The attached patch adds validation to the input to ensure it is not empty. -- components: Tkinter files: askstring.patch keywords: patch messages: 141868 nosy: rabbidous priority: normal severity: normal status: open title: tkSimpleDialog.askstring shouldn't allow empty string input type: feature request Added file: http://bugs.python.org/file22875/askstring.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12723 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12723] tkSimpleDialog.askstring shouldn't allow empty string input
Changes by Matthew Hemke mghe...@gmail.com: -- versions: +Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12723 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12608] crash in PyAST_Compile when running Python code
Benjamin Peterson benja...@python.org added the comment: 2011/8/10 Meador Inge rep...@bugs.python.org: Meador Inge mead...@gmail.com added the comment: I have verified that the code checked in for issue12575 keep the test case from this issue from crashing the interpreter: [meadori@motherbrain cpython]$ ./python test.py Traceback (most recent call last): File test.py, line 14, in module compiled = compile(exprAst, foo, single) ValueError: empty body on FunctionDef Do we have any intent on fixing this crasher for 3.2 and 2.7? Probably not. Everything is rather broken before 3.3 now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12608 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: @Александр: 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 setuptoolsdone. 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). -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1621] Do not assume signed integer overflow behavior
deadshort cploo...@gmail.com added the comment: Since this is still dribbling along I'll point out intobject.c:int_pow() and: prev = ix; /* Save value for overflow check */ if (iw 1) { ix = ix*temp; if (temp == 0) break; /* Avoid ix / 0 */ if (ix / temp != prev) { return PyLong_Type.tp_as_number-nb_power( (PyObject *)v, (PyObject *)w, (PyObject *)z); } } which I misclassified in http://bugs.python.org/issue12701 -- nosy: +deadshort ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1621 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior
Alexis Metaireau ale...@notmyidea.org added the comment: I see two different things here: 1) the fact that getlocale() doesn't return (None, None) on some python versions 2) the fact that having it returning (None, None) by default is a bit misleading as users may think that getlocale() is tied to environment variables. That's what was at the origin of #12699 My last remark is about the second bit. Maybe should I start a new issue for this? -- title: 3.x locale does not default to C,contrary to the documentation and to 2.x behavior - 3.x locale does not default to C, contrary to the documentation and to 2.x behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6203 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: BTW I just tested on PyPy. The following program: import logging.config import sys d = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'console': { 'level': 'DEBUG', 'class': 'logging.StreamHandler', 'stream': 'ext://sys.stdout', } }, 'root': { 'level': 'DEBUG', } } logging.config.dictConfig(d) logging.debug('%s', sys.version) prints: vinay@eta-natty:~/projects/scratch$ python dctest.py DEBUG:root:2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) [GCC 4.5.2] vinay@eta-natty:~/projects/scratch$ ~/pypy-c-jit-43780-b590cf6de419-linux/bin/pypy dctest.py DEBUG:root:2.7.1 (b590cf6de419, Apr 30 2011, 02:00:38) [PyPy 1.5.0-alpha0 with GCC 4.4.3] -- status: pending - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12687] Python 3.2 fails to load protocol 0 pickle
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Added file: http://bugs.python.org/file22876/fac0421cb7b2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9528] Add pure Python implementation of time module to CPython
STINNER Victor victor.stin...@haypocalc.com added the comment: @alanjds: Why do you add Python 2.7 version to this issue? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9528] Add pure Python implementation of time module to CPython
Brett Cannon br...@python.org added the comment: @Victor it doesn't really matter why since it is an incorrect classification. This issue in no way involves Python 2.7 since we will not backport any modules to Python 2.7. -- versions: +Python 3.3 -Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12715] Add symlink support to shutil functions
Hynek Schlawack h...@ox.cx added the comment: JFTR, my implementation is ready, but I can't/don't want to start writing tests, as long as #12721 is open. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12715 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9528] Add pure Python implementation of time module to CPython
Alan Justino alan.just...@yahoo.com.br added the comment: @haypo: Because it affects version 2.7 too. @Victor: Even since we will not backport any modules to Python 2.7, is not worth to sign that this affects it too? Even wontfix or rejected, it affects, does not? Have I made something wrong? Sorry to be so newbie about this. Long explanation: Is not easy to change/extend datetime, as stated by several other before. Searching the bugs for 2.x only does not shows that someone else already care about this issue AND that it exists at 2.x too. I am getting a hard time trying to do some BDD with c-based datetime because I cannot mock it easily to force datetime.datetime.now() to return a desired value, making almost impossible to test time-based code, like the accounting system that I am refactoring right now. Another solution would be to open C-based classes to allow modification, that is not planned to be into near future Python versions AFAIK. I came to fill a new bug with all this, but then found this one that is already mature enough, with even BDFL and python-dev opinion. Then my (maybe pointless) plan was to gather more arguments favor to change into python-based datetime, but you replied first... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9528] Add pure Python implementation of time module to CPython
Alan Justino alan.just...@yahoo.com.br added the comment: (noticed a typo at the start of my last msg: @Victor should be @brett.cannon) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator
Александр alexandr.s@gmail.com added the comment: As I understand, you created importer as a class attribute, so we can opportunity set import function to importer when inheritance new class from BaseConfigurator(# We might want to use a different one, e.g. importlib)? As example importer = import_module # from importlib. 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? You true. rpdb2 create wrapper for __import__ and self.importer not work such __builtin__ __import__ ps. Sorry for bad english, it is't primary language. -- status: pending - open Added file: http://bugs.python.org/file22877/test_logging.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9528] Add pure Python implementation of time module to CPython
Marc-Andre Lemburg m...@egenix.com added the comment: Alan Justino wrote: I am getting a hard time trying to do some BDD with c-based datetime because I cannot mock it easily to force datetime.datetime.now() to return a desired value, making almost impossible to test time-based code, like the accounting system that I am refactoring right now. It's usually better to use a central helper get_current_time() in the application, than to use datetime.now() and others directly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9528 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8713] multiprocessing needs option to eschew fork() under Linux
Changes by Matt M numbernine.pyt...@complexnumber.net: -- nosy: +numbernine ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8713 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10588] imp.find_module raises unexpected SyntaxError
Changes by Andreas Stührk andy-pyt...@hammerhartes.de: -- nosy: +Trundle ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12718] Logical mistake of importer method in logging.config.BaseConfigurator
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: Okay, the problem occurs because builtin functions and Python functions are handled differently. This is how you need to set a Python importer: vinay@eta-natty:~$ python Python 2.7.1+ (r271:86832, Apr 11 2011, 18:05:24) [GCC 4.5.2] on linux2 Type help, copyright, credits or license for more information. import logging.config BC = logging.config.BaseConfigurator from importlib import import_module class CC(BC): ... importer = staticmethod(import_module) ... CC.importer function import_module at 0xb746db54 CC.importer('pickle') module 'pickle' from '/usr/lib/python2.7/pickle.pyc' CC({}).importer('pickle') module 'pickle' from '/usr/lib/python2.7/pickle.pyc' I will update the documentation to indicate this, but I don't think a change to logging.config is needed. -- status: open - pending ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12718 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12608] crash in PyAST_Compile when running Python code
Meador Inge mead...@gmail.com added the comment: OK, I am marking this as fixed then. If someone decides to fix this in 3.2 or 3.7, then they can reopen the issue. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12608 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4841] io's close() not handling errors correctly
Changes by Meador Inge mead...@gmail.com: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4841 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10588] imp.find_module raises unexpected SyntaxError
Benjamin Peterson benja...@python.org added the comment: The reason for this is that file_module tries to detect the encoding of the file to set the encoding for the opened file. IMO, it should just return a file in binary mode. -- nosy: +benjamin.peterson, haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10588 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12613] itertools fixer fails
Changes by Meador Inge mead...@gmail.com: -- nosy: +meador.inge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12687] Python 3.2 fails to load protocol 0 pickle
Antoine Pitrou pit...@free.fr added the comment: First, the patch calls PyOS_strtol while a Py_ssize_t should be decodable. However, the dump phase (in memo_put) coerces the memo size to long as well, so this shouldn't be a problem in real life. Second, the patch needs a test. Also, please click on the resolution link for meaning of the various possible values. Accepted is only to be used when something has been positively reviewed. -- resolution: accepted - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12687] Python 3.2 fails to load protocol 0 pickle
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment: I can add a test, using the data attached to the ticket, but like the marshal case we discussed before, it might be several KB of data, which I would incorporate into the tests using a similar approach to the one I used for marshal. (This data has been shrunk from a much larger data set, but I can't easily make it any smaller.) I've no idea why I changed the resolution, I don't normally do this. Probably a case of brain-fade :-( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12687 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12724] Add Py_RETURN_NOTIMPLEMENTED
New submission from Brian Curtin br...@python.org: Would anyone be opposed to adding the following simple macro, which would be the same as the one we have for Py_RETURN_NONE. I recently found myself doing the Py_INCREF/return dance several times and ended up leaving an incref out in a few spots, which the macro form nicely handles. diff --git a/Include/object.h b/Include/object.h --- a/Include/object.h +++ b/Include/object.h @@ -792,6 +792,10 @@ PyAPI_DATA(PyObject) _Py_NotImplementedStruct; /* Don't use this directly */ #define Py_NotImplemented (_Py_NotImplementedStruct) +/* Macro for returning Py_NotImplemented from a function */ +#define Py_RETURN_NOTIMPLEMENTED \ +return Py_INCREF(Py_NotImplemented), Py_NotImplemented + /* Rich comparison opcodes */ #define Py_LT 0 #define Py_LE 1 If this is fine, I can also take care of making the replacements, of which there are apparently 55. -- assignee: brian.curtin components: None keywords: needs review, patch messages: 141886 nosy: brian.curtin priority: normal severity: normal stage: patch review status: open title: Add Py_RETURN_NOTIMPLEMENTED type: feature request versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12724 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12723] tkSimpleDialog.askstring shouldn't allow empty string input
R. David Murray rdmur...@bitdance.com added the comment: But what if the empty string is valid input? This change would be backward incompatible. I think this should instead be a feature request for exposing _QueryDialog so that you can subclass it and provide your own getresult function. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12723 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12724] Add Py_RETURN_NOTIMPLEMENTED
Benjamin Peterson benja...@python.org added the comment: +1 -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12724 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue10087] HTML calendar is broken
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 9fc7ef60ea06 by Senthil Kumaran in branch '3.2': Fix closes Issue10087 - fixing the output of calendar display in the html format. Patch by Chris Lambacher. Test Contributed by catherine. http://hg.python.org/cpython/rev/9fc7ef60ea06 New changeset 23316468ed4f by Senthil Kumaran in branch '3.2': News item for Issue10087. http://hg.python.org/cpython/rev/23316468ed4f -- nosy: +python-dev resolution: - fixed stage: test needed - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10087 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6203] 3.x locale does not default to C, contrary to the documentation and to 2.x behavior
R. David Murray rdmur...@bitdance.com added the comment: Yes a new issue would be more appropriate. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6203 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12724] Add Py_RETURN_NOTIMPLEMENTED
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset 77a65b078852 by Brian Curtin in branch 'default': Add Py_RETURN_NOTIMPLEMENTED macro. Fixes #12724. http://hg.python.org/cpython/rev/77a65b078852 New changeset d0b0fcbb40db by Brian Curtin in branch 'default': Replace Py_NotImplemented returns with the macro form Py_RETURN_NOTIMPLEMENTED. http://hg.python.org/cpython/rev/d0b0fcbb40db New changeset 3a6782f2a4a8 by Brian Curtin in branch 'default': News item for #12724 http://hg.python.org/cpython/rev/3a6782f2a4a8 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12724 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12724] Add Py_RETURN_NOTIMPLEMENTED
Changes by Brian Curtin br...@python.org: -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12724 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12725] Docs: Odd phrase floating seconds in socket.html
New submission from Cris Simpson cri...@gmail.com: In http://docs.python.org/library/socket.html, the description for socket.setdefaulttimeout(timeout) reads: Set the default timeout in *floating seconds* for new socket objects. [occurs two other times on that page] floating seconds is a confusing construction. Suggestion: float expressing seconds as per socket.settimeout(value) or seconds (float). -- assignee: docs@python components: Documentation messages: 141892 nosy: Cris.Simpson, docs@python priority: normal severity: normal status: open title: Docs: Odd phrase floating seconds in socket.html versions: Python 2.6, Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12725 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12613] itertools fixer fails
Meador Inge mead...@gmail.com added the comment: I see two problems that cause the posted test cases to fail: 1. The 'next' fixer runs before the 'itertools' fixer and strips out a 'power' node. This keeps the 'itertools' fixer from matching. 2. The 'itertools' fixer does not handle any 'trailer' nodes after the itertool function application it is transforming. I have fixed both of these issues in the attached patch. Full test suite run; no regressions. -- keywords: +patch stage: needs patch - patch review type: - behavior Added file: http://bugs.python.org/file22878/issue12613.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12613 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com