[issue23184] Unused imports, variables, file in IDLE

2015-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: There were errors in the patch. FileList.py: EditorWindow is used later. RemoteDebugger.py: frame is used twice, as visible in the diff. My copy of hg is not working right at the moment, or I would have applied the rest. --

[issue23184] Unused imports, variables, file in IDLE

2015-01-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1c3f8d044589 by Terry Jan Reedy in branch '2.7': Issue #23184: delete unused idlelib file. https://hg.python.org/cpython/rev/1c3f8d044589 New changeset 364e44a49a31 by Terry Jan Reedy in branch '3.4': Issue #23184: delete unused idlelib file. https:

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-01-07 Thread Chris Angelico
Chris Angelico added the comment: I can have a poke at the __future__ import tonight, but my main concern is memory management - I'm not sufficiently familiar with the exception handling calls to be sure that I'm neither leaking nor over-freeing anything. There's also a secondary concern that

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: Heh, I guess that should have been "The main thing missing other than docs and tests is ..." :) -- ___ Python tracker ___ ___

[issue22906] PEP 479: Change StopIteration handling inside generators

2015-01-07 Thread Nick Coghlan
Nick Coghlan added the comment: As Stefan noted, the leading underscore on "_PyErr_ChainExceptions" is just a warning to third party users that we don't yet offer any API stability guarantees for it. Using it in CPython itself is entirely appropriate - that's the whole reason for exposing it t

[issue23188] Convert _PyErr_ChainExceptions to a public API

2015-01-07 Thread Nick Coghlan
New submission from Nick Coghlan: There's currently an internal helper API for chaining exceptions from C code, _PyErr_ChainExceptions. It would be good to have a public API that offered equivalent functionality for use in third party C extensions. -- messages: 233619 nosy: ncoghlan p

[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: I prefer to use the same code on all platforms. I don't like the idea of SSL bugs specific to Windows. With this change, it becomes possible to support "STARTTLS". IMO supporting this feature is more important than performance, even if I only expect a low ove

[issue22560] Add loop-agnostic SSL implementation to asyncio

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: I updated sslproto3.patch with my remarks: sslproto-4.patch Main differences with sslproto3.patch (unsorted): * write_eof raises NotImplementedError * fix write_buffer_size: use data, not offset * use tuples in the write backlog * data_received exits the loop w

[issue7651] Python3: guess text file charset using the BOM

2015-01-07 Thread Jon Dufresne
Changes by Jon Dufresne : -- nosy: +jdufresne ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue23187] Segmentation fault, possibly asyncio related

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: > The only module that I'm using that's implemented in C is ujson > https://pypi.python.org/pypi/ujson . If you think this is relevant, I can > easily try changing it to use the built-in json. To investigate an issue, we have to reduce the scope. If your progr

[issue23187] Segmentation fault, possibly asyncio related

2015-01-07 Thread Ivailo Karamanolev
Ivailo Karamanolev added the comment: > try to configure Python with ./configure --with-pydebug I'm installing 3.4.2 with this option right now and I'll reboot and run the script with gdb attached. I might be a few days before I have a result. > Are you using other external modules which are im

[issue23187] Segmentation fault, possibly asyncio related

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: > upgrading to 3.4.2 would fix it, but it didn't Oh sorry, I missed the part where you wrote that you already tested Python 3.4.2. By the way, if you already compile your own Python: try to configure Python with ./configure --with-pydebug. It adds much more d

[issue23187] Segmentation fault, possibly asyncio related

2015-01-07 Thread Ivailo Karamanolev
Ivailo Karamanolev added the comment: @haypo Maybe I didn't put it prominently enough, but I upgraded to 3.4.2 by downloading the source and installing it. The same crash with the same stack trace happens. -- ___ Python tracker

[issue23187] Segmentation fault, possibly asyncio related

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: > that's 3.4.0 I suggest you to upgrade to Python 3.4.2. Your issue may already be fixed. For example, there was the issue #21435 in the garbage collector. The issue was found with an asyncio code. Your crash occurs at "_PyObject_GC_UNTRACK(self);" which is a

