[issue37445] Some FormatMessageW() calls use FORMAT_MESSAGE_FROM_SYSTEM without FORMAT_MESSAGE_IGNORE_INSERTS

2019-09-09 Thread Zackery Spytz


Change by Zackery Spytz :


--
pull_requests: +15470
pull_request: https://github.com/python/cpython/pull/15822

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38018] Increase Code Coverage for multiprocessing.shared_memory

2019-09-09 Thread Vinay Sharma


Vinay Sharma  added the comment:

Also, I haven't made a NEWS entry since it's just a short bug fix

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread Vedran Čačić

Vedran Čačić  added the comment:

I just want to express my delight, Terry, about your desire to solve the root 
of the problem instead of just fixing a particular instance. (This is not the 
first time I witnessed that.) It's a big part of the reason why I love Python 
so much.

--
nosy: +veky

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38018] Increase Code Coverage for multiprocessing.shared_memory

2019-09-09 Thread Vinay Sharma


Vinay Sharma  added the comment:

Hi I have opened another PR: https://github.com/python/cpython/pull/15821
This should fix test failures in FreeBSD.

FreeBSD requires a leading slash in shared memory names. That's why it was 
throwing the below error:

==
ERROR: test_shared_memory_basics 
(test.test_multiprocessing_spawn.WithProcessesTestSharedMemory)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py",
 line 3737, in test_shared_memory_basics
shm1 = shared_memory.SharedMemory(create=True, size=1)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/shared_memory.py",
 line 89, in __init__
self._fd = _posixshmem.shm_open(
OSError: [Errno 22] Invalid argument: 'test01_fn'
--

test01_fn doesn't contain a leading slash that's why it is an invalid argument.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Is it 'fine' to instantiate a widget without parent parameter?

2019-09-09 Thread jfong
Terry Reedy於 2019年9月10日星期二 UTC+8上午11時43分05秒寫道:
> On 9/9/2019 8:30 PM, jf...@ms4.hinet.net wrote:
> > Terry Reedy於 2019年9月9日星期一 UTC+8下午3時06分27秒寫道:
> 
> >> There will only be one default Tk object, but there can be multiple Tk
> >> objects.
> 
>  import tkinter as tk
>  f0 = tk.Frame()
> 
> This causes creation of a default root
> 
>  root0 = tk.Tk()
> 
> This creates another, hence two different objects.
> 
>  f0.master
> > 
>  root0
> > 
> 
>  import tkinter as tk
>  root0 = tk.Tk()
> 
> This creates a root that is set as the default because there was not one 
> already.
> 
>  f0 = tk.Frame()
> 
> The uses the default root which is root0, hence 1 object.
> 
>  f0.master
> > 
>  root0
> > 
> 
> -- 
> Terry Jan Reedy

Got it. The first Tk object is always the default one no matter where it was  
created. The default one is always the one which the widget constructor refer 
to when required.

--Jach
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pandas loc on str lower for column comparison

2019-09-09 Thread Sayth Renshaw
On Tuesday, 10 September 2019 12:56:36 UTC+10, Sayth Renshaw  wrote:
> On Friday, 6 September 2019 07:52:56 UTC+10, Piet van Oostrum  wrote:
> > Piet van Oostrum <> writes:
> > 
> > > That would select ROWS 0,1,5,6,7, not columns.
> > > To select columns 0,1,5,6,7, use two-dimensional indexes
> > >
> > > df1 = df.iloc[:, [0,1,5,6,7]]
> > >
> > > : selects all rows.
> > 
> > And that also solves your original problem.
> > 
> > This statement:
> > 
> > df1['Difference'] = df1.loc['Current Team'].str.lower().str.strip() == 
> > df1.loc['New Team'].str.lower().str.strip()
> > 
> > should not use .loc, because then you are selecting rows, not columns, but:
> > 
> > df1['Difference'] = df1['Current Team'].str.lower().str.strip() == df1['New 
> > Team'].str.lower().str.strip()
> > -- 
> > Piet van Oostrum <>
> > WWW: http://piet.vanoostrum.org/
> > PGP key: [8DAE142BE17999C4]
> 
> That actually creates another error.
> 
> A value is trying to be set on a copy of a slice from a DataFrame.
> Try using .loc[row_indexer,col_indexer] = value instead
> 
> See the caveats in the documentation: 
> http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
> 
> So tried this
> df['c'] = df.apply(lambda df1: df1['Current Team'].str.lower().str.strip() == 
> df1['New Team'].str.lower().str.strip(), axis=1)
> 
> Based on this SO answer https://stackoverflow.com/a/46570641
> 
> Thoughts?
> 
> Sayth

This works on an individual row
df2 = df1.loc[(df1['Current Team'] == df1['New Team']),'D'] = 'Wow'

But how do I apply it to the whole new column and return the new dataset?

Trying to use lambda but it cannot contain assigment
df2 = df1.apply(lambda df1: [ (df1['Current Team'] == df1['New Team'])  ]['D'] 
= 'succeed')
df2

Confused

Sayth
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue38018] Increase Code Coverage for multiprocessing.shared_memory

2019-09-09 Thread Vinay Sharma


Change by Vinay Sharma :


--
pull_requests: +15469
pull_request: https://github.com/python/cpython/pull/15821

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



How to correctly use 'in_' argument in tkinter grid()?

2019-09-09 Thread jfong
I had tried the following script test.py:

import tkinter as tk

class Demo(tk.Frame):
def __init__(self):
tk.Frame.__init__(self, name='demo')
self.pack()

panel = tk.Frame(self, name='panel')
panel.pack()

start = tk.Button(text='Start', name='start')
start.grid(in_=panel)

btn = self.nametowidget('panel.start')
btn.config(state='disabled')

Demo().mainloop()


It fails on nametowidget() function. My intention is to use 'in_' to change the 
parent of 'start' widget from the default Tk object to 'panel', but failed with 
KeyError: 'start'.

below is part of the snapshot in pdb,
...
> d:\works\python\test.py(11)__init__()
-> start = tk.Button(text='Start', name='start')
(Pdb) !panel.winfo_parent()
'.demo'
(Pdb) next
> d:\works\python\test.py(12)__init__()
-> start.grid(in_=panel)
(Pdb) !start.winfo_parent()
'.'
(Pdb) next
> d:\works\python\test.py(14)__init__()
-> btn = self.nametowidget('panel.start')
(Pdb) !start.winfo_parent()
'.'

--Jach
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Is it 'fine' to instantiate a widget without parent parameter?

2019-09-09 Thread Terry Reedy

On 9/9/2019 8:30 PM, jf...@ms4.hinet.net wrote:

Terry Reedy於 2019年9月9日星期一 UTC+8下午3時06分27秒寫道:



There will only be one default Tk object, but there can be multiple Tk
objects.



import tkinter as tk
f0 = tk.Frame()


This causes creation of a default root


root0 = tk.Tk()


This creates another, hence two different objects.


f0.master



root0





import tkinter as tk
root0 = tk.Tk()


This creates a root that is set as the default because there was not one 
already.



f0 = tk.Frame()


The uses the default root which is root0, hence 1 object.


f0.master



root0




--
Terry Jan Reedy


--
https://mail.python.org/mailman/listinfo/python-list


[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset 64947dc81a94692fa8ed21c2199a19a0188150ad by Miss Islington (bot) 
in branch '3.7':
bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818)
https://github.com/python/cpython/commit/64947dc81a94692fa8ed21c2199a19a0188150ad


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset 29bde48ade5dbd5d88cfe309653014c84bebb89c by Miss Islington (bot) 
in branch '3.8':
bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818)
https://github.com/python/cpython/commit/29bde48ade5dbd5d88cfe309653014c84bebb89c


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37488] Document the "gotcha" behaviors in utcnow() and utcfromtimestamp()

