[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset d03fd5d041b6f514daf0aabc0c159d8727c33980 by Mariatta Wijaya in branch '2.7': Issue #29329: Improve documentation for hex(). Patch by Ammar Askar https://github.com/python/cpython/commit/d03fd5d041b6f514daf0aabc0c159d8727c33980 --

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- resolution: -> fixed stage: commit review -> resolved ___ Python tracker ___

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks, Pekka, Eryk, Ammar, and Zachary :) -- status: open -> closed ___ Python tracker ___

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset d7804789368a by Mariatta Wijaya in branch '2.7': Issue #29329: Improve documentation for hex(). Patch by Ammar Askar https://hg.python.org/cpython/rev/d7804789368a -- nosy: +python-dev ___ Python tracker

[issue29329] Incorrect documentation for custom `hex()` support on Python 2

2017-02-01 Thread Zachary Ware
Zachary Ware added the comment: LGTM. -- assignee: docs@python -> Mariatta nosy: +Mariatta, zach.ware stage: needs patch -> commit review ___ Python tracker

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset abfa17511f7ce8f1a6394f28f82ffb9a916fcf03 by Mariatta Wijaya in branch 'master': Issue #29381: Clarify ordering of UNIX shebang line as source encoding line https://github.com/python/cpython/commit/abfa17511f7ce8f1a6394f28f82ffb9a916fcf03 New

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3f5b24dd4b38bf885a80f4bb5f605cd6b0c49ead by Mariatta Wijaya in branch '2.7': Issue #29381: Clarify ordering of UNIX shebang line as source encoding line https://github.com/python/cpython/commit/3f5b24dd4b38bf885a80f4bb5f605cd6b0c49ead --

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 848eeb1debc94a82660bf5af4e3d554b02b81c2e by Mariatta Wijaya in branch '3.6': Issue #29381: Clarify ordering of UNIX shebang line as source encoding line https://github.com/python/cpython/commit/848eeb1debc94a82660bf5af4e3d554b02b81c2e --

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Mariatta Wijaya
Mariatta Wijaya added the comment: Thanks, Jim, Marco, and Raymond :) -- ___ Python tracker ___ ___

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset df356d3c916e by Mariatta Wijaya in branch '2.7': Issue #29381: Clarify ordering of UNIX shebang line as source encoding line https://hg.python.org/cpython/rev/df356d3c916e -- ___ Python tracker