[issue23187] Segmentation fault, possibly asyncio related

2015-01-07 Thread Ivailo Karamanolev
Ivailo Karamanolev added the comment: What I forgot to mention is that I'm using aiohttp for making lots of HTTP requests. http://bugs.python.org/issue21435 mentions asyncio and aiohttp and is somewhat memory management related so I thought I'm hitting a different manifestation of it and upgra

[issue23187] Segmentation fault, possibly asyncio related

2015-01-07 Thread Ivailo Karamanolev
Ivailo Karamanolev added the comment: Running out of memory is unlikely. There are many other processes running on the machine and none of them show signs of memory issues. In addition, the munin memory usage reporting doesn't show signs of steady growing or drops when the process crashes (mun

[issue23187] Segmentation fault, possibly asyncio related

2015-01-07 Thread Guido van Rossum
Guido van Rossum added the comment: That's going to be really hard to debug. Is it always the same stack trace? Could it be slowly running out of memory? (The consistent time until it happens points to this.) A segfault in dealloc might point to a refcounting bug. The rarity of the even might

[issue23187] Segmentation fault, possibly asyncio related

2015-01-07 Thread Ivailo Karamanolev
New submission from Ivailo Karamanolev: I have a program that's running Tornado on top of asyncio and uses mysql-connector-python to monitor a set of HTTP servers and save the status to MySQL. Initially I ran it with the current version of Python in the Ubuntu 14.04 repos, that's 3.4.0 and sta

[issue4431] Distutils MSVC doesn't create manifest file

2015-01-07 Thread Pavel Repin
Changes by Pavel Repin : -- nosy: -paxan ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue23185] add inf and nan to math module

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: "History, perhaps? In any case, the sign of a NaN isn't useful information in the same way that the sign of an infinity is. The IEEE 754 standard explicitly refuses to attach any meaning to the sign bit of a NaN. And if we were aiming for a full and faithfu

[issue23184] Unused imports, variables, file in IDLE

2015-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I am aware of some of these from running PyChecker over idlelib, but had not gotten around to an global patch yet. The unit test coverage is still woefully incomplete, so I will want to check each deletion. I have been meaning to delete testcode.py, but in a

[issue23180] Rename IDLE's "Windows" menu item to "Window"

2015-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: I guess the logic of the plural was that the submenu lists windows to select from. The logic of the singular is that the submenu lets a user select and jump to *a* window, just as the file menu allows one to select and open (if needed) *a* file. Somewhat odd

[issue23158] IDLE's help.txt "corrent" typo

2015-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: idlelib/help.txt has been and is being replaced by idle.html, compiled from Doc/library/idle.rst. See #16893. Idle.rst started as a marked up version of help.txt and has since been edited and will get more editing. This typo has been corrected there. Help.

[issue6171] IDLE - TreeWidget draw and double-click (Ubuntu)

2015-01-07 Thread Terry J. Reedy
Terry J. Reedy added the comment: It appears that this could be closed then. But I would like to look at the patch first if I can get to it. -- ___ Python tracker ___ __

[issue22619] Possible implementation of negative limit for traceback functions

2015-01-07 Thread Dmitry Kazakov
Changes by Dmitry Kazakov : Removed file: http://bugs.python.org/file37341/traceback_patch_2.diff ___ Python tracker ___ ___ Python-bugs-list

[issue22619] Possible implementation of negative limit for traceback functions

2015-01-07 Thread Dmitry Kazakov
Changes by Dmitry Kazakov : Removed file: http://bugs.python.org/file37181/traceback.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue22619] Possible implementation of negative limit for traceback functions

2015-01-07 Thread Dmitry Kazakov
Changes by Dmitry Kazakov : Removed file: http://bugs.python.org/file36919/tb_patch_2.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23185] add inf and nan to math module