2019-09-09 Thread Ashwin Ramaswami


Ashwin Ramaswami  added the comment:

Why not deprecate them?

--
nosy: +epicfaace

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: numpy array - convert hex to int

2019-09-09 Thread Sharan Basappa
On Sunday, 8 September 2019 11:16:52 UTC-4, Luciano Ramalho  wrote:
> >>> int('C0FFEE', 16)
> 12648430
> 
> There you go!
> 
> On Sun, Sep 8, 2019 at 12:02 PM Sharan Basappa  
> wrote:
> >
> > I have a numpy array that has data in the form of hex.
> > I would like to convert that into decimal/integer.
> > Need suggestions please.
> > --

I am sorry. I forgot to mention that I have the data in a numpy array.
So, when I try to convert to int, I get the following error.

sample code here
#
my_data_3 = int(my_data_2)

my_data_4 = my_data_3.astype(np.float)
#

Error here
###
#np.core.defchararray.replace(my_data_2,",'')
 27 
---> 28 my_data_3 = int(my_data_2)
 29 
 30 my_data_4 = my_data_3.astype(np.float)
TypeError: only length-1 arrays can be converted to Python scalars 
#
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15468
pull_request: https://github.com/python/cpython/pull/15820

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15467
pull_request: https://github.com/python/cpython/pull/15819

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset c59295a1ca304f37ca136dd7efca9e560db27d28 by Terry Jan Reedy in 
branch 'master':
bpo-38077: IDLE no longer adds 'argv' to the user namespace (GH-15818)
https://github.com/python/cpython/commit/c59295a1ca304f37ca136dd7efca9e560db27d28


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: issue in handling CSV data

2019-09-09 Thread Sharan Basappa
On Sunday, 8 September 2019 12:45:45 UTC-4, Peter J. Holzer  wrote:
> On 2019-09-08 05:41:07 -0700, Sharan Basappa wrote:
> > On Sunday, 8 September 2019 04:56:29 UTC-4, Andrea D'Amore  wrote:
> > > On Sun, 8 Sep 2019 at 02:19, Sharan Basappa  
> > > wrote:
> > > > As you can see, the string "\t"81 is causing the error.
> > > > It seems to be due to char "\t".
> > > 
> > > It is not clear what format do you expect to be in the file.
> > > You say "it is CSV" so your actual payload seems to be a pair of three
> > > bytes (a tab and two hex digits in ASCII) per line.
> > 
> > The issue seems to be presence of tabs along with the numbers in a single 
> > string. So, when I try to convert strings to numbers, it fails due to 
> > presence of tabs.
> > 
> > Here is the hex dump:
> > 
> > 22 61 64 64 72 65 73 73 2c 22 09 22 6c 65 6e 67 
> > 74 68 2c 22 09 22 38 31 2c 22 09 35 63 0d 0a 22 
> > 61 64 64 72 65 73 73 2c 22 09 22 6c 65 6e 67 74 
> ...
> 
> This looks like this:
> 
> "address,"  "length,"   "81,"   5c
> "address,"  "length,"   "04,"   11
> "address,"  "length,"   "e1,"   17
> "address,"  "length,"   "6a,"   6c
> ...
> 
> Note that the commas are within the quotes. I'd say Andrea is correct:
> This is a tab-separated file, not a comma-separated file. But for some
> reason all fields except the last end with a comma. 
> 
> I would 
> 
> a) try to convince the person producing the file to clean up the mess
> 
> b) if that is not successful, use the csv module to read the file with
>separator tab and then discard the trailing commas.
> 

Hi Peter,

I respectfully disagree that it is not a comma separated. Let me explain why.
If you look the following line in the code, it specifies comma as the delimiter:


my_data = genfromtxt('constraints.csv', delimiter = ',', dtype=None)


Now, if you see the print after getting the data, it looks like this:

