[issue16991] Add OrderedDict written in C
Eric Snow added the comment: Without too many optimzations, the C implementation of OrderedDict is basically between 1x and 4x the performance of raw dict. This contrasts with the pure Python OrderedDict, which falls in roughly between 4x and 100x. I've attached an addition to pybench, not intended to be committed, that compares the 3. Run any of these commands to get timing: ./python Tools/pybench/pybench.py -t ODict ./python Tools/pybench/pybench.py -t ODict -t _Py ./python Tools/pybench/pybench.py -t ODict -t _C ./python Tools/pybench/pybench.py -t ODict -t _Dict I tuned the # rounds for each test such that the raw dict results all come out to just about the same value (2ms on my computer). That way it's easy to compare the pure Python or C results to the dict results. -- Added file: http://bugs.python.org/file30461/odict-speed.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16991] Add OrderedDict written in C
Changes by Eric Snow ericsnowcurren...@gmail.com: Removed file: http://bugs.python.org/file30357/cOrderedDict.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16991] Add OrderedDict written in C
Eric Snow added the comment: Here's an updated patch that has fixes for recursive pickles and for a couple memory-related segfaults that I missed before. That leaves the following to be done: * handle the case where a node is deleted during iteration * check for any reference cycles (should be fine) * validate reentrancy (make sure everything is thread-safe around calls into Python) * make sure subclassing is okay * address any remaining TODOs in the code -- Added file: http://bugs.python.org/file30462/cOrderedDict.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18078] threading.Condition to allow notify on a specific waiter
Charles-François Natali added the comment: I'm not convinced it's really useful. Furthermore, the complexity is rather bad: if T is the average number of waiting threads, an C the number of conditions being waited on, the wait is O(C) (appending to C wait queues) and wakeup is O(CT) (C removal from a T-length deque). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18054] Add more exception related assertions to unittest
Nick Coghlan added the comment: I like the idea of using the strategy pattern to at least decouple the assertion API from the main testcase API. I also like it better than the mixin suggested earlier. We would obviously have to keep the existing methods for backwards compatibility, but could avoid adding new ones. I'm not sure what such an API would look like, though :( -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18054 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18021] Update broken link to Apple Publication Style Guide
Madison May added the comment: So I've done a quick comparison of the two, and for the most part each entry is an identical copy of the 2009 version. Some dated entries have been removed, which I would consider a plus -- who realistically needs to know how to refer to a 56K modems these day, anyhow :) Aside from this kind of removal, a slightly modified layout, and a few updated images, I haven't noticed any significant differences. What caught your eye, Ned? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18078] threading.Condition to allow notify on a specific waiter
João Bernardo added the comment: I'm not convinced it's really useful. It doesn't seem a lot useful until you *really* need it. I've got 2 highly parallel programs that took advantage of this pattern. the wait is O(C) (appending to C wait queues) and wakeup is O(CT) (C removal from a T-length deque). That's another thing that I wanted to address, but I didn't want to change the data structure in this patch. The complexity for `notify` and `notify_all` is the same as before. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18111] Add a default argument to min max
David Beazley added the comment: To me, the fact that m = max(s) if s else default doesn't work with iterators alone makes this worthy of consideration. I would also note that min/max are the only reduction functions that don't have the ability to work with a possibly empty sequence. For example: sum([]) 0 any([]) False all([]) True functools.reduce(lambda x,y: x+y, [], 0) 0 math.fsum([]) 0.0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18111 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18132] buttons in turtledemo disappear on small screens
Changes by Jan Kanis jan.pyt...@jankanis.nl: -- components: +Demos and Tools type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18132] buttons in turtledemo disappear on small screens
New submission from Jan Kanis: If the window of the turtledemo is small enough, the start/stop/clear buttons disappear. This is specifically a problem when running on a netbook with a small screen, because the buttons are never shown. For a newcommer checking out the demo app this could be very confusing as there is no indication on what went wrong, and the notification area just says 'press start button'. -- messages: 190596 nosy: JanKanis priority: normal severity: normal status: open title: buttons in turtledemo disappear on small screens versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18078] threading.Condition to allow notify on a specific waiter
Richard Oudkerk added the comment: Furthermore, the complexity is rather bad: if T is the average number of waiting threads, an C the number of conditions being waited on, the wait is O(C) (appending to C wait queues) and wakeup is O(CT) (C removal from a T-length deque). Which just means that waiting on C conditions is C times more expensive than waiting on 1 currently is. That seems reasonable enough to me, and anyway, I would expect C to be fairly small. Note that the alternative is to use a single condition and use notify_all() instead of notify(). That is likely to be much more expensive because every waiting thread must wake up to see if it should continue. But I am still not sure it is worth it. BTW, I think it would be better to have wait_for_any() return a list of ready conditions rather than a boolean. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17269] getaddrinfo segfaults on OS X when provided with invalid arguments combinations
Ronald Oussoren added the comment: I've tested a patch for the 2.7 branch on a 10.5 machine (which also failed to build without the patch), and will commit once I've finished running the testsuite on the 3.3 branch as well. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17269 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18078] threading.Condition to allow notify on a specific waiter
João Bernardo added the comment: BTW, I think it would be better to have wait_for_any() return a list of ready conditions rather than a boolean. That was the original idea until I realized `wait` and `wait_for` were just specializations of `wait_for_any`. This can probably be done with another helper function. (BTW: There are 2 commented lines in the patch that can be used to see the ready Conditions). Any suggestions? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks
Brett Cannon added the comment: I'm going to toss Armin's request over to core-mentorship since the fix is easy. Is all you are after, Armin, a ``not os.path.isfile(cfile) or os.path.islink(cfile)`` check which if true raises an exception? -- assignee: brett.cannon - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18054] Add more exception related assertions to unittest
Julian Berman added the comment: I don't either really off the top of my head, though I've toyed with some things. If there's support for some exploration I wouldn't mind attempting a POC externally though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18054 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18054] Add more exception related assertions to unittest
Michael Foord added the comment: There's always (almost) support for exploration... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18054 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18119] urllib.FancyURLopener does not treat URL fragments correctly
Changes by Mher Movsisyan mher.movsis...@gmail.com: -- nosy: +mher.movsisyan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18119 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18116] getpass.getpass() triggers ResourceWarning
Vajrasky Kok added the comment: Based on the input from Benjamin Peterson, I grab encoding from the os module in the getpass module. I put some test as well. Until the whole function is rewritten, I hope this patch will suffice and do the job properly. -- Added file: http://bugs.python.org/file30463/getpass_tty_with_test.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18116 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18005] faster modular exponentiation in some cases
Changes by Aaron Meurer asmeu...@gmail.com: -- nosy: +Aaron.Meurer ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18005 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18078] threading.Condition to allow notify on a specific waiter
Charles-François Natali added the comment: Which just means that waiting on C conditions is C times more expensive than waiting on 1 currently is. That seems reasonable enough to me, and anyway, I would expect C to be fairly small. Waking up a single thread (through notify()) is currently O(1) (since it's unqueued from the head of the deque). Here, removing a thread from a wait queue other than the one from which it was signalled is O(waiting threads). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18078] threading.Condition to allow notify on a specific waiter
João Bernardo added the comment: Here, removing a thread from a wait queue other than the one from which it was signalled is O(waiting threads). To be fair, You will probably never have more than a few hundred/thousand threads on a process. Usually you'll work under a few dozen threads. To reduce the complexity on average, you could use a set, but `notify` no longer will be able to follow insertion order. I was hoping it could be done later... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18078 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18133] Modulus not calculating properly?
New submission from Joshua: The Modulus doesn't seem to pull the proper remainder from simple calculations. Look at the difference below between the remainder of a regular division calculation and the modulus: Am I missing something??? print (str(10.2 / 2)) 5.1 print (str(10.2 % 2)) 0.1993 -- components: Windows messages: 190606 nosy: pccreator25 priority: normal severity: normal status: open title: Modulus not calculating properly? type: behavior versions: Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18132] buttons in turtledemo disappear on small screens
Changes by Berker Peksag berker.pek...@gmail.com: -- versions: -Python 2.6, Python 3.1, Python 3.2, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18132 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18133] Modulus not calculating properly?
Joshua added the comment: never mind, long day sorry! -- resolution: - works for me status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18133 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18021] Update broken link to Apple Publication Style Guide
Ned Deily added the comment: Documenting Python references to the Apple Style Guide go back to at least Python 2.3.5's documentation, at that time to the 2001 version of the Apple Style Guide. I was more curious if the Apple Style Guide was still being actively consulted by the documentation team or if this had become a vestigial link, being updated by rote. So, I'd say update the link unless Georg or someone else says it is no longer relevant. -- nosy: +georg.brandl ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18021] Update broken link to Apple Publication Style Guide
Ezio Melotti added the comment: I don't think I ever read/consulted that page, except maybe the first time I came across that link. I consult http://docs.python.org/devguide/documenting.html regularly, but that is mostly for the rst markup. Usually I just try to be consistent with the document I'm working on. Removing the link altogether would be fine with me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18021 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18134] zipfile extractall accepts wrong password
New submission from Benedict Kwok: Steps to reproduce: 1) create a ssn.txt file with social security numbers of customers 2) create a zip file with a password: zip -P secret ssn ssn.txt 3) create a python script to extract the zipfile by: import=zipfile zFile=zipfile.ZipFile(ssn.zip) try: zFile.extractall(pwd=secret) except Exception, e: print e This will extract the ssn.txt into the directory by using the right password secretdifferent 4) However, by using a wrong password proa this does not get the exception. Instead create a ssn.txt file which is corrupted. 5) Other wrong password will get the exception but not the one descripted in step 4. -- messages: 190610 nosy: benedictkwok priority: normal severity: normal status: open title: zipfile extractall accepts wrong password type: security versions: Python 2.7 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18134] zipfile extractall accepts wrong password
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18103] Create a GUI test framework for Idle
Ned Deily added the comment: Terry: FYI, I just noticed the languishing patches in Issue4343 which *might* be of some use here. -- nosy: +ned.deily ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18103 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks
Armin Rigo added the comment: That's not really what I'm after, but that's a workaround I proposed to avoid the worst breakage. I don't have an opinion about what to do with symlinks. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17932] Win64: possible integer overflow in iterobject.c
Roundup Robot added the comment: New changeset 757a121a27c2 by Victor Stinner in branch 'default': Close #17932: Fix an integer overflow issue on Windows 64-bit in iterators: http://hg.python.org/cpython/rev/757a121a27c2 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17932] Win64: possible integer overflow in iterobject.c
Changes by STINNER Victor victor.stin...@gmail.com: -- stage: committed/rejected - ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)
New submission from STINNER Victor: Our Windows 64-bit buildbot has interesting warnings: ..\Modules\_ssl.c(493): warning C4244: 'function' : conversion from 'SOCKET_T' to 'int', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_ssl.vcxproj] ..\Modules\_ssl.c(1304): warning C4244: 'function' : conversion from 'SOCKET_T' to 'int', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_ssl.vcxproj] ..\Modules\_ssl.c(1306): warning C4244: 'function' : conversion from 'SOCKET_T' to 'int', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_ssl.vcxproj] ..\Modules\_ssl.c(1360): warning C4244: 'function' : conversion from 'Py_ssize_t' to 'int', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_ssl.vcxproj] ..\Modules\_ssl.c(1655): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_ssl.vcxproj] ..\Modules\_ssl.c(1659): warning C4267: '=' : conversion from 'size_t' to 'int', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_ssl.vcxproj] ..\Modules\_ssl.c(2109): warning C4244: 'return' : conversion from 'Py_ssize_t' to 'int', possible loss of data [C:\buildbot.python.org\3.x.kloth-win64\build\PCbuild\_ssl.vcxproj] http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/2042/steps/compile/logs/warnings%20%28532%29 It looks like the _ssl.c module does mix int and size_t types. Attached patch should fix 3 warnings. I didn't test my patch except running test_ssl (with success on my Linux x64 box). -- files: ssl_int.patch keywords: patch messages: 190614 nosy: haypo, pitrou priority: normal severity: normal status: open title: _ssl module: possible integer overflow for very long strings (+2^31 bytes) versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30464/ssl_int.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18136] test_distutils failing under OS X 10.8 w/ clang
New submission from Brett Cannon: I have not had test_distutils succeed in ages. It looks like various header files are not being passed to the compiler properly as all three test failures stem from PyModuleDef_HEAD_INIT supposedly not existing or some other macro. Below is an example failure test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ... /var/folders/00/030sr000h01000cxqpysvccm000c37/T/tmpx392aa/xxmodule.c:341:5: error: use of undeclared identifier 'PyModuleDef_HEAD_INIT' PyModuleDef_HEAD_INIT, ^ /var/folders/00/030sr000h01000cxqpysvccm000c37/T/tmpx392aa/xxmodule.c:340:27: error: variable has incomplete type 'struct PyModuleDef' static struct PyModuleDef xxmodule = { ^ /var/folders/00/030sr000h01000cxqpysvccm000c37/T/tmpx392aa/xxmodule.c:340:15: note: forward declaration of 'struct PyModuleDef' static struct PyModuleDef xxmodule = { ^ /var/folders/00/030sr000h01000cxqpysvccm000c37/T/tmpx392aa/xxmodule.c:370:9: warning: implicit declaration of function 'PyModule_Create' is invalid in C99 [-Wimplicit-function-declaration] m = PyModule_Create(xxmodule); ^ /var/folders/00/030sr000h01000cxqpysvccm000c37/T/tmpx392aa/xxmodule.c:392:5: error: void function 'PyInit_xx' should not return a value [-Wreturn-type] return m; ^ ~ /var/folders/00/030sr000h01000cxqpysvccm000c37/T/tmpx392aa/xxmodule.c:395:5: error: void function 'PyInit_xx' should not return a value [-Wreturn-type] return NULL; ^ 1 warning and 4 errors generated. ERROR -- assignee: eric.araujo components: Distutils, Macintosh messages: 190615 nosy: brett.cannon, eric.araujo, tarek priority: normal severity: normal stage: needs patch status: open title: test_distutils failing under OS X 10.8 w/ clang type: behavior versions: Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18136 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17222] py_compile.compile() replaces target files, breaking special files and symlinks
Brett Cannon added the comment: Armin: I'm going off of http://bugs.python.org/msg189428 where you say you want an exception raised. If there is something else you want to suggest that's fine as long as it's not to revert the semantics since I'm not willing to do that. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17222 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11959] smtpd cannot be used without affecting global state
Barry A. Warsaw added the comment: The changes to smtpd.py seem reasonable to me. I see no reason not to make this change, so +1. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11959 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9566] Compilation warnings under x64 Windows
Roundup Robot added the comment: New changeset 46401ce03547 by Victor Stinner in branch 'default': Issue #9566: Fix compiler warning on Windows 64-bit in _bz2module.c http://hg.python.org/cpython/rev/46401ce03547 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9566 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17931] PyLong_FromPid() is not correctly defined on Windows 64-bit
Roundup Robot added the comment: New changeset 2298bcba6ec9 by Victor Stinner in branch 'default': Close #17931: Fix PyLong_FromPid() on Windows 64-bit: processes are identified http://hg.python.org/cpython/rev/2298bcba6ec9 -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17931 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17932] Win64: possible integer overflow in iterobject.c
Roundup Robot added the comment: New changeset 52075f60719e by Victor Stinner in branch 'default': Issuse #17932: Fix an integer overflow issue on Windows 64-bit in tuple http://hg.python.org/cpython/rev/52075f60719e -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17932 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9566] Compilation warnings under x64 Windows
Roundup Robot added the comment: New changeset 93f4b32fc95c by Victor Stinner in branch 'default': Issue #9566: Fix a compiler warning on Windows 64-bit in namespace_init() http://hg.python.org/cpython/rev/93f4b32fc95c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9566 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9566] Compilation warnings under x64 Windows
Roundup Robot added the comment: New changeset 5dcbd5d8d004 by Victor Stinner in branch 'default': Issue #9566: Fix compiler warning on Windows 64-bit http://hg.python.org/cpython/rev/5dcbd5d8d004 New changeset 41b8be55b160 by Victor Stinner in branch 'default': Issue #9566: Fix compiler warning on Windows 64-bit http://hg.python.org/cpython/rev/41b8be55b160 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9566 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17206] Py_XDECREF() expands its argument multiple times
STINNER Victor added the comment: AMD64 Windows7 SP1 3.x buildbot is crashing in test_marshal. It looks like a regression introduced by the changeset aff41a6421c2: [ 88/375] test_marshal Traceback (most recent call last): File ../lib/test/regrtest.py, line 1611, in module main_in_temp_cwd() File ../lib/test/regrtest.py, line 1586, in main_in_temp_cwd main() File ../lib/test/regrtest.py, line 774, in main raise Exception(Child error on {}: {}.format(test, result[1])) Exception: Child error on test_marshal: Exit code 3221225725 http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/2009/steps/test/logs/stdio -- resolution: fixed - status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11959] smtpd cannot be used without affecting global state
Giampaolo Rodola' added the comment: Changes to Doc/library/asyncore.rst should be reverted. Also I would do: - asynchat.async_chat.__init__(self, conn, map) + asynchat.async_chat.__init__(self, conn, map=map) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11959 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Roundup Robot added the comment: New changeset f431cd0edd85 by Victor Stinner in branch 'default': Issue #13772: Fix compiler warnings on Windows http://hg.python.org/cpython/rev/f431cd0edd85 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Roundup Robot added the comment: New changeset c351591f1f63 by Victor Stinner in branch 'default': Issue #13772: fix _check_dirA(): call *A() functions, not *W() functions http://hg.python.org/cpython/rev/c351591f1f63 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
STINNER Victor added the comment: @Jason R. Coombs: Can you please review my following commit? It looks like you made a copy/paste failure in _check_dirA() :-) New changeset c351591f1f63 by Victor Stinner in branch 'default': Issue #13772: fix _check_dirA(): call *A() functions, not *W() functions http://hg.python.org/cpython/rev/c351591f1f63 -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17206] Py_XDECREF() expands its argument multiple times
Amaury Forgeot d'Arc added the comment: Hum, a stack overflow? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17206 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18137] format(float, str): integer overflow for huge precision
New submission from STINNER Victor: format(1.2, .%sf % (2**32 + 2)) returns 1.20: the integer overflow is not catced. Attached patch fixes the issue. -- components: Interpreter Core files: float_format_precision.patch keywords: patch messages: 190629 nosy: haypo, mark.dickinson priority: normal severity: normal status: open title: format(float, str): integer overflow for huge precision versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file30465/float_format_precision.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue9566] Compilation warnings under x64 Windows
Roundup Robot added the comment: New changeset 36c35a1893fe by Victor Stinner in branch 'default': Issue #9566: Fix compiler warning on Windows 64-bit http://hg.python.org/cpython/rev/36c35a1893fe New changeset 88a21c5a97ef by Victor Stinner in branch 'default': Issue #9566: Fix compiler warning on Windows 64-bit http://hg.python.org/cpython/rev/88a21c5a97ef New changeset aeebbae8c74c by Victor Stinner in branch 'default': Issue #9566: Fix compilater warnings on Windows 64-bit http://hg.python.org/cpython/rev/aeebbae8c74c -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9566 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Jason R. Coombs added the comment: @Victor Stinner Thanks for fixing this. You're absolutely right. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Roundup Robot added the comment: New changeset e024236ea253 by Victor Stinner in branch 'default': Issue #13772: Fix a compiler warning on Windows http://hg.python.org/cpython/rev/e024236ea253 New changeset d9f3ea27f826 by Victor Stinner in branch 'default': Issue #13772: Mark helper functions as private (static) http://hg.python.org/cpython/rev/d9f3ea27f826 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue13772] listdir() doesn't work with non-trivial symlinks
Roundup Robot added the comment: New changeset c8212fca8747 by Victor Stinner in branch 'default': Issue #13772: Use syntax for literal wchar_t character http://hg.python.org/cpython/rev/c8212fca8747 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13772 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4343] New function in Tkinter.py: setup_master
Terry J. Reedy added the comment: I am still confused about the master/parent business and why required args are documented as optional. (Besides #18131, I also discovered that messageboxes usually, but not always, require parent=something passed, to be collected into **options. I need to read more before I can really review and think about applying this. Why isn't _default_root initialized to something useful instead of None. If it were, _support_default_root would not be needed. The new function is slightly different from the code it replaces. The main difference I see with Misc.setup is that your code does *not* stash Tk() in _default_root. Since every Tk() call creates a new screen window, I do not see how this is correct. On the plus side, I believe your patch would fix part of the problem I reported in #18131. -- nosy: +terry.reedy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17628] str==str: compare the first character before calling memcmp()
Changes by STINNER Victor victor.stin...@gmail.com: -- title: str==str: compare the first and last character before calling memcmp() - str==str: compare the first character before calling memcmp() ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17628 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18129] Fatal Python error: Cannot recover from stack overflow.
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18129 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue17991] ctypes.c_char gives a misleading error when passed a one-character unicode string
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4343] New function in Tkinter.py: setup_master
Terry J. Reedy added the comment: After searching through tkinter.py for '_default_root', the patch looks better. The point I missed before is that Tk().__init__(self,...) normally calls _loadtk(self) which installs self as _default_tk if it was None before. So the new function will return the same Tk object each call after the first (unless _default_tk is somehow reset to None.) This also means that the assignment in BaseWidget.setup, _default_root = Tk(), which the patch deletes, is redundant and misleading, and should go. I think 'getmaster' or 'get_master' would be a better name than 'setup_master' as setting up a new master is the 2nd backup choice and will happen only once in a session. Most call will get an existing master -- either the one passed in or the once stored as _default_root The patch needs to be updated for 3.4 and run with current tests. -- versions: +Python 3.4 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4343 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18103] Create a GUI test framework for Idle
Terry J. Reedy added the comment: Thanks Ned. I commented on the issue. The code in the proposed function will fix one of the two problems with tkinter.Variable that I noted in #18131. I can imagine there might be situations in which it would also be useful for testing, as GP claims. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18103 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18138] ssl.SSLContext.add_cert()
New submission from Christian Heimes: The patch implements an add_cert(pem_or_der_data) method for the ssl.SSLContext() object. On success the method adds a trusted CA cert to the context's internal cert store. The CA certificate can either be an ASCII unicode string (PEM format) or buffer object (DER / ASN1 format). The patch also implements a get_cert_count() method for debugging. I'm going to remove that function eventually as it doesn't give correct answers when the object table contains CRLs, too. A correct implementation might be useful to verify set_default_verify_paths(). I've split up the functions so I can re-use _add_cert() in my upcoming patch for an interface to crypt32.dll on Windows. -- components: Extension Modules files: sslctx_add_cert.patch keywords: patch messages: 190637 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: ssl.SSLContext.add_cert() type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file30466/sslctx_add_cert.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18138 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18134] zipfile extractall accepts wrong password
R. David Murray added the comment: This is a duplicate of issue 10876. According to that issue it is a bug in the zipfile format. -- nosy: +r.david.murray resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - Zipfile sometimes considers a false password to be correct ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18134 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16991] Add OrderedDict written in C
Eric Snow added the comment: Here's one solution to the deletion-during-iteration problem. It makes the iterators track the key rather than the node, at the expense of a sliver of speed on __iter__() and keys(). -- Added file: http://bugs.python.org/file30467/cOrderedDict-iterators-by-key.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue16991] Add OrderedDict written in C
Eric Snow added the comment: The concern about reference cycles here lies in their existence in the linked-list. To see what I mean, check out the use of weakrefs in the pure Python implementation at Lib/collections/__init__.py. As the current implementation does not use PyObjects for the linked-list, I'm going to call this a non-issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16991 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue11470] Flag inappropriate uses of callable class attributes
Changes by Nick Coghlan ncogh...@gmail.com: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11470 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18139] email module's add_header appends instead of inserting
New submission from Kiran Bandla: This issue is in message.py in the email module. The add_header method should insert the new header on the top of the existing headers. The current function implementation appends the header at the end of the existing headers. -- components: Library (Lib) messages: 190641 nosy: kbandla priority: normal severity: normal status: open title: email module's add_header appends instead of inserting type: behavior versions: Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18139 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18135] _ssl module: possible integer overflow for very long strings (+2^31 bytes)
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18135 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue18137] format(float, str): integer overflow for huge precision
Changes by Serhiy Storchaka storch...@gmail.com: -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18137 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue4331] Add functools.partialmethod
Nick Coghlan added the comment: I don't believe it is reasonable to change the behaviour of partial at this late stage of the game. It's documented as behaving like staticmethod (albeit by not implementing the descriptor protocol at all), so that's no longer something we can change. If issue 11470 is added, then we'll just implement the staticmethod-like behaviour explicitly rather than leaving it as implicit. More importantly, the acceptance of PEP 443's functools.singledispatch makes it more desirable than ever to support partial binding for method implementations *even when the descriptor protocol is not involved*. Accordingly, I suggest converting this proposal to a separate functools.partialmethod API that: 1. When called directly, passes the first positional argument as the first positional argument of the underlying function (providing call time binding of self, just like a normal function) 2. When retrieved from a class, returns itself 3. When retrieved from an instance, returns an appropriate bound method object (providing method lookup time binding of self, just like a normal function) functools.partial will then continue to behave as it always has (thus posing no backwards compatibility risks), while the new partialmethod implementation should work with both class descriptor protocol based dispatch (through point 3) *and* the new functools.singledispatch mechanism (through point 1). -- components: +Library (Lib) nosy: +ncoghlan title: Can't use _functools.partial() created function as method - Add functools.partialmethod versions: -Python 2.7, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4331 ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com