[issue8288] zipfile module documentation misprint
Georg Brandl ge...@python.org added the comment: In 2.x, the method is really called next(). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8288 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8298] in what way we have to save tha module?
Eric Smith e...@trueblade.com added the comment: Hi. Please don't use the bug tracker to ask Python questions. You've already been asked twice to refer to http://www.python.org/about/help/#got-a-python-problem-or-question . Please read and follow those instructions. Your questions have not been about bugs in Python, so this is not the correct place to ask them. -- nosy: +eric.smith resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8298 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1086642] Compile of _socket fails on IRIX with 2.4
Changes by Georg Brandl ge...@python.org: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1086642 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1542308] Nested finally in generators don't follow PEP 342
Changes by Georg Brandl ge...@python.org: -- status: open - languishing ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1542308 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1518617] PEP101/102 out of date
Georg Brandl ge...@python.org added the comment: PEP 101 is up to date. I don't know about 102, it should probably be withdrawn, as 101 has all the info. -- status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1518617 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1944] Documentation for PyUnicode_AsString (et al.) missing.
Changes by Georg Brandl ge...@python.org: -- assignee: - georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1944 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8297] AttributeError message text should include module name
Ray.Allen ysj@gmail.com added the comment: Yes, I agree with this feature request. And also the super(Class, obj) call should return a reasonable AttributeError message when the requested attribute is not found in one of Class's base classes, not just 'super' object has no attribute 'xxx'. -- nosy: +ysj.ray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8227] Fix C API documentation: Argument parsing
STINNER Victor victor.stin...@haypocalc.com added the comment: Commited: r79654 (trunk), r79655 (2.7), blocked in py3k and 3.1 (see #8215 and #2322) -- resolution: accepted - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8227 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8297] AttributeError message text should include module name
Ray.Allen ysj@gmail.com added the comment: In fact, there are only three types of tp_getattro functions: 1.For type objects, it is type_getattro(), in case of AttributeError, this function give the message format: type object %(type)s has no attribute %(attr)s 2.For super objects, it is super_getattro(), in case of no attribute found in one of its base class, it calls the 3'th getattr function below. 3.For the base type 'object' and other new style class, it is PyObject_GenericGetAttr(), and in case of AttributeError, this function give the message format: %(type)s object has no attribute %(attr)s So, there are only tow formats of AttributeError's exception messages: 1.type object %(type)s has no attribute %(attr)s 2.%(type)s object has no attribute %(attr)s The first one is for type objects, the second one is for all the instances objects. In most cases, these tow formats it is enough for program to display, bu t it is not well enough. Take the module objects for example, in case of AttributeError, we will always hope to know exactly which module has no attribute, not only the message: 'module object has attribute xxx'. Also for the super() call, take super(A, b).xxx() for example, if the attribute is not found in the class next to the A in b's type's mro list, PyObject_GenericGetAttr() will be called with the two arguments, the super object its self and 'xxx'. But there are only few valid attributes of a super object, like '__thisclass__', '__self__', '__self_class__'. In most cases, we don't need these attributes of a super object, what we need is the attribute of one of b's type's base types. So I think once the AttributeError is raised in PyObject_GenericGetAttr() call in the end of super_getattro(), the exception message should tell us in which base class python can not found the attribte 'xxx', but not the super object itself, although the exception is raised in the PyObject_GenericGetAttr(super obj, 'xxx'). For the solution, I think the type_getattro and super_getattro can just return NULL to indicate the attribute is not found, but for a wrapper function of this tow which is the tp_getattro for each type to raise the attribute error, with the reasonable exception message. For example, mudule type can tell which module has no attribute, super type can tell which base class has no attribute, and so on. What about others' opinion? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1501108] Add write buffering to gzip
Charles-Francois Natali neolo...@free.fr added the comment: In the test script, simply changing def emit(f, data=snips): for datum in data: f.write(datum) to def gemit(f, data=snips): datas = ''.join(data) f.write(datas) improves direct gzip performance from [1.1799781322479248, 0.50524115562438965, 0.2713780403137207] [1.183434009552002, 0.50997591018676758, 0.26801109313964844] [1.173914909362793, 0.51325297355651855, 0.26233196258544922] to [0.43065404891967773, 0.50007486343383789, 0.26698708534240723] [0.43662095069885254, 0.49983596801757812, 0.2686460018157959] [0.43778109550476074, 0.50057196617126465, 0.2687230110168457] which means that you're better off letting the application handle buffering issues. Furthermore, the problem with gzip-level buffering is the choice of the default buffer size. Time to close ? -- nosy: +neologix ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1501108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
New submission from Kristján Valur Jónsson krist...@ccpgames.com: This patch does several things: 1) Creates a separate lock type PyThread_type_gil and locking functions for that. This allows tweaking of the GIL without affecting regular lock behaviour. 2) Creates a uniform implementation of the GIL on windows/pthreads using macros, with emulated condition variables on windows (Lifted Antoine's code from py3k, adding own improvements to the slightly problematic windows implementation). This makes the GIL behave the same on windows and pthreads platforms, if we so choose, and allows cross-platform development. 3) provide three GIL implementations: a) legacy gil, which is the same as the one used on pthreads b) a roundrobin gil, which fixes the multicore problem on pthreads and exhibits the same behaviour as the legacy GIL on windows did (no jumping the gil queue) c) a priority based gil, with n given priority levels, and optionally, the ability to request immediate GIL drop by the ceval.c loop. See thread_gil.h for details of the three modes. In my experiments using David Beazley's scripts from http://www.dabeaz.com/blog/dablog.html, implementation b fixed the performance problems encountered on multicore machines. This is, I believe, the original impetus for Antoine Pitrou's work on the new GIL. Implementation c improved data transfer still, by allowing faster wakeup of completed IO. Please note that I was not able to test this patch on a pthreads machine, I can only hope that it compiles :) -- components: Interpreter Core files: gil.patch keywords: patch, patch messages: 102234 nosy: beazley, krisvale, pitrou severity: normal status: open title: Improve GIL in 2.7 type: performance versions: Python 2.7 Added file: http://bugs.python.org/file16744/gil.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
Martin v. Löwis mar...@v.loewis.de added the comment: I think this is too late for 2.7. 2.7b1 will be released RSN, and we should not implement such a change after the first beta release. -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7559] TestLoader.loadTestsFromName swallows import errors
Chris Jerdonek chris.jerdo...@gmail.com added the comment: I think in both cases the error text should state not just what module was being imported but also what module was being imported from FYI, I filed the following report partly in response to some of the comments I made above: http://bugs.python.org/issue8297 (regarding the AttributeError not displaying the name of the module from which the caller is trying to get the attribute) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7559 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8279] python-gdb PyListTests fail
Martin v. Löwis mar...@v.loewis.de added the comment: I still get failures, after applying file16727. I'm attaching the complete regrtest output. -- versions: +Python 2.7 Added file: http://bugs.python.org/file16745/failures ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8279 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8294] Allow Fraction constructor to accept float and decimal instances directly.
Mark Dickinson dicki...@gmail.com added the comment: Merged to py3k in r79670. -- stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8294 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
Marc-Andre Lemburg m...@egenix.com added the comment: Ezio Melotti wrote: Ezio Melotti ezio.melo...@gmail.com added the comment: Here's a new patch. Should be complete but I want to test it some more before committing. I decided to follow RFC 3629, putting 0 instead of 5/6 for bytes in range F5-FD (we can always put them back in the unlikely case that the Unicode Consortium changed its mind) and also for other invalid ranges (e.g. C0-C1). This lead to some simplification in the code. Ok. I also found out that, according to RFC 3629, surrogates are considered invalid and they can't be encoded/decoded, but the UTF-8 codec actually does it. I included tests and fix but I left them commented out because this is out of the scope of this patch, and it probably need a discussion on python-dev. Right, but that idea is controversial. In Python we need to be able to put those surrogate code points into source code (encoded as UTF-8) as well as pickle and marshal dumps of Unicode object dumps, so we can't consider them invalid UTF-8. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7279] decimal.py: == and != comparisons involving NaNs
Mark Dickinson dicki...@gmail.com added the comment: r79588 and r79589 were merged to py3k in r79668. -- resolution: invalid - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7279 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1023290] Conversion of longs to bytes and vice-versa.
Mark Dickinson dicki...@gmail.com added the comment: Closing this; it's too late for Python 2.7. -- status: open - closed versions: -Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1023290 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2531] float compared to decimal is silently incorrect.
Mark Dickinson dicki...@gmail.com added the comment: Merged to py3k in r79668. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2531 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2799] Remove _PyUnicode_AsString(), rework _PyUnicode_AsStringAndSize(), add PyUnicode_AsChar()
Marc-Andre Lemburg m...@egenix.com added the comment: Updating the ticket title to what we actually have in SVN (I had renamed the APIs to mark them as private to the interpreter some time ago). -- title: Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() - Remove _PyUnicode_AsString(), rework _PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2799 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1530559] struct.pack raises TypeError where it used to convert
Mark Dickinson dicki...@gmail.com added the comment: Closing this; a separate feature request should be opened for the idea of adding __index__ awareness to struct.pack in py3k. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1530559 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8300] Allow struct.pack to handle objects with an __index__ method.
New submission from Mark Dickinson dicki...@gmail.com: In Python 2.7, struct.pack with an integer format can handle non-integers that provide an __int__ method (although this *does* raise a DeprecationWarning). Python 2.7a4+ (trunk:79659:79661, Apr 3 2010, 11:28:19) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type help, copyright, credits or license for more information. from struct import pack [35194 refs] pack('L', 3.1415) '\x03\x00\x00\x00\x00\x00\x00\x00' [35210 refs] This behaviour isn't particularly desirable for floats or Decimal instances, but it's useful for integer-like objects. In Python 3.x, there's no provision for handling integer-like objects than aren't actually integers. I propose that in 3.x, struct.pack should try to convert any non-integer to an integer by using its __index__ method, before packing. -- assignee: mark.dickinson messages: 102245 nosy: mark.dickinson severity: normal status: open title: Allow struct.pack to handle objects with an __index__ method. versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8300] Allow struct.pack to handle objects with an __index__ method.
Changes by Mark Dickinson dicki...@gmail.com: -- components: +Extension Modules stage: - test needed type: - feature request ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1530559] struct.pack raises TypeError where it used to convert
Mark Dickinson dicki...@gmail.com added the comment: I've opened issue 8300 for adding the __index__ handling. -- superseder: - Allow struct.pack to handle objects with an __index__ method. ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1530559 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements
Michel Samia m.sa...@seznam.cz added the comment: Could you please apply that patch? People are starting to use non-standard libraries to process xml files because of this issue for example this man is using lxml or pyxml: http://ronrothman.com/public/leftbraned/xml-dom-minidom-toprettyxml-and-silly-whitespace/ Is there any problem with that patch? -- nosy: +m-samia ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4147 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
David Beazley d...@dabeaz.com added the comment: Without looking at this patch, I think it would wise to proceed with caution on incorporating any kind of GIL patch into 2.X. If there is anything to be taken away from my own working studying the GIL, it's that the problem is far more tricky than it looks and that any kind of fix has the potential to adversely affect something that you might not expect. That said, I would only suggest that any kind of new gil incorporated in 2.X be disabled by default and enabled with special configuration options for those who want to try it out. -- nosy: +dabeaz ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1501108] Add write buffering to gzip
Lukas Lueg knabberknusperh...@yahoo.de added the comment: agreed -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1501108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Martin: Well, this patch was originally conceived more as a demonstration of the GIL problem and an alternative fix proposal. However, it is possible to configure it so that there is no change from existing functionality, simply by not including thread_gil.h in thread_pthread.h and thread_nt.h. The only change would then be the presence of the new PyThread_type_gil and associating locking functions which delegate directly to the old PyThread_type_lock functions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8292] Incorrect condition test in platform.py
Marc-Andre Lemburg m...@egenix.com added the comment: A.M. Kuchling wrote: New submission from A.M. Kuchling li...@amk.ca: While looking at #4440, I grepped for similar problems and found one in platform.py in the following line: if no_os_uname or not filter(None, (system, node, release, version, machine)) In 3.x, filter() returns an object, not a list, so 'not filter()' will always be false. One fix is to either convert filter's output by adding list() or tuple(). Another fix could be 'not any ((system, node, release, version, machine))', but I don't know if platform.py is trying to stay compatible with versions of Python that lack any(). I'm trying to keep platform.py compatible with all Python versions since 2.3, so using the list() wrapper appears to be the better solution. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8292 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
Kristján Valur Jónsson krist...@ccpgames.com added the comment: Antoine: Please take a look, the change is really simple, particularly the ROUNDROBIN_GIL variant which fixes the originally observed problem. the GIL is still a lock, implemented using a mutex and a semaphore. It is modified to work exactly as the lock always has done on windows (which is why the original problem isn't present on that platform). The simplicity of the change stems from the fact that the gil is still just a mutex-type object, which is aqcuired and released just as it has always been. The change is in the internal rules of the mutex, making sure that threads queue up properly and (optionally) that they are released in a priority based order. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1501108] Add write buffering to gzip
Antoine Pitrou pit...@free.fr added the comment: Additionally, since issue7471 was fixed, you should be able to wrap a GzipFile in a Buffered{Reader,Writer} object for faster buffering. -- resolution: - out of date status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1501108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
David Beazley d...@dabeaz.com added the comment: I'm not sure where you're getting your information, but the original GIL problem *DEFINITELY* exists on multicore Windows machines. I've had numerous participants try it in training classes and workshops they've all observed severely degraded performance for CPU-bound threads on Windows (XP, Vista, and Windows 7). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
David Beazley d...@dabeaz.com added the comment: Just ran the CPU-bound GIL test on my wife's dual core Windows Vista machine. The code runs twice as slow using two threads as it does using no threads (original observed behavior in my GIL talk). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
Antoine Pitrou pit...@free.fr added the comment: Kristjan, I agree with Martin, it's probably too late to make such changes for 2.7. Additionally, your round-robin scheme only seems round-robin when there are two threads competing. Otherwise, you could have three threads A, B and C, and the GIL bouncing between A and B. I would advocate opening a separate issue to improve the Windows condition variable code under 3.x. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8300] Allow struct.pack to handle objects with an __index__ method.
Mark Dickinson dicki...@gmail.com added the comment: Here's a patch for trunk. It combines the docs and tests from Meador Inge's patch in issue 1530559 with a C-level change to get_pylong in Modules/struct.c. -- keywords: +patch versions: +Python 2.7 Added file: http://bugs.python.org/file16746/struct_index_trunk.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8300] Allow struct.pack to handle objects with an __index__ method.
Mark Dickinson dicki...@gmail.com added the comment: Adding Meador Inge to nosy. -- nosy: +minge ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8301] Putting a function in a unittest.TestSuite doesn't work
New submission from Michael Foord mich...@voidspace.org.uk: Putting functions (rather than TestCase instances) directly in TestSuites was never officially supported but it used to work: from unittest import TestSuite, TestResult def f(): pass ... s = TestSuite() s.addTest(f) s.run(TestResult()) Traceback (most recent call last): File stdin, line 1, in module File /compile/python-trunk/Lib/unittest/suite.py, line 85, in run self._wrapped_run(result) File /compile/python-trunk/Lib/unittest/suite.py, line 100, in _wrapped_run self._handleClassSetUp(test, result) File /compile/python-trunk/Lib/unittest/suite.py, line 122, in _handleClassSetUp currentClass._classSetupFailed = False TypeError: can't set attributes of built-in/extension type 'function' -- assignee: michael.foord components: Library (Lib) messages: 102259 nosy: michael.foord severity: normal stage: needs patch status: open title: Putting a function in a unittest.TestSuite doesn't work type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8301 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8302] SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip
New submission from Michael Foord mich...@voidspace.org.uk: SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip. -- assignee: michael.foord messages: 102260 nosy: michael.foord severity: normal stage: needs patch status: open title: SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip type: behavior versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8302 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1441530] socket read() can cause MemoryError in Windows
Charles-Francois Natali neolo...@free.fr added the comment: $ cat /tmp/test.py import socket SIZE = 10L s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: s.recv(SIZE) finally: s.close() $ python /tmp/test.py Traceback (most recent call last): File /tmp/test.py, line 8, in module s.recv(SIZE) MemoryError $ strace python /tmp/test.py [...] socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 mmap2(NULL, 101536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) brk(0x4440c000) = 0x8a56000 mmap2(NULL, 1000132608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0xb79b1000 munmap(0xb79b1000, 323584) = 0 munmap(0xb7b0, 724992) = 0 mprotect(0xb7a0, 135168, PROT_READ|PROT_WRITE) = 0 mmap2(NULL, 101536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) [...] imaplib is simply requesting too much at a time: the memory error is probably raised in Modules/socketmodule.c:sock_recv /* Allocate a new string. */ buf = PyString_FromStringAndSize((char *) 0, recvlen); if (buf == NULL) return NULL; Requesting a 10M read is indeed quite questionable, and will fail no matter what system is used (the limit will depend on the heap usage and OS, though). The fix should be made at imaplib level, rather than requiring users to redefine IMAP4 read method. A patch is attached (imaplib_read.diff). -- keywords: +patch nosy: +neologix Added file: http://bugs.python.org/file16747/imaplib_read.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1441530 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1222585] C++ compilation support for distutils
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: Removed file: http://bugs.python.org/file16519/python-distutils-C++.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1222585 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8300] Allow struct.pack to handle objects with an __index__ method.
Mark Dickinson dicki...@gmail.com added the comment: That patch was a bit hasty in many respects; here's a better one. For 2.7, the scheme is as follows: when packing a non-integer with an integer format: (1) First __index__ is tried (2) If the __index__ method doesn't exist, or the call to __index__ raises TypeError, then the __int__ method is tried. (3) If the __index__ method raises something other than TypeError, or returns a non-integer, then struct.pack fails. -- Added file: http://bugs.python.org/file16748/struct_index_trunk2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8300] Allow struct.pack to handle objects with an __index__ method.
Changes by Mark Dickinson dicki...@gmail.com: -- priority: - normal stage: test needed - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8300] Allow struct.pack to handle objects with an __index__ method.
Mark Dickinson dicki...@gmail.com added the comment: Committed this patch to trunk in r79674. Will forward port to py3k. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4256] optparse: provide a simple way to get a programmatically useful list of options
Andy Buckley a...@insectnation.org added the comment: That sort of idea, yes: just a wild thought, but it would be really nice if this was available so that in combination with a standard bash/zsh function, getting basic automatic command completion for scripts built with optparse (and any other implementer of such a scheme) was as simple as adding complete -F _optparse -o default mycmdname to the completion script library. The simple scheme you laid out seems fine to me, but in the best bikeshedding tradition it would be useful to distinguish between options which take an argument and those which don't, pre-empt the need for a format version, and make the parsing even easier by removing cosmetic whitespace, commas etc.: grusz...@gruszczy-laptop:~/Programs/logbuilder$ ./logbuilder --help-options #OPTPARSE_FORMAT 0 --version -h --help -r= --regexp= -c= --contains= -s= --start= -e= --end= -f= --file= -t= --template= -p= --purge= Maybe this is just a pipe-dream, but the need to hand-write basic completion scripts seems so unnecessary, just for lack of any (even de-facto) standardisation. As optparse already enforces/encourages many good habits and conventions, some system like this would further help the integration with shell completion. Or maybe the existing --help output is good enough for a rather more fiddly standard bash completion parsing function. I've tried writing one of these, but it would hard for it be generally robust since the descriptive strings can contain any structure that they feel like, and could hence mess up the pattern-matching. I'm very happy if someone can out-sed me and make that work! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0
STINNER Victor victor.stin...@haypocalc.com added the comment: I also found out that, according to RFC 3629, surrogates are considered invalid and they can't be encoded/decoded, but the UTF-8 codec actually does it. Python2 does, but Python3 raises an error. Python 2.7a4+ (trunk:79675, Apr 3 2010, 16:11:36) u\uDC80.encode(utf8) '\xed\xb2\x80' Python 3.2a0 (py3k:79441, Mar 26 2010, 13:04:55) \uDC80.encode(utf8) UnicodeEncodeError: 'utf-8' codec can't encode character '\udc80' in position 0: surrogates not allowed Deny encoding surrogates (in utf8) causes a lot of crashs in Python3, because most functions calling suppose that _PyUnicode_AsString() does never fail: see #6687 (and #8195 and a lot of other crashs). It's not a good idea to change it in Python 2.7, because it would require a huge work and we are close to the first beta of 2.7. -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8271 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8215] getargs.c in Python3 contains some TODO and the documentation is outdated
STINNER Victor victor.stin...@haypocalc.com added the comment: The PEP 3118 describes some points about discontigious buffers, but there is no module nor third party libraries supporting them. PIL 1.1.7 (the last version) doesn't support the buffer API (an image can not be exported as a buffer, but PIL accepts a buffer as input in some functions). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8215 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8303] python -m unittest -h and python -m unittest discover -h message slightly incorrect
New submission from Michael Foord mich...@voidspace.org.uk: The usage messages for unittest from the command line are slightly incorrect. They show: Usage: unittest [options] when it should be Usage: python -m unittest [options] (or even python -m unittest discover). -- assignee: michael.foord messages: 102267 nosy: michael.foord severity: normal status: open title: python -m unittest -h and python -m unittest discover -h message slightly incorrect versions: Python 2.7, Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8303] python -m unittest -h and python -m unittest discover -h message slightly incorrect
Michael Foord mich...@voidspace.org.uk added the comment: In TestProgram.usageExit the command name comes from: self.progName = os.path.basename(argv[0]) For test discovery the usage message is auto-generated by optparse. Probably using sys.argv[0]. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8303 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8304] strftime and Unicode characters
New submission from AndiDog andi...@web.de: There is inconsistent behavior in time.strftime, comparing Python 2.6 and 3.1. In 3.1, non-ASCII Unicode characters seem to get dropped whereas in 2.6 you can keep them using the necessary Unicode-to-UTF8 workaround. This should be fixed if it isn't intended behavior. Python 2.6 time.strftime(u%d\u200F%A.encode(utf-8), time.gmtime()).decode(utf-8) u'03\u200fSaturday' time.strftime(u%d\u0041%A.encode(utf-8), time.gmtime()).decode(utf-8) u'03ASaturday' Python 3.1 time.strftime(%d\u200F%A, time.gmtime()) '' len(time.strftime(%d\u200F%A, time.gmtime())) 0 time.strftime(%d\u0041%A, time.gmtime()) '03ASaturday' -- components: Library (Lib), Unicode messages: 102269 nosy: AndiDog severity: normal status: open title: strftime and Unicode characters type: behavior versions: Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8304 ___ ___ 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
New submission from STINNER Victor victor.stin...@haypocalc.com: memory_item() function creates a new memoryview object if ndim is different than 1. Example with numpy: 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] print type(view2) Result: type 'memoryview'. (Without the shape, ndim equals 1, and view2 is a standard str object.) The problem is that view attribute of the view2 (PyMemoryViewObject) is not initialized. Extract of memory_item(): /* Return a new memory-view object */ Py_buffer newview; memset(newview, 0, sizeof(newview)); /* XXX: This needs to be fixed so it actually returns a sub-view */ return PyMemoryView_FromBuffer(newview); This needs to be fixed :-/ -- view2 is not initialized and so view2.tolist() does crash. -- messages: 102270 nosy: haypo severity: normal status: open title: memoview[0] creates an invalid view if ndim != 1 versions: Python 2.7, Python 3.1, Python 3.2 ___ 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
[issue8305] memoview[0] creates an invalid view if ndim != 1
STINNER Victor victor.stin...@haypocalc.com added the comment: Full example (using numpy) crashing Python: memoryview_crash.py -- Added file: http://bugs.python.org/file16749/memoryview_crash.py ___ 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
[issue8305] memoview[0] creates an invalid view if ndim != 1
Changes by STINNER Victor victor.stin...@haypocalc.com: -- components: +Interpreter Core type: - crash ___ 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
[issue7723] sqlite only accept buffer() for BLOB objects (input/output)
Changes by Benjamin Peterson benja...@python.org: -- priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7723 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3928] os.mknod missing on Solaris
Benjamin Peterson benja...@python.org added the comment: I think this small change can slip in after beta. -- nosy: +benjamin.peterson priority: release blocker - deferred blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3928 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7319] Silence DeprecationWarning by default
Benjamin Peterson benja...@python.org added the comment: Lowering priority. -- priority: release blocker - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7319 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7092] Test suite emits many DeprecationWarnings when -3 is enabled
Changes by Benjamin Peterson benja...@python.org: -- priority: release blocker - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7092 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7755] copyright clarification for audiotest.au
Benjamin Peterson benja...@python.org added the comment: Lowering priority. -- nosy: +benjamin.peterson priority: release blocker - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7755 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3778] python uninstaller leave registry entries
Martin v. Löwis mar...@v.loewis.de added the comment: I think Installer has features to remove registry keys with no subkeys; we probably would need to declare that we create these keys, and then Installer might remove them automatically. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3778 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8279] python-gdb PyListTests fail
Dave Malcolm dmalc...@redhat.com added the comment: It looks like all of the failures were due to gdb.Frame not having a function method. I did some digging, and it appears that this attribute may not yet be in the upstream version of gdb. The gdb/python integration was largely implemented by colleagues of mine at Red Hat, and Fedora's build of gdb is closely tracking their work. It looks to me like only a subset of their work has been merged into upstream gdb so far. Specifically http://cvs.fedoraproject.org/viewvc/rpms/gdb/F-12/gdb-archer.patch?revision=1.40view=markup (warning: large) contains a hunk that applies to gdb/python/py-frame.c which adds frapy_function. So it appears that I've unwittingly coded this to a very recent pre-merge version of gdb. Sorry about this. What is the output of gdb --version on this machine? What happens if you run: $ gdb --batch --eval-command python print gdb.Frame.function --eval-command python print dir(gdb.Frame) For reference, on Fedora 12 I see: [da...@surprise ~]$ gdb --version GNU gdb (GDB) Fedora (7.0.1-33.fc12) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-redhat-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. [da...@surprise ~]$ gdb --batch --eval-command python print gdb.Frame.function --eval-command python print dir(gdb.Frame) method 'function' of 'gdb.Frame' objects ['__class__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'block', 'find_sal', 'function', 'is_valid', 'name', 'newer', 'older', 'pc', 'read_var', 'select', 'type', 'unwind_stop_reason'] On Fedora 13: [da...@f13 ~]$ gdb --version GNU gdb (GDB) Fedora (7.0.50.20100203-15.fc13) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later http://gnu.org/licenses/gpl.html This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type show copying and show warranty for details. This GDB was configured as x86_64-redhat-linux-gnu. For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/. [da...@f13 ~]$ gdb --batch --eval-command python print gdb.Frame.function --eval-command python print dir(gdb.Frame) method 'function' of 'gdb.Frame' objects ['__class__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'block', 'find_sal', 'function', 'is_valid', 'name', 'newer', 'older', 'pc', 'read_var', 'select', 'type', 'unwind_stop_reason'] The code works for me on both of these machines; all tests pass. Assuming that my analysis above is correct, then I'd expect other builds of gdb not to have the gdb.Frame.function method. This method is critical for the libpython.py:Frame class, and so without it the various extension commands aren't going to be usable. The pretty-printers ought to still work. The fix would be to detect the presence of gdb.Frame.function, and enable/disable the commands and their selftests accordingly, assuming that it's OK to add a conditional dependency on code that isn't merged into gdb's trunk yet. I'll do a patch for this. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8279 ___ ___ 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
STINNER Victor victor.stin...@haypocalc.com added the comment: I can try to cook up a patch fixing this. Did you wrote something? I don't see any patch attached to this issue :-/ -- nosy: +haypo ___ 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
[issue8305] memoview[0] creates an invalid view if ndim != 1
STINNER Victor victor.stin...@haypocalc.com added the comment: According to #2394, the implementation of the new buffer API is not complete. -- nosy: +teoliphant ___ 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
[issue8279] python-gdb PyListTests fail
Martin v. Löwis mar...@v.loewis.de added the comment: What is the output of gdb --version on this machine? GNU gdb (GDB) 7.0.1-debian This GDB was configured as x86_64-linux-gnu. The debian package is 7.0.1-2 $ gdb --batch --eval-command python print gdb.Frame.function --eval-command python print dir(gdb.Frame) Traceback (most recent call last): File string, line 1, in module AttributeError: type object 'gdb.Frame' has no attribute 'function' Error while executing Python code. ['__class__', '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'is_valid', 'name', 'newer', 'older', 'pc', 'read_var', 'type', 'unwind_stop_reason'] The fix would be to detect the presence of gdb.Frame.function, and enable/disable the commands and their selftests accordingly, assuming that it's OK to add a conditional dependency on code that isn't merged into gdb's trunk yet. That would be fine, I think. Please add a comment saying that gdb 7.0.1 didn't have this feature yet. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8279 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue6409] 2to3 -j 4 generates malformed diffs
Changes by STINNER Victor victor.stin...@haypocalc.com: -- title: 2to3 generates malformed diffs - 2to3 -j 4 generates malformed diffs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6409 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7696] Improve Memoryview/Buffer documentation
STINNER Victor victor.stin...@haypocalc.com added the comment: memoryview() function is not documented in library/functions.rst, whereas it's a builtin function. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8304] strftime and Unicode characters
Changes by Eric Smith e...@trueblade.com: -- nosy: +eric.smith ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4256] optparse: provide a simple way to get a programmatically useful list of options
Filip Gruszczyński grusz...@gmail.com added the comment: I'll take a look at optparse code and try to provide a patch. But first holidays must finish and I must come back to ma usual residence, where I have programming environment. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8108] test_ftplib fails with OpenSSL 0.9.8m
Changes by Benjamin Peterson benja...@python.org: -- priority: high - release blocker ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8306] ctypes.create_string_buffer should only accept bytes
New submission from Benjamin Peterson benja...@python.org: These coercions shouldn't be allowed: import ctypes buf = ctypes.create_string_buffer(hi) buf.value b'hi' buf.value = 23 buf.value b'23' -- assignee: theller components: ctypes messages: 102282 nosy: benjamin.peterson, theller severity: normal status: open title: ctypes.create_string_buffer should only accept bytes versions: Python 3.1, Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8306 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8032] Add gdb7 hooks to make it easier to debug Python
Benjamin Peterson benja...@python.org added the comment: Could I request that the python-gdb.py script not be put in the top level directory? It's a little annoying to have another executable script starting with python when you're trying to test the python executable. -- nosy: +benjamin.peterson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8032] Add gdb7 hooks to make it easier to debug Python
Martin v. Löwis mar...@v.loewis.de added the comment: That is tricky to do. gdb will consider it automatically only if it is called exename-gdb.py. I agree that there should be a better solution, though. David, is it possible to somehow hook this into .gdbinit, with an arbitrary path? Benjamin, would a .gdbinit in the top-level build directory still be annoying? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8032] Add gdb7 hooks to make it easier to debug Python
Jeffrey Yasskin jyass...@gmail.com added the comment: http://sourceware.org/gdb/current/onlinedocs/gdb/Auto_002dloading.html says If this file exists and is readable, gdb will evaluate it as a Python script. So maybe it doesn't need to be executable? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8032] Add gdb7 hooks to make it easier to debug Python
Benjamin Peterson benja...@python.org added the comment: 2010/4/3 Martin v. Löwis rep...@bugs.python.org: Benjamin, would a .gdbinit in the top-level build directory still be annoying? That would be fine with me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8218] Fix typos and phrasing in the Web servers howto
R. David Murray rdmur...@bitdance.com added the comment: I do know something about web development, so I did a more extensive edit. I'm not saying I've brought it completely up to date or fixed any inaccuracies, but I did change the tone here and there, tightened up a bunch of the language, clarified a few things, and updated a few statements. -- Added file: http://bugs.python.org/file16750/webservers_howto.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8218 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8032] Add gdb7 hooks to make it easier to debug Python
Martin v. Löwis mar...@v.loewis.de added the comment: I have now changed Makefile.pre.in to not install python-gdb.py as a script anymore; this seems to work fine. People will still need to remove there existing python-gdb.py (or make clean) to see this change. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8032 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7772] test_py3kwarn fails when running the whole test suite
Mark Dickinson dicki...@gmail.com added the comment: This still seems to be an issue for OS X. With the current trunk (r79716), I get: Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ ./python.exe -3 ./Lib/test/regrtest.py test_macostools test_py3kwarn test_macostools /Users/dickinsm/python/svn/trunk/Lib/importlib/__init__.py:37: DeprecationWarning: In 3.x, the MacOS module is removed. __import__(name) /Users/dickinsm/python/svn/trunk/Lib/test/test_macostools.py:10: DeprecationWarning: In 3.x, the Carbon package is removed. import Carbon.File /Users/dickinsm/python/svn/trunk/Lib/test/test_macostools.py:11: DeprecationWarning: In 3.x, the macostools module is removed. import macostools test_py3kwarn test test_py3kwarn failed -- Traceback (most recent call last): File /Users/dickinsm/python/svn/trunk/Lib/test/test_py3kwarn.py, line 387, in test_platform_specific_removals self.check_removal(module_name, optional=True) File /Users/dickinsm/python/svn/trunk/Lib/test/test_py3kwarn.py, line 376, in check_removal .format(module_name)) AssertionError: DeprecationWarning not raised for MacOS 1 test OK. 1 test failed: test_py3kwarn [40996 refs] -- nosy: +mark.dickinson status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
Torsten Landschoff t.landsch...@gmx.net added the comment: Silly question, I know, but why isn't the GIL just implemented as a lock of the host operating system? After all, we want mutual exclusion, I don't see why condition variables are required for this. I have to admin that I did not look at the source, so the reason might be documented there. -- nosy: +torsten ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8299] Improve GIL in 2.7
David Beazley d...@dabeaz.com added the comment: It's not a simple mutex because if you did that, you would have performance problems much worse than those described in issue 7946. http://bugs.python.org/issue7946 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8299 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8108] test_ftplib fails with OpenSSL 0.9.8m
Antoine Pitrou pit...@free.fr added the comment: I don't think this should be a release blocker for the beta, although I agree it should be one for the final release (and RCs). By the way, it doesn't affect maintenance branches. -- versions: -Python 2.6, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8108] test_ftplib fails with OpenSSL 0.9.8m
Antoine Pitrou pit...@free.fr added the comment: Giampaolo, which call exactly triggers the error: [Errno 0] Error? It doesn't seem it can be _sslobj.shutdown itself. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8108] test_ftplib fails with OpenSSL 0.9.8m
Changes by Benjamin Peterson benja...@python.org: -- priority: release blocker - critical ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8108 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
New submission from Mark Dickinson dicki...@gmail.com: I'm seeing a very peculiar test_pep263 failure when doing 'make test' on OS X 10.6.3. It's enough to run test___all__ and test_pep263, in that order: Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ ./python.exe -Wd -3 -E -tt ./Lib/test/regrtest.py test___all__ test_pep263 test___all__ /Users/dickinsm/python/svn/trunk/Lib/test/test___all__.py:3: DeprecationWarning: in 3.x, the bsddb module has been removed; please use the pybsddb project instead import bsddb /Users/dickinsm/python/svn/trunk/Lib/bsddb/__init__.py:67: PendingDeprecationWarning: The CObject type is marked Pending Deprecation in Python 2.7. Please use capsule objects instead. import _bsddb test_pep263 test test_pep263 failed -- Traceback (most recent call last): File /Users/dickinsm/python/svn/trunk/Lib/test/test_pep263.py, line 39, in test_issue7820 self.assertRaises(SyntaxError, eval, '\xff\x20') File /Users/dickinsm/python/svn/trunk/Lib/unittest/case.py, line 444, in assertRaises callableObj(*args, **kwargs) File string, line 1, in module NameError: name '?' is not defined 1 test OK. 1 test failed: test_pep263 [218378 refs] The failing test is expecting a SyntaxError, but gets a NameError instead. I've narrowed down the cause of the failure to a Tkinter import: Python 2.7a4+ (trunk:79716, Apr 3 2010, 20:30:09) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type help, copyright, credits or license for more information. eval('\xff\x20') Traceback (most recent call last): File stdin, line 1, in module File string, line 1 ? ^ SyntaxError: invalid syntax [35036 refs] import Tkinter [51314 refs] eval('\xff\x20') Traceback (most recent call last): File stdin, line 1, in module File string, line 1, in module NameError: name '?' is not defined [51324 refs] But I'm now mystified: why does the eval raise a SyntaxError before the import and a TypeError afterwards? -- messages: 102294 nosy: mark.dickinson severity: normal status: open title: test_pep263 failure on OS X versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
Mark Dickinson dicki...@gmail.com added the comment: That should be NameError in the last line of the previous message, not TypeError. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7696] Improve Memoryview/Buffer documentation
Antoine Pitrou pit...@free.fr added the comment: This is quite obscure because there's no definition of the buffer protocol. You can find it at http://www.python.org/dev/peps/pep-3118/#id5 (assuming it is not outdated) the memoryview.suboffsets attribute is not documented on the 6.10 memoryview Type page I don't know what it does. By the way, I don't really know how to do links and glossary entries. I suppose someone else knows (and enjoys) ReST formatting better than I do. -- assignee: pitrou - teoliphant nosy: +teoliphant ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7696] Improve Memoryview/Buffer documentation
Antoine Pitrou pit...@free.fr added the comment: memoryview() function is not documented in library/functions.rst You should look more carefully... See http://docs.python.org/dev/library/functions.html#max (I don't know why it doesn't have its own anchor, though) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7696 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8304] strftime and Unicode characters
Ezio Melotti ezio.melo...@gmail.com added the comment: This seems to be fixed now, on both 3.1 and 3.2. Can you try with 3.1.2 and see if it works? What operating system are you using? -- nosy: +ezio.melotti priority: - normal status: open - pending versions: -Python 2.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8208] test_issue7820 fails: name '?' is not defined
Ned Deily n...@acm.org added the comment: Duplicated in Issue8307 -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8208 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8208] test_issue7820 fails: name '?' is not defined
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - duplicate stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8208 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
Ezio Melotti ezio.melo...@gmail.com added the comment: See also #8208. -- components: +Tests nosy: +ezio.melotti, haypo, l0nwlf, ned.deily priority: - normal stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
Mark Dickinson dicki...@gmail.com added the comment: After some more digging, it looks as though this is due to the Tkinter import (that ends up happening as a result of test___all__) changing the locale(?), and in particular the meaning of isalpha: Python 2.7a4+ (trunk:79716, Apr 3 2010, 22:06:18) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type help, copyright, credits or license for more information. str.isalpha(chr(255)) False [34999 refs] import Tkinter [51283 refs] str.isalpha(chr(255)) True [51283 refs] (Is there some way that I can see the locale change more explicitly from Python?) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
Mark Dickinson dicki...@gmail.com added the comment: (Is there some way that I can see the locale change more explicitly from Python?) Found it. :) locale.nl_langinfo(locale.CODESET) 'US-ASCII' [40683 refs] import Tkinter [56953 refs] locale.nl_langinfo(locale.CODESET) 'UTF-8' [56953 refs] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8297] AttributeError message text should include module name
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - low stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8297 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
Ned Deily n...@acm.org added the comment: Or this: Python 2.7a4+ (trunk, Apr 3 2010, 15:18:51) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type help, copyright, credits or license for more information. import locale locale.getlocale() (None, None) import Tkinter locale.getlocale() ('en_US', 'UTF8') -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
Mark Dickinson dicki...@gmail.com added the comment: I realize that the above doesn't really explain why the NameError is occurring: Python's token recognition algorithm, in tok_get in tokenizer.c, uses isalpha, which is locale-aware. In particular, it seems that chr(255) is considered alphabetic in the UTF-8 codeset, and not in ASCII. Should this instance of isalpha be replaced by something that's not locale aware? I'm not sure what the rules are supposed to be in 2.x for recognising identifiers. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
Mark Dickinson dicki...@gmail.com added the comment: Ned: yes, that works too. Thanks! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4256] optparse: provide a simple way to get a programmatically useful list of options
R. David Murray rdmur...@bitdance.com added the comment: Please target argparse rather than optparse, or better yet in addition to optparse. And I'm +1 for making it easier to write completion scripts. -- nosy: +bethard, r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4256 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8308] raw_bytes.decode('cp932') -- spurious mappings
New submission from John Machin sjmac...@users.sourceforge.net: According to the following references, the bytes 80, A0, FD, FE, and FF are not defined in cp932: http://msdn.microsoft.com/en-au/goglobal/cc305152.aspx http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT http://demo.icu-project.org/icu-bin/convexp?conv=ibm-943_P15A-2003s=ALL However CPython 3.1.2 does this: print(ascii(b'\x80\xa0\xfd\xfe\xff'.decode('cp932'))) '\x80\uf8f0\uf8f1\uf8f2\uf8f3' (as do 2.5, 2.6. and 2.7 with the appropriate syntax) This maps 80 to U+0080 (not very useful) and maps the other 4 bytes into the Private Use Area (PUA)!! Each case should be treated as undefined/unexpected/error/... -- components: Unicode messages: 102308 nosy: sjmachin severity: normal status: open title: raw_bytes.decode('cp932') -- spurious mappings type: behavior versions: Python 2.7, Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8308 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8308] raw_bytes.decode('cp932') -- spurious mappings
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti priority: - normal stage: - test needed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8308 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8307] test_pep263 failure on OS X
Ned Deily n...@acm.org added the comment: Verified that r79725 fix to tokenizer.c prevents the original test failure. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8307 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8304] strftime and Unicode characters
Ezio Melotti ezio.melo...@gmail.com added the comment: Actually the bug seems related to Windows. -- components: +Windows nosy: +brian.curtin status: pending - open versions: +Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8304 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue8300] Allow struct.pack to handle objects with an __index__ method.
Meador Inge mead...@gmail.com added the comment: I may be missing something subtle, but how can 'PyNumber_Index(v) != NULL' *and* '!PyInt_Check(v) !PyLong_Check(v)' both be satisfied in the 'get_pylong' mods? It seems to me that 'PyNumber_Index' only returns non-NULL when the object being returned is an 'int' or 'long'. Attached a patch with the extra check removed and a few more test cases. -- Added file: http://bugs.python.org/file16751/struct_index_trunk3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8300 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com