[issue35692] pathlib.Path.exists() on non-existent drive raises WinError instead of returning False

2019-02-03 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-03 Thread Steve Dower
Steve Dower added the comment: Py_Initialize() is not supposed to set it up. If you are embedding Python, you have to be responsible for configuring the paths that it uses - pyvenv.cfg is configuration for Python interactive, not the shared lib (using Windows terminology, it's configuration

[issue35692] pathlib.Path.exists() on non-existent drive raises WinError instead of returning False

2019-02-03 Thread miss-islington
miss-islington added the comment: New changeset 69af4395a25481e9de4009c816b6d1f032a2d8eb by Miss Islington (bot) in branch '3.7': bpo-35692: pathlib no longer raises when checking file and directory existence on drives that are not ready (GH-11746)

[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +11692 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35872] Creating venv from venv no longer works in 3.7.2

2019-02-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +11689, 11690, 11691 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35872] Creating venv from venv no longer works in 3.7.2

2019-02-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +11689 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35872] Creating venv from venv no longer works in 3.7.2

2019-02-03 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +11689, 11690 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35873] Controlling venv from venv no longer works in 3.7.2

2019-02-03 Thread Steve Dower
Steve Dower added the comment: New changeset a8474d025cab794257d2fd0bea67840779b9351f by Steve Dower in branch 'master': bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745) https://github.com/python/cpython/commit/a8474d025cab794257d2fd0bea67840779b9351f --

[issue35872] Creating venv from venv no longer works in 3.7.2

2019-02-03 Thread Steve Dower
Steve Dower added the comment: New changeset a8474d025cab794257d2fd0bea67840779b9351f by Steve Dower in branch 'master': bpo-35872 and bpo-35873: Clears __PYVENV_LAUNCHER__ variable (GH-11745) https://github.com/python/cpython/commit/a8474d025cab794257d2fd0bea67840779b9351f --

[issue35692] pathlib.Path.exists() on non-existent drive raises WinError instead of returning False

2019-02-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +11686, 11687 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35692] pathlib.Path.exists() on non-existent drive raises WinError instead of returning False

2019-02-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +11686 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35692] pathlib.Path.exists() on non-existent drive raises WinError instead of returning False

2019-02-03 Thread miss-islington
Change by miss-islington : -- pull_requests: +11686, 11687, 11688 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue35692] pathlib.Path.exists() on non-existent drive raises WinError instead of returning False

2019-02-03 Thread Steve Dower
Steve Dower added the comment: New changeset 2f6fae6e510dba653391cb510a2aca8322eec03b by Steve Dower in branch 'master': bpo-35692: pathlib no longer raises when checking file and directory existence on drives that are not ready (GH-11746)

[issue35894] Apparent regression in 3.8-dev: 'TypeError: required field "type_ignores" missing from Module'