## 
[['"\t"81' '"\t5c'] 
 ['"\t"04' '"\t11'] 
 ['"\t"e1' '"\t17'] 
 ['"\t"6a' '"\t6c'] 
 ['"\t"53' '"\t69'] 
 ['"\t"98' '"\t87'] 
 ['"\t"5c' '"\t4b'] 
## 

if you observe, the commas have disappeared. That, I think, is because it 
actually treated this as a CSV file.

Anyway, I am checking to see if I can discard the tabs and process this.
I will keep everyone posted.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: pandas loc on str lower for column comparison

2019-09-09 Thread Sayth Renshaw
On Friday, 6 September 2019 07:52:56 UTC+10, Piet van Oostrum  wrote:
> Piet van Oostrum <> writes:
> 
> > That would select ROWS 0,1,5,6,7, not columns.
> > To select columns 0,1,5,6,7, use two-dimensional indexes
> >
> > df1 = df.iloc[:, [0,1,5,6,7]]
> >
> > : selects all rows.
> 
> And that also solves your original problem.
> 
> This statement:
> 
> df1['Difference'] = df1.loc['Current Team'].str.lower().str.strip() == 
> df1.loc['New Team'].str.lower().str.strip()
> 
> should not use .loc, because then you are selecting rows, not columns, but:
> 
> df1['Difference'] = df1['Current Team'].str.lower().str.strip() == df1['New 
> Team'].str.lower().str.strip()
> -- 
> Piet van Oostrum <>
> WWW: http://piet.vanoostrum.org/
> PGP key: [8DAE142BE17999C4]

That actually creates another error.

A value is trying to be set on a copy of a slice from a DataFrame.
Try using .loc[row_indexer,col_indexer] = value instead

See the caveats in the documentation: 
http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy

So tried this
df['c'] = df.apply(lambda df1: df1['Current Team'].str.lower().str.strip() == 
df1['New Team'].str.lower().str.strip(), axis=1)

Based on this SO answer https://stackoverflow.com/a/46570641

Thoughts?

Sayth
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue37825] IDLE doc improvements

2019-09-09 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

5 Delete use of 'extension' referring to converted features. 
"If you don’t like the ACW popping up unbidden, simply make the delay longer or 
disable the extension." Remove ' or ...'

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +15466
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15818

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38015] inline function generates slightly inefficient machine code

2019-09-09 Thread Ma Lin


Ma Lin  added the comment:

PR 15710 has been merged into the master, but the merge message is not shown 
here.
Commit: 
https://github.com/python/cpython/commit/6b519985d23bd0f0bd072b5d5d5f2c60a81a19f2

Maybe this issue can be closed.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I verified that 'argv' (bound to sys.argv)  appears for all three versions 
after running an editor file, but not when Shell is started normally, without a 
file.

The immediate culprit is the runcommand code in runscript, lines 156-168.  As 
part of the patch to allow additions to sys.argv, temporary name 'argv' was 
added but not deleted at the end.  I missed this when I reviewed the patch.  So 
this bug only affected 3.7.4 and 3.8.0b2 to 3.8.0b4. The immediate fix is 
trivial.

The deeper problem is running internal IDLE code in the user namespace.  I 
believe that this is not necessary and opened #38078 to test and fix.

--
nosy: +cheryl.sabella

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38078] IDLE: Don't run internal code in user namespace.

2019-09-09 Thread Terry J. Reedy


New submission from Terry J. Reedy :

#38077 fixed the bug of internal runcommand code not deleting 'argv' from the 
user namespace.  This issue is about not running code there.

When a subprocess is running, pyshell.ModifiedInterpreter.runcommand runs 
python code created by IDLE in locals == __main__.__dict__, the same as code 
enter by a user.  This requires that the code carefully clean up after itself.  
I believe the same effect could by had more safely by exec-ing internal 
commands in the run module dict or a fresh temporary dict.

Possible solution.  In run.Executive.runcode, add 'user=True' to runcode 
signature, add 'if user else {}' to 'self.locals' arg, and add
def runcommand(self, code):
return self.runcode(code, user=False).  Then replace 'runcode' with 
'runcommand' in pyshell runcommand body.

--
assignee: terry.reedy
components: IDLE
messages: 351562
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Don't run internal code in user namespace.
type: behavior
versions: Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: Is it 'fine' to instantiate a widget without parent parameter?

2019-09-09 Thread jfong
Terry Reedy於 2019年9月9日星期一 UTC+8下午3時06分27秒寫道:
> On 9/8/2019 8:40 PM, jf...@ms4.hinet.net wrote:
> 
> > Thank you. After a quick trace to find out the reason, I found that Tkinter 
> > prevents Tk() be called more than once from widget constructors, so only 
> > one Tk object exists:-)
> 
> There will only be one default Tk object, but there can be multiple Tk 
> objects.
> 
>  >>> import tkinter as tk
>  >>> r1 = tk.Tk()
>  >>> r2 = tk.Tk()
>  >>> r1.tk
> <_tkinter.tkapp object at 0x01F90F2F1D30>
>  >>> r2.tk
> <_tkinter.tkapp object at 0x01F90F328930>
> 
> 
> -- 
> Terry Jan Reedy

>>> import tkinter as tk
>>> f0 = tk.Frame()
>>> root0 = tk.Tk()
>>> f0.master

>>> root0

>>>

>>> import tkinter as tk
>>> root0 = tk.Tk()
>>> f0 = tk.Frame()
>>> f0.master

>>> root0

>>>

Why?

PS. Maybe there is no why, just it is what it is:-)

--Jach
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-09 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 23669330b7d0d5ad1a9aac40315ba4c2e765f9dd by Victor Stinner in 
branch '3.7':
bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641) (GH-15789)
https://github.com/python/cpython/commit/23669330b7d0d5ad1a9aac40315ba4c2e765f9dd


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38018] Increase Code Coverage for multiprocessing.shared_memory

