[issue20518] Weird behavior with multiple inheritance when C classes involved
New submission from Martin Teichmann: Python behaves odd with regards to multiple inheritance and classes written in C. I stumbled over this problem while working with PyQt4, but soon realized that part of the problem is not actually in that library, but is deep down in the CPython core. For better understanding of this post, I still use PyQt4 as an example. For those who don't know PyQt4, it's an excellent Python binding for some C++ library, for this post you only need to know that QTimer is a class that inherits from QObject. The PyQt4 documentation repeatedly insists that it is not possible to inherit more than one of its classes. This is not astonishing, since this is actually a limitation of CPython. What should still be possible is to inherit from two classes if one is the parent of the other. Let me give an example: from PyQt4.QtCore import QObject, QTimer # QObject is the parent of QTimer class A(QObject): pass class B(A, QTimer): pass class C(QTimer, A): pass print(B.__base__, B.__mro__) print(C.__base__, C.__mro__) Both classes B and C technically inherit from both QObject and QTimer, but given that QTimer inherits from QObject, there is no actual multiple inheritance here, from the perspective of a class written in C. But now the problems start. The metaclass of PyQt4 uses the __base__ class attribute to find out which of its classes the new class actually decends from (this is called the best_base in typeobject.c). This is the correct behavior, this is exactly what __base__ is for. Lets see what it contains. For the class B, the second-to-last line prints: class '__main__.A' (class '__main__.B', class '__main__.A', class 'PyQt4.QtCore.QTimer', class 'PyQt4.QtCore.QObject', class 'sip.wrapper', class 'sip.simplewrapper', class 'object') So, __base__ is set to class A. This is incorrect, as PyQt4 now thinks it should create a QObject. The reason is the weird algorithm that typeobject.c uses: it tries to find the most special class that does not change the size of the its instances (called the solid_base). This sounds reasonable at first, because only classes written in C can change the size of their instances. Unfortunately, this does not hold the other way around: in PyQt4, the instances only contain a pointer to the actual data structures, so all instances of all PyQt4 classes have the same size, and __base__ will simply default to __bases__[0]. Now I tried to outsmart this algorithm, why not put the PyQt4 class as the first parent class? This is what the class C is for in my example. And indeed, the last line of my example prints: class 'PyQt4.QtCore.QTimer' (class '__main__.C', class 'PyQt4.QtCore.QTimer', class '__main__.A', class 'PyQt4.QtCore.QObject', class 'sip.wrapper', class 'sip.simplewrapper', class 'object') So hooray, __base__ is set to QTimer, the metaclass will inherit from the correct class! But well, there is a strong drawback: now the MRO, which I print in the same example, has a mixture of Python and PyQt4 classes in it. Unfortunately, the methods of the PyQt4 classes do not call super, so they are uncooperative when it comes to multiple inheritance. This is expected, as they are written in C++, a language that has a weird concept of cooperative multiple inheritance, if it has one at all. So, to conclude: it is sometimes not possible to use python cooperative multiple inheritance if C base classes are involved. This is a bummer. Can we change this behavior? Yes, certainly. The clean way would be to re-write typeobject.c to actually find the best_base in a sane way. This would be easiest if we could just find out somehow whether a class is written in Python or in C, e.g. by adding a tp_flag to PyTypeObject. best_base would then point to the most specialized parent written in C. A simpler solution would be to default to __bases__[-1] for __base__, then we can tell users to simply put their uncooperative base classes last in the list of bases. -- components: Interpreter Core messages: 210291 nosy: Martin.Teichmann priority: normal severity: normal status: open title: Weird behavior with multiple inheritance when C classes involved type: behavior versions: Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20518 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20485] Enable 'import Non-ASCII.pyd'
Suzumizaki added the comment: Thank you Nick about msg210209. I would like to try making PEP, but the work looks somewhat difficult. It may take the time. BTW, C/C++ Standards only allow the encoding of source code as platform dependent. They don't define the standard encoding of source codes... This means we have to choose to resolve this issue, one is giving up readability, the other is allowing platform-dependent feature, using UTF-8 to write the C code. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2008] cookielib lacks FileCookieJar class for Safari
Changes by Hendrik hendrik.hoe...@googlemail.com: -- keywords: +patch Added file: http://bugs.python.org/file33921/cookie.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2008 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2008] cookielib lacks FileCookieJar class for Safari
Changes by Hendrik hendrik.hoe...@googlemail.com: Added file: http://bugs.python.org/file33922/cookiejar.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2008 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20517] Support errors with two filenames for errno exceptions
Vajrasky Kok added the comment: But there are some errors that really need two filenames, like copy(), symlink(), and rename(). I think *need* is too strong word in this case. I agree that two filenames is better than none. But I don't see anything wrong from omitting filenames in error messages for copy(), etc. If PHP and Perl are taking omitting filenames way, surely there is some merit in that way. I am in if we are taking two filenames way just like Ruby does. It's just isn't it too rush for Python 3.4? -- nosy: +vajrasky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3068] IDLE - Add an extension configuration dialog
Tal Einat added the comment: (This is a bit long; there's a TL;DR at the end.) You'd be surprised how many of IDLE's features are implemented as extensions. These are simply included in idlelib, enabled by default and configured with reasonable values. Take a look at Lib/idlelib/config-extensions.def, and you'll see all of the bundled extensions' configuration values. (Every extension must have a section in config-extensions.def or a user's config-extensions.cfg to be enabled.) So, for example, auto-completion is an extension. Besides disabling it completely, a user can also change the delay before the completion list appears automatically by setting 'popupwait', and customize the key bindings for the 'autocomplete' and 'force-open-completions' events. The 'ParenMatch' and 'CodeContext' extensions also each have several configurable settings. And most extensions have at least one event to which keyboard shortcuts can be bound. If after all of the above you look again at the 'FormatParagraph' extension, you'll see that it's breaking the convention. The maximum line width is configurable, but isn't found in config-extensions.def! Instead of using the normal extension configuration mechanism, FormatParagraph reads the 'maxformatwidth' config value from IDLE's main configuration on every call to format_paragraph_event(). Why was this done? To allow users to configure this setting using the GUI instead of editing a config file! If a config dialog for extensions had existed, this hack wouldn't have been necessary. So what does my patch achieve? * It makes many more of IDLE's settings easy to discover, set and fiddle with. Some of these are actually useful, e.g. AutoComplete's 'popupwait' setting. * Makes it reasonable to tell a user just disable auto-completions from the extension config dialog. (Without this patch: find your .idlerc folder; open the config-extensions.cfg file or create one if it doesn't exist; find the [AutoComplete] section; make sure enable=0 is written directly under it.) * Removes the inconsistent hack in FormatParagraph.format_paragraph_event(). * Makes it more reasonable to bundle more extensions with IDLE (such as my Squeezer extension; see issue1529353). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3068 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1529353] Squeezer - squeeze large output in the interpreter
Tal Einat added the comment: Ping? Can this please go in? It's such a great improvement to user experience! I've seen too many novice users print a ton of output by accident and have IDLE hang as a result, losing their interactive session. This simple extension avoid those issues completely, while still allowing access to the output if needed. I'd even be willing to do any extra work required, such as testing on Windows, Linux and OSX. Just tell me what's holding this up! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1529353 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20167] Exception on IDLE closing
Tal Einat added the comment: This is caused by MultiCall's _ComplexBinder.__del__() being called during app shutdown. _ComplexBinder.__del__() unbinds a bunch of event handlers from the widget to which it is attached. It seems that there's some edge case here where the underlying Tk widget has already been destroyed. Instead of trying to debug all of the Tk events and app shutdown order, I propose just surrounding this __del__() code with a try/except block, catching _tkinter.TclError and ignoring it. From my (somehwat limited) understanding of MultiCall, this shouldn't do any harm. See attached patch. -- keywords: +patch Added file: http://bugs.python.org/file33923/taleinat_idle_closing_exception.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue2008] cookielib lacks FileCookieJar class for Safari
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2008 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20167] Exception on IDLE closing
Serhiy Storchaka added the comment: 1. try/except should be inside a loop, not outside. 2. It would be better not to hide the problem under the rug, but find why the order of destruction is different when open shell window. Of course, if better solution will not be found, we will have to apply this patch before 3.4 releasing. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20517] Support errors with two filenames for errno exceptions
Serhiy Storchaka added the comment: As release manager Larry has the right to add a new feature after feature freeze. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20517 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12691] tokenize.untokenize is broken
Changes by Gareth Rees g...@garethrees.org: -- assignee: - docs@python components: +Documentation, Tests nosy: +docs@python ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12691 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20498] Update StringIO newline tests
Roundup Robot added the comment: New changeset 07e7bb29a2c5 by Serhiy Storchaka in branch '2.7': Issue #20498: Fixed io.StringIO tests for newline='\n'. Added new tests. http://hg.python.org/cpython/rev/07e7bb29a2c5 New changeset e23c928b9e39 by Serhiy Storchaka in branch '3.3': Issue #20498: Fixed io.StringIO tests for newline='\n'. Added new tests. http://hg.python.org/cpython/rev/e23c928b9e39 New changeset 7ed8a9f9831d by Serhiy Storchaka in branch 'default': Issue #20498: Fixed io.StringIO tests for newline='\n'. Added new tests. http://hg.python.org/cpython/rev/7ed8a9f9831d -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20498 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue3068] IDLE - Add an extension configuration dialog
Terry J. Reedy added the comment: Thank you! This is a bit of the 'Idle Developer's Guide' that I wish existed. It turns out that the exceptional FormatParagraph.py is the one extension file I am really familiar with, because I worked with a GSOC student to write tests and fix/improve it. I agree that this would be useful now. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue3068 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20167] Exception on IDLE closing
Tal Einat added the comment: I put the try/except outside of the loop on purpose. If calling the widget's unbind() method fails once, it will fail forever afterwards. If you prefer a different spelling, move the try/except into the loop, and break out of the loop in case of an exception: for seq, id in self.handlerids: try: self.widget.unbind(self.widgetinst, seq, id) except _tkinter.TclError: break As for avoiding the exception in the first place, I'm sure figuring out how IDLE shuts down would be a lot of work, and I honestly don't think it's necessary. Note that this problem is triggered in a __del__() method; making sure these are called at a proper time is problematic because the timing depends on the GC. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20519] uuid.uuid4().hex generates garbage when ctypes available
New submission from Gustavo J. A. M. Carneiro: If you try the attached program, you will find that for every iteration the uuid.uuid4() call generates objects that contain reference cycles and need the help of the garbage collector. This is not nice. If I make the ctypes module not able to import, then no garbage is generated. This problem appears in 2.7, 3.3, and 3.4, at least. -- components: Library (Lib) files: gc.py messages: 210306 nosy: gustavo priority: normal severity: normal status: open title: uuid.uuid4().hex generates garbage when ctypes available type: resource usage versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33925/gc.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20519 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20167] Exception on IDLE closing
Tal Einat added the comment: Attaching second patch, to replace the first. As suggested by Serhiy, I moved the try/except block into the loop. I also added a comment explaining the try/except block and referencing this issue. -- Added file: http://bugs.python.org/file33926/taleinat_idle_closing_exception_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20167] Exception on IDLE closing
Tal Einat added the comment: Both previous patches caused an import error. Here's a new patch with that fixed, and actually tested to fix the bug. -- Added file: http://bugs.python.org/file33927/taleinat_idle_closing_exception_3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20520] Readline test in test_codecs is broken
New submission from Serhiy Storchaka: The ReadTest.test_readline test in Lib/test/test_codecs.py has two loops on \n \r\n \r \u2028.split(). But as far as \n \r\n \r \u2028.split() is empty list (because newline characters are whitespace characters), the bodies of these loops are never executed. After fixing this bug, a number of other tests were exposed. I tried to fix them. The purpose of these tests is not entirely clear, so I'm not sure that it is properly grasped the idea of the author. Test was added in issue1076985 and modified in issue1175396. -- components: Tests files: test_codecs_readline.patch keywords: patch messages: 210309 nosy: doerwalter, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Readline test in test_codecs is broken type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33928/test_codecs_readline.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20520 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20489] help() fails for zlib Compress and Decompress objects
Changes by Serhiy Storchaka storch...@gmail.com: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20489 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1529353] Squeezer - squeeze large output in the interpreter
Serhiy Storchaka added the comment: Could you please provide a patch which applies to default branch? There is other proposed solution for the problem of large output: issue1442493. -- stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1529353 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20167] Exception on IDLE closing
Terry J. Reedy added the comment: I tried all three versions both installed and recent repository builds and verified that the overt issue is limited to 3.4. I agree that the exception message suggests stopping with the first exception. Since there is a small cost to try: and break, I am inclined to move the try back out of the loop. The only thing it could mask is a problem with self.handlerids, and I would expect that if that is corrupted or missing, there would be problems before shutdown. I know that in 3.4, shutdown order has been modified and the wording of the warning was discussed on pydev. I do not know (and do not care at the moment) if either ignoring __del__ exceptions or warning about them is new in 3.4. What I do remember from the discussion is agreement that 1. __del__ exceptions should be caught so shutdown can continue; 2. a warning should be given in case the exception indicates a bug in __del__; and 3. __del__ writers are responsible to catch exceptions that do not indicate a bug, so as to avoid the warning. So I am inclined to backport to all versions. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20167 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20053] venv and ensurepip are affected by default pip config file
Roundup Robot added the comment: New changeset ddc82c4d1a44 by Nick Coghlan in branch 'default': Issue #20053: new test to check an assumption http://hg.python.org/cpython/rev/ddc82c4d1a44 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20053 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20521] [PATCH] Cleanup for dis module documentation
New submission from Sven Berkvens-Matthijsse: The documentation for the dis module has a wrong opcode name in it (POP_STACK instead of POP_TOP). Furthermore, the patch fixes inconsistent use of markers for code and opcodes. -- assignee: docs@python components: Documentation files: dis-doc.patch keywords: patch messages: 210314 nosy: docs@python, svenberkvens priority: normal severity: normal status: open title: [PATCH] Cleanup for dis module documentation type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file33929/dis-doc.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20521 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20520] Readline test in test_codecs is broken
Walter Dörwald added the comment: \n \r\n \r \u2028.split() should have been \n \r\n \r \u2028.split( ), i.e. a list of different line ends. The purpose of these tests is not entirely clear, so I'm not sure that it is properly grasped the idea of the author. I wrote the tests nearly 10 years ago, so it's no longer entirely clear to me either! ;) Anyway, here's a patch that fixes the resulting test failures. -- Added file: http://bugs.python.org/file33930/fix_linetests.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20520 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20519] uuid.uuid4().hex generates garbage when ctypes available
R. David Murray added the comment: I'm not sure that this is a real problem, but have you identified what the cycle is? -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20519 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20053] venv and ensurepip are affected by default pip config file
Nick Coghlan added the comment: D'oh, still failing even though that new assumption check passes on Windows: http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/4002/steps/test/logs/stdio Paul, any ideas? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20053 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded
Gunnar Aastrand Grimnes added the comment: Agreed that a doc-fix is the first step. Shall I make another issue for the fix in fileinput? I also wonder if the comment in codecs is not too negative - it is not easy to get it 100% right, but the method just above readlines is readline, which does somehow manage to read a single line. To me it seems like it would be better to makes readlines repeatedly call readline. It would also be inefficient, but still better than reading the whole (possibly infinite) stream in ... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20501 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20519] uuid.uuid4().hex generates garbage when ctypes available
Gustavo J. A. M. Carneiro added the comment: Well, this isn't a big problem, but I have an application that needs to run with the GC disabled, since it causes pauses of a couple of seconds each time a full collection runs (we have a few million objects allocated). I will run the GC only once every 3 hours. So it would be nice if this uuid call didn't generate cycles. No, I didn't identify the cycle. All I know is that the garbage below is produced. If the ctypes module is unavailable, uuid still works but doesn't generate the garbage. gc.garbage [(type '_ctypes.Array',), {'raw': attribute 'raw' of 'c_char_Array_16' objects, '__module__': 'ctypes', '__dict__': attribute '__dict__' of 'c_char_Array_16' objects, '__weakref__': attribute '__weakref__' of 'c_char_Array_16' objects, '_length_': 16, '_type_': class 'ctypes.c_char', '__doc__': None, 'value': attribute 'value' of 'c_char_Array_16' objects}, class 'ctypes.c_char_Array_16', attribute '__dict__' of 'c_char_Array_16' objects, attribute '__weakref__' of 'c_char_Array_16' objects, (class 'ctypes.c_char_Array_16', type '_ctypes.Array', type '_ctypes._CData', type 'object'), attribute 'raw' of 'c_char_Array_16' objects, attribute 'value' of 'c_char_Array_16' objects, (type '_ctypes.Array',), {'raw': attribute 'raw' of 'c_char_Array_16' objects, '__module__': 'ctypes', '__dict__': attribute '__dict__' of 'c_char_Array_16' objects, '__weakref__': attribute '__weakref__' of 'c_char_Array_16' objects, '_length_': 16, '_type_': class 'ctypes .c_char', '__doc__': None, 'value': attribute 'value' of 'c_char_Array_16' objects}, class 'ctypes.c_char_Array_16', attribute '__dict__' of 'c_char_Array_16' objects, attribute '__weakref__' of 'c_char_Array_16' objects, (class 'ctypes.c_char_Array_16', type '_ctypes.Array', type '_ctypes._CData', type 'object'), attribute 'raw' of 'c_char_Array_16' objects, attribute 'value' of 'c_char_Array_16' objects, (type '_ctypes.Array',), {'raw': attribute 'raw' of 'c_char_Array_16' objects, '__module__': 'ctypes', '__dict__': attribute '__dict__' of 'c_char_Array_16' objects, '__weakref__': attribute '__weakref__' of 'c_char_Array_16' objects, '_length_': 16, '_type_': class 'ctypes.c_char', '__doc__': None, 'value': attribute 'value' of 'c_char_Array_16' objects}, class 'ctypes.c_char_Array_16', attribute '__dict__' of 'c_char_Array_16' objects, attribute '__weakref__' of 'c_char_Array_16' objects, (class 'ctypes.c_char_Array_16', type '_ctypes.Ar ray', type '_ctypes._CData', type 'object'), attribute 'raw' of 'c_char_Array_16' objects, attribute 'value' of 'c_char_Array_16' objects, (type '_ctypes.Array',), {'raw': attribute 'raw' of 'c_char_Array_16' objects, '__module__': 'ctypes', '__dict__': attribute '__dict__' of 'c_char_Array_16' objects, '__weakref__': attribute '__weakref__' of 'c_char_Array_16' objects, '_length_': 16, '_type_': class 'ctypes.c_char', '__doc__': None, 'value': attribute 'value' of 'c_char_Array_16' objects}, class 'ctypes.c_char_Array_16', attribute '__dict__' of 'c_char_Array_16' objects, attribute '__weakref__' of 'c_char_Array_16' objects, (class 'ctypes.c_char_Array_16', type '_ctypes.Array', type '_ctypes._CData', type 'object'), attribute 'raw' of 'c_char_Array_16' objects, attribute 'value' of 'c_char_Array_16' objects] -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20519 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4188] test_threading hang when running as verbose
Berker Peksag added the comment: The threading._VERBOSE attribute was removed in issue 13550 (see also changeset http://hg.python.org/cpython/rev/8ec51b2e57c2). -- nosy: +berker.peksag resolution: - out of date stage: needs patch - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4188 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20519] uuid.uuid4().hex generates garbage when ctypes available
Gustavo J. A. M. Carneiro added the comment: I have narrowed it down to one line of code: ctypes.create_string_buffer(16) That is enough to create 7 objects that have reference cycles. [class 'ctypes.c_char_Array_16', {'__module__': 'ctypes', '__doc__': None, '__weakref__': attribute '__weakref__' of 'c_char_Array_16' objects, 'raw': attribute 'raw' of 'c_char_Array_16' objects, '_length_': 16, '_type_': class 'ctypes.c_char', 'value': attribute 'value' of 'c_char_Array_16' objects, '__dict__': attribute '__dict__' of 'c_char_Array_16' objects}, (class 'ctypes.c_char_Array_16', class '_ctypes.Array', class '_ctypes._CData', class 'object'), attribute '__weakref__' of 'c_char_Array_16' objects, attribute 'raw' of 'c_char_Array_16' objects, attribute 'value' of 'c_char_Array_16' objects, attribute '__dict__' of 'c_char_Array_16' objects] So maybe the bug is in ctypes itself, not the uuid module. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20519 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20522] pandas version 0.13.0 does not give warning when summing float with object
New submission from Simone Serrajotto: Good afternoon, I have just installed pandas 0.13.0 and was observing some strange results produced by old codes. One major issue is that I found that when summing two columns of a dataframe, one of which is a float64 and the other an object, the result includes just the float64 columns. This would be not an issue per se, but no warning message is displayed. I think a warning in this case is of paramount importance. Regards, Simone -- Simone Serrajotto Quaestio Capital Management SGR SpA Unipersonale Corso Como 15 (8° piano) 20154 Milano C.F. e P.I. 06803880969 Iscritta all'Albo delle SGR al n. 299 Mobile: +39 393 919 0217 Tel: +39 02 3676 5241 E-Mail:s.serrajo...@quaestiocapital.comc.prin...@quaestiocapital.com -- Le informazioni contenute nella comunicazione che precede sono riservate e destinate esclusivamente alla persona o all'ente sopraindicati. La diffusione, distribuzione e/o copiatura del presente email o di qualsiasi documento allegato da parte di qualsiasi soggetto diverso dal destinatario e' proibita. La sicurezza e la correttezza dei messaggi di posta elettronica non possono essere garantite. Se avete ricevuto questo messaggio per errore, Vi preghiamo di contattarci immediatamente. Grazie The content of this email is confidential and it is intended for the sole use of the addressees. The transmission, distribution and/or copy of this email or any document attached hereto by any person other than the addressees is prohibited. The transmission of this email cannot be guaranteed to be secure or error-free. If you have received this communication unintentionally, please inform us immediately. Thank you. -- messages: 210323 nosy: serrajo priority: normal severity: normal status: open title: pandas version 0.13.0 does not give warning when summing float with object ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20522 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20522] pandas version 0.13.0 does not give warning when summing float with object
Mark Dickinson added the comment: Hi Simone, I'm afraid you've got the wrong bugtracker. This is the bugtracker for the Python core language (which doesn't include Pandas). Pandas is a 3rd party project. You can report Pandas issues here: https://github.com/pydata/pandas/issues -- nosy: +mark.dickinson resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20522 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20053] venv and ensurepip are affected by default pip config file
Paul Moore added the comment: Nothing obvious or Windows-specific from what I can see. It does seem to me that EnvironmentVarGuard doesn't monkeypatch os.environ even though it looks like it intends to (__exit__ sets it back, but __enter__ doesn't monkeypatch it). So maybe that's doing something weird? I'll try to have a better look later (not much spare time right now). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20053 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Vajrasky Kok added the comment: Here is the patch addressing Zachary's review (Thanks!). There are some Zachary's suggestions that I could not implement: 1. float_conjugate_impl,/* nb_float */ I think this should still be the real function (the parser), not the impl. The impl function is really just an implementation detail. It has to be that way. If I change it to float_conjugate, the compiler will complain. But on other places, we can use the real function. 2. v = list_sort_impl((PyListObject *)v, Py_None, 0); Considering what I said about not using impl functions at the end of floatobject.c, it would be nice to avoid it here, but I think that would be a lot more trouble than it would be worth. I can not use the real function here, otherwise the compiler will throw error. -- Added file: http://bugs.python.org/file33931/issue20185_conglomerate_v3.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Vajrasky Kok added the comment: Zachary, Looking again, that one is non-trivial, but still doable. You just need a this means an error happened value to initialize rl to, and return that value instead of NULL. How do you give this means an error happened value to struct rlimit? struct rlimit { rlim_t rlim_cur; /* Soft limit */ rlim_t rlim_max; /* Hard limit (ceiling for rlim_cur) */ }; This is what prevents me to use custom converter. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20519] ctypes.create_string_buffer creates reference cycles
R. David Murray added the comment: Yes, I was pretty sure it was in cytpes, from looking at the UUID code. -- components: +ctypes -Library (Lib) nosy: +amaury.forgeotdarc, belopolsky, meador.inge title: uuid.uuid4().hex generates garbage when ctypes available - ctypes.create_string_buffer creates reference cycles ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20519 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20520] Readline test in test_codecs is broken
Serhiy Storchaka added the comment: \n \r\n \r \u2028.split() should have been \n \r\n \r \u2028.split( ), i.e. a list of different line ends. Yes, this is obvious fix, but explicit tuple of line ends looks more clear and error-proof to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20520 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1410680] Add 'surgical editing' to ConfigParser
Changes by Berker Peksag berker.pek...@gmail.com: -- versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1410680 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Zachary Ware added the comment: Vajrasky: Note that you can reply to individual review comments within Rietveld; this way context is kept and replies are easier :). The same people get the message either way. Anyhow, for float point 1: you can use I believe you can use (unaryfunc) for nb_int and nb_float, just like nb_positive above. list point 2: I agree, it's not worth it to try to not use the impl function. rlimit: I'm not sure what value to give, and I'm not where I can play with it until my PC catches fire, either. Is there some value that makes no sense as a legitimate value? Is it legal for rlim_cur to be greater than rlim_max? Or is there a value that is just exceedingly uncommon? Or you could simply pick some random value; your converter should be written to render with self.err_occurred_if(_return_value == RLIMIT_ERROR_VALUE). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20519] ctypes.create_string_buffer creates reference cycles
Gustavo J. A. M. Carneiro added the comment: Regardless, if you don't mind, take this patch for Python 3.5 to avoid ctypes, at least in the Linux case (I don't have Windows to test). Creating a proper extension module is safer and really not that hard... -- keywords: +patch Added file: http://bugs.python.org/file33932/uuid-no-ctypes.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20519 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20485] Enable non-ASCII extension module names
Changes by Brett Cannon br...@python.org: -- stage: - test needed title: Enable 'import Non-ASCII.pyd' - Enable non-ASCII extension module names ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20520] Readline test in test_codecs is broken
Walter Dörwald added the comment: True, here's an updated patch. -- Added file: http://bugs.python.org/file33933/fix_linetests2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20520 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7717] Compilation fixes for IRIX
Berker Peksag added the comment: According to the python-dev discussion, Irix is not supported anymore: https://mail.python.org/pipermail/python-dev/2009-February/086111.html -- keywords: -needs review nosy: +berker.peksag resolution: - out of date stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7717 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20485] Enable non-ASCII extension module names
Changes by Arfrever Frehtes Taifersar Arahesis arfrever@gmail.com: -- nosy: +Arfrever ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue7718] Build shared libpythonX.Y.so on IRIX
Berker Peksag added the comment: According to the python-dev discussion, Irix is not supported anymore: https://mail.python.org/pipermail/python-dev/2009-February/086111.html -- nosy: +berker.peksag resolution: - out of date stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue7718 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20519] Replace uuid ctypes usage with an extension module.
R. David Murray added the comment: Thanks. This looks like a good idea, but I'll leave it to someone with more experience with this module to review it. Let's change this issue to an enhancement request for uuid instead. If someone wants to work on the cycle-in-ctypes problem they can open a new issue. -- nosy: +ned.deily, serhiy.storchaka stage: - patch review title: ctypes.create_string_buffer creates reference cycles - Replace uuid ctypes usage with an extension module. type: resource usage - enhancement versions: +Python 3.5 -Python 2.7, Python 3.3, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20519 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20485] Enable non-ASCII extension module names
Changes by Jeremy Kloth jeremy.kloth+python-trac...@gmail.com: -- nosy: +jkloth ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20485] Enable non-ASCII extension module names
Changes by Stefan Behnel sco...@users.sourceforge.net: -- nosy: +scoder ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20485 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20345] Better logging defaults
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- status: pending - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20345 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12691] tokenize.untokenize is broken
Changes by Gareth Rees g...@garethrees.org: Removed file: http://bugs.python.org/file33919/Issue12691.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12691 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue1028088] Cookies without values are silently ignored (by design?)
Berker Peksag added the comment: This was fixed in issue 16611 (for 3.3 and 3.4) and there is a open issue for 2.7: issue 19870. I'm closing this one as a duplicate of issue 19870, because it has a patch. from http import cookies C = cookies.SimpleCookie() C.load(chips=ahoy; vienna=finger; secure) print(C) Set-Cookie: chips=ahoy Set-Cookie: vienna=finger; secure C['vienna']['secure'] True -- nosy: +berker.peksag resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - Backport Cookie fix to 2.7 (httponly / secure flag) ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1028088 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19920] TarFile.list() fails on some files
Roundup Robot added the comment: New changeset a5895fca91f3 by Serhiy Storchaka in branch '3.3': Issue #19920: TarFile.list() no longer fails when outputs a listing http://hg.python.org/cpython/rev/a5895fca91f3 New changeset 077aa6d4f3b7 by Serhiy Storchaka in branch 'default': Issue #19920: TarFile.list() no longer fails when outputs a listing http://hg.python.org/cpython/rev/077aa6d4f3b7 New changeset 48c5c18110ae by Serhiy Storchaka in branch '2.7': Issue #19920: Added tests for TarFile.list(). Based on patch by Vajrasky Kok. http://hg.python.org/cpython/rev/48c5c18110ae -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue19920] TarFile.list() fails on some files
Serhiy Storchaka added the comment: Thank you for your patch Vajrasky. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19920 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue12691] tokenize.untokenize is broken
Yury Selivanov added the comment: Gareth, Thanks a lot for such a comprehensive writeup and the patch. Please give me a day or two to do the review. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12691 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33746/clinic_typeobject_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33744/clinic_resource_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33644/clinic_marshal_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Zachary Ware added the comment: Clearing nosy for file cleaning, will restore: larry,nadeem.vawda,serhiy.storchaka,vajrasky,zach.ware -- nosy: -larry, nadeem.vawda, serhiy.storchaka, vajrasky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33678/clinic_marshal_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33767/clinic_listobject_v3.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33479/clinic_marshal.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33643/clinic_floatobject.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: -- nosy: +larry, nadeem.vawda, serhiy.storchaka, vajrasky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33769/clinic_marshal_v4.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33778/issue20185_conglomerate.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33773/clinic_floatobject_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33887/issue20185_conglomerate_v2.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33612/clinic_listobject.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33641/clinic_listobject_v2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33475/clinic_resource.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: Removed file: http://bugs.python.org/file33562/clinic_typeobject.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Changes by Zachary Ware zachary.w...@gmail.com: -- Removed message: http://bugs.python.org/msg210340 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20521] [PATCH] Cleanup for dis module documentation
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +ncoghlan stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20521 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20218] Add `pathlib.Path.write` and `pathlib.Path.read`
Antoine Pitrou added the comment: Hi Ram, sorry, I'll take a look at your patch soon. (as you know, we're in feature freeze right now so your patch must wait for 3.4 to be released, anyway) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20218 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20501] fileinput module will read whole file into memory when using fileinput.hook_encoded
Serhiy Storchaka added the comment: As far as the issue is in the codecs module, this is 2.7 only issue, because codecs.open is used only in 2.7. And I suppose that replacing codecs.open by io.open should fix this issue. -- keywords: +patch nosy: +benjamin.peterson, hynek, pitrou, serhiy.storchaka, stutzbach stage: - patch review versions: -Python 3.3, Python 3.4 Added file: http://bugs.python.org/file33934/fileinput_hook_encoded.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20501 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20505] Remove resolution from selectors and granularity from asyncio
Charles-François Natali added the comment: To solve a performance issue in asyncio, I added a new resolution attribute to selectors.BaseSelector and a new _granularity attribute to asyncio.BaseEventLoop. If I understood correctly, Charles-François (author and so maintainer of the new selectors module) doesn't like the new resolution attribute because it is a lie (if I understood correctly Charles-François complain). Here are the reasons I don't like this attribute: - it's a low-level implementation detail, which shouldn't be part of the API - it's actually impossible to provide a sensible value for the granularity, because it depends not only on the operating system, but also on the actual version on the OS, and the hardware, as Victor's extensive tests showed - what's the definition of this granularity anyway? - but most importantly, it's useless: the performance problem initially identified was due to the rounding of select/epoll/etc of timeouts towards zero, which means that it they got passed a timeout smaller than the syscall resolution, the syscall would end up being called in a tight loop. Now that the timeouts are rounded away from 0, that's not an issue anymore Let me state this last point once again: no busy loop can occur now that timeouts are rounded up. Sure, some syscalls, on some OS, can sometimes return a little bit earlier than expected, e.g. epoll can return after 0.98ms instead of 1ms. But that's not an issue, if that's the case you'll just loop an extra time, *all* event loops just work this way. Furthermore, note than due to rounding, the actual probability of having the syscall return earlier than expected is really low: for example, if the loop wants to wake up in 5.3ms, it will be rounded to 6ms, and even a slight early wakeup won't be enough to wake up before 5.3ms (typically it'll return after 5.98ms or so). The patch is a comprise, it solves partially the asyncio performance issue. With the patch, BaseEventLoop._run_once() may not executed a task even if there was a scheduled task, just because of timing rounding issues. So I modified the existing patch to tolerate useless calls to _run_once(). If you want to keep the current approach, nothing prevents from using a fixed slack value, independant of the selector (e.g. 1ms seems reasonable). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20505 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14515] tempfile.TemporaryDirectory documented as returning object but returns name
Roundup Robot added the comment: New changeset b5fe07d39e16 by R David Murray in branch '3.3': #14515: clarify that TemporaryDirectory's __enter__ returns the name. http://hg.python.org/cpython/rev/b5fe07d39e16 New changeset 7b7e17723787 by R David Murray in branch 'default': #14515: clarify that TemporaryDirectory's __enter__ returns the name. http://hg.python.org/cpython/rev/7b7e17723787 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14515 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue14515] tempfile.TemporaryDirectory documented as returning object but returns name
R. David Murray added the comment: Just ran into this again :). Committed a patch with wording clarified based on Serhiy's feedback (I say 'target of the as clause of the with statement'.) -- stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14515 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20519] Replace uuid ctypes usage with an extension module.
Serhiy Storchaka added the comment: See also issue5885. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20519 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20136] Logging: StreamHandler does not use OS line separator.
A. Libotean added the comment: You can go ahead and close this. I ran some tests and concluded that indeed the IO system will take care of the line separators. Sorry to have wasted your time. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20136 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.
A. Libotean added the comment: Which encoding are you using, such that the difference in length between encoded and decoded messages is significant? I agree right off the bat that the error in size is not significant. Only the length of the last appended line is computed erroneously. I'm uploading the patch in case you decide to apply it. Thanks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20137 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20523] global .pdbrc on windows 7 not reachable out of the box
New submission from mbyt: The global .pdbrc file is determined by the %HOME% environment variable. However, this is not available out of the box on e.g. windows 7 systems. Here only %HOMEDRIVE% and %HOMEPATH% are defined. Thus the usual approach to have a global .pdbrc file on windows is to define a %HOME% environment variable by hand. This could be avoided if the global .pdbrc would be determined by os.path.expanduser(~/.pdbrc), which works on current windows and does the magic behind. There are two possible approaches to improve this situation: * explicitly mention in the docs that on windows a %HOME% varialbe need to be created manually * patch pdb.py to use os.path.expanduser instead (see attached diff) For reference, see also old discussion https://mail.python.org/pipermail/python-list/2005-October/349550.html. -- files: pdb.diff keywords: patch messages: 210349 nosy: mbyt priority: normal severity: normal status: open title: global .pdbrc on windows 7 not reachable out of the box type: enhancement Added file: http://bugs.python.org/file33935/pdb.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20523 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20136] Logging: StreamHandler does not use OS line separator.
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20136 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20137] Logging: RotatingFileHandler computes string length instead of byte representation length.
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20137 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20523] global .pdbrc on windows 7 not reachable out of the box
Changes by Ned Deily n...@acm.org: -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20523 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files
Zachary Ware added the comment: Ok, current status of this issue as I see it: Objects/typeobject.c:part of conglomerate patch, LGTM Objects/longobject.c:awaiting revision based on review Objects/listobject.c:part of conglomerate patch, LGTM Objects/floatobject.c: part of conglomerate patch, two minor issues, otherwise LGTM Modules/resource.c: part of conglomerate patch, LGTM (could use return converter, not essential) Modules/_threadmodule.c: untouched, held til 3.5 Modules/_bz2module.c:untouched, held til 3.5 Modules/_bisectmodule.c: untouched, held til 3.5 Python/marshal.c:part of conglomerate patch, LGTM Objects/exceptions.c:untouched, held til 3.5 Modules/nismodule.c: untouched, held til 3.5 Modules/gcmodule.c: awaiting revision based on review Python/_warnings.c: untouched, held til 3.5 Modules/_cryptmodule.c: done in another issue I'd like someone with more C experience to have a look at typeobject, floatobject, listobject, resource, and marshal to make sure I haven't missed anything (or led Vajrasky astray). If someone else can ok them, I can get them committed. Vajrasky: What's the status on gcmodule and longobject? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20185 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20524] format error messages should provide context information
New submission from R. David Murray: Consider the following: '{run_time:%H:%M:%S}, ,COM,DA{id},{title:.43},{id},{length:%M:%S}'.format(**mydict) The error message I got was: Invalid format specifier The problem turned out to be that the value of the 'length' key was an integer instead of a datetime.time(), but it sure wasn't easy to figure out which bit of the format string or which variable was the problem. It would be nice for the format error message to include the pattern that it is parsing when it hits the error. The type of the value being substituted would also be nice. Perhaps something like: The format specifier in {length:%HH:%MM} is not valid for type int() -- components: Library (Lib) messages: 210351 nosy: eric.smith, r.david.murray priority: normal severity: normal status: open title: format error messages should provide context information ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20524 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures
Yury Selivanov added the comment: This one is still not merged in Tulip, right? -- nosy: +yselivanov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20367 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20524] format error messages should provide context information
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti stage: - test needed type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20524 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20367] concurrent.futures.as_completed() fails when given duplicate Futures
Guido van Rossum added the comment: Correct, if you want to work on it, see http://code.google.com/p/tulip/issues/detail?id=114 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20367 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20524] format error messages should provide context information
Eric V. Smith added the comment: That would be a great improvement. It's in Python/formatter_unicode.c, line 245, in parse_internal_render_format_spec(). That code knows about the format spec, but not the type being formatted. That would be easy enough to pass in. This fix would only work for the built-in types: int, float, and str, I think. Maybe complex. But that's probably good enough. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20524 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20374] Failure to compile with readline-6.3-rc1
Ned Deily added the comment: Using Serhiy's suggestion, here are patches for 2.7/3.3 and default that condition the hook function signatures. With these patches, all three branches compile without warnings and pass test_readline using OS X libedit, readline 6.3-rc2, and an older readline. -- resolution: fixed - stage: committed/rejected - patch review status: closed - open Added file: http://bugs.python.org/file33936/issue20374_no_cast_33.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20374 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20374] Failure to compile with readline-6.3-rc1
Changes by Ned Deily n...@acm.org: Added file: http://bugs.python.org/file33937/issue20374_no_cast_3x.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20374 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20374] Failure to compile with readline-6.3-rc1
Benjamin Peterson added the comment: That is sure ugly, but okay. :) -- assignee: benjamin.peterson - ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20374 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20374] Failure to compile with readline-6.3-rc1
Roundup Robot added the comment: New changeset 0b5b0bfcc7b1 by Ned Deily in branch '2.7': Issue #20374: Avoid compiler warnings when compiling readline with libedit. http://hg.python.org/cpython/rev/0b5b0bfcc7b1 New changeset 9131a9edcac4 by Ned Deily in branch '3.3': Issue #20374: Avoid compiler warnings when compiling readline with libedit. http://hg.python.org/cpython/rev/9131a9edcac4 New changeset 0abf103f5559 by Ned Deily in branch 'default': Issue #20374: merge http://hg.python.org/cpython/rev/0abf103f5559 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20374 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20374] Failure to compile with readline-6.3-rc1
Roundup Robot added the comment: New changeset 74c7a6fd8b45 by Ned Deily in branch '2.7': Issue #20374: delete spurious empty line http://hg.python.org/cpython/rev/74c7a6fd8b45 New changeset 6616c94d6149 by Ned Deily in branch '3.3': Issue #20374: delete spurious empty line http://hg.python.org/cpython/rev/6616c94d6149 New changeset 0b91e764b889 by Ned Deily in branch 'default': Issue #20374: merge http://hg.python.org/cpython/rev/0b91e764b889 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20374 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20374] Failure to compile with readline-6.3-rc1
Changes by Ned Deily n...@acm.org: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20374 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20524] format error messages should provide context information
Eric V. Smith added the comment: int, float, str, and complex are the types formatted by that code. Notice that Decimal already has a better message: format(Decimal(42), 'tx') Traceback (most recent call last): ... ValueError: Invalid format specifier: tx format(42, 'tx') Traceback (most recent call last): ... ValueError: Invalid conversion specification But, look at this: format(3, '--') Traceback (most recent call last): File stdin, line 1, in module ValueError: Unknown format code '-' for object of type 'int' This is generated in unknown_presentation_type, also in formatter_unicode.c. It almost does what you want, but just handles the presentation type, not the whole format specifier. Error handling could be cleaned up in that module. I'd say that the string should be: specific error with format specifier specifier for object of type 'type' specific error might be Unknown presentation type '-', or Cannot specify ','. I think that would require some major surgery to the code, but would be worth it. Note that in your original example, you want the error to contain {length:%HH:%MM}. By the time the error is detected, the only thing the code knows is the format specifier %HH:%MM. It doesn't know the length part. The error is basically in int.__format__. By the time that gets called, the format specifier has already been extracted and the argument selection (by indexing, by name, including attribute access) has already taken place. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20524 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue20521] [PATCH] Cleanup for dis module documentation
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20521 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com