2015-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: One more patch, fixing a misplaced period. -- Added file: http://bugs.python.org/file37635/math_inf_nan3.patch ___ Python tracker ___ __

[issue23185] add inf and nan to math module

2015-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: Thanks for the review comments. Here's an updated patch taking the review comments into account (and fixing the spelling of PY_NAN, which should have been Py_NAN). -- Added file: http://bugs.python.org/file37634/math_inf_nan2.patch __

[issue20487] Odd words in unittest.mock document.

2015-01-07 Thread Berker Peksag
Berker Peksag added the comment: Fixed. Thank you to both Andrew and Michael. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker _

[issue20487] Odd words in unittest.mock document.

2015-01-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset 230a1bfb0f59 by Berker Peksag in branch '3.4': Issue #20487: Clarify meaning of "side effect" in the magic mock documentation. https://hg.python.org/cpython/rev/230a1bfb0f59 New changeset 3cf91d2aeab3 by Berker Peksag in branch 'default': Issue #204

[issue23186] expose the client's list of ciphers during the handshake

2015-01-07 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing lis

[issue23185] add inf and nan to math module

2015-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: Here's a patch. -- assignee: -> mark.dickinson keywords: +patch Added file: http://bugs.python.org/file37633/math_inf_nan.patch ___ Python tracker

[issue22619] Possible implementation of negative limit for traceback functions

2015-01-07 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: I improved tests for *_stack and *_tb functions, fixed a few typos and added more comments. -- Added file: http://bugs.python.org/file37632/traceback_rev3.diff ___ Python tracker

[issue23185] add inf and nan to math module

2015-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: > but 0*inf and inf-inf return values with the same representation as > float('-nan'), not float('nan') Right: that's because Intel's "default" NaN (i.e., the float it produces as a result of any invalid operation) has its sign bit set. -- __

[issue23185] add inf and nan to math module

2015-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: > By tweaking the grammar we can have math.-inf. RRGH! -- ___ Python tracker ___ ___ Python-bug

[issue23185] add inf and nan to math module

2015-01-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: By tweaking the grammar we can have math.-inf. -- nosy: +pitrou ___ Python tracker ___ ___ Python-bu

[issue23185] add inf and nan to math module

2015-01-07 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are several different NaNs. >>> x = struct.unpack('d', b'\x00\x00\x00\x00\x00\x00\xf8\x7f')[0] >>> x nan >>> x == x False >>> struct.pack('d', x) b'\x00\x00\x00\x00\x00\x00\xf8\x7f' >>> x = struct.unpack('d', b'\x00\x00\x00\x00\x00\x00\xf9\x7f')[0] >>> x

[issue22619] Possible implementation of negative limit for traceback functions

2015-01-07 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: Hold on, I found 2 more bugs. Will update the patch soon. -- ___ Python tracker ___ ___ Python-bugs-

[issue23185] add inf and nan to math module

2015-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: > Why does Python return the same representation for positive and negative NaN? History, perhaps? In any case, the sign of a NaN isn't useful information in the same way that the sign of an infinity is. The IEEE 754 standard explicitly refuses to attach any

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-07 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: Why is there no "review" link next to my second patch? -- ___ Python tracker ___ ___ Python-bugs-l

[issue23086] Add start and stop parameters to the Sequence.index() ABC mixin method

2015-01-07 Thread Devin Jeanpierre
Devin Jeanpierre added the comment: I modified your test case somewhat. Also, your tests uncovered an issue with negative indexes -- oops, hadn't thought of those. Fixed. Let me know what you think. -- Added file: http://bugs.python.org/file37631/issue23086.2.patch ___