2019-09-09 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Correction, is PR 15662 the one that introduced the recession (the one in this 
issue) not the previous one I linked. Apologies for that.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar

2019-09-09 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 12228ce41de1b8fcfb3f1ba0a86d98a232815e85 by Zachary Ware in 
branch '3.7':
[3.7] bpo-34293: Fix PDF documentation paper size (GH-8585) (GH-15817)
https://github.com/python/cpython/commit/12228ce41de1b8fcfb3f1ba0a86d98a232815e85


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar

2019-09-09 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 99df5e837334b62c29c979bb0806f525778a4f3e by Zachary Ware in 
branch '3.8':
[3.8] bpo-34293: Fix PDF documentation paper size (GH-8585) (GH-15816)
https://github.com/python/cpython/commit/99df5e837334b62c29c979bb0806f525778a4f3e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38018] Increase Code Coverage for multiprocessing.shared_memory

2019-09-09 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is the failure for reference:

==
ERROR: test_shared_memory_basics 
(test.test_multiprocessing_spawn.WithProcessesTestSharedMemory)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/_test_multiprocessing.py",
 line 3737, in test_shared_memory_basics
shm1 = shared_memory.SharedMemory(create=True, size=1)
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/multiprocessing/shared_memory.py",
 line 89, in __init__
self._fd = _posixshmem.shm_open(
OSError: [Errno 22] Invalid argument: 'test01_fn'
--

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar

2019-09-09 Thread Zachary Ware


Zachary Ware  added the comment:

Thank you for the patch!

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue24564] shutil.copytree fails when copying NFS to NFS

2019-09-09 Thread Michael Burt


Michael Burt  added the comment:

This is still a problem when shutil gets a errno.ENOSYS

I hit this bug on Microsoft Azure when I mount an Azure File (managed NFS) into 
an AKS cluster (managed Kubernetes offering) and try to copy a file from the 
NFS over to the local disk on the node using shutil.copytree().

The workaround I am using came from this StackOverflow answer: 
https://stackoverflow.com/a/51635427/3736286

--
nosy: +Michael Burt

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar

2019-09-09 Thread Zachary Ware


Change by Zachary Ware :


--
pull_requests: +15465
pull_request: https://github.com/python/cpython/pull/15817

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar

2019-09-09 Thread Zachary Ware


Change by Zachary Ware :


--
pull_requests: +15464
pull_request: https://github.com/python/cpython/pull/15816

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34293] DOC: Makefile inherits a Sphinx 1.5 bug regarding PAPER envvar

2019-09-09 Thread Zachary Ware

Zachary Ware  added the comment:


New changeset b5381f669718aa19690f42f3b8bd88f03045b9d2 by Zachary Ware 
(Jean-François B) in branch 'master':
bpo-34293: Fix PDF documentation paper size (GH-8585)
https://github.com/python/cpython/commit/b5381f669718aa19690f42f3b8bd88f03045b9d2


--
nosy: +zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38018] Increase Code Coverage for multiprocessing.shared_memory

2019-09-09 Thread Davin Potts


Davin Potts  added the comment:

Initial review of the test failure suggests a likely flaw in the mechanism used 
by the resource tracker.

I will continue investigating more tomorrow.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
versions: +Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38077] IDLE leaking ARGV into globals() namespace

2019-09-09 Thread Raymond Hettinger


New submission from Raymond Hettinger :

Reproducer:

1) Turn-on IDLE
2) Create an empty file called: tmp.py
3) Press F5 to run the empty file
4) In the output shell window, type dir() which gives

>>> dir()
['__annotations__', '__builtins__', '__doc__', '__file__', '__loader__', 
'__name__', '__package__', '__spec__', 'argv']

--
assignee: terry.reedy
components: IDLE
messages: 351552
nosy: rhettinger, terry.reedy
priority: high
severity: normal
status: open
title: IDLE leaking ARGV into globals() namespace
type: behavior
versions: Python 3.8, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36511] Add Windows ARM32 buildbot

2019-09-09 Thread Zachary Ware


Zachary Ware  added the comment:


New changeset 55d12ce8b8d397dd4e376bb0d1c27b3cced0ef50 by Zachary Ware (Paul 
Monson) in branch 'master':
bpo-36511: clean up python process before deploy on ARM Windows buildbots 
(GH-14431)
https://github.com/python/cpython/commit/55d12ce8b8d397dd4e376bb0d1c27b3cced0ef50


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: [OT(?)] Ubuntu 18 now defaults to 4-space tabs

2019-09-09 Thread Wildman via Python-list
On Mon, 09 Sep 2019 10:23:57 -0700, Tobiah wrote:

> We upgraded a server to 18.04 and now when I start typing
> a python file (seems to be triggered by the .py extension)
> the tabs default to 4 spaces.  We have decades of code that
> use tab characters, and it has not been our intention to
> change that.
> 
> I found a /usr/share/vim/vim80/indent/python.vim and tried
> moving it out of the way, but the behavior was still there.
> 
> This is more of a vim question perhaps, but I'm already
> subscribed here and I figured someone would know what
> to do.
> 
> 
> Thanks!

A quick search may have revealed your problem.  Look for
an entry named 'expandtab' in vimrc.  You should find
vimrc in /etc/vim or /usr/share/vim or both.  Also if
you have both, one may be a link to the other.

If the entry is there, place a quote mark in front of it
to comment it out...

"set expandtab

If you don't have the entry then it is a different problem
and I would point you back to my original post as my
knowledge of vim is very limited.

-- 
 GNU/Linux user #557453
"There are only 10 types of people in the world...
those who understand Binary and those who don't."
  -Spike
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: [OT(?)] Ubuntu 18 now defaults to 4-space tabs