[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread INADA Naoki
INADA Naoki added the comment: microbench: $ ./python.patched -m perf timeit --compare-to `pwd`/python.default -s "d = b''" -- "d.decode('ascii')" python.default: . 109 ns +- 1 ns python.patched: . 102 ns +- 1 ns Median +- std dev: [python.default] 109

[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread INADA Naoki
INADA Naoki added the comment: Here is the result. I'll investigate mako result. + ../python.default -m perf compare_to default.json patched.json -G --min-speed=1 Slower (20): - mako: 40.9 ms +- 0.4 ms -> 44.7 ms +- 0.6 ms: 1.09x slower (+9%) - chaos: 298 ms +- 3 ms -> 308 ms +- 2 ms: 1.03x

[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread INADA Naoki
INADA Naoki added the comment: I'm running pyperformance. -- Added file: http://bugs.python.org/file46487/loadmethod-methoddescr.patch ___ Python tracker

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 483d9133fd7e by Mariatta Wijaya in branch '3.6': Issue #29381: Clarify ordering of UNIX shebang line as source encoding line https://hg.python.org/cpython/rev/483d9133fd7e New changeset 762a93935afd by Mariatta Wijaya in branch 'default': Issue

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : -- stage: -> resolved ___ Python tracker ___

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : -- resolution: -> fixed ___ Python tracker ___

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset abfa17511f7ce8f1a6394f28f82ffb9a916fcf03 by Mariatta Wijaya in branch '3.6': Issue #29381: Clarify ordering of UNIX shebang line as source encoding line https://github.com/python/cpython/commit/abfa17511f7ce8f1a6394f28f82ffb9a916fcf03 --

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Changes by Roundup Robot : -- status: open -> closed ___ Python tracker ___

[issue29381] Tutorial documentation contains undefined reference to #!

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3d712292f2fa by Mariatta Wijaya in branch '3.6': Issue #29381: Clarify ordering of UNIX shebang line as source encoding line https://hg.python.org/cpython/rev/3d712292f2fa -- nosy: +python-dev ___ Python

[issue29368] Optimize unpickling list-like objects: use extend() instead of append()

2017-02-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Could anyone please make a review of my explanation comment? > I have doubts about a wording. The wording is correct and clear. -- ___ Python tracker

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Rustom Mody
On Thursday, February 2, 2017 at 5:44:51 AM UTC+5:30, Erik wrote: > On 01/02/17 23:20, Wildman via Python-list wrote: > > On Wed, 01 Feb 2017 21:29:00 +, Chris Green wrote: > > > >> Wildman wrote: > >>> On Wed, 01 Feb 2017 19:15:13 +, Chris Green wrote: > >> OK, no problem, but isn't it

Re: How coding in Python is bad for you

2017-02-01 Thread Erik
On 02/02/17 01:41, Chris Angelico wrote: On Thu, Feb 2, 2017 at 10:49 AM, Erik wrote: Well, _logically_ there is a flag (in as much as it could be thought of like that to make it easy to understand - and in C, that's pretty much what you have to actually do unless you

Re: How coding in Python is bad for you

2017-02-01 Thread Erik
On 02/02/17 02:05, MRAB wrote: Both suggestions are a little long-winded. Couldn't we just abbreviate them to "else:"? :-) You are not wrong ;) E. -- https://mail.python.org/mailman/listinfo/python-list

Re: How coding in Python is bad for you

2017-02-01 Thread MRAB
On 2017-02-01 23:49, Erik wrote: On 30/01/17 02:14, Steve D'Aprano wrote: On Mon, 30 Jan 2017 10:52 am, Erik wrote: It would be even better if it was "else if not break:" to make the meaning clearer. break is not the only way to exit the for loop Fine - "else if not break or raise or

[issue29416] Path.mkdir can get into a recursive error loop

2017-02-01 Thread Eryk Sun
Eryk Sun added the comment: This case is similar to issue 29079. It should only attempt to make the parent to handle ENOENT if self and self.parent aren't equal. Here's the snippet from Path.mkdir: try: self._accessor.mkdir(self, mode) except FileExistsError: if not

[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: > * Create unbound PyCFunction and cache it Does it mean create a new private type, similar to PyCFunction_Type (PyCFunctionObject) but without the self attribute? IMHO creating a new type is complex. I'm not sure that it's worth it, especially if the

[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: INADA Naoki: "LOAD_METHOD support was based on tp_fastcall. (...) Other ideas to support LOAD_METHOD for C function are: * Add _PyMethodDescr_FastCallKeywords and call it in call_function." It seems like a very small subset of tp_fastcall. If it provides a

Re: How coding in Python is bad for you

2017-02-01 Thread Chris Angelico
On Thu, Feb 2, 2017 at 10:49 AM, Erik wrote: > Well, _logically_ there is a flag (in as much as it could be thought of like > that to make it easy to understand - and in C, that's pretty much what you > have to actually do unless you really want to use 'goto'). The last

Re: Is shutil.get_terminal_size useless?

2017-02-01 Thread Chris Angelico
On Thu, Feb 2, 2017 at 12:24 PM, Steve D'Aprano wrote: etc, etc, etc, etc. It's not a proxy for "being piped" - it's that when your output isn't going to a terminal, asking "what is my terminal size" isn't particularly productive. >>> >>> Then

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread Gregory P. Smith
Changes by Gregory P. Smith : -- nosy: -gregory.p.smith ___ Python tracker ___ ___

Re: Is shutil.get_terminal_size useless?

2017-02-01 Thread Steve D'Aprano
On Sat, 28 Jan 2017 11:53 pm, Peter Otten wrote: [...] >> I see that as "Hey look, we can fool shutil into returning >> absolute garbage instead of the terminal size!" > > There are valid reasons for temporarily altering the number of columns, > like writing to a file or preparing a code sample.

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Michael Torrie
On 02/01/2017 02:29 PM, Chris Green wrote: > OK, thank you, what a strange way to do it. Why is it strange? Essentially, python bindings for any GObject-based library are now fully automatic via this gi module. No longer do we need custom bindings for each component of a glib-based library.

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: INADA Naoki added the comment: > My motivation is improve speed, Ah, if the motivation is performance, I would like to see benchmark results :-) I understand that an AST optimizer would help to produce more efficient bytecode, right? > reduce memory usage, I

[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread Yury Selivanov
Yury Selivanov added the comment: > * Add _PyMethodDescr_FastCallKeywords and call it in call_function. This option seems to be the easiest to implement. -- ___ Python tracker

Re: Is shutil.get_terminal_size useless?

2017-02-01 Thread Steve D'Aprano
On Sun, 29 Jan 2017 04:58 am, Chris Angelico wrote: > On Sun, Jan 29, 2017 at 3:15 AM, Steve D'Aprano > wrote: >> On Sat, 28 Jan 2017 10:50 pm, Chris Angelico wrote: >> >>> On Sat, Jan 28, 2017 at 9:49 PM, Steve D'Aprano >>> wrote:

[issue29417] Sort entries in foo.dist-info/RECORD

2017-02-01 Thread Douglas Greiman
New submission from Douglas Greiman: Feature Request: It would make reproducible builds easier if the [package].dist-info/RECORD files were sorted in some deterministic way. For example, building a Docker image twice and comparing the results. The current ordering seems to be arbitrary, and

[issue29263] Implement LOAD_METHOD/CALL_METHOD for C functions

2017-02-01 Thread INADA Naoki
INADA Naoki added the comment: LOAD_METHOD support was based on tp_fastcall. Without LOAD_METHOD support, methoddescr_get is called and stack layout after LOAD_METHOD is: NULL, (bound)PyCFunction, arg1, arg2, ... argN With LOAD_METHOD support, stack layout is: PyMethodDescrObject, self,

[issue29410] Moving to SipHash-1-3

2017-02-01 Thread INADA Naoki
INADA Naoki added the comment: OK, let's forget Py_HASH_CUTOFF for now and focus on SipHash-13. -- ___ Python tracker ___

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread INADA Naoki
INADA Naoki added the comment: My motivation is improve speed, reduce memory usage, and quicker startup time for real world applications. If some optimization in FAT optimizer has significant speedup, I want to try it. But this time, my motivation is I felt "everyone think constant folding

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread Eugene Toder
Eugene Toder added the comment: Yes, doing optimizations on AST in CPython is unlikely to give any sizable speed improvements in real world programs. Python as a language is not suited for static optimization, and even if you manage to inline a function, there's still CPython's interpreted

Re: Python3 using requests to grab HTTP Auth Data

2017-02-01 Thread Νίκος Βέργος
# Give user the file requested print('''http://superhost.gr/data/files/%s;>''' % realfile) authuser = os.environ.get( 'REMOTE_USER', 'Άγνωστος' ) print( authuser ) Trying this, feels liek i'm almost there except

Re: Rename file without overwriting existing files

2017-02-01 Thread Steve D'Aprano
On Tue, 31 Jan 2017 02:56 am, Grant Edwards wrote: > On 2017-01-30, Terry Reedy wrote: >> On 1/30/2017 8:58 AM, Peter Otten wrote: >>> Jussi Piitulainen wrote: >> It doesn't seem to be documented. >>> >>> For functions with a C equivalent a look into the man page is

[issue29415] Exposing handle._callback and handle._args in asyncio

2017-02-01 Thread Yury Selivanov
Yury Selivanov added the comment: > @yselivanov I just wanted to use the handler to avoid storing the callback > and args in my own data structure (I would just store the handlers whenever I > may need to reschedule). Not a big deal, I don't have to use handler as a > storage space, if it's

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Erik
On 01/02/17 23:20, Wildman via Python-list wrote: On Wed, 01 Feb 2017 21:29:00 +, Chris Green wrote: Wildman wrote: On Wed, 01 Feb 2017 19:15:13 +, Chris Green wrote: OK, no problem, but isn't it very non-portable? I don't see why not. It should work on any

[issue29416] Path.mkdir can get into a recursive error loop

2017-02-01 Thread Steve Dower
Steve Dower added the comment: Might be worth checking if this is resolved with issue29079, which is already in for 3.6.1. -- ___ Python tracker ___

Re: Python3 using requests to grab HTTP Auth Data

2017-02-01 Thread Νίκος Βέργος
Τη Πέμπτη, 2 Φεβρουαρίου 2017 - 1:51:52 π.μ. UTC+2, ο χρήστης Ian έγραψε: > On Wed, Feb 1, 2017 at 2:51 PM, Νίκος Βέργος wrote: > > Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 11:41:28 μ.μ. UTC+2, ο χρήστης Michael > > Torrie έγραψε: > >> On 02/01/2017 01:51 PM, Νίκος Βέργος wrote: >

Re: Python3 using requests to grab HTTP Auth Data

2017-02-01 Thread Ian Kelly
On Wed, Feb 1, 2017 at 2:51 PM, Νίκος Βέργος wrote: > Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 11:41:28 μ.μ. UTC+2, ο χρήστης Michael > Torrie έγραψε: >> On 02/01/2017 01:51 PM, Νίκος Βέργος wrote: >> > as well as input() for both user & pass combo but iam not getting in >> >

[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: Hum, I don't know well how Python tracing works, but if we had a new "instruction level debugging" feature, it must be an opt-in feature. Existing debuggers must not be flooded by such events. -- ___ Python tracker

Re: How coding in Python is bad for you

2017-02-01 Thread Erik
On 30/01/17 02:14, Steve D'Aprano wrote: On Mon, 30 Jan 2017 10:52 am, Erik wrote: It would be even better if it was "else if not break:" to make the meaning clearer. break is not the only way to exit the for loop Fine - "else if not break or raise or return:", then ;) [that is not a

[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread George King
George King added the comment: Thanks to both of you for your feedback. I will take a stab at updating the patch with Victor's suggestions as soon as I can. -- ___ Python tracker

[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread George King
George King added the comment: Attached is a demo of using the feature as a fancy replacement for __ltrace__. It demonstrates using a closure for the local trace function to track the previous offset, and prints the offset transitions as src -> dst pairs. This helped me learn a lot about how

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Wildman via Python-list
On Wed, 01 Feb 2017 21:29:00 +, Chris Green wrote: > Wildman wrote: >> On Wed, 01 Feb 2017 19:15:13 +, Chris Green wrote: >> >> > Wildman wrote: >> >> On Wed, 01 Feb 2017 17:12:26 +, Chris Green wrote: >> >> >> >> > I'm often hitting this

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Chris Green
Wildman wrote: > On Wed, 01 Feb 2017 19:15:13 +, Chris Green wrote: > > > Wildman wrote: > >> On Wed, 01 Feb 2017 17:12:26 +, Chris Green wrote: > >> > >> > I'm often hitting this problem, how does one find out what package to > >> > install to

[issue29415] Exposing handle._callback and handle._args in asyncio

2017-02-01 Thread Max
Max added the comment: @yselivanov I just wanted to use the handler to avoid storing the callback and args in my own data structure (I would just store the handlers whenever I may need to reschedule). Not a big deal, I don't have to use handler as a storage space, if it's not supported across

[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread George King
George King added the comment: Xavier, this is a misunderstanding; sorry for not being more clear. When I said "remove the `else`", I was proposing this: + if (tstate->inst_tracing) { + result = call_trace(func, obj, tstate, frame, PyTrace_INSTRUCTION, Py_None); + } Line-oriented

[issue29416] Path.mkdir can get into a recursive error loop

2017-02-01 Thread Dan Buchoff
Changes by Dan Buchoff : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list

[issue29416] Path.mkdir can get into a recursive error loop

2017-02-01 Thread Dan Buchoff
New submission from Dan Buchoff: If a path has a non-existent anchor, Path.mkdir can get into a RecursionError as it tries to recursively create the parent. I expect a more sane error. This is readily reproducible in Windows with `Path('Z:').mkdir(parents=True)` Example execution: Python

[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: > I do not agree, Python debuggers are already really really slow. They should > not have to process 'instruction' trace events as this would happen if George > does "Remove the `else` to always trace with PyTrace_INSTRUCTION, rather than > as an alternate to

[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread Xavier de Gaye
Xavier de Gaye added the comment: > About performances: it's fine to add anything to maybe_call_line_trace(), it > cannot impact performances when tracing is not used. I do not agree, Python debuggers are already really really slow. They should not have to process 'instruction' trace events

[issue29415] Exposing handle._callback and handle._args in asyncio

2017-02-01 Thread Yury Selivanov
Yury Selivanov added the comment: > Is it safe to use the _callback and _args attributes of asyncio.Handle? Is it > possible to officially expose them as public API? I'd be -1 on exposing them. Alternative asyncio event loop implementations such as uvloop don't have those attributes, and

[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Yury Selivanov
Yury Selivanov added the comment: > Yury, I'm more than happy to help! I've spent a decent amount of time > learning about code objects, byte code, etc. and I'd love to put that > knowledge to use. Let me know the best way to find these issues on the > tracker or otherwise. Certainly! There

[issue29300] Modify the _struct module to use FASTCALL and Argument Clinic

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: > It looks to me that the type of the self parameter can be changed from > PyObject* to PyStructObject*. This will make the patch larger but the final > code simpler. I like the idea, but I prefer to do in a separated change, once the first big one is

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9f889393ab0362229c42bc31056f3ef9735a1d27 by Serhiy Storchaka in branch 'master': Issue #20185: Converted the int class to Argument Clinic. https://github.com/python/cpython/commit/9f889393ab0362229c42bc31056f3ef9735a1d27 --

[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: A new Sphinx declaration sounds great to me, but you might want to check with some Sphinx or Python-docs expert. I somehow misread the code of IocpProactor.connect(), so ignore that part -- the point is that it's not always a coroutine. --

Re: Python3 using requests to grab HTTP Auth Data

2017-02-01 Thread Νίκος Βέργος
Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 11:41:28 μ.μ. UTC+2, ο χρήστης Michael Torrie έγραψε: > On 02/01/2017 01:51 PM, Νίκος Βέργος wrote: > > as well as input() for both user & pass combo but iam not getting in chrome > > the basic pop-up HTTP auth window. > > > > Any idea why? > > What you're

[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: inst-tracing-2.diff: * Rebased patch applied on Mercurial, I had to fix a conflict in sys_settrace() * I replaced your PyEval_SetTraceInstructions() function with a new private _PyEval_SetTraceEx() method * I changed sys.settrace() API to convert the

[issue29415] Exposing handle._callback and handle._args in asyncio

2017-02-01 Thread Max
New submission from Max: Is it safe to use the _callback and _args attributes of asyncio.Handle? Is it possible to officially expose them as public API? My use case: handle = event_loop.call_later(delay, callback) # this function can be triggered by some events def

Re: How to know what to install (Ubuntu/Debian) for a given import?

2017-02-01 Thread Michael Torrie
On 02/01/2017 01:03 PM, Wildman via Python-list wrote: > > It is the proper way. This page helps explain it. > > http://askubuntu.com/questions/784068/what-is-gi-repository-in-python > >> ... and doesn't it need an internet connection? > > No. However the gi module provides access to GTK+3,

[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Yury Selivanov
Yury Selivanov added the comment: > Maybe we should switch all these to "awaitable"? I like this! Would it be OK to add a new sphinx declaration? So that: .. coroutinemethod:: AbstractEventLoop.shutdown_asyncgens() would become: .. awaitable:: AbstractEventLoop.shutdown_asyncgens()

Re: Python3 using requests to grab HTTP Auth Data

2017-02-01 Thread Michael Torrie
On 02/01/2017 01:51 PM, Νίκος Βέργος wrote: > as well as input() for both user & pass combo but iam not getting in chrome > the basic pop-up HTTP auth window. > > Any idea why? What you're describing is not something you can do with an interactive Python script. HTTP-level authentication is

[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Emily Morehouse
Emily Morehouse added the comment: Serhiy, thank you for the update. I looked over your patch to ensure that I understood your solution. I also appreciate your tests, as I was able to see other edge cases that I perhaps would not have thought of. Yury, I'm more than happy to help! I've spent

[issue29368] Optimize unpickling list-like objects: use extend() instead of append()

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: pickle-appends-extend-3.patch LGTM. Even if I don't see any refleak, you might just run "./python -m test -R 3:3 test_pickle" just to be sure :-) -- ___ Python tracker

[issue29344] sock_recv not detected a coroutine

2017-02-01 Thread Guido van Rossum
Guido van Rossum added the comment: The word coroutine has a more specific meaning though (and we have iscoroutine*() inspection functions to check for it). Maybe we should switch all these to "awaitable"? Also note that in proactor_events.py, sock_connect() is *not* a coroutine. In fact I'm

[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Yury Selivanov
Yury Selivanov added the comment: Emily, if you have time and want to help us with the inspect module, we have many other unresolved issues. I'd be happy to help you with code reviews etc. -- ___ Python tracker

[issue29368] Optimize unpickling list-like objects: use extend() instead of append()

2017-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Victor. Your wording looks simpler to me. -- Added file: http://bugs.python.org/file46484/pickle-appends-extend-3.patch ___ Python tracker

[issue29368] Optimize unpickling list-like objects: use extend() instead of append()

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: > Could anyone please make a review of my explanation comment? I have doubts > about a wording. I'm not fluent in english, so I'm not the best for this task. But I reviewed your patch ;-) -- ___ Python tracker

[issue29339] Interactive: Move to same indentation level as previousline

2017-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > The only way that I can think of is to delay indentation until the first > character is typed, and not to indent if it is a space or tab. This will not help for "else" or "except". -- ___ Python tracker

[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: +gvanrossum ___ Python tracker ___ ___

[issue23980] Documentation for format units starting with 'e' is inconsistent

2017-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: LGTM. -- nosy: +serhiy.storchaka ___ Python tracker ___ ___

[issue20185] Derby #17: Convert 49 sites to Argument Clinic across 13 files

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset aa7ac93d23b2 by Serhiy Storchaka in branch 'default': Issue #20185: Converted the int class to Argument Clinic. https://hg.python.org/cpython/rev/aa7ac93d23b2 -- ___ Python tracker

[issue11549] Build-out an AST optimizer, moving some functionality out of the peephole optimizer

2017-02-01 Thread STINNER Victor
STINNER Victor added the comment: At the AST level, you have a wide range of possible optimizations. See the optimizations that I implemented in fatoptimizer (FAT Python) to have an idea: http://fatoptimizer.readthedocs.io/en/latest/optimizations.html FAT Python adds guards checked at runtime,

[issue29400] Instruction level tracing via sys.settrace

2017-02-01 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +xdegaye ___ Python tracker ___ ___ Python-bugs-list

[issue29354] Python 2.7.12: pydoc.help(lambda (a, ): lambda x: a) raises IndexError

2017-02-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You were on right way Emily. Sorry for crossing your road, but I already had a written patch. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

Re: Python3 using requests to grab HTTP Auth Data

2017-02-01 Thread Νίκος Βέργος
Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 9:22:46 μ.μ. UTC+2, ο χρήστης Chris Angelico έγραψε: > You should use the input() function (called raw_input() in Python 2) > for a user name, and the getpass module for the password: I have just tried === # Give user the file

[issue29339] Interactive: Move to same indentation level as previousline

2017-02-01 Thread 12345 67890
12345 67890 added the comment: That one is pretty tricky. The only way that I can think of is to delay indentation until the first character is typed, and not to indent if it is a space or tab. From: Serhiy Storchaka Sent: Wednesday, February 1, 2017 2:39 PM To: xov...@gmail.com Subject:

[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 97c8ec91eb10a04c797e4dac99971e4152abcbec by Serhiy Storchaka in branch '2.7': Issue #29028: Fixed possible use-after-free bugs in the subscription of the https://github.com/python/cpython/commit/97c8ec91eb10a04c797e4dac99971e4152abcbec

[issue29028] Use-After-Free in PyString_FromStringAndSize() of stringobject.c

2017-02-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 8cfa6d3065b3 by Serhiy Storchaka in branch '2.7': Issue #29028: Fixed possible use-after-free bugs in the subscription of the https://hg.python.org/cpython/rev/8cfa6d3065b3 -- nosy: +python-dev ___

Re: Python3 using requests to grab HTTP Auth Data

2017-02-01 Thread Νίκος Βέργος
Τη Τετάρτη, 1 Φεβρουαρίου 2017 - 9:22:46 μ.μ. UTC+2, ο χρήστης Chris > You should use the input() function (called raw_input() in Python 2) > for a user name, and the getpass module for the password: i have just tried: # Give user the file requested url =

  1   2   3   >