[issue32917] ConfigParser writes a superfluous final blank line

2018-03-09 Thread TitanSnow
TitanSnow added the comment: If we treat the original behavior as a bug, it’s much easier to write a patch that just changes the default behavior and never outputs a final blank line. I have looked through the testsuite of it. It seems that the original author had knew

[issue33038] GzipFile doesn't always ignore None as filename

2018-03-09 Thread Diego Argueta
New submission from Diego Argueta : The Python documentation states that if the GzipFile can't determine a filename from `fileobj` it'll use an empty string and won't be included in the header. Unfortunately, this doesn't work for SpooledTemporaryFile which has a

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Brett Cannon added the comment: - [x] ast module for Python 3 - [x] compile() for Python 3 - [x] dbm.dumb.open() - [ ] ast module for Python 2 (see https://github.com/python/cpython/pull/5960) - [ ] compile() for Python 2 (see https://github.com/python/cpython/pull/6043) At

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +5809 ___ Python tracker ___

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Change by Brett Cannon : -- pull_requests: +5808 ___ Python tracker ___ ___

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Brett Cannon added the comment: @Serhiy: Correct, which is what the warning says: https://github.com/python/cpython/pull/6043/files . -- ___ Python tracker

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Yury Selivanov
Change by Yury Selivanov : -- nosy: -yselivanov ___ Python tracker ___ ___

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In 3.7 compile() can crash not only when compiling to an AST object (due to recursive AST optimization). -- ___ Python tracker

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Brett Cannon added the comment: Thanks for the feedback, Serhiy! Based on that, the new TODO list is: - [x] ast module for Python 3 - [x] compile() for Python 3 - [ ] dbm.dumb.open() - [ ] ast module for Python 2 (see https://github.com/python/cpython/pull/5960) - [ ]

[issue32458] test_asyncio failures on Windows

2018-03-09 Thread Ned Deily
Ned Deily added the comment: Note, I think this failure is still happening occasionally on the windows7 buildbot; for example: http://buildbot.python.org/all/#/builders/111/builds/68/steps/3/logs/stdio http://buildbot.python.org/all/#/builders/111/builds/85/steps/3/logs/stdio

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think we can ignore the inspect module. It is unlikely that it will cause a crash unintentionally, and it is hard to use this for attacks. The attacker needs to create an extension function with malicious __text_signature__,

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +5807 ___ Python tracker ___

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +5806 ___ Python tracker ___

[issue33037] Skip sending/receiving after SSL transport closing

2018-03-09 Thread Andrew Svetlov
Change by Andrew Svetlov : -- keywords: +patch pull_requests: +5805 stage: -> patch review ___ Python tracker ___

[issue33037] Skip sending/receiving after SSL transport closing

2018-03-09 Thread Andrew Svetlov
New submission from Andrew Svetlov : Now asyncio raises exceptions like "None type has no method feed_appdata" because self._sslpipe is set to None on closing. See https://github.com/aio-libs/aiohttp/issues/2546 for more details. IMHO the fix should just skip

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Change by Brett Cannon : -- pull_requests: +5804 ___ Python tracker ___ ___

[issue33014] Clarify doc string for str.isidentifier()

2018-03-09 Thread David Beazley
David Beazley added the comment: That wording isn't much better in my opinion. If I'm sitting there looking at methods like str.isdigit(), str.isnumeric(), str.isascii(), and str.isidentifier(), seeing keyword.iskeyword() makes me think it's a method regardless of whether

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Brett Cannon added the comment: Actually, the TODO list is: - [x] ast module for Python 3 - [ ] compile() - [ ] eval() for >= 3.7 - [ ] exec() for >= 3.7 - [ ] dbm.dumb.open() - [ ] inspect - [ ] ast module for Python 2 (see https://github.com/python/cpython/pull/5960)

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Brett Cannon added the comment: I have the changes in for Python 3 for the ast module. Updated TODO list: - [x] ast module - [ ] compile() - [ ] eval() for >= 3.7 - [ ] exec() for >= 3.7 - [ ] dbm.dumb.open() - [ ] inspect -- ___

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Brett Cannon added the comment: New changeset f2fffd41b42d88fe36b483852ae33d5a415b7082 by Brett Cannon (Miss Islington (bot)) in branch '3.7': bpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter (GH-5960) (GH-6041)

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Brett Cannon added the comment: New changeset b316c44b0105d11a80ff971636143735f3655bbf by Brett Cannon (Miss Islington (bot)) in branch '3.6': bpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter (GH-5960) (GH-6042)

[issue33015] Fix function cast warning in thread_pthread.h

2018-03-09 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +brett.cannon, pitrou ___ Python tracker ___ ___

[issue33014] Clarify doc string for str.isidentifier()

2018-03-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: No new string method ;-). "Call function keyword.iskeyword() ..." should make it clear that iskeyword is not a string method. Samyam, I suggest getting agreement on new wording first. Then do PR that is more or less 'pre-approved'.

[issue24084] pstats: sub-millisecond display

2018-03-09 Thread Ned Deily
Ned Deily added the comment: Based on the review comments, it looks like the existing PR 3931 needs to be revised and resubmitted against current master branch. So, can we close PR 3931? -- nosy: +ned.deily versions: +Python 3.8 -Python 3.5

[issue33007] Objects referencing private-mangled names do not roundtrip properly under pickling.

2018-03-09 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +alexandre.vassalotti ___ Python tracker ___ ___

[issue30940] Documentation for round() is incorrect.

2018-03-09 Thread Ned Deily
Ned Deily added the comment: This issue seems to have slipped through the cracks with a couple of long-standing PR's open. Anyone feel up to finishing it? -- nosy: +ned.deily stage: needs patch -> patch review versions: +Python 3.8 -Python 3.5

[issue32987] tokenize.py parses unicode identifiers incorrectly

2018-03-09 Thread Terry J. Reedy
Terry J. Reedy added the comment: I verified on Win10 with 3.5 (which cannot be patched) and 3.7.0b2 that ab·cd is accepted as a name and that tokenize fails as described. -- nosy: +terry.reedy stage: -> needs patch versions: +Python 3.7, Python 3.8

[issue30077] Support Apple AIFF-C pseudo compression in aifc.py

2018-03-09 Thread Ned Deily
Change by Ned Deily : -- versions: +Python 3.8 -Python 3.7 ___ Python tracker ___ ___

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +5803 ___ Python tracker ___

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +5802 ___ Python tracker ___

[issue32758] Stack overflow when parse long expression to AST

2018-03-09 Thread Brett Cannon
Brett Cannon added the comment: New changeset 7a7f100eb352d08938ee0f5ba59c18f56dc4a7b5 by Brett Cannon in branch 'master': bpo-32758: Warn that ast.parse() and ast.literal_eval() can segfault the interpreter (GH-5960)

[issue33020] Tkinter old style classes

2018-03-09 Thread Ned Deily
Ned Deily added the comment: Thanks for the suggestion but I agree with Serhiy. We should not make this kind of significant change to 2.7 at this stage of its life cycle. -- nosy: +ned.deily resolution: -> wont fix stage: -> resolved status: open -> closed

[issue32993] urllib and webbrowser.open() can open w/ file: protocol

2018-03-09 Thread Ned Deily
Ned Deily added the comment: This is now marked as a security issue but I do not understand what the problem is. urllib / urllib2 are supposed to be able to open file:// style URLs, that was not the point of Issue11662.

[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-03-09 Thread miss-islington
miss-islington added the comment: New changeset 3c39beb65d003b209a98a79af4aaf94ba16d0d29 by Miss Islington (bot) in branch '3.7': bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)

[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-03-09 Thread miss-islington
Change by miss-islington : -- pull_requests: +5801 ___ Python tracker ___

[issue32517] test_read_pty_output() of test_asyncio hangs on macOS 10.13.2 (darwin 17.3.0)

2018-03-09 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset 12f74d8608c15cacd9d5786524e2be9ca36f007e by Yury Selivanov (Nathan Henrie) in branch '3.6': bpo-32517: fix test_read_pty_output() hangs on macOS 10.13.2+ (GH-6037)

[issue32576] concurrent.futures.thread deadlock due to Queue in weakref callback

2018-03-09 Thread Ned Deily
Ned Deily added the comment: Yes, backporting all of the required code to earlier releases would be out of scope for a maintenance release, particularly at this late stage in the 3.6 life cycle. Let's see whether disabling the GC is a sufficient workaround until 3.7 is

[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-09 Thread Ned Deily
Ned Deily added the comment: Sorry, I am not seeing this failure on 10.13.3 with either current 3.6 head or with v3.6.1. Didn't try anything else. -- nosy: +ned.deily ___ Python tracker

[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-09 Thread Nathan Henrie
Nathan Henrie added the comment: Traceback: ``` File "cpython/Lib/test/test_selectors.py", line 453, in test_above_fd_setsize self.assertEqual(NUM_FDS // 2, len(s.select())) File "cpython/Lib/selectors.py", line 376, in select fd_event_list =

[issue33036] test_selectors.PollSelectorTestCase failing on macOS 10.13.3

2018-03-09 Thread Nathan Henrie
New submission from Nathan Henrie : Failing for me on latest 3.6, 3.6.1, 3.5.5, may be related to https://bugs.python.org/issue32517, presumably a change on macOS KQueue stuff. Can anyone else on macOS 10.13.3 see if they can reproduce? ``` make clean && ./configure

[issue33035] Some examples in documentation section 4.7.2 are incorrect

2018-03-09 Thread Emanuel Barry
Emanuel Barry added the comment: The documentation is correct. The first argument in both of those cases is a str, which may not be what you were expecting, but the calls are still valid. -- nosy: +ebarry resolution: -> not a bug stage: -> resolved status: open

[issue33035] Some examples in documentation section 4.7.2 are incorrect

2018-03-09 Thread Stephen Wille Padnos
New submission from Stephen Wille Padnos : Section 4.7.2 of the documentation, "Keyword Arguments", has several examples of valid calls to the sample function parrot. The function definition is: def parrot(voltage, state='a stiff', action='voom', type='Norwegian Blue'):

[issue33018] Improve issubclass() error checking and message

2018-03-09 Thread Alexey Izbyshev
Alexey Izbyshev added the comment: Regarding status quo (expanding the examples of @inada.naoki and @jab): >>> import typing >>> import collections.abc as cabc >>> issubclass(typing.Mapping, cabc.Mapping) Traceback (most recent call last): File "", line 1, in File

[issue33018] Improve issubclass() error checking and message

2018-03-09 Thread Ivan Levkivskyi
Ivan Levkivskyi added the comment: To be honest I am still undecided on this. In principle, I am OK with status quo, but I am also OK, with the PR that will prohibit non-classes. I am a bit worried that it may break some existing code, so it is probably not for 3.7.

[issue33018] Improve issubclass() error checking and message

2018-03-09 Thread INADA Naoki
INADA Naoki added the comment: >> Isn't it just a limitation? >> Most Python-implemented objects supports weakref. I don't think "requiring >> weakref support implies it must be type object". > Formally, there is no implication. It is the abc module authors who know

[issue32972] unittest.TestCase coroutine support

2018-03-09 Thread Andrew Svetlov
Andrew Svetlov added the comment: 1. We have an agreement that we need `asyncSetUp` and all family. I strongly support it. `super()` call is crucial argument I think. 2. Should async setup/teardown methods be a part of `unittest.TestCase` or we need a new

[issue32917] ConfigParser writes a superfluous final blank line

2018-03-09 Thread TitanSnow
TitanSnow added the comment: I’m afraid of breaking the backward compatibility. -- ___ Python tracker ___

[issue32576] concurrent.futures.thread deadlock due to Queue in weakref callback

2018-03-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Michał, sorry, I doubt it. The fix is highly non-trivial as it first requires backporting a new feature (see issue14976). I'm cc'ing the 3.6 branch release manager just in case. If apparently you're witnessing this in controlled situations

[issue33033] Clarify that the signed number convertors to PyArg_ParseTuple... *do* overflow checking

2018-03-09 Thread Antony Lee
Antony Lee added the comment: One could just add, immediately below the "Numbers" section, something like: "The signed convertors (b, h, i, ...) perform overflow checking. The unsigned convertors (B, H, I, ...) do not." That would actually be shorter than the current

[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-09 Thread Jonathan
Jonathan added the comment: Arguably the same logic applies to out-of-range ports: > a = urlsplit('http://example.com:444') > a.port Traceback (most recent call last): File "", line 1, in File "E:\Software\_libs\Python36\lib\urllib\parse.py", line 169, in

[issue32576] concurrent.futures.thread deadlock due to Queue in weakref callback

2018-03-09 Thread Michał Górny
Michał Górny added the comment: Could you get this fixed in earlier versions of CPython? Given that 3.7 is not yet released, having this broken in 3.5 and 3.6 is highly undesirable. This apparently seems to affect our tooling [1] and telling our users to use 3.7 beta is

[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-09 Thread Jonathan
New submission from Jonathan : (Confirmed in 2.7.14, 3.5.4, and 3.6.3) I have this really bad URL from a crawl: "http://Server=sde; Service=sde:oracle$sde:oracle11g:geopp; User=bodem; Version=SDE.DEFAULT" if I try and parse it with wither urlparse or urlsplit it

[issue33034] urllib.parse.urlparse and urlsplit not raising ValueError for bad port

2018-03-09 Thread Jonathan
Change by Jonathan : -- versions: +Python 3.5 ___ Python tracker ___ ___