2019-09-09 Thread Wildman via Python-list
On Mon, 09 Sep 2019 10:23:57 -0700, Tobiah wrote:

> We upgraded a server to 18.04 and now when I start typing
> a python file (seems to be triggered by the .py extension)
> the tabs default to 4 spaces.  We have decades of code that
> use tab characters, and it has not been our intention to
> change that.
> 
> I found a /usr/share/vim/vim80/indent/python.vim and tried
> moving it out of the way, but the behavior was still there.
> 
> This is more of a vim question perhaps, but I'm already
> subscribed here and I figured someone would know what
> to do.
> 
> 
> Thanks!

There are quite a few vim users that frequent the alt.os.linux
newsgroups, i.e.;

alt.os.linux
alt.os.linux.debian
alt.os.linux.mint
alt.os.linux.ubuntu

-- 
 GNU/Linux user #557453
The early bird might get the worm but it
is the second mouse that gets the cheese.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue1615158] POSIX capabilities support

2019-09-09 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +15463
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/15815

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37995] Multiline ast.dump()

2019-09-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38049] Add command-line interface for the ast module

2019-09-09 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36990] test_asyncio.test_create_connection_ipv6_scope fails(in mock test?)

2019-09-09 Thread Carl Jacobsen


Change by Carl Jacobsen :


--
nosy: +CarlRJ

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38049] Add command-line interface for the ast module

2019-09-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 832e8640086ac4fa547c055a72929879cc5a963a by Serhiy Storchaka in 
branch 'master':
bpo-38049: Add command-line interface for the ast module. (GH-15724)
https://github.com/python/cpython/commit/832e8640086ac4fa547c055a72929879cc5a963a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



Re: [OT(?)] Ubuntu 18 vim now defaults to 4-space tabs

2019-09-09 Thread Eli the Bearded
In comp.lang.python, Tobiah   wrote:
> We upgraded a server to 18.04 and now when I start typing

Your subject missed a critical word: vim. There are a lot of editors in
Ubuntu, and probably they don't all do that.

> This is more of a vim question perhaps, but I'm already
> subscribed here and I figured someone would know what
> to do.

Run vim. Then ':set' to see what's set different than default. Then,
if it is tabstop you want to know about, ':verbose set tabstop?' will
tell you where that setting was last altered.

I'm not seeing tabstops changed on my Ubuntu 18.04, but I may have vim
installed with different packages. I prefer vim configured in a closer to
vi-compatible way than defaults.

Elijah
--
expects `ed` and `nano` still work the same
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue38066] Hide internal asyncio.Stream methods

2019-09-09 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

Done.
The only API from transport that users really need is get_extra_info() which is 
exposed as a stream method already.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38075] Make random module PEP-384 compatible

2019-09-09 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

I'm curious what this does for us.  _randommodule.c isn't public.  Internally, 
we get to use our full ABI, not just the stable public ABI.

I'm unclear on why this needs to change at all.  Is code like this deemed 
broken in some way?

--
nosy: +rhettinger

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37997] Segfault when using pickle with exceptions and dynamic class inheritance

2019-09-09 Thread Gabriel C


Gabriel C  added the comment:

Some further investigation suggests this may have nothing to do with pickle at 
all.

Consider the following short example:
```
def CreateDynamicClass(basetype):
class DynamicClassImpl(basetype):
def __init__(self):
super(DynamicClassImpl, self).__init__()

return DynamicClassImpl()

# Comment out any of the following three lines and the test passes
dynamic_memerror = CreateDynamicClass(MemoryError)
memory_error = MemoryError("Test")
dynamic_memerror = CreateDynamicClass(MemoryError)

print(MemoryError("Test2"))
```

This reliably produces the following stack trace:
```
Traceback (most recent call last):
  File "test_min2.py", line 13, in 
print(MemoryError("Test2"))
TypeError: __init__() takes 1 positional argument but 2 were given
```
In addition it causes a bus error (signal 10) around 30% of the time when run 
on python 3.7.4 (macOS high sierra) and a segmentation fault around 10% of the 
time when run on python 3.5 (Ubuntu 16.04).

Now modify the short example as follows, inserting a dummy argument into the 
constructor of the dynamic exception type:
```
def CreateDynamicClass(basetype):
class DynamicClassImpl(basetype):
def __init__(self, dummy_arg):
if dummy_arg is not None:
raise AssertionError("Dynamic exception constructor called.")
super(DynamicClassImpl, self).__init__()

return DynamicClassImpl(None)

# Comment out any of the following three lines and the test passes
dynamic_memerror = CreateDynamicClass(MemoryError)
memory_error = MemoryError("Test")
dynamic_memerror = CreateDynamicClass(MemoryError)

print(MemoryError("Test2"))
```

This produces the following stack trace:
```
Traceback (most recent call last):
  File "test_min2.py", line 15, in 
print(MemoryError("Test2"))
  File "test_min2.py", line 5, in __init__
raise AssertionError("Dynamic exception constructor called.")
AssertionError: Dynamic exception constructor called.
```
showing that the user-defined type constructor is actually called when the 
MemoryError object is created.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36502] str.isspace() for U+00A0 and U+202F differs from document

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset c1c04cbc24c11cd7a47579af3faffee05a16acd7 by Miss Islington (bot) 
in branch '3.8':
bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15301)
https://github.com/python/cpython/commit/c1c04cbc24c11cd7a47579af3faffee05a16acd7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36502] str.isspace() for U+00A0 and U+202F differs from document

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset 0a86da87da82c4a28d7ec91eb54c0b9ca40bbea7 by Miss Islington (bot) 
in branch '3.7':
bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. (GH-15301)
https://github.com/python/cpython/commit/0a86da87da82c4a28d7ec91eb54c0b9ca40bbea7


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38018] Increase Code Coverage for multiprocessing.shared_memory

2019-09-09 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

