[issue32439] Clean up the code for compiling comparison expressions

2017-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 02b9ef27752ff4873c592ac3afe7e3410f715984 by Serhiy Storchaka in branch 'master': bpo-32439: Clean up the code for compiling comparison expressions. (#5029)

[issue32452] Brackets and Parentheses used in an ambiguous way

2017-12-29 Thread kandhan
kandhan added the comment: "round brackets instead of square brackets" sounds better. Its simple and direct and doesn't require any extra operations other than the required one. -- ___ Python tracker

[issue32452] Brackets and Parentheses used in an ambiguous way

2017-12-29 Thread Steven D'Aprano
Steven D'Aprano added the comment: In British, Australian, New Zealander, and Indian English (and sometimes Canada), at least, "bracket" on its own typically means round brackets () and is rarely if ever used for square brackets [] or curly brackets {} without the

[issue23749] asyncio missing wrap_socket (starttls)

2017-12-29 Thread Yury Selivanov
Change by Yury Selivanov : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue23749] asyncio missing wrap_socket (starttls)

2017-12-29 Thread Yury Selivanov
Yury Selivanov added the comment: New changeset f111b3dcb414093a4efb9d74b69925e535ddc470 by Yury Selivanov in branch 'master': bpo-23749: Implement loop.start_tls() (#5039) https://github.com/python/cpython/commit/f111b3dcb414093a4efb9d74b69925e535ddc470 --

[issue32453] shutil.rmtree can have O(n^2) performance on large dirs

2017-12-29 Thread Niklas Hambüchen
New submission from Niklas Hambüchen : See http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=24412edeaf556a for the explanation and equivalent fix in coreutils. The gist ist that deleting entries in inode order can improve deletion performance dramatically. To obtain

[issue28564] shutil.rmtree is inefficient due to listdir() instead of scandir()

2017-12-29 Thread Niklas Hambüchen
Niklas Hambüchen added the comment: I've filed https://bugs.python.org/issue32453, which is about O(n^2) deletion behaviour for large directories. -- nosy: +nh2 ___ Python tracker

[issue32452] Brackets and Parentheses used in an ambiguous way

2017-12-29 Thread kandhan
kandhan added the comment: In the above comment, Line 1 is the URL where it needs improvement Line 2 and 3 are the actual content in the page that needs improvement Line 4 is the proposed solution -- ___ Python tracker

[issue32452] Brackets and Parentheses used in an ambiguous way

2017-12-29 Thread kandhan
New submission from kandhan : https://docs.python.org/3/tutorial/classes.html 9.10. Generator Expressions Some simple generators can be coded succinctly as expressions using a syntax similar to list comprehensions but with "parentheses instead of brackets" Since

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-12-29 Thread Nick Coghlan
Change by Nick Coghlan : -- keywords: +patch pull_requests: +4929 stage: needs patch -> patch review ___ Python tracker ___

Re: Goto (Posting On Python-List Prohibited)

2017-12-29 Thread Rustom Mody
On Saturday, December 30, 2017 at 8:35:27 AM UTC+5:30, Lawrence D’Oliveiro wrote: > On Saturday, December 30, 2017 at 12:12:23 PM UTC+13, bartc wrote: > > Looking at 14 million lines of Linux kernel sources, which are in C, > > over 100,000 of them use 'goto'. About one every 120 lines. > >

[issue32451] python -m venv activation issue when using cygwin on windows

2017-12-29 Thread Kevin
New submission from Kevin : attempts from within cygwin: 1. The Posix way: $ python -m venv taco $ cd taco $ source bin/activate -bash: $'\r': command not found -bash: Scripts/activate: line 4: syntax error near unexpected token `$'{\r'' 'bash: Scripts/activate: line 4:

[issue31975] Add a default filter for DeprecationWarning in __main__

2017-12-29 Thread Nick Coghlan
Change by Nick Coghlan : -- assignee: -> ncoghlan ___ Python tracker ___ ___

[issue10381] Add timezone support to datetime C API

2017-12-29 Thread Nick Coghlan
Nick Coghlan added the comment: Would it be possible to deprecate (or at least stop enhancing) the current datetime C API and add a new capsule based one instead? We're trying to get extension module authors to *stop* relying on C level globals, since it causes problems

[issue30449] Improve __slots__ datamodel documentation

2017-12-29 Thread mpb
mpb added the comment: Can __slots__ be assigned a string? If so, what are the consequences? I find the current docs lack clarity. For example from the docs for 3.7.0a3: https://docs.python.org/3.7/reference/datamodel.html#slots > 3.3.2.4. __slots__ > > [snip] > >

[issue32450] non-descriptive variable name

2017-12-29 Thread Yuri Kanivetsky
New submission from Yuri Kanivetsky : Not a big issue, really. At some point the code switches from "ndots" name: https://github.com/python/cpython/blob/v3.7.0a3/Python/ast.c#L3385 to "level" name:

Goto

2017-12-29 Thread Mikhail V
MRAB wrote: > It's OK for code that's close to the metal, but in high-level code? No. > Python has managed for >25 years without it, and I've yet to see a > convincing use-case. "convincing" is a broad term I think, especially for syntax proposals ;) I think often one wish to use it just to

How to create a python extension module from a shared library?

2017-12-29 Thread Etienne Robillard
Hi all, I would like to extend uWSGI by creating a CPython extension module for the libuwsgi.so shared library included in the distribution. My goal is to use this automatically generated CPython module for extending uWSGI. I have summarized my current approach here:

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Nick Coghlan
Nick Coghlan added the comment: Another point in favour of the JSR approach is that it should make it easier for tools like coverage.py to continue mapping opcode coverage to line coverage. I also like Serhiy's proposed strategy of separating the initial introduction of the

Re: Goto (Posting On Python-List Prohibited)

2017-12-29 Thread MRAB
On 2017-12-29 23:12, bartc wrote: On 29/12/2017 21:55, Lawrence D’Oliveiro wrote: On Saturday, December 30, 2017 at 9:03:50 AM UTC+13, bartc wrote: Why most newer, higher level languages don't, I don't know. Perhaps because the people who design them want to make programming harder? I don’t

[issue32426] Tkinter.ttk Widget does not define wich option exists to set the cursor

2017-12-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The tkinter docs currently omit much, but refer one to, among other places, http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html, which has a page with images and names. http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/cursors.html

[issue32421] Keeping an exception in cache can segfault the interpreter

2017-12-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yonathon, when replying by email, please delete the quoted message, except possibly for a specific line, as it is redundant noise when posted on the web page. -- nosy: +terry.reedy ___ Python

[issue32420] LookupError : unknown encoding : [0x7FF092395AD0] ANOMALY

2017-12-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Since there is no evident CPython bug, I am closing this. If CPython gets a bogus encoding for the std streams, it cannot output a normal traceback on sys.stderr. >From StackOverflow: "TensorFlow is an open source library for machine

[issue32449] MappingView must inherit from Collection instead of Sized

2017-12-29 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4928 stage: -> patch review ___ Python tracker ___

Re: Goto (Posting On Python-List Prohibited)

2017-12-29 Thread Skip Montanaro
Looking at 14 million lines of Linux kernel sources, which are in C, over 100,000 of them use 'goto'. About one every 120 lines. Isn't C's goto statement restricted to the current function? I imagine setjmp and longjmp calls might be more insidious. Skip --

[issue28134] socket.socket(fileno=fd) does not work as documented

2017-12-29 Thread Christian Heimes
Christian Heimes added the comment: Yuri, * The patch is purely about Python's view of the socket. The actual behavior of the OS socket fd is not influenced by socket.socket()'s family, type and protocol. However the especially the family is critical for Python because a

[issue32449] MappingView must inherit from Collection instead of Sized

2017-12-29 Thread Yahya Abou Imran
Yahya Abou Imran added the comment: And I just saw that Raymon Hettinger made it inherting from Sized: https://github.com/python/cpython/blame/master/Lib/_collections_abc.py#L694 So I we were to ahve his opinion on this... --

Re: Goto (Posting On Python-List Prohibited)

2017-12-29 Thread bartc
On 29/12/2017 21:55, Lawrence D’Oliveiro wrote: On Saturday, December 30, 2017 at 9:03:50 AM UTC+13, bartc wrote: Why most newer, higher level languages don't, I don't know. Perhaps because the people who design them want to make programming harder? I don’t use gotos in C code. Why should it

[issue32449] MappingView must inherit from Collection instead of Sized

2017-12-29 Thread Yahya Abou Imran
Yahya Abou Imran added the comment: https://mail.python.org/pipermail/python-ideas/2017-December/048489.html Guido is waiting for objection on this... I have absolutly no idea why this decision was made. These tests

Re: Goto

2017-12-29 Thread bartc
On 29/12/2017 21:56, Stefan Ram wrote: Chris Angelico writes: On Sat, Dec 30, 2017 at 8:03 AM, D'Arcy Cain wrote: On 12/29/2017 02:25 PM, Chris Angelico wrote: PHP also added goto to a later version. Ahh, great choice of example. "It's okay - PHP

[issue32449] MappingView must inherit from Collection instead of Sized

2017-12-29 Thread R. David Murray
R. David Murray added the comment: Well, it would be a backward compatibility problem at a minimum. Obviously things were designed this way. Have you found out why? Is there a consensus on python-ideas that this should be changed? If so, please link to the thread.

[issue32449] MappingView must inherit from Collection instead of Sized

2017-12-29 Thread Yahya Abou Imran
Yahya Abou Imran added the comment: Quoting my own post on python-ideas: After I generate an UML diagram from collections.abc, I found very strange that MappingView inherit from Sized instead of Collection (new in python 3.6). Yes, MappingView only define

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I consider PR 5006 as just a first step. I had two goals: 1) Fix all regressions in PR 2827. First at all the regression in the f_lineno setter. 2) Simplify the patch. This is critically important for getting the review. And

[issue32363] Deprecate task.set_result() and task.set_exception()

2017-12-29 Thread Ilya Kulakov
Ilya Kulakov added the comment: cancel will work in my case, but it's somewhat limited. In other hand it's probably a job of a testing library to provide an utility function. -- ___ Python tracker

[issue32449] MappingView must inherit from Collection instead of Sized

2017-12-29 Thread Yahya Abou Imran
New submission from Yahya Abou Imran : Quoting my own post on python-ideas: After I generate an UML diagram from collections.abc, I found very strange that MappingView inherit from Sized instead of Collection (new in python 3.6). Yes, MappingView only define

[issue32363] Deprecate task.set_result() and task.set_exception()

2017-12-29 Thread Yury Selivanov
Yury Selivanov added the comment: > My use case was outside control of otherwise unconditionally blocking task > (for tests only). What replacement (if any) would you suggest? Use Task.cancel() or use a Queue to communicate with the task. Your test code was working,

[issue32363] Deprecate task.set_result() and task.set_exception()

2017-12-29 Thread Ilya Kulakov
Ilya Kulakov added the comment: Andrew, Yury I test my lib against dev versions of Python and recently got an error in one of the tests due to the deprecation. I do not argue the reason behind removing this methods, but Task.set_exception was working for me in tests:

Re: Goto

2017-12-29 Thread Chris Angelico
On Sat, Dec 30, 2017 at 8:03 AM, D'Arcy Cain wrote: > On 12/29/2017 02:25 PM, Chris Angelico wrote: >>> PHP also added goto to a later version. >> >> Ahh, great choice of example. "It's okay - PHP does it." > > I thought that that was a reason to not do it. Often, yeah.

[issue32441] os.dup2 should return the new fd

2017-12-29 Thread Benjamin Peterson
Benjamin Peterson added the comment: New changeset bbdb17d19bb1d5443ca4417254e014ad64c04540 by Benjamin Peterson in branch 'master': return the new file descriptor from os.dup2 (closes bpo-32441) (#5041)

Re: Goto

2017-12-29 Thread D'Arcy Cain
On 12/29/2017 02:25 PM, Chris Angelico wrote: >> PHP also added goto to a later version. > > Ahh, great choice of example. "It's okay - PHP does it." I thought that that was a reason to not do it. -- D'Arcy J.M. Cain Vybe Networks Inc. http://www.VybeNetworks.com/ IM:da...@vex.net VoIP:

[issue32443] Add Linux's signalfd() to the signal module

2017-12-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: My reading of the Linux signalfd man page may be optimistic. :) Regardless, it'd be nice to have it available in the stdlib so it could be used if deemed useful. I expect this to only ever be added by someone making use of it in another

[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-29 Thread Ned Deily
Ned Deily added the comment: Those messages at the top of your terminal sessions are pretty suspicious, e.g. "Permission denied" and "No such file or directory". They suggest a home directory ownership or permissions issue which you should investigate. But definitely try

Re: Goto

2017-12-29 Thread bartc
On 29/12/2017 20:25, Chris Angelico wrote: On Sat, Dec 30, 2017 at 7:03 AM, bartc wrote: On 29/12/2017 18:55, MarkA wrote: On Thu, 28 Dec 2017 00:58:48 -0200, Duram wrote: How to use goto in python? --- This email has been checked for viruses by AVG. http://www.avg.com

[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: IDLE uses Python's tcl/tk interface module, called 'tkinter'. Tcl is a separate language and tk is its graphical user interface. This is most likely the problem. Did you follow the advice at https://www.python.org/download/mac/tcltk/ to

[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute

2017-12-29 Thread Gregory P. Smith
Change by Gregory P. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed type: -> behavior ___ Python tracker

[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute

2017-12-29 Thread Gregory P. Smith
Gregory P. Smith added the comment: New changeset 3ceaed0dce81fd881bbaf2dbdbe827d9681887da by Gregory P. Smith (Segev Finer) in branch '2.7': bpo-18035: telnetlib: select.error doesn't have an errno attribute (#5044)

Re: Goto

2017-12-29 Thread Chris Angelico
On Sat, Dec 30, 2017 at 7:03 AM, bartc wrote: > On 29/12/2017 18:55, MarkA wrote: >> >> On Thu, 28 Dec 2017 00:58:48 -0200, Duram wrote: >> >>> How to use goto in python? >>> >>> --- >>> This email has been checked for viruses by AVG. >>> http://www.avg.com >> >> >> Rather than

Re: Goto

2017-12-29 Thread bartc
On 29/12/2017 18:55, MarkA wrote: On Thu, 28 Dec 2017 00:58:48 -0200, Duram wrote: How to use goto in python? --- This email has been checked for viruses by AVG. http://www.avg.com Rather than ask how to use an unavailable statement (GOTO), why not investigate why no modern languages use

[issue32448] subscriptable

2017-12-29 Thread R. David Murray
R. David Murray added the comment: At the point at which that error is raised, Python doesn't know the name of the attribute, nor is attribute access the only place where that particular error report is triggered (it's in a generic subscript-this-object call). So I

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-29 Thread Yury Selivanov
Yury Selivanov added the comment: > So, PR is ready. Please review. I understand, however I still don't have time for it at the moment. If another core dev wants to take initiative, please by all means do. I can/will take another look at this after January 15.

[issue32221] Converting ipv6 address to string representation using getnameinfo() is wrong.

2017-12-29 Thread Марк Коренберг
Марк Коренберг added the comment: So, PR is ready. Please review. -- ___ Python tracker ___

Re: PyWin32 installer question

2017-12-29 Thread Terry Reedy
On 12/29/2017 11:38 AM, Paul Moore wrote: On 29 December 2017 at 16:04, Skip Montanaro wrote: Thanks. I'll shoot Thomas Heller an email... Actually, make that Christopher Toth. Seems he's the current maintainer. If you get no joy there, then in a week or two,

[issue32428] dataclasses: make it an error to have initialized non-fields in a dataclass

2017-12-29 Thread Guido van Rossum
Guido van Rossum added the comment: I liked the original design better, where things without annotations would just be ignored. What changed? On Dec 27, 2017 5:19 PM, "Ivan Levkivskyi" wrote: > > Ivan Levkivskyi added the

[issue32427] Rename and expose dataclasses._MISSING

2017-12-29 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved type: -> behavior ___ Python tracker ___

[issue32427] Rename and expose dataclasses._MISSING

2017-12-29 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 03220fdb26c0b6a50ce5ed1fdfbf232094b66db6 by Eric V. Smith in branch 'master': bpo-32427: Expose dataclasses.MISSING object. (#5045) https://github.com/python/cpython/commit/03220fdb26c0b6a50ce5ed1fdfbf232094b66db6 --

[issue32448] subscriptable

2017-12-29 Thread Alexander Mohr
New submission from Alexander Mohr : Currently subscriting a attribute that's None reports the following: >>> class Foo: pass >>> Foo.organizer = None >>> Foo.organizer['start'] Traceback (most recent call last): File "", line 1, in TypeError: 'NoneType' object is not

[issue12706] timeout sentinel in ftplib and poplib documentation

2017-12-29 Thread Marcel Widjaja
Marcel Widjaja added the comment: Greg, I wonder if you are planning to submit a PR for your patch? If not, I'm plan to take your patch, make some minor adjustment and submit a PR. -- nosy: +mawidjaj ___ Python tracker

Re: Goto

2017-12-29 Thread MarkA
On Thu, 28 Dec 2017 00:58:48 -0200, Duram wrote: > How to use goto in python? > > --- > This email has been checked for viruses by AVG. > http://www.avg.com Rather than ask how to use an unavailable statement (GOTO), why not investigate why no modern languages use it? -- MarkA You can

Re: Goto

2017-12-29 Thread Chris Angelico
On Sat, Dec 30, 2017 at 4:13 AM, bartc wrote: > If you want to translate code from one language to another, and the source > language uses gotos, or uses control structures not available in the target > language, then gotos would be very useful in the latter. > As has already

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Neil Schemenauer
Neil Schemenauer added the comment: I apologize if my extra PR is causing confusion. My original intention was to merely forward port Antoine changes so they could compile with the 'master' version of Python. Over time I have made some fixes to it. I have kept it

[issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element

2017-12-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is an existing test for copying. No new tests are needed. Just add a case for the copy() method in test_copy. Special __deepcopy__() method for Python implementation is not needed. copy.deepcopy() already works well.

[issue31907] Clarify error message when attempting to call function via str.format()

2017-12-29 Thread mickey695
mickey695 added the comment: Well, it has been more than the 2 weeks I promised however now I finally have time to look into this. I did some fuzzing to build a list quickly and the following ASCII characters can not be used as part of the argument name: exclamation

Re: Python goto

2017-12-29 Thread Grant Edwards
On 2017-12-28, Skip Montanaro wrote: > Though it appears some wag has used function decorators to implement > goto statements: > > https://pypi.python.org/pypi/goto-statement/1.1 > > Rather clever, it seems. That's brilliant! Not that I'd look kindly on anybody who

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Whether the small speed difference is worth worrying about is a different > matter. I don't think so. Though one could run the benchmarks suite to get an idea of the impact on real-world code. --

Re: Goto

2017-12-29 Thread bartc
On 29/12/2017 09:52, alister wrote: On Thu, 28 Dec 2017 18:54:31 -0800, breamoreboy wrote: On Thursday, December 28, 2017 at 7:40:14 PM UTC, alister wrote: On Thu, 28 Dec 2017 00:58:48 -0200, Duram wrote: How to use goto in python? --- This email has been checked for viruses by AVG.

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Mark Shannon
Mark Shannon added the comment: When I said "significant", I meant from a statistically, not as a judgement meaning "useful" or "worthwhile". The code duplication approach is significantly faster in the tests. Whether the small speed difference is worth worrying about is a

[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-29 Thread Steve Margetts
New submission from Steve Margetts : I am trying to install Python on a Max running OS 10.13.1 (so my son can use a 'Coding for Beginners' book). Both 2.7 and 3.6 have the same problem: Clicking on IDLE leads to the icon bouncing a couple of times in the dock, but not

Re: PyWin32 installer question

2017-12-29 Thread Paul Moore
On 29 December 2017 at 16:04, Skip Montanaro wrote: >> Thanks. I'll shoot Thomas Heller an email... > > > Actually, make that Christopher Toth. Seems he's the current maintainer. If you get no joy there, then in a week or two, when I next get access to a system with a

[issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element

2017-12-29 Thread Gordon P. Hemsley
Gordon P. Hemsley added the comment: Given the discussion, I've gone ahead and created a new PR that synchronizes the three copy methods between implementations and deprecates Element.copy(). -- ___ Python tracker

[issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element

2017-12-29 Thread Gordon P. Hemsley
Change by Gordon P. Hemsley : -- title: Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation -> Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element

[issue32424] Rename copy() to __copy__() in xml.etree.ElementTree.Element Python implementation

2017-12-29 Thread Gordon P. Hemsley
Change by Gordon P. Hemsley : -- pull_requests: +4927 ___ Python tracker ___ ___

Re: PyWin32 installer question

2017-12-29 Thread Skip Montanaro
> Thanks. I'll shoot Thomas Heller an email... Actually, make that Christopher Toth. Seems he's the current maintainer. -- https://mail.python.org/mailman/listinfo/python-list

Re: PyWin32 installer question

2017-12-29 Thread Skip Montanaro
> That's not an architecture-independent file. The Wheel spec gives all > the details, but "cp27" (as opposed to "py27") means it's CPython only > (which usually means it's got a C extension) and "win32" is 32-bit > only ("win_amd64" is the tag for 64-bit Windows). So the problem is > that the

[issue32446] ResourceLoader.get_data() should accept a PathLike

2017-12-29 Thread Barry A. Warsaw
New submission from Barry A. Warsaw : Currently get_data() only accepts a string. It should also accept a os.PathLike -- messages: 309178 nosy: barry, brett.cannon priority: normal severity: normal status: open title: ResourceLoader.get_data() should accept a PathLike

[issue32429] Outdated Modules/Setup warning is invisible

2017-12-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: I'm ok with turning the warning into an error. Does anyone object here? -- ___ Python tracker ___

[issue32145] Wrong ExitStack Callback recipe

2017-12-29 Thread Barry A. Warsaw
Barry A. Warsaw added the comment: On Dec 29, 2017, at 08:40, Nick Coghlan wrote: > > I'm not clear on what you mean about allowing arbitrary names for the > instance creation function - What I meant was that I don’t see `def _make_instance()`

[issue32427] Rename and expose dataclasses._MISSING

2017-12-29 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +4926 stage: -> patch review ___ Python tracker ___

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-29 Thread R. David Murray
R. David Murray added the comment: Correct, a new feature should always get a what's new entry. You could submit a PR for it :) -- ___ Python tracker

[issue32444] python -m venv symlink dependency on how python binary is called is not documented

2017-12-29 Thread R. David Murray
R. David Murray added the comment: Actually, I'm going to reopen this as a doc issue because this behavior is not discussed by the docs that I can see, and it is important to know about when creating a venv. -- assignee: -> docs@python components:

[issue32444] python -m venv has incongruous behavor creating binaries

2017-12-29 Thread R. David Murray
R. David Murray added the comment: This is a feature that actually supports your use case, as well as the use cases of those who *don't* want to strap the python version: you get what you ask for. If you call venv with 'python3', you get a venv that will use your new

[issue32145] Wrong ExitStack Callback recipe

2017-12-29 Thread Nick Coghlan
Nick Coghlan added the comment: I'm not clear on what you mean about allowing arbitrary names for the instance creation function - at that point we're back to subclasses not being able to use the default `pop_all()` implementation at all, and needing to duplicate the

[issue32445] Skip creating redundant wrapper functions in ExitStack.callback

2017-12-29 Thread Nick Coghlan
New submission from Nick Coghlan : While discussing https://bugs.python.org/issue32145, I noticed that ExitStack.callback *always* adds a wrapper function, even when the `args` and `kwds` parameters are both empty. For plain callbacks that aren't receiving any extra

[issue18035] telnetlib incorrectly assumes that select.error has an errno attribute

2017-12-29 Thread Segev Finer
Change by Segev Finer : -- keywords: +patch pull_requests: +4925 stage: -> patch review ___ Python tracker ___

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 29/12/2017 à 12:48, Mark Shannon a écrit : > > Why all these competing pull requests? It does feel like my original patch > has been hijacked. The original patch had a number of issues which needed to be fixed (in addition to forward-port

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Mark Shannon
Mark Shannon added the comment: Why all these competing pull requests? It does feel like my original patch has been hijacked. Also, before any more PRs, we need to decide whether to use subroutines or code duplication for finally blocks. Here is my attempt at an objective

[issue15873] datetime: add ability to parse RFC 3339 dates and times

2017-12-29 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: maybe it's worth adding an entry in python 3.7 "what's new" ? I think it was a very long awaited issue. The opposite of isoformat() is a very frequent question from python newcomers -- ___ Python

Re: GUI user input to function

2017-12-29 Thread Nico Vogeli
Am Donnerstag, 28. Dezember 2017 14:00:14 UTC+1 schrieb Chris Angelico: > On Thu, Dec 28, 2017 at 11:06 PM, Nico Vogeli wrote: > > Am Donnerstag, 28. Dezember 2017 12:59:24 UTC+1 schrieb Chris Angelico: > >> On Thu, Dec 28, 2017 at 8:38 PM, Nico Vogeli

Re: Goto

2017-12-29 Thread mm0fmf
On 28/12/2017 22:38, Tim Chase wrote: On 2017-12-29 08:42, Ben Finney wrote: Duram writes: How to use goto in python? Step 0: what is goto in Python? Step 1: that's not something that exists in Python. So why are you asking how to use something that doesn't exist? so

Re: Goto

2017-12-29 Thread alister via Python-list
On Thu, 28 Dec 2017 18:54:31 -0800, breamoreboy wrote: > On Thursday, December 28, 2017 at 7:40:14 PM UTC, alister wrote: >> On Thu, 28 Dec 2017 00:58:48 -0200, Duram wrote: >> >> > How to use goto in python? >> > >> > --- >> > This email has been checked for viruses by AVG. >> >

[issue32443] Add Linux's signalfd() to the signal module

2017-12-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Also see how the forkserver module does without it: https://github.com/python/cpython/blob/master/Lib/multiprocessing/forkserver.py#L146 Reading Jean-Paul's messages in https://bugs.python.org/issue8407, I'm unclear what is required to take

Creation of a metaclass for dataclass.

2017-12-29 Thread Kirill Balunov
I'm studying the meta-programming topic in Python, and as an exercise I'm trying to make a somewhat simplified version of dataclass. My goal in this exercise is to make the difference between annotated variables and usual ones to be as much transparent as possible. So I come with this code to

[issue32443] Add Linux's signalfd() to the signal module

2017-12-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: See also https://bugs.python.org/issue12304 -- nosy: +pitrou ___ Python tracker ___

[issue32434] pathlib.WindowsPath.reslove(strict=False) returns absoulte path only if at least one component exists

2017-12-29 Thread Eryk Sun
Eryk Sun added the comment: resolve() has additional problems, which possibly could be addressed all at once because it's a small method and the problems are closely related. For an empty path it returns os.getcwd(). I don't think this case is possible in the normal way a

[issue32434] pathlib.WindowsPath.reslove(strict=False) returns absoulte path only if at least one component exists

2017-12-29 Thread Eryk Sun
Eryk Sun added the comment: If none of the components of a relative path exist, then splitting off the head returns an empty string in the second-to-last pass through the while loop. In the last pass, _getfinalpathname("") raises FileNotFoundError, and ultimately resolve()

[issue17611] Move unwinding of stack for "pseudo exceptions" from interpreter to compiler.

2017-12-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le 29/12/2017 à 06:26, Neil Schemenauer a écrit : > > I wonder if I should drop PR 4682. My main criterion (apart from performance issues which don't seem to exist) for choosing between the two PRs would be implementation complexity. I find