[issue23185] add inf and nan to math module

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: Oh, NaN can be signed? >>> struct.pack("d", float("nan")) b'\x00\x00\x00\x00\x00\x00\xf8\x7f' >>> struct.pack("d", float("-nan")) b'\x00\x00\x00\x00\x00\x00\xf8\xff' >>> struct.pack("d", -float("nan")) b'\x00\x00\x00\x00\x00\x00\xf8\xff' >>> struct.pack("d", -fl

[issue23186] expose the client's list of ciphers during the handshake

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue because you commit your change while I was reviewing the patch :-/ See my review at Rietveld. -- nosy: +haypo resolution: fixed -> status: closed -> open ___ Python tracker

[issue23186] expose the client's list of ciphers during the handshake

2015-01-07 Thread Roundup Robot
Roundup Robot added the comment: New changeset bc34fcccaca3 by Benjamin Peterson in branch 'default': expose the client's cipher suites from the handshake (closes #23186) https://hg.python.org/cpython/rev/bc34fcccaca3 -- nosy: +python-dev resolution: -> fixed stage: patch review -> reso

[issue23185] add inf and nan to math module

2015-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: Implementation suggestion: if possible, use the _Py_dg_stdnan and _Py_dg_infinity functions from Python/dtoa.c. These are a little safer than the Py_NAN and Py_HUGE_VAL macros, and will give results consistent with the float("inf") and float("nan") constructi

[issue23186] expose the client's list of ciphers during the handshake

2015-01-07 Thread Benjamin Peterson
New submission from Benjamin Peterson: This patch adds a shared_ciphers() method to SSLObject and SSLSocket, which allows servers to see the complete list of ciphers sent by the client during handshake. -- components: Library (Lib) files: shared-ciphers.patch keywords: patch messages:

[issue23185] add inf and nan to math module

2015-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: > float("-inf") and -float("inf") have exactly the same IEEE 754 representation Indeed: there's only one negative infinity (and only one positive infinity) in IEEE 754 binary64 format. -- ___ Python tracker

[issue23185] add inf and nan to math module

2015-01-07 Thread Mark Dickinson
Mark Dickinson added the comment: Sounds good to me. > Do we add a math.neginf IMO no: -inf should be fine. -- nosy: +mark.dickinson ___ Python tracker ___

[issue23185] add inf and nan to math module

2015-01-07 Thread Berker Peksag
Changes by Berker Peksag : -- components: +Library (Lib) stage: -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue23185] add inf and nan to math module

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: > Do we add a math.neginf, or somesuch, for float('-inf')? Or just use > -math.inf? I would prefer to only add inf. It looks like float("-inf") and -float("inf") have exactly the same IEEE 754 representation (at least on my x86_64 CPU): >>> struct.pack("d

[issue23185] add inf and nan to math module

2015-01-07 Thread Ethan Furman
New submission from Ethan Furman: Proposal: math.nan = float('nan') math.inf = float('inf') Guido's approval: https://mail.python.org/pipermail/python-ideas/2015-January/030775.html Followup question: Do we add a math.neginf, or somesuch, for float('-inf')? Or just use -math.inf?

[issue14099] ZipFile.open() should not reopen the underlying file

2015-01-07 Thread Augie Fackler
Changes by Augie Fackler : -- nosy: +durin42 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue17164] MozillaCookieJar does not handle session cookies

2015-01-07 Thread Jérémie Detrey
Jérémie Detrey added the comment: Hi again, Attached is a patch for adding test cases to test_cookiejar. Cheers, Jérémie. -- Added file: http://bugs.python.org/file37629/session-cookies-test.patch ___ Python tracker

[issue23177] test_ssl: failures on OpenBSD with LibreSSL

2015-01-07 Thread STINNER Victor
STINNER Victor added the comment: > Note that the FreeBSD port modifies the OPENSSL_VERSION_NUMBER and sets the > version number to 1.0.1g. Maybe we should remove the test on OPENSSL_VERSION (string) for LibreSSL? -- ___ Python tracker

[issue6171] IDLE - TreeWidget draw and double-click (Ubuntu)

2015-01-07 Thread Saimadhav Heblikar
Saimadhav Heblikar added the comment: Behavior described in msg229434 is right. Tested on Ubuntu 14.04 64bit with Python version 3.5.0a, TkVersion=8.5 and TclVersion=8.5. -- ___ Python tracker