PR15552 introduced a regression in FreeBSD buildbots:

https://buildbot.python.org/all/#/builders/168/builds/1417

Could you take a look?

--
nosy: +pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments

2019-09-09 Thread TK


TK  added the comment:

Hi everybody,

I just submitted a PR for this issue. It's my first contribution to the cPython 
project so please let me know if I need to change anything.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37649] calculate_init fails to check that EXEC_PREFIX was decoded

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset 328cfde754c6b30c1249c5b9c12ab6b8faab551e by Miss Islington (bot) 
in branch '3.7':
bpo-37649: Fix exec_prefix check (GH-14897)
https://github.com/python/cpython/commit/328cfde754c6b30c1249c5b9c12ab6b8faab551e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18108] shutil.chown should support dir_fd and follow_symlinks keyword arguments

2019-09-09 Thread TK


Change by TK :


--
pull_requests: +15461
pull_request: https://github.com/python/cpython/pull/15811

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37649] calculate_init fails to check that EXEC_PREFIX was decoded

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset e83296314583ba9c7952d6539c63aae803a197ae by Miss Islington (bot) 
in branch '3.8':
bpo-37649: Fix exec_prefix check (GH-14897)
https://github.com/python/cpython/commit/e83296314583ba9c7952d6539c63aae803a197ae


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35803] Test and document that `dir=...` in tempfile may be PathLike

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset b4591ad33a727873c0a07d084211295bf4f5b892 by Miss Islington (bot) 
in branch '3.7':
bpo-35803: Document and test dir=PathLike for tempfile (GH-11644)
https://github.com/python/cpython/commit/b4591ad33a727873c0a07d084211295bf4f5b892


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35803] Test and document that `dir=...` in tempfile may be PathLike

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset eadf6b8787e979920c4fb6845797c33d270d2729 by Miss Islington (bot) 
in branch '3.8':
bpo-35803: Document and test dir=PathLike for tempfile (GH-11644)
https://github.com/python/cpython/commit/eadf6b8787e979920c4fb6845797c33d270d2729


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[OT(?)] Ubuntu 18 now defaults to 4-space tabs

2019-09-09 Thread Tobiah

We upgraded a server to 18.04 and now when I start typing
a python file (seems to be triggered by the .py extension)
the tabs default to 4 spaces.  We have decades of code that
use tab characters, and it has not been our intention to
change that.

I found a /usr/share/vim/vim80/indent/python.vim and tried
moving it out of the way, but the behavior was still there.

This is more of a vim question perhaps, but I'm already
subscribed here and I figured someone would know what
to do.


Thanks!


--
https://mail.python.org/mailman/listinfo/python-list


[issue38070] visit_decref(): add an assertion to check that the object is not freed

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset 5731172bb1e958b1d80b18eaf88d3f2f93cfccdd by Miss Islington (bot) 
in branch '3.8':
bpo-38070: visit_decref() calls _PyObject_IsFreed() (GH-15782)
https://github.com/python/cpython/commit/5731172bb1e958b1d80b18eaf88d3f2f93cfccdd


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37383] call count in not registered in AsyncMock till the coroutine is awaited

2019-09-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15460
pull_request: https://github.com/python/cpython/pull/15810

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36502] str.isspace() for U+00A0 and U+202F differs from document

2019-09-09 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 58d61efd4cdece3b026868a66d829001198d29b1 by Benjamin Peterson in 
branch '2.7':
[2.7] bpo-36502: Update link to UAX GH-44, the Unicode doc on the UCD. 
(GH-15808)
https://github.com/python/cpython/commit/58d61efd4cdece3b026868a66d829001198d29b1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37683] Use importlib.resources in venv

2019-09-09 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

See also this ticket: 
https://gitlab.com/python-devs/importlib_resources/issues/58

We've basically agreed that you should be able to load resources from 
subdirectories that aren't packages.  It turns out to be not a simple change in 
importlib.resources, but contributions are welcome!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[RELEASED] Python 3.5.8rc1 is released

2019-09-09 Thread Larry Hastings


On behalf of the Python development community, I'm chuffed to announce 
the availability of Python 3.5.8rc1.


Python 3.5 is in "security fixes only" mode.  This new version only 
contains security fixes, not conventional bug fixes, and it is a 
source-only release.


You can find Python 3.5.8rc1 here:

   https://www.python.org/downloads/release/python-358rc1/



I think Python 3.5 may just barely outlive 2.7,


//arry/
--
Python-announce-list mailing list -- python-announce-list@python.org
To unsubscribe send an email to python-announce-list-le...@python.org
https://mail.python.org/mailman3/lists/python-announce-list.python.org/

   Support the Python Software Foundation:
   http://www.python.org/psf/donations/


[issue7940] re.finditer and re.findall should support negative end positions

2019-09-09 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Note that changing the current behavior is a breaking change. For example 
someone can use `pattern.findall(text, curpos-50, curpos+50)` to search in the 
range ±50 characters from the current position. If negative positions change 
meaning, this will break a code for curpos < 50.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37383] call count in not registered in AsyncMock till the coroutine is awaited

2019-09-09 Thread Lisa Roach


Lisa Roach  added the comment:


New changeset b9f65f01fd761da7799f36d29b54518399d3458e by Lisa Roach in branch 
'master':
bpo-37383: Updates docs to reflect AsyncMock call_count after await. (#15761)
https://github.com/python/cpython/commit/b9f65f01fd761da7799f36d29b54518399d3458e


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36502] str.isspace() for U+00A0 and U+202F differs from document

2019-09-09 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
pull_requests: +15459
pull_request: https://github.com/python/cpython/pull/15808

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37857] Setting logger.level directly has no effect due to caching in 3.7+

2019-09-09 Thread Zane Bitter


Zane Bitter  added the comment:

> It feels wrong to do this as a band-aid to help out people who didn't do the 
> right thing.

