[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-05-27 Thread Siddhesh Poyarekar
Siddhesh Poyarekar added the comment: > Pedantically the correct way is to cast to a function pointer with no > prototype (empty parentheses) and from that to the target type. See for > example. See for example https://godbolt.org/g/FdPdUj This is one way that the gcc diagnostics explicitly a

[issue33661] urllib may leak sensitive HTTP headers to a third-party web site

2018-05-27 Thread Artem Smotrakov
Artem Smotrakov added the comment: Hi Ivan, Yes, unfortunately specs don't say anything about this scenario. > once you have given your credentials to a server, it is free to do whatever > it wants with them. I hope servers don't share this opinion :) > So, your proposed filtering does not

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-05-27 Thread Antti Haapala
Antti Haapala added the comment: Well, there's only one problem with casting to void *: while converting the function pointer to another *is* standard-compliant, and GCC is being just hypersensitive here, casting a function pointer to void * isn't, though it is a common extension (http://port

[issue33610] IDLE: Make multiple improvements to CodeContext

2018-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: While trying out variable lines, #33642, I encounter two related issues. First is the context colors. Black on gray is a variant of black on white. I am using the dark theme, white on dark blue. For fixed sized context, the high contrast is okay. For vari

[issue33642] IDLE: Use variable number of lines in CodeContext

2018-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: After testing the patch as a user, I would like 3 user-visible changes. 1. Only display a blank line when there are no context lines. 2. Replace the 'lines' option with a 'maxlines' option. There is no need to worry about, or explain to users (see 3.) the po

[issue25015] Idle: scroll Text faster with mouse wheel

2018-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: This is 'out of date' in the sense that I have decided that the root problem is scrolling by pixels instead of lines. Once we do the latter, for #33664, we can just scroll by, say, 5 lines instead of 3, which I think is sufficient. -- resolution: ->

[issue33664] IDLE: scroll text by lines, not pixels.

2018-05-27 Thread Terry J. Reedy
New submission from Terry J. Reedy : When tk and hence, IDLE, opens a text window, it contains an integral number of lines of text in the base font. Clicking a vertical scrollbar arrow button moves text up or down exactly one line. Clicking in the trough between the buttons and and the slide

[issue33661] urllib may leak sensitive HTTP headers to a third-party web site

2018-05-27 Thread Ivan Pozdeev
Ivan Pozdeev added the comment: According to https://stackoverflow.com/questions/1969709/how-to-forward-headers-on-http-redirect , there's nothing in the specs that mention (even the possibility) of any special request header processing. According to https://tools.ietf.org/html/rfc7231#secti

[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: Christian, I believe https://github.com/python/cpython/pull/7130/commits/bd17a5593f03e3f2d39a64f5afd3ffb77c97e914 fixes the issue with OpenSSL 1.1.1 (socket.shutdown was missing and asyncio's protocol didn't receive EOF, instead the connection was terminated

[issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit

2018-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: > I should have known better that I wasn't going to find a bug in python :) We have a lot of bugs, as any other software :) Don't be afraid to open issues. I'll close this bug, feel free to re-open. -- resolution: -> not a bug stage: -> resolved st

[issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit

2018-05-27 Thread skorpeo
skorpeo added the comment: yes, in this case they were meant to stay open to write and read multiple messages. I was hoping to read data when it is available, the other work around was to specify n, but that also blocked once there was no more data to be fetchedEither way I will stick to qu

[issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit

2018-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: > You are also correct that there is no clean up for closing the pipes. It's not just about the cleanup. If you don't close the pipes, they will be open forever, so there will be no EOF for which read(-1) will wait forever. -- ___

[issue33663] Web.py wsgiserver3.py raises TypeError when CSS file is not found

2018-05-27 Thread Jean-Marc Le Peuvedic
New submission from Jean-Marc Le Peuvedic : When running the built-in web server of web.py, the following error messages appear when the HTTP client fetches a non existing CSS file: TypeError('WSGI response header value 469 is not of type str.',) Traceback (most recent call last): File "/hom

[issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit

2018-05-27 Thread skorpeo
skorpeo added the comment: Yes makes sense, it could be another bug with TTY or just my error and I did preface that I am submitting this humbly. You are also correct that there is no clean up for closing the pipes. On Mon, May 28, 2018 at 1:45 AM, Yury Selivanov wrote: > > Yury Selivanov a

[issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit

2018-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: "if not block:" means EOF and replacing it with "if len(block) < self._limit:" would break everything. There might be another bug here (with TTY) or, maybe, there's a bug in pty_test.py. For example, I don't see how you closing reader_pipe or writer_pipe.

[issue33662] asyncio Stream Reader Blocks on read when data fetched is less than limit

2018-05-27 Thread skorpeo
New submission from skorpeo : I humbly submit what I think may be a bug in the asyncio.StreamReader.read() function. When n=-1 is supplied and the data is less than self._limit the read function creates a future and never wakes it up. I believe the culprit is https://github.com/python/cpytho

[issue33601] [EASY DOC] Py_UTF8Mode is not documented

2018-05-27 Thread Yuwei Ren
Change by Yuwei Ren : -- keywords: +patch pull_requests: +6777 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list ma

[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: 'deleted somehow': Christian added himself while I had this page open, so when I submitted without refreshing, the nosy list did not include him. When I saw the red warning, I did not notice the nosy list change; I should have. -- __

[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-27 Thread Christian Heimes
Christian Heimes added the comment: Linux -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyt

[issue32458] test_asyncio: test_start_tls_server_1() fails randomly

2018-05-27 Thread Yury Selivanov
Yury Selivanov added the comment: Terry, you somehow deleted Christian from the nosy list. Christian, > It's failing reproducible with OpenSSL 1.1.1 and TLS 1.3 enabled. I haven't > seen it failing with TLS 1.2 yet. On Linux or Windows? -- nosy: +christian.heimes __

[issue32832] doctest should support custom ps1/ps2 prompts

2018-05-27 Thread Tim Peters
Tim Peters added the comment: Sergey, I understand that, but I don't care. The only people I've ever seen _use_ this are people writing an entirely different shell interface. They're rare. There's no value in complicating doctest to cater to theoretical use cases that don't exist - to the

[issue32832] doctest should support custom ps1/ps2 prompts

2018-05-27 Thread Sergey B Kirpichev
Sergey B Kirpichev added the comment: > doctest was intended to deal with the standard CPython terminal shell. I'd > like to keep it that way The point is: ps1/ps2 customization could be considered as part of the standard shell. If stdlib allow such changes - doctest module should take this

[issue33642] IDLE: Use variable number of lines in CodeContext

2018-05-27 Thread Terry J. Reedy
Terry J. Reedy added the comment: Unlinked duplicate PR entry. I have no idea how that could happen. -- ___ Python tracker ___ ___

[issue33642] IDLE: Use variable number of lines in CodeContext

2018-05-27 Thread Terry J. Reedy
Change by Terry J. Reedy : -- pull_requests: -6745 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue32832] doctest should support custom ps1/ps2 prompts

2018-05-27 Thread Tim Peters
Tim Peters added the comment: doctest was intended to deal with the standard CPython terminal shell. I'd like to keep it that way, but recognize that everyone wants to change everything into "a framework" ;-) How many other shells are there? As Sergey linked to, IPython already dealt with

[issue33409] Clarify the interaction between locale coercion & UTF-8 mode

2018-05-27 Thread Ned Deily
Ned Deily added the comment: Nick, thanks for the notification. I assume this means you are planning to provide one or more updates. If so, any idea when? -- ___ Python tracker

[issue32832] doctest should support custom ps1/ps2 prompts

2018-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Tim, what do you say, feature or feature creep, straightforward patch or can of worms? -- assignee: -> tim.peters nosy: +rhettinger, tim.peters type: -> enhancement versions: +Python 3.8 ___ Python tracker

[issue33494] random.choices ought to check that cumulative weights are in ascending order

2018-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: > or, for a minimal doc change, change this sentence: > "For example, the relative weights [10, 5, 30, 5] are > equivalent to the cumulative weights [10, 15, 45, 50]," > > to: > "For example, the relative call 'weights[10, 5, 30, 5]' > is equivalent to the

[issue33598] ActiveState Recipes links in docs, and the apparent closure of Recipes

2018-05-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Marking this a closed. It can be reopened if ActiveState makes an announcement that they're actually going to kill the existing links. Otherwise, this is pure speculation and not an actual problem to be solved. -- resolution: -> later stage: ->

[issue18307] Relative path in co_filename for zipped modules

2018-05-27 Thread Vitaly Murashev
Vitaly Murashev added the comment: Pull-requests for 2.7, 3.7 and master submitted on github, all tests look passed, so Python dev-team, please, take a look. -- ___ Python tracker ___

[issue18307] Relative path in co_filename for zipped modules

2018-05-27 Thread Vitaly Murashev
Change by Vitaly Murashev : -- versions: +Python 2.7, Python 3.7, Python 3.8 -Python 3.3, Python 3.4 ___ Python tracker ___ ___ Pytho

[issue33630] test_posix: TestPosixSpawn fails on PPC64 Fedora 3.x

2018-05-27 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: @serhiy.storchaka Is the race condition/freed memory reusage in the test suite or in the posix module? -- nosy: +pablogsal ___ Python tracker

[issue3405] Add support for the new data option supported by event generate (Tk 8.5)

2018-05-27 Thread Matthias Kievernagel
Change by Matthias Kievernagel : -- pull_requests: +6776 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue32832] doctest should support custom ps1/ps2 prompts

2018-05-27 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +6775 stage: -> patch review ___ Python tracker ___ ___ Python-bugs-lis

[issue18307] Relative path in co_filename for zipped modules

2018-05-27 Thread Vitaly Murashev
Vitaly Murashev added the comment: > Vitaly, in the future please use gender-neutral words Mariatta, OK, got it, I am sorry for that. I am not a native speaker. -- ___ Python tracker _

[issue33409] Clarify the interaction between locale coercion & UTF-8 mode

2018-05-27 Thread Nick Coghlan
Nick Coghlan added the comment: Ned, just adding you to the nosy list here, as I don't think this is a release blocker per se (since nothing's actually *broken*), but the current state of the PEP 538/540 docs is such that it isn't going to be clear to most readers why both mechanisms exist, o

[issue18307] Relative path in co_filename for zipped modules

2018-05-27 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +6774 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-05-27 Thread Xavier de Gaye
Xavier de Gaye added the comment: > But the problem is that additional flags can be used, e.g. METH_CLASS. Right, https://docs.python.org/3/c-api/structures.html says: "The individual flags indicate either a calling convention or a binding convention". This may be overcome by introducing anot

[issue18307] Relative path in co_filename for zipped modules

2018-05-27 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +6773 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue18307] Relative path in co_filename for zipped modules

2018-05-27 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +6772 stage: test needed -> patch review ___ Python tracker ___ ___ Python-bugs-list mail

[issue33661] urllib may leak sensitive HTTP headers to a third-party web site

2018-05-27 Thread Alex Gaynor
Change by Alex Gaynor : -- nosy: +orsenthil ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue33661] urllib may leak sensitive HTTP headers to a third-party web site

2018-05-27 Thread Artem Smotrakov
New submission from Artem Smotrakov : After discussing it on secur...@python.org, it was decided to disclose it. Here is the original report: Hello Python Security Team, Looks like urllib may leak sensitive HTTP headers to third parties when handling redirects. Let's consider the followin

[issue33659] leak in pythonrun.c?

2018-05-27 Thread lekma
lekma added the comment: sorry, my mistake, I missed the format specifier in PyObject_CallFunction() sorry for the noise -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker

[issue33658] Introduce a method to concatenate regex patterns

2018-05-27 Thread Thrlwiti
Change by Thrlwiti : -- nosy: +THRlWiTi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.or

[issue33635] OSError when using pathlib.Path.rglob() to list device files

2018-05-27 Thread Ronald Oussoren
Ronald Oussoren added the comment: This is fairly odd behaviour of macOS, the same error can be seen from a bash session: $ stat /dev/fd/3 stat: /dev/fd/3: stat: Bad file descriptor The reason os.walk() works while the Path().is_file doesn't is that os.walk() explicitly guards against OSErro

[issue33660] pathlib.Path.resolve() returns path with double slash when resolving a relative path in root directory

2018-05-27 Thread QbLearningPython
New submission from QbLearningPython : I have recently found a weird behaviour while trying to resolve a relative path located on the root directory on a macOs. I tried to resolve a Path('spam') and the interpreter answered PosixPath('//spam') —double slash for root— instead of (my) expected

[issue33659] leak in pythonrun.c?

2018-05-27 Thread lekma
New submission from lekma : Am I wrong in thinking 'filename_obj' should be decrefed before the last two return statements in set_main_loader()? If yes, what am I missing? -- components: Interpreter Core messages: 317789 nosy: lekma priority: normal severity: normal status: open title:

[issue33658] Introduce a method to concatenate regex patterns

2018-05-27 Thread Ales Kvapil
New submission from Ales Kvapil : After removing inline flags (deprecated in https://bugs.python.org/issue22493) piping patterns will not work: pats = [r'(?m)^line.continues$', r'(?s)begin.*?end'] re.compile('|'.join(pats)) Maybe there should be introduced some method to merge patterns (simila

[issue22493] Deprecate the use of flags not at the start of regular expression

2018-05-27 Thread Ales Kvapil
Ales Kvapil added the comment: See also https://bugs.python.org/issue33658 -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue22493] Deprecate the use of flags not at the start of regular expression

2018-05-27 Thread Ales Kvapil
Ales Kvapil added the comment: Maybe there should be introduced some method to merge patterns as just piping patterns will not work: pats = [r'(?m)^line.continues$', r'(?s)begin.*?end'] re.compile('|'.join(pats)) -- nosy: +aleskva ___ Python tracker

[issue32911] Doc strings no longer stored in body of AST

2018-05-27 Thread Benjamin Ragan-Kelley
Benjamin Ragan-Kelley added the comment: That should work well for us. Our patches for this are all conditional on the module body being empty, so reverting causes us no issues at all. Thank you! -- nosy: +Benjamin Ragan-Kelley ___ Python tracker

[issue32911] Doc strings no longer stored in body of AST

2018-05-27 Thread Ned Deily
Ned Deily added the comment: OK, since I believe everyone who has spoken up so far has chosen B or a variation on it, I think we can eliminate option A. And there also seems to be a consensus so far among the core developers who have spoken up for the approach in PR 7121. Before we commit t

[issue32911] Doc strings no longer stored in body of AST

2018-05-27 Thread INADA Naoki
INADA Naoki added the comment: I'm +1 on PR-7121 too. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http