[issue23177] test_ssl: failures on OpenBSD with LibreSSL

2015-01-07 Thread Bernard Spil
Bernard Spil added the comment: Note that the FreeBSD port modifies the OPENSSL_VERSION_NUMBER and sets the version number to 1.0.1g. https://svnweb.freebsd.org/ports?view=revision&revision=361642 -- nosy: +spil ___ Python tracker

[issue22619] Possible implementation of negative limit for traceback functions

2015-01-07 Thread Dmitry Kazakov
Dmitry Kazakov added the comment: Thank you, Terry. You got the proposal right. I'm glad you noticed the issues with tests, I updated the patch to fix them. -- Added file: http://bugs.python.org/file37628/traceback_rev2.diff ___ Python tracker

[issue17164] MozillaCookieJar does not handle session cookies

2015-01-07 Thread Jérémie Detrey
Jérémie Detrey added the comment: Dear all, Here is a small tentative patch for fixing this issue. Expiry times for session cookies are now written as "0", and both "0" and "" are parsed as valid expiry times for session cookies. Cheers, Jérémie. -- keywords: +patch nosy: +jdetrey ve

[issue23184] Unused imports, variables, file in IDLE

2015-01-07 Thread Al Sweigart
New submission from Al Sweigart: The IDLE code base has several unused imports and local variables. The testcode.py file seems to have been accidentally checked in. These changes were found through a lint program, not by hand. All idle unit tests pass after these changes. -- component

[issue23184] Unused imports, variables, file in IDLE

2015-01-07 Thread Al Sweigart
Changes by Al Sweigart : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue5162] multiprocessing cannot spawn child from a Windows service

2015-01-07 Thread Marc Schlaich
Marc Schlaich added the comment: This issue is not fully fixed, there are some occasions where you can still run into it. One example is if you want to spawn a new multiprocessing.Process as sub process in a multiprocessing.Process: pythonservice.exe - multiprocessing.Process - multipro

[issue2190] MozillaCookieJar ignore HttpOnly cookies

2015-01-07 Thread Jérémie Detrey
Changes by Jérémie Detrey : -- versions: +Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker ___ ___ Python-bugs-list ma

[issue2190] MozillaCookieJar ignore HttpOnly cookies

2015-01-07 Thread Jérémie Detrey
Jérémie Detrey added the comment: Dear all, In fact, this cookie.txt format is still used by curl. For instance, see https://github.com/bagder/curl/blob/curl-7_39_0/lib/cookie.c#L644 which clearly shows support for the "#HttpOnly_" prefix. Therefore, supporting this format in http.cookiejar

[issue23183] timeit CLI best of 3: undocumented output format

2015-01-07 Thread Chathuranga
New submission from Chathuranga: easy Following command is executed in terminal to use timeit module to measure time. python -m timeit -v -n 3 "time.sleep(1)" Output of the command: raw times: 3 3 3 3 loops, best of 3: 1 sec per loop The interpretation of this output is unclear, and no detail

[issue23182] Update grammar tests to use new style for annotated function definitions

2015-01-07 Thread Ian Lee
Changes by Ian Lee : -- title: Update grammar tests to use new style -> Update grammar tests to use new style for annotated function definitions ___ Python tracker ___ _

[issue23182] Update grammar tests to use new style

2015-01-07 Thread Ian Lee
New submission from Ian Lee: Per Guido's suggestion on the p...@python.org mailing list, I'm creating this issue to update the argument annotation tests at cpython/Lib/test/test_grammar.py to use the new style wording Guido requested on GitHub [1] that I proposed and was merged into PEP-8 [2]

[issue23181] Unicode "code point" should be two words in documentation

2015-01-07 Thread Al Sweigart
New submission from Al Sweigart: According to http://unicode.org/glossary/ "codepoint" is incorrect and should be changed to "code point". -- assignee: docs@python components: Documentation files: code_point_patch.diff keywords: patch messages: 233568 nosy: Al.Sweigart, docs@python prio