I mean... are we here to punish people for making mistakes by sending them to 
schroedinbug purgatory, or are we here to help them upgrade to the latest 
Python without feeling like it's a minefield?

I genuinely don't know what Python's stance on this is. Certainly the Linux 
kernel and Windows both have a philosophy of not breaking working userspace 
code no matter how wrong it might be, so it's not unheard-of to choose the 
latter.

I suggested on the PR that we could deprecate the setter so that people who are 
Doing It Wrong will get a warning that they can much more easily track down and 
fix, and we won't encourage any wrong new code. Would that change your opinion?

> > but the good news is that the values are now cached

> That's not relevant to the performance numbers I posted above, is it?

Not directly - your performance numbers show that accessing the attribute is 
~300ns slower when it's a property. But the thing that gets called all the time 
that we want to be fast is isEnabledFor(), and the results of that are cached 
so it only calls getEffectiveLevel() (which is the thing accessing the 
attribute) once.

Note that populating the cache is already considerably more expensive than the 
previous path (it requires handling an exception and acquiring a lock), but 
it's still worth it because the cost is typically amortised across many log 
calls. The addition of an extra property lookup in this path is not going to be 
noticeable.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38018] Increase Code Coverage for multiprocessing.shared_memory

2019-09-09 Thread Davin Potts


Davin Potts  added the comment:


New changeset d14e39c8d9a9b525c7dcd83b2a260e2707fa85c1 by Davin Potts (Vinay 
Sharma) in branch 'master':
bpo-38018: Increase code coverage for multiprocessing.shared_memory (GH-15662)
https://github.com/python/cpython/commit/d14e39c8d9a9b525c7dcd83b2a260e2707fa85c1


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue20490] Show clear error message on circular import

2019-09-09 Thread Steve Dower


Steve Dower  added the comment:


New changeset 2d5594fac21a81a06f82c3605318dfa96e72398f by Steve Dower in branch 
'3.8':
bpo-20490: Improve circular import error message (GH-15308)
https://github.com/python/cpython/commit/2d5594fac21a81a06f82c3605318dfa96e72398f


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue7940] re.finditer and re.findall should support negative end positions

2019-09-09 Thread Zachary Ware


Zachary Ware  added the comment:

Ezio requested further opinions, so here's mine.  I don't think the current 
behavior makes sense; I doubt anyone actually expects a negative index to be 
squashed to 0, especially for endpos.  I'm not certain that allowing negative 
indexes is really necessary, but seems nicer than raising an exception which 
would be the other acceptable option to me.

--
nosy: +zach.ware

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37245] Azure Pipeline 3.8 CI: multiple tests hung and timed out on macOS 10.13

2019-09-09 Thread Steve Dower


Steve Dower  added the comment:

I suspect this code is a repro - it certainly locks up the host process 
reliably enough.

Perhaps if we unblock multiprocessing in the context of a crashed worker then 
it'll show what the underlying errors are?


import os
from multiprocessing import Pool

def f(x):
os._exit(0)
return "success"

if __name__ == '__main__':
with Pool(1) as p:
print(p.map(f, [1]))

--
nosy: +davin, pitrou

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38060] precedence (relational, logical operator)not working with single value

2019-09-09 Thread Tim Peters


Tim Peters  added the comment:

BTW, the docs also spell out that "and" and "or" ALWAYS evaluate their left 
operand before their right operand, and don't evaluate the right operand at all 
if the result of evaluating the left operand is true (for "or") or false (for 
"and").  So, e.g., 

result = (EXPR1) or (EXPR2)

acts like

result = EXPR1
if not bool(result):
result = EXPR2

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36502] str.isspace() for U+00A0 and U+202F differs from document

2019-09-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15458
pull_request: https://github.com/python/cpython/pull/15807

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36502] str.isspace() for U+00A0 and U+202F differs from document

2019-09-09 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 64c6ac74e254d31f93fcc74bf02b3daa7d3e3f25 by Benjamin Peterson 
(Greg Price) in branch 'master':
bpo-36502: Update link to UAX #44, the Unicode doc on the UCD. (GH-15301)
https://github.com/python/cpython/commit/64c6ac74e254d31f93fcc74bf02b3daa7d3e3f25


--
nosy: +benjamin.peterson

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36502] str.isspace() for U+00A0 and U+202F differs from document

2019-09-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15457
pull_request: https://github.com/python/cpython/pull/15806

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38076] Make struct module PEP-384 compatible

2019-09-09 Thread Dino Viehland


Change by Dino Viehland :


--
keywords: +patch
pull_requests: +15456
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15805

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38076] Make struct module PEP-384 compatible

2019-09-09 Thread Dino Viehland


New submission from Dino Viehland :

Make struct module PEP-384 compatible

--
assignee: dino.viehland
components: Extension Modules
messages: 351524
nosy: dino.viehland, eric.snow
priority: normal
severity: normal
status: open
title: Make struct module PEP-384 compatible
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37995] Multiline ast.dump()

2019-09-09 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 850573b836d5b82d1a1ebe75a635aaa0a3dff997 by Serhiy Storchaka in 
branch 'master':
bpo-37995: Add an option to ast.dump() to produce a multiline output. (GH-15631)
https://github.com/python/cpython/commit/850573b836d5b82d1a1ebe75a635aaa0a3dff997


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37840] bytearray_getitem() handles negative index incorrectly

2019-09-09 Thread Thomas Wouters


Thomas Wouters  added the comment:


New changeset 92709a263e9cec0bc646ccc1ea051fc528800d8d by T. Wouters (Sergey 
Fedoseev) in branch 'master':
bpo-37840: Fix handling of negative indices in bytearray_getitem() (GH-15250)
https://github.com/python/cpython/commit/92709a263e9cec0bc646ccc1ea051fc528800d8d


--
nosy: +twouters

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue18576] Document test.support.script_helper

2019-09-09 Thread Julien Palard


Julien Palard  added the comment:

All those functions has already been documented.

--
dependencies:  -Make test.script_helper more comprehensive, and use it in the 
test suite
nosy: +mdk
resolution:  -> out of date
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38006] Crash in remove() weak reference callback of weakref.WeakValueDictionary at Python exit

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset 78d15faf6c522619098e94be3e7f6d88a9e61123 by Miss Islington (bot) 
in branch '3.8':
bpo-38006: Avoid closure in weakref.WeakValueDictionary (GH-15641)
https://github.com/python/cpython/commit/78d15faf6c522619098e94be3e7f6d88a9e61123


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37683] Use importlib.resources in venv

2019-09-09 Thread Brett Cannon


Brett Cannon  added the comment:

Since no one has ever asked for this I won't worry about it. This was mostly to 
start using the proper API for reading data out of a package, but it isn't 
critical.

--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37531] Fix regrtest timeout for subprocesses: regrtest -jN --timeout=SECONDS

2019-09-09 Thread Jeremy Kloth


Jeremy Kloth  added the comment:

Well, the kill timeout doesn't seem to be working, at least completely:

https://buildbot.python.org/all/#/builders/40/builds/3012

The worker process has been killed (line 562), but regrtest is still waiting.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35941] ssl.enum_certificates() regression

2019-09-09 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +15455
pull_request: https://github.com/python/cpython/pull/15804

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37876] Tests for Rot13 codec

2019-09-09 Thread miss-islington


miss-islington  added the comment:


New changeset b6ef8f2beb90678a4a54218d6169040afbbf9fe1 by Miss Islington (bot) 
in branch '3.8':
bpo-37876: Tests for ROT-13 codec (GH-15314)
https://github.com/python/cpython/commit/b6ef8f2beb90678a4a54218d6169040afbbf9fe1


--
nosy: +miss-islington

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35941] ssl.enum_certificates() regression

2019-09-09 Thread Steve Dower


Change by Steve Dower :


--
pull_requests: +15454
pull_request: https://github.com/python/cpython/pull/15803

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38000] importlib can not handle module file names with periods

2019-09-09 Thread Brett Cannon


Brett Cannon  added the comment:

This works as expected as nothing is inherently injected into your global 
namespace in any of the other code that you are executing. Otherwise the fact 
that the imported module is not being put into sys.modules also doesn't help if 
you're trying to get access via `import cmdoplib_yaml`. 

But once the module object is created then the file name does not matter.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35941] ssl.enum_certificates() regression

2019-09-09 Thread Steve Dower


Steve Dower  added the comment:


New changeset 915cd3f0696cb8a7206754a8fc34d4cd865a1b4a by Steve Dower 
(Christian Heimes) in branch 'master':
bpo-35941: Fix performance regression in new code (GH-12610)
https://github.com/python/cpython/commit/915cd3f0696cb8a7206754a8fc34d4cd865a1b4a


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37649] calculate_init fails to check that EXEC_PREFIX was decoded

2019-09-09 Thread Steve Dower


Steve Dower  added the comment:

Thanks! Great catch

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37649] calculate_init fails to check that EXEC_PREFIX was decoded

2019-09-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15453
pull_request: https://github.com/python/cpython/pull/15802

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37649] calculate_init fails to check that EXEC_PREFIX was decoded

2019-09-09 Thread miss-islington


Change by miss-islington :


--
keywords: +patch
pull_requests: +15452
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15801

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37649] calculate_init fails to check that EXEC_PREFIX was decoded

2019-09-09 Thread Steve Dower


Steve Dower  added the comment:


New changeset 09090d04ef8d2f4c94157b852d3d530a51e13d22 by Steve Dower (Orivej 
Desh) in branch 'master':
bpo-37649: Fix exec_prefix check (GH-14897)
https://github.com/python/cpython/commit/09090d04ef8d2f4c94157b852d3d530a51e13d22


--
nosy: +steve.dower

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36338] urlparse of urllib returns wrong hostname

2019-09-09 Thread Christian Heimes


Christian Heimes  added the comment:

The guidelines https://url.spec.whatwg.org/#host-parsing make a lot of sense to 
me. Python should refuse hostnames with "[" unless

* the hostname starts with "["
* the hostname ends with "]"
* the string between [] is a valid IPv6 address (full or shortened, without or 
with correctly quoted scope id)

Python should refuse any hostname with forbidden chars "\x00\n\r #%/:?@", too.

--
nosy: +christian.heimes

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36338] urlparse of urllib returns wrong hostname

2019-09-09 Thread Christian Heimes


Change by Christian Heimes :


--
priority: normal -> high
versions: +Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30122] Added missing archive programs.

2019-09-09 Thread Julien Palard


Julien Palard  added the comment:

This FAQ entry has been deleted.

--
nosy: +mdk
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38075] Make random module PEP-384 compatible

2019-09-09 Thread Dino Viehland


Change by Dino Viehland :


--
keywords: +patch
pull_requests: +15450
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15798

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue38075] Make random module PEP-384 compatible

2019-09-09 Thread Dino Viehland


New submission from Dino Viehland :

Make random module PEP-384 compatible

--
assignee: dino.viehland
components: Extension Modules
messages: 351509
nosy: dino.viehland, eric.snow
priority: normal
severity: normal
status: open
title: Make random module PEP-384 compatible
versions: Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35803] Test and document that `dir=...` in tempfile may be PathLike

2019-09-09 Thread Zachary Ware


Change by Zachary Ware :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 3.7, Python 3.9

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue35803] Test and document that `dir=...` in tempfile may be PathLike

2019-09-09 Thread miss-islington


Change by miss-islington :


--
pull_requests: +15448
pull_request: https://github.com/python/cpython/pull/15796

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



  1   2   3   4   >