2019-02-03 Thread Nathaniel Smith
Nathaniel Smith added the comment: Oh, that's not my code, it's the core of IPython's REPL :-). I just filed a bug with them, referencing this one: https://github.com/ipython/ipython/issues/11590 -- ___ Python tracker

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: David, I don't agree with merging at this point. The lack of documentation makes it hard to ask for more feedback and broader testing, because people won't know how to use the library and provide constructive feedback (that's why my review comments on

[issue35894] Apparent regression in 3.8-dev: 'TypeError: required field "type_ignores" missing from Module'

2019-02-03 Thread Guido van Rossum
Guido van Rossum added the comment: Yeah, this definitely changed. When we updated typed_ast to Python 3.7 recently, the mypy project looked into making certain arguments to AST certain nodes optional, but the code responsible for those arguments is too weird to easily make that work (it's

[issue35894] Apparent regression in 3.8-dev: 'TypeError: required field "type_ignores" missing from Module'

2019-02-03 Thread Nathaniel Smith
New submission from Nathaniel Smith : Travis provides a "3.8-dev" python, which is updated regularly to track cpython master. When running our tests on this Python, specifically version python: 3.8.0a0 (heads/master:f75d59e, Feb 3 2019, 07:27:24) we just started getting tracebacks:

Re: Switch function

2019-02-03 Thread Dan Sommers
On 2/3/19 9:03 PM, Avi Gross wrote: > The example I show above could in many cases be done as you describe > but what are you gaining? > > I mean if I subtract the integer representation of a keyboard > alphabetic letter (ASCII for the example) from letter 'a' or 'A' then > A maps to 0 and B

Re: Implement C's Switch in Python 3

2019-02-03 Thread DL Neil
Christian, On 4/02/19 10:00 AM, Christian Gollwitzer wrote: Am 03.02.19 um 09:32 schrieb DL Neil: Now back to ordinal dates - the "st", "th", etc suffixes only work in English. You'd need another list (but no great coding complexity) to cope with a second, third, ... language! Only for

RE: Switch function

2019-02-03 Thread Avi Gross
Dan, I agree and have felt no need to do a method like this. Most of the time a switch is easy to avoid or even forget that it exists. I rarely needed to use these years ago when they were available in C and C++ , JAVA, JavaScript, PERL or R or under other *names* but similar functionality

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-03 Thread Davin Potts
Davin Potts added the comment: This work is the result of ~1.5 years of development effort, much of it accomplished at the last two core dev sprints. The code behind it has been stable since September 2018 and tested as an independently installable package by multiple people. I was

Re: Switch function

2019-02-03 Thread Dan Sommers
On 2/3/19 5:40 PM, Avi Gross wrote: Bottom line, does anyone bother using anything like this? It is actually a bunch of hidden IF statements matched in order but may meet many needs. I sure don't. In the rare case that I might use a switch statement in another language, I just use a series

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-03 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think there is also a license problem. posixshmem.c contains "Copyright 2012 Philip Semanchuk, 2018-2019 Davin Potts" Ronald commented "The only other files with a copyright attribute are parser, optparse and platform. I'd prefer to avoid adding new

[issue35586] Open pyexpat compilation, Make shows error(missing separator)

2019-02-03 Thread Ned Deily
Ned Deily added the comment: Sorry about the delay in responding. I am unable to reproduce the problem but I may be missing some important details. What platform were you attempting to build on? What was the exact path to the source directory? And, if you can still reproduce, could you

Re: Implement C's Switch in Python 3

2019-02-03 Thread Chris Angelico
On Mon, Feb 4, 2019 at 10:53 AM Avi Gross wrote: > It is very bad form to have ambiguous compressed formats. Even if you include > a slash or minus sign or period or the delimiter of your choice, I sometimes > see this: > > 01/02/2020 > > And I wonder if it is meant to be January 2nd or

Ordered Ordinal number methods

2019-02-03 Thread Avi Gross
[NOTE: message is a tad long as it discusses multiple possible solutions and concerns including code.] The original question was how to do some reasonable translation from something like the "switch" statement in languages that have it, including C and R. Other languages use their own variants

Re: Implement C's Switch in Python 3

2019-02-03 Thread Chris Angelico
On Mon, Feb 4, 2019 at 11:08 AM Chris Angelico wrote: > If you need to attach some *other* time zone (which should be rare - > ONLY do this if you absolutely cannot translate to UTC) BTW, there are some legit reasons for keeping something in a different timezone. If you're representing an

RE: Implement C's Switch in Python 3

2019-02-03 Thread Avi Gross
Comment at end: -Original Message- From: Python-list On Behalf Of Bob van der Poel Sent: Sunday, February 3, 2019 4:01 PM To: DL Neil Cc: Python Subject: Re: Implement C's Switch in Python 3 I'm surprised that no one has yet addressed the year 1 problem. Hopefully we're doing

Switch function

2019-02-03 Thread Avi Gross
Message asking about a fairly simple way to implement a switch in python as per the ongoing discussion. I wrote a function that might emulate a fairly simple general use of switch. A function would take N+2 arguments of the form: 1: something to switch based on 2,3: something to match to

[issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped

2019-02-03 Thread Ned Deily
Ned Deily added the comment: I agree that this can go into 3.6. Thanks, everyone! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue35605] backported patch requires new sphinx, minimum sphinx version was not bumped

2019-02-03 Thread Ned Deily
Ned Deily added the comment: New changeset 9bacdce451618a5f0bf62cb1b6f966ebde0492c6 by Ned Deily (Anthony Sottile) in branch '3.6': [3.6] bpo-35605: Fix documentation build for sphinx<1.6 (GH-11368) https://github.com/python/cpython/commit/9bacdce451618a5f0bf62cb1b6f966ebde0492c6

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-03 Thread Ned Deily
Change by Ned Deily : -- nosy: -ned.deily ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

Re: Implement C's Switch in Python 3

2019-02-03 Thread Bob van der Poel
On Sun, Feb 3, 2019 at 2:15 PM Chris Angelico wrote: > On Mon, Feb 4, 2019 at 8:02 AM Bob van der Poel wrote: > > > > I'm surprised that no one has yet addressed the year 1 problem. > Hopefully we're doing numeric, not alpha sorts on the stuff before the 1st > '-'. And, the compact versions

[issue35893] distutils fails to build extension on windows when it is a package.__init__

2019-02-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: FWIW the project in question is modulegraph2 , which almost works on Windows, except for this issue and some incorrect code on my side that assumes virtualenv on Windows behaves the same as on

Re: Implement C's Switch in Python 3

2019-02-03 Thread Chris Angelico
On Mon, Feb 4, 2019 at 8:02 AM Bob van der Poel wrote: > > I'm surprised that no one has yet addressed the year 1 problem. Hopefully > we're doing numeric, not alpha sorts on the stuff before the 1st '-'. And, > the compact versions will really screw up :). > Compact versions? You mean

[issue35893] distutils fails to build extension on windows when it is a package.__init__

2019-02-03 Thread Ronald Oussoren
New submission from Ronald Oussoren : Python supports having a C extension for the the __init__ of a package (instead of having __init__.py). This works fine on Linux, but on Windows distutils fails to build the C extension because it assumes the entry point is named PyInit___init__ while

Re: Implement C's Switch in Python 3

2019-02-03 Thread Christian Gollwitzer
Am 03.02.19 um 09:32 schrieb DL Neil: Now back to ordinal dates - the "st", "th", etc suffixes only work in English. You'd need another list (but no great coding complexity) to cope with a second, third, ... language! Only for some languages. In other languages there can be, for example,

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: And to make things clear, I'm not saying anything about the functionality. Easier shared memory + multiprocessing is definitely an interesting endeavour (and a non-trivial one). -- ___ Python tracker

Re: Implement C's Switch in Python 3

2019-02-03 Thread Chris Angelico
On Mon, Feb 4, 2019 at 7:35 AM DL Neil wrote: > > On 3/02/19 10:16 PM, Chris Angelico wrote: > >> There's normal and there's normal - like it's tomato or tomato? > > I dunno. I'm the kind of normal that likes tomatoes (not to be > > confused with tomatoes). Does that help? > > If you like

Re: Implement C's Switch in Python 3

2019-02-03 Thread Bob van der Poel
On Sun, Feb 3, 2019 at 1:35 PM DL Neil wrote: > On 3/02/19 10:16 PM, Chris Angelico wrote: > > On Sun, Feb 3, 2019 at 8:09 PM DL Neil > wrote: > >> On 3/02/19 9:45 PM, Chris Angelico wrote: > >>> Which is why I always write dates in sorted format, usually eschewing > >>> delimiters: > >>> //CJA

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: FWIW I agree with reverting this pull request, the work is clearly not finished yet. -- ___ Python tracker ___

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Yes, I think this was merged too soon. Davin, the convention is that we only merge completed work, not some work-in-progress. You already did this once in https://bugs.python.org/issue28053 . You still haven't completed that piece of work. I'm going to

Re: Implement C's Switch in Python 3

2019-02-03 Thread DL Neil
On 3/02/19 10:16 PM, Chris Angelico wrote: On Sun, Feb 3, 2019 at 8:09 PM DL Neil wrote: On 3/02/19 9:45 PM, Chris Angelico wrote: Which is why I always write dates in sorted format, usually eschewing delimiters: //CJA 20160511: Is this still happening? I don't remember seeing it in three

[issue35533] argparse standard error usage for exit / error

2019-02-03 Thread paul j3
Change by paul j3 : -- nosy: +paul.j3 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-03 Thread Ned Deily
Change by Ned Deily : -- components: +Windows nosy: +paul.moore, steve.dower, tim.golden, zach.ware ___ Python tracker ___ ___

[issue35892] Fix awkwardness of statistics.mode() for multimodal datasets

2019-02-03 Thread Raymond Hettinger
New submission from Raymond Hettinger : The current code for mode() does a good deal of extra work to support its two error outcomes (empty input and multimodal input). That latter case is informative but doesn't provide any reasonable way to find just one of those modes, where any of the

Re: mask and proper index

2019-02-03 Thread Peter Otten
diego.aves...@gmail.com wrote: > Dear all, > > I am trying to apply a mask to my dataframe: > > mask = (df['datatime'] > start_date) & (df['datatime'] <= end_date) > df = df.loc[mask] > > > It seems to work pretty well. > > After that I crate the cumulative of its element as: > > >

mask and proper index

2019-02-03 Thread diego . avesani
Dear all, I am trying to apply a mask to my dataframe: mask = (df['datatime'] > start_date) & (df['datatime'] <= end_date) df = df.loc[mask] It seems to work pretty well. After that I crate the cumulative of its element as: PP_cumPP = np.cumsum(df[PP_station]) However, I am not able to

[issue12374] Execution model should explain compile vs definition vs execution time

2019-02-03 Thread Cheryl Sabella
Cheryl Sabella added the comment: Hi Nick, Would you be able to update the link as http://svn.python.org/view/sandbox/trunk/userref/ODF/ isn't valid anymore? Have things changed even more since you created this issue or are you still interested in pursuing this? Thanks! -- nosy:

[issue27485] urllib.splitport -- is it official or not?

2019-02-03 Thread Jason R. Coombs
Jason R. Coombs added the comment: Please refer to issue35891 for a description of an important use-case broken by the planned removal of splituser. -- nosy: +jason.coombs ___ Python tracker

[issue35891] urllib.parse.splituser has no suitable replacement

2019-02-03 Thread Jason R. Coombs
New submission from Jason R. Coombs : The removal of splituser (issue27485) has the undesirable effect of leaving the programmer without a suitable alternative. The deprecation warning states to use `urlparse` instead, but `urlparse` doesn't provide the access to the `credential` or

[issue35891] urllib.parse.splituser has no suitable replacement

2019-02-03 Thread Jason R. Coombs
Change by Jason R. Coombs : -- versions: +Python 3.8 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-03 Thread PyScripter
PyScripter added the comment: I don't see how pep-0582 is related to embedded python. The solution is to check for the presence of pyvenv.cfg in PYTHONHOME and set up the system.path accordingly. -- ___ Python tracker

[issue35851] Make search result in online docs keep their position when search finishes

2019-02-03 Thread Julien Palard
Julien Palard added the comment: Hi Roel, I like the idea, but as xtreak told, it's a sphinx issue we cannot easy fix on our side, better fix it sphinx side. Would you please repoen it on the sphinx bug tracker at https://github.com/sphinx-doc/sphinx/issues? --

RE: Implement C's Switch in Python 3

2019-02-03 Thread Avi Gross
The discussion strictly sets a limit of 31 for the largest number of days in a month and asks for suffixes used to make ordinal numbers like 31st. But in reality, you can go to 99th and beyond for other purposes albeit the pattern for making 101 and on seems to repeat. The last algorithm I wrote

[issue35706] Make it easier to use a venv with an embedded Python interpreter

2019-02-03 Thread Wolfgang Langner
Wolfgang Langner added the comment: I think this pep is related to the issue and could be a solution: https://www.python.org/dev/peps/pep-0582/ -- nosy: +tds333 ___ Python tracker

Re: Implement C's Switch in Python 3

2019-02-03 Thread Frank Millman
"Sayth Renshaw" wrote in message news:73a1c64c-7fb1-4fc8-98a2-b6939e82a...@googlegroups.com... chooseFrom = { day : nthSuffix(day) for day in range(1,32)} chooseFrom {1: '1st', 2: '2nd', 3: '3rd', 4: '4th', 5: '5th', 6: '6th', 7: '7th', 8: '8th', 9: '9th', 10: '10th', 11: '11th', 12: '12th',

[issue35813] shared memory construct to avoid need for serialization between processes

2019-02-03 Thread Ronald Oussoren
Ronald Oussoren added the comment: Was this merged too soon? This is new functionality without any docs and tests. I've also left review comments on the pull request. -- nosy: +ronaldoussoren ___ Python tracker

[issue32627] Header dependent _uuid build failure on Fedora 27

2019-02-03 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch pull_requests: +11682, 11683 stage: needs patch -> patch review ___ Python tracker ___

[issue32627] Header dependent _uuid build failure on Fedora 27

2019-02-03 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch, patch pull_requests: +11682, 11683, 11684 stage: needs patch -> patch review ___ Python tracker ___

[issue32627] Header dependent _uuid build failure on Fedora 27

2019-02-03 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch, patch, patch, patch pull_requests: +11682, 11683, 11684, 11685 stage: needs patch -> patch review ___ Python tracker ___

[issue32627] Header dependent _uuid build failure on Fedora 27

2019-02-03 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch pull_requests: +11682 stage: needs patch -> patch review ___ Python tracker ___ ___

Re: Implement C's Switch in Python 3

2019-02-03 Thread Chris Angelico
On Sun, Feb 3, 2019 at 8:09 PM DL Neil wrote: > > On 3/02/19 9:45 PM, Chris Angelico wrote: > > Which is why I always write dates in sorted format, usually eschewing > > delimiters: > > > > //CJA 20160511: Is this still happening? I don't remember seeing it in > > three parts of forever. > > Sure

Re: Implement C's Switch in Python 3

2019-02-03 Thread DL Neil
Chris, On 3/02/19 9:45 PM, Chris Angelico wrote: On Sun, Feb 3, 2019 at 7:40 PM DL Neil wrote: This would normally see us coding "2019-02-03". The arrangement of larger to ever more precise time-units is very useful in databases and applications such as file-names, because it sequences

Re: Implement C's Switch in Python 3

2019-02-03 Thread Chris Angelico
On Sun, Feb 3, 2019 at 7:40 PM DL Neil wrote: > This would normally see us coding "2019-02-03". The arrangement of > larger to ever more precise time-units is very useful in databases and > applications such as file-names, because it sequences logically. > > However, that is not the way 'normal

Re: Implement C's Switch in Python 3

2019-02-03 Thread DL Neil
When a client demanded his way on this issue, the action we took was, as below, to create a list (called ordinal) and to use the dd (day) value as an index. [ nthSuffix(day) for day in range(1,32)] ['1st', '2nd', '3rd', '4th', '5th', '6th', '7th', '8th', '9th', '10th', '11th', '12th',

Re: Implement C's Switch in Python 3

2019-02-03 Thread Stefan Behnel
Chris Angelico schrieb am 03.02.19 um 02:23: > Of course, you can also precompute this: > > day_ordinal = mapper( > [1, 21, 31], "st", > [2, 22], "nd", > [3, 23], "rd", > ) > def f(x): return day_ordinal.get(x, "th") … in which case I would also 'precompute' the ".get"