[issue33293] Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get correct UTC timestamp.

2018-04-16 Thread Han Shaowen

New submission from Han Shaowen :

What I am talking is like:

Python 3.6.0 (default, Feb 28 2018, 15:41:04)
[GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import time
>>> from datetime import datetime
>>> time.time()
1523942154.3787892
>>> datetime.now().timestamp()
1523942165.202865
>>> datetime.utcnow().timestamp()
1523913372.362377

Apparently, datetime.now().timestamp() give me right unix timestamp while 
utcnow().timestamp() doesn't.

Fellas what do you think about this?

--
components: Extension Modules
messages: 315377
nosy: Han Shaowen
priority: normal
severity: normal
status: open
title: Using datetime.datetime.utcnow().timestamp() in Python3.6.0 can't get 
correct UTC timestamp.
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue33283] Mention PNG as a supported image format by Tcl/Tk

2018-04-16 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6196

___
Python tracker 

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



[issue33283] Mention PNG as a supported image format by Tcl/Tk

2018-04-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 4b685bf7192fff48c8effeeae4f4d64f9420ec0f by Serhiy Storchaka 
(Andrés Delfino) in branch 'master':
bpo-33283: Mention PNG as a supported format by Tcl/Tk. (GH-6479)
https://github.com/python/cpython/commit/4b685bf7192fff48c8effeeae4f4d64f9420ec0f


--

___
Python tracker 

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



[issue33292] Fix secrets.randbelow docstring

2018-04-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

What is wrong with the current docstring?

--
nosy: +serhiy.storchaka, steven.daprano

___
Python tracker 

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



[issue33283] Mention PNG as a supported image format by Tcl/Tk

2018-04-16 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6197

___
Python tracker 

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



Re: Instance variables question

2018-04-16 Thread Joseph L. Casale
From: Python-list  on 
behalf of Irv Kalb 
Sent: Monday, April 16, 2018 10:03 AM
To: python-list@python.org
Subject: Instance variables question
    
> class PartyAnimal():
>     x = 0
> 
>     def party(self):
>     self.x = self.x + 1
>     print('So far', self.x)

Your not accessing the class variable here, self.x != PartyAnimal.x.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: How to save xarray data to csv

2018-04-16 Thread Chris Angelico
On Tue, Apr 17, 2018 at 3:50 AM, Rhodri James  wrote:
> You don't say, but I assume you're using Python 2.x
>
> [snip]
>
>> getting this error - TypeError: a bytes-like object is required, not 'str'

Actually, based on this error, I would suspect Python 3.x. But you're
right that (a) the Python version should be stated for clarity
(there's a LOT of difference between Python 3.3 and Python 3.7), and
(b) the full traceback is very helpful.

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


[issue21475] Support the Sitemap extension in robotparser

2018-04-16 Thread Steven Steven

Steven Steven  added the comment:

Kindly add a test for this issue

--
nosy: +stevensalbert

___
Python tracker 

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



Re: Instance variables question

2018-04-16 Thread Thomas Jollans
On 2018-04-16 18:03, Irv Kalb wrote:
> He gives a demonstration using the following example:
> 
> class PartyAnimal():
> x = 0
> 
> def party(self):
> self.x = self.x + 1
> print('So far', self.x)
> 
> [snip]
> 
> But there is something there that seems odd.  My understanding is that the "x 
> = 0" would be defining a class variable, that can be shared by all 
> PartyAnimal objects.  But he explains that because x is defined between the 
> class statement and the "party" method, that this defines an instance 
> variable x.   That way, it can be used in the first line of the "party" 
> method as self.x to increment itself.   
> 
> At the end of the video, he creates two objects from the same class, and each 
> one gets its own self.x where each correctly starts at zero.  Again, I 
> expected x to be a class variable (accessible through PartyAnimal.x).  
> 
> When I want to create an instance variable and to be used later in other 
> methods, I do this:
> 
> class PartyAnimal():
> def __init__(self):
>   self.x = 0  
> 
> def party(self):
> self.x = self.x + 1
> print('So far', self.x)
> 
> [snip]
> 
> That is, I would assign the instance variable in the __init__ method.  Both 
> approaches give the same results.
> 
> I'm certainly not trying to argue with Dr. Chuck.  I am trying to understand 
> his approach, but it's not clear to me why his code works.  Specifically, can 
> anyone explain how his "x = 0" turns x into an instance variable - while also 
> allowing the syntax for a class variable PartyAnimal.x to be used?
> 

"self.x = y", whatever self and y are, sets the attribute "x" of the
object "self". Whether "self.x" previously existed does not matter
(ignoring descriptors and the like).

If you access self.x, whether x exists obviously does matter, and
there's a fallback to looking in the class if the instance doesn't have it.

FWIW, I think this business of defining class attributes for things that
are instance-specific a bit daft. Your version strikes me as much more
pythonic.


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


Re: Instance variables question

2018-04-16 Thread duncan smith
On 16/04/18 17:03, Irv Kalb wrote:
> I have been writing OOP code for many years in other languages and for the 
> past few years in Python.  I am writing new curriculum for a course on OOP in 
> Python.  In order to see how others are explaining OOP concepts, I have been 
> reading as many books and watching as many videos as I can.   I've been 
> watching some videos created by Dr. Chuck Severance in a series called 
> "Python For Everyone".  I think "Dr. Chuck" is an excellent teacher and I 
> think his videos are outstanding.  
> 
> Today I watched this video:   https://www.youtube.com/watch?v=b2vc5uzUfoE 
>   which is about 10 minutes 
> long.  In that video he gives a very basic overview of OOP and classes.  He 
> gives a demonstration using the following example:
> 
> class PartyAnimal():
> x = 0
> 
> def party(self):
> self.x = self.x + 1
> print('So far', self.x)
> 
> an = PartyAnimal()
> an.party()
> an.party()
> an.party()
> 
> # I added this line just to see what it would do
> print('Class variable', PartyAnimal.x)
> 
> 
> And the output is:
> 
> So far 1
> So far 2
> So far 3
> Class variable 0
> 
> But there is something there that seems odd.  My understanding is that the "x 
> = 0" would be defining a class variable, that can be shared by all 
> PartyAnimal objects.  But he explains that because x is defined between the 
> class statement and the "party" method, that this defines an instance 
> variable x.   That way, it can be used in the first line of the "party" 
> method as self.x to increment itself.   
> 
> At the end of the video, he creates two objects from the same class, and each 
> one gets its own self.x where each correctly starts at zero.  Again, I 
> expected x to be a class variable (accessible through PartyAnimal.x).  
> 
> When I want to create an instance variable and to be used later in other 
> methods, I do this:
> 
> class PartyAnimal():
> def __init__(self):
>   self.x = 0  
> 
> def party(self):
> self.x = self.x + 1
> print('So far', self.x)
> 
> an = PartyAnimal()
> an.party()
> an.party()
> an.party()
> 
> That is, I would assign the instance variable in the __init__ method.  Both 
> approaches give the same results.
> 
> I'm certainly not trying to argue with Dr. Chuck.  I am trying to understand 
> his approach, but it's not clear to me why his code works.  Specifically, can 
> anyone explain how his "x = 0" turns x into an instance variable - while also 
> allowing the syntax for a class variable PartyAnimal.x to be used?
> 
> Thanks,
> 
> Irv
> 

My understanding of this:

x is a class variable.

Initially an instance has no instance variable self.x. So on the first
call to self.party the name 'x' is looked up in the class. This value is
incremented and the result is assigned to self.x. This is where the
instance variable x is created and set. On subsequent calls to
self.party there exists an instance variable x, so the name 'x' is not
looked up in the class.

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


Re: How to save xarray data to csv

2018-04-16 Thread Rhodri James

On 16/04/18 15:55, shalu.ash...@gmail.com wrote:

Hello All,

I have used xarray to merge several netcdf files into one file and then I 
subset the data of my point of interest using lat/long. Now I want to save this 
array data (time,lat,long) into csv file but I am getting an error with my code:



You don't say, but I assume you're using Python 2.x

[snip]


# xarray to numpy array
clt1=numpy.array(clt0sub)
# saving data into csv file
with open('combine11.csv', 'wb') as f:
 writer = csv.writer(f, delimiter=',')
 writer.writerows(enumerate(clt1))

getting this error - TypeError: a bytes-like object is required, not 'str'


Copy and paste the entire traceback please if you want help.  We have 
very little chance of working out what produced that error without it.



when I am removing "b" the error disappears


Which "b"?  Don't leave us guessing, we might guess wrong.


but the data saving in wrong format


Really?  It looks to me like you are getting exactly what you asked for. 
 What format were you expecting?  What are you getting that doesn't 
belong.  I suspect that you don't want the "enumerate", but beyond that 
I have no idea what you're after.


--
Rhodri James *-* Kynesim Ltd
--
https://mail.python.org/mailman/listinfo/python-list


Slow tarfile extract on armv7l Linux machine

2018-04-16 Thread Jim MacArthur
Hi, I'm seeing a very slow extraction of an uncompressed tar file using 
'tarfile' in Python 3.5.3 vs. the native Debian tar tool. This is a 
console log from my machine:


jimm@scw-01:~$ time tar xf update.tar

real    0m3.436s
user    0m0.430s
sys 0m2.870s
jimm@scw-01:~$ rm -rf home
jimm@scw-01:~$ cat untar-test.py
#!/usr/bin/env python3

import tarfile

tar = tarfile.open('update.tar')

tar.extractall()

jimm@scw-01:~$ time ./untar-test.py

real    0m12.216s
user    0m8.730s
sys 0m3.030s
jimm@scw-01:~$ uname -a
Linux scw-01 4.3.5-std-1 #1 SMP Fri Feb 19 11:52:18 UTC 2016 armv7l 
GNU/Linux

jimm@scw-01:~$ python3
Python 3.5.3 (default, Jan 19 2017, 14:11:04)
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.






I also tried this with 3.7.0b3 and I get the same result. On my desktop, 
an x86_64 running Ubuntu, there's little difference between tarfile and 
native tar. Obviously there will be some time spent starting Python but 
the above seems too much. Does anyone have any ideas what might cause 
this or where to look next? Does x86_64 do more of this in C code that's 
interpreted on armv7l, for example?



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


Re: Instance variables question

2018-04-16 Thread Irv Kalb

> On Apr 16, 2018, at 9:48 AM, duncan smith  wrote:
> 
> On 16/04/18 17:03, Irv Kalb wrote:
>> I have been writing OOP code for many years in other languages and for the 
>> past few years in Python.  I am writing new curriculum for a course on OOP 
>> in Python.  In order to see how others are explaining OOP concepts, I have 
>> been reading as many books and watching as many videos as I can.   I've been 
>> watching some videos created by Dr. Chuck Severance in a series called 
>> "Python For Everyone".  I think "Dr. Chuck" is an excellent teacher and I 
>> think his videos are outstanding.  
>> 
>> Today I watched this video:   https://www.youtube.com/watch?v=b2vc5uzUfoE 
>>   which is about 10 minutes 
>> long.  In that video he gives a very basic overview of OOP and classes.  He 
>> gives a demonstration using the following example:
>> 
>> class PartyAnimal():
>>x = 0
>> 
>>def party(self):
>>self.x = self.x + 1
>>print('So far', self.x)
>> 
>> an = PartyAnimal()
>> an.party()
>> an.party()
>> an.party()
>> 
>> # I added this line just to see what it would do
>> print('Class variable', PartyAnimal.x)
>> 
>> 
>> And the output is:
>> 
>> So far 1
>> So far 2
>> So far 3
>> Class variable 0
>> 
>> snip
> 
> My understanding of this:
> 
> x is a class variable.
> 
> Initially an instance has no instance variable self.x. So on the first
> call to self.party the name 'x' is looked up in the class. This value is
> incremented and the result is assigned to self.x. This is where the
> instance variable x is created and set. On subsequent calls to
> self.party there exists an instance variable x, so the name 'x' is not
> looked up in the class.
> 
> Duncan
> -- 
> https://mail.python.org/mailman/listinfo/python-list
> 

Thanks for the responses.  I thought it was something like this, but it hadn't 
realized that the first time the method was called, the right hand side would 
access the class variable x, but the second time (and later) it would access 
the instance variable x.  

I'll stick with the more "standard" approach of assigning the instance variable 
in the __init__ method.

Thanks,

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


Re: Instance variables question

2018-04-16 Thread Peter Otten
Irv Kalb wrote:

> I have been writing OOP code for many years in other languages and for the
> past few years in Python.  I am writing new curriculum for a course on OOP
> in Python.  In order to see how others are explaining OOP concepts, I have
> been reading as many books and watching as many videos as I can.   I've
> been watching some videos created by Dr. Chuck Severance in a series
> called "Python For Everyone".  I think "Dr. Chuck" is an excellent teacher
> and I think his videos are outstanding.
> 
> Today I watched this video:   https://www.youtube.com/watch?v=b2vc5uzUfoE
>   which is about 10 minutes
> long.  In that video he gives a very basic overview of OOP and classes. 
> He gives a demonstration using the following example:
> 
> class PartyAnimal():
> x = 0
> 
> def party(self):
> self.x = self.x + 1
> print('So far', self.x)
> 
> an = PartyAnimal()
> an.party()
> an.party()
> an.party()

This style is rather brittle. Consider the following variant:

>>> class A:
... x = ""
... 
>>> a = A()
>>> b = A()
>>> a.x += "a"
>>> a.x += "a"
>>> b.x += "b"
>>> a.x
'aa'
>>> b.x
'b'
>>> A.x
''

Seems to work. Now let's change x to something mutable:

>>> A.x = []
>>> a = A()
>>> b = A()
>>> a.x += "a"
>>> a.x += "a"
>>> b.x += "b"
>>> a.x
['a', 'a', 'b']
>>> b.x
['a', 'a', 'b']
>>> A.x
['a', 'a', 'b']

Conclusion: don't do this except to learn how attributes work in Python.


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


Re: Instance variables question

2018-04-16 Thread Chris Angelico
On Tue, Apr 17, 2018 at 3:34 AM, Peter Otten <__pete...@web.de> wrote:
> Irv Kalb wrote:
>
>> I have been writing OOP code for many years in other languages and for the
>> past few years in Python.  I am writing new curriculum for a course on OOP
>> in Python.  In order to see how others are explaining OOP concepts, I have
>> been reading as many books and watching as many videos as I can.   I've
>> been watching some videos created by Dr. Chuck Severance in a series
>> called "Python For Everyone".  I think "Dr. Chuck" is an excellent teacher
>> and I think his videos are outstanding.
>>
>> Today I watched this video:   https://www.youtube.com/watch?v=b2vc5uzUfoE
>>   which is about 10 minutes
>> long.  In that video he gives a very basic overview of OOP and classes.
>> He gives a demonstration using the following example:
>>
>> class PartyAnimal():
>> x = 0
>>
>> def party(self):
>> self.x = self.x + 1
>> print('So far', self.x)
>>
>> an = PartyAnimal()
>> an.party()
>> an.party()
>> an.party()
>
> This style is rather brittle. Consider the following variant:
>
 class A:
> ... x = ""
> ...
 a = A()
 b = A()
 a.x += "a"
 a.x += "a"
 b.x += "b"
 a.x
> 'aa'
 b.x
> 'b'
 A.x
> ''
>
> Seems to work. Now let's change x to something mutable:
>
 A.x = []
 a = A()
 b = A()
 a.x += "a"
 a.x += "a"
 b.x += "b"
 a.x
> ['a', 'a', 'b']
 b.x
> ['a', 'a', 'b']
 A.x
> ['a', 'a', 'b']
>
> Conclusion: don't do this except to learn how attributes work in Python.

Be careful: Your example looks nice and tidy because you're adding
single-character strings onto a list. They happen to work as you'd
expect. Normally, though, if you're adding onto a list, you probably
want to use another list:

a.x += ["a"]

But you've successfully - if partly unwittingly - shown how hairy this can be :)

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


How to save xarray data to csv

2018-04-16 Thread shalu . ashu50
Hello All,

I have used xarray to merge several netcdf files into one file and then I 
subset the data of my point of interest using lat/long. Now I want to save this 
array data (time,lat,long) into csv file but I am getting an error with my code:

dsmerged = 
xarray.open_mfdataset('F:/NTU_PDF__Work/1_Codes/1_Python/testing/netcdf/*.nc')

#save to netcdf file
dsmerged.to_netcdf('combine.nc')

# Extraction of data as per given coordinates 
#values (lat/long with their upper and lower bound)

fin = netCDF4.Dataset("combine.nc" ,"r")
# print the all the variables in this file
print (fin.variables)
# print the dimensions of the variable
print (fin.variables["clt"].shape)
#Out: (20075, 90, 144)
# retrieve time step from the variable
clt0 = (fin.variables["clt"])
# extract a subset of the full dataset contained in the file
clt0sub = clt0[10:30,20:30]
# xarray to numpy array   
clt1=numpy.array(clt0sub)
# saving data into csv file
with open('combine11.csv', 'wb') as f:
writer = csv.writer(f, delimiter=',')
writer.writerows(enumerate(clt1))

getting this error - TypeError: a bytes-like object is required, not 'str' when 
I am removing "b" the error disappears but the data saving in wrong format 
example:-

0,"[[  99.93312836   99.99977112  100. ...,   98.53624725
99.98111725   99.9799881 ]
 [  99.95301056   99.99489594   99.8474 ...,   99.999870399.99951172
99.97265625]
 [  99.67852783   99.96372986   99.9237 ...,   99.96694946   99.9842453
99.96450806]
 ..., 
 [  78.29571533   45.00857544   24.39345932 ...,   90.86527252
84.48490143   62.53995895]
 [  42.03381348   46.169670122.71044922 ...,   80.88492584
71.15007019   50.95384216]
 [  34.75331879   49.99913025   17.66173935 ...,   57.12231827
62.56645584   40.6435585 ]]"

1,"[[ 100.  100.  100. ...,   99.93876648
99.98928833  100.]
 [  99.9773941   100.   99.4933548  ...,   97.93031311
97.36623383   97.07974243]
 [  98.593490699.7242   99.44548035 ...,   79.59191132
85.77541351   94.40919495]
 ..., 

suggestions would be appreciated
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

Multiprocessing by default uses the fork system call to start new processes on 
Linux. This system call is not available on Windows, and there multiprocessing 
starts a fresh interpreter (see 
).
 

I'm also on macOS, and cannot reproduce the problem there even when using the 
'spawn' method there by adding some lines to the start of your script (before 
the other import statements):

import multiprocessing
if __name__ == "__main__":
multiprocessing.set_start_method('spawn')

But: I have a fairly old version of 3.6 on my machine.

--

___
Python tracker 

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



[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread schwemro

schwemro  added the comment:

On macOS it works perfectly for me as well. The issue is about running it on 
windows 10...

--

___
Python tracker 

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



Instance variables question

2018-04-16 Thread Irv Kalb
I have been writing OOP code for many years in other languages and for the past 
few years in Python.  I am writing new curriculum for a course on OOP in 
Python.  In order to see how others are explaining OOP concepts, I have been 
reading as many books and watching as many videos as I can.   I've been 
watching some videos created by Dr. Chuck Severance in a series called "Python 
For Everyone".  I think "Dr. Chuck" is an excellent teacher and I think his 
videos are outstanding.  

Today I watched this video:   https://www.youtube.com/watch?v=b2vc5uzUfoE 
  which is about 10 minutes long.  
In that video he gives a very basic overview of OOP and classes.  He gives a 
demonstration using the following example:

class PartyAnimal():
x = 0

def party(self):
self.x = self.x + 1
print('So far', self.x)

an = PartyAnimal()
an.party()
an.party()
an.party()

# I added this line just to see what it would do
print('Class variable', PartyAnimal.x)


And the output is:

So far 1
So far 2
So far 3
Class variable 0

But there is something there that seems odd.  My understanding is that the "x = 
0" would be defining a class variable, that can be shared by all PartyAnimal 
objects.  But he explains that because x is defined between the class statement 
and the "party" method, that this defines an instance variable x.   That way, 
it can be used in the first line of the "party" method as self.x to increment 
itself.   

At the end of the video, he creates two objects from the same class, and each 
one gets its own self.x where each correctly starts at zero.  Again, I expected 
x to be a class variable (accessible through PartyAnimal.x).  

When I want to create an instance variable and to be used later in other 
methods, I do this:

class PartyAnimal():
def __init__(self):
self.x = 0  

def party(self):
self.x = self.x + 1
print('So far', self.x)

an = PartyAnimal()
an.party()
an.party()
an.party()

That is, I would assign the instance variable in the __init__ method.  Both 
approaches give the same results.

I'm certainly not trying to argue with Dr. Chuck.  I am trying to understand 
his approach, but it's not clear to me why his code works.  Specifically, can 
anyone explain how his "x = 0" turns x into an instance variable - while also 
allowing the syntax for a class variable PartyAnimal.x to be used?

Thanks,

Irv

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


[issue33287] "pip iinstall packageName.py" fails

2018-04-16 Thread Berker Peksag

Berker Peksag  added the comment:

There are two different problems here:

1. There is a possible networking issue. I'd try to use a proxy or something 
like that.

2. You are using a pip patched by Ubuntu/Debian developers. pip is normally a 
self-contained package and they use their own version of requests library 
(urllib3 is used by requests.) Upgrading pip by running "pip install -U pip" 
(you might need "sudo" depending on your system) or by using your package 
manager might help.

Please use support channels of Ubuntu to get further help. This tracker is for 
issues with the Python standard library and Python interpreter.

--
nosy: +berker.peksag
resolution:  -> third party
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



ANN: Python Meeting Düsseldorf - 18.04.2018

2018-04-16 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group
 meeting in Düsseldorf, Germany]



ANKÜNDIGUNG

  Python Meeting Düsseldorf

   http://pyddf.de/

Ein Treffen von Python Enthusiasten und Interessierten
 in ungezwungener Atmosphäre.

   Mittwoch, 18.04.2018, 18:00 Uhr
   Raum 1, 2.OG im Bürgerhaus Stadtteilzentrum Bilk
 Düsseldorfer Arcaden, Bachstr. 145, 40217 Düsseldorf

Diese Nachricht ist auch online verfügbar:
https://www.egenix.com/company/news/Python-Meeting-Duesseldorf-2018-04-18


NEUIGKEITEN

 * Bereits angemeldete Vorträge:

Philipp Hagemeister
"5 Sicherheitslücken in Deiner Python-Anwendung"

Johannes Spielmann
"Python auf dem ESP32"

Charlie Clark
"Verborgene Schätze - Das itertools Modul"

   Weitere Vorträge können gerne noch angemeldet werden: i...@pyddf.de

 * Startzeit und Ort:

   Wir treffen uns um 18:00 Uhr im Bürgerhaus in den Düsseldorfer
   Arcaden.

   Das Bürgerhaus teilt sich den Eingang mit dem Schwimmbad und
   befindet sich an der Seite der Tiefgarageneinfahrt der Düsseldorfer
   Arcaden.

   Über dem Eingang steht ein großes "Schwimm' in Bilk" Logo. Hinter
   der Tür direkt links zu den zwei Aufzügen, dann in den 2. Stock
   hochfahren. Der Eingang zum Raum 1 liegt direkt links, wenn man aus
   dem Aufzug kommt.

   Google Street View: http://bit.ly/11sCfiw



EINLEITUNG

Das Python Meeting Düsseldorf ist eine regelmäßige Veranstaltung in
Düsseldorf, die sich an Python Begeisterte aus der Region wendet:

 * http://pyddf.de/

Einen guten Überblick über die Vorträge bietet unser YouTube-Kanal,
auf dem wir die Vorträge nach den Meetings veröffentlichen:

 * http://www.youtube.com/pyddf/

Veranstaltet wird das Meeting von der eGenix.com GmbH, Langenfeld,
in Zusammenarbeit mit Clark Consulting & Research, Düsseldorf:

 * http://www.egenix.com/
 * http://www.clark-consulting.eu/



PROGRAMM

Das Python Meeting Düsseldorf nutzt eine Mischung aus (Lightning)
Talks und offener Diskussion.

Vorträge können vorher angemeldet werden, oder auch spontan während
des Treffens eingebracht werden. Ein Beamer mit XGA Auflösung
steht zur Verfügung.

(Lightning) Talk Anmeldung bitte formlos per EMail an i...@pyddf.de



KOSTENBETEILIGUNG

Das Python Meeting Düsseldorf wird von Python Nutzern für Python
Nutzer veranstaltet. Um die Kosten zumindest teilweise zu
refinanzieren, bitten wir die Teilnehmer um einen Beitrag in Höhe von
EUR 10,00 inkl. 19% Mwst, Schüler und Studenten zahlen EUR 5,00
inkl. 19% Mwst.

Wir möchten alle Teilnehmer bitten, den Betrag in bar mitzubringen.



ANMELDUNG

Da wir nur für ca. 20 Personen Sitzplätze haben, möchten wir
bitten, sich per EMail anzumelden. Damit wird keine Verpflichtung
eingegangen. Es erleichtert uns allerdings die Planung.

Meeting Anmeldung bitte formlos per EMail an i...@pyddf.de



WEITERE INFORMATIONEN

Weitere Informationen finden Sie auf der Webseite des Meetings:

http://pyddf.de/

Mit freundlichen Grüßen,
-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Experts (#1, Apr 16 2018)
>>> Python Projects, Coaching and Consulting ...  http://www.egenix.com/
>>> Python Database Interfaces ...   http://products.egenix.com/
>>> Plone/Zope Database Interfaces ...   http://zope.egenix.com/


::: We implement business ideas - efficiently in both time and costs :::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
   Registered at Amtsgericht Duesseldorf: HRB 46611
   http://www.egenix.com/company/contact/
  http://www.malemburg.com/

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


Re: how to set timeout for os.popen

2018-04-16 Thread Jugurtha Hadjar

On 04/15/2018 12:01 PM, Ho Yeung Lee wrote:

while 1:
runner = os.popen("tracert -d www.hello.com")
o=runner.read()
print(o)
runner.close()
runner = os.popen("tracert -d www.hello.com")
o=runner.read()
print(o)
runner.close()
runner = os.popen("tracert -d www.hello.com")
o=runner.read()
print(o)
runner.close()


after running over 1 hour, it stop and not return in one of tracert

how to set timeout and know that this is timeout?


import signal
import time
from contextlib import contextmanager

@contextmanager
def timeout(duration, handler):
    """Timeout after `duration` seconds."""
    signal.signal(signal.SIGALRM, handler)
    signal.alarm(duration)
    try:
    yield
    finally:
    signal.alarm(0)


def interrupt_handler(signum, frame):
    print('Interrupt handler saves the day')
    raise TimeoutError


# You can use that in many ways:

# At definition time:

@timeout(10, interrupt_handler)
def foo():
    print('Begin foo')
    while True:
    print('foo is printing')
    time.sleep(3)


# At use time, define foo normally:

def bar():
    print('Begin bar')
    while True:
    print('bar is printing')
    time.sleep(3)
with timeout(10, interrupt_handler):
    print('I am inside with, above bar')
    bar()

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


[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread schwemro

schwemro  added the comment:

Here is the traceback:

Python 3.6.5 | packaged by conda-forge | (default, Apr  6 2018, 
16:13:55) [MSC v.1900 64 bit (AMD64)]
Type "copyright", "credits" or "license" for more information.

IPython 6.3.1 -- An enhanced Interactive Python.


runfile('C:/Users/Downloads/temp.py', 
wdir='C:/Users/Downloads')
Traceback (most recent call last):

File "", line 1, in 
runfile('C:/Users/Downloads/temp.py', 
wdir='C:/Users/Downloads')

File "C:\ProgramData\Anaconda3\lib\site- 
packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
execfile(filename, namespace)

File "C:\ProgramData\Anaconda3\lib\site- 
packages\spyder\utils\site\sitecustomize.py", line 102, in execfile
exec(compile(f.read(), filename, 'exec'), namespace)

File "C:/Users/Downloads/temp.py", line 22, in 
p.map(progresser, L)

File "C:\ProgramData\Anaconda3\lib\multiprocessing\pool.py", line 
266, in map
return self._map_async(func, iterable, mapstar, chunksize).get()

File "C:\ProgramData\Anaconda3\lib\multiprocessing\pool.py", line 
644, in get
raise self._value

AttributeError: 'NoneType' object has no attribute 'write'

Where can I find more details about differences between the two OS? By the way, 
I'm working on mac.

--

___
Python tracker 

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



[issue4806] Function calls taking a generator as star argument can mask TypeErrors in the generator

2018-04-16 Thread Jason R. Coombs

Jason R. Coombs  added the comment:

I believe I encountered this issue today on Python 2.7.14 
(https://ci.appveyor.com/project/jaraco/jaraco-windows/build/31/job/lenh5l4dcmj137b9).
 In this case, I have an iterable (in itertools.imap) that raises a TypeError 
when evaluated, not a generator.

The issue doesn't happen on Python 3, where 'map' is used instead of 
itertools.imap.

Does this patch need to be extended to support any iterable?

--
nosy: +jason.coombs

___
Python tracker 

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



[issue33287] "pip iinstall packageName.py" fails

2018-04-16 Thread antonio95100

New submission from antonio95100 :

Hi all. I'm struggling with the installation of a pyton package under Ubuntu 
16.4 and Python 7. I follow the statements of the pakage authors, but I obtaint 
the following errors (note that I have the same error for different packages 
installation attempt). Any suggestion is more than welcome.

$ pip install path.py
Collecting path.py
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main
status = self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in 
run
wb.build(autobuilding=True)
  File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build
self.requirement_set.prepare_files(self.finder)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in 
prepare_files
ignore_dependencies=self.ignore_dependencies))
  File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 512, in 
_prepare_file
finder, self.upgrade, require_hashes)
  File "/usr/lib/python2.7/dist-packages/pip/req/req_install.py", line 273, in 
populate_link
self.link = finder.find_requirement(self, upgrade)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 442, in 
find_requirement
all_candidates = self.find_all_candidates(req.name)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 400, in 
find_all_candidates
for page in self._get_pages(url_locations, project_name):
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 545, in _get_pages
page = self._get_page(location)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 648, in _get_page
return HTMLPage.get_page(link, session=self.session)
  File "/usr/lib/python2.7/dist-packages/pip/index.py", line 757, in get_page
"Cache-Control": "max-age=600",
  File 
"/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py",
 line 480, in get
return self.request('GET', url, **kwargs)
  File "/usr/lib/python2.7/dist-packages/pip/download.py", line 378, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
  File 
"/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py",
 line 468, in request
resp = self.send(prep, **send_kwargs)
  File 
"/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/sessions.py",
 line 576, in send
r = adapter.send(request, **kwargs)
  File 
"/usr/share/python-wheels/CacheControl-0.11.5-py2.py3-none-any.whl/cachecontrol/adapter.py",
 line 46, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
  File 
"/usr/share/python-wheels/requests-2.9.1-py2.py3-none-any.whl/requests/adapters.py",
 line 376, in send
timeout=timeout
  File 
"/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/connectionpool.py",
 line 610, in urlopen
_stacktrace=sys.exc_info()[2])
  File 
"/usr/share/python-wheels/urllib3-1.13.1-py2.py3-none-any.whl/urllib3/util/retry.py",
 line 228, in increment
total -= 1
TypeError: unsupported operand type(s) for -=: 'Retry' and 'int'

--
components: Installation
messages: 315354
nosy: antonio95100
priority: normal
severity: normal
status: open
title: "pip iinstall packageName.py" fails
versions: Python 2.7

___
Python tracker 

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



[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-16 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6185

___
Python tracker 

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



[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-16 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6186

___
Python tracker 

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



[issue33264] Remove to-be-deprecated urllib.request.urlretrieve function reference from HOWTO

2018-04-16 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

Thank you, Andrés and Terry.

This is merged in 3.8 and backported to 3.7 and 3.6 too.

--
versions: +Python 3.6, Python 3.7

___
Python tracker 

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



Re: Instance variables question

2018-04-16 Thread Peter Otten
Chris Angelico wrote:

> On Tue, Apr 17, 2018 at 3:34 AM, Peter Otten <__pete...@web.de> wrote:
>> Irv Kalb wrote:
>>
>>> I have been writing OOP code for many years in other languages and for
>>> the
>>> past few years in Python.  I am writing new curriculum for a course on
>>> OOP
>>> in Python.  In order to see how others are explaining OOP concepts, I
>>> have
>>> been reading as many books and watching as many videos as I can.   I've
>>> been watching some videos created by Dr. Chuck Severance in a series
>>> called "Python For Everyone".  I think "Dr. Chuck" is an excellent
>>> teacher and I think his videos are outstanding.
>>>
>>> Today I watched this video:  
>>> https://www.youtube.com/watch?v=b2vc5uzUfoE
>>>   which is about 10 minutes
>>> long.  In that video he gives a very basic overview of OOP and classes.
>>> He gives a demonstration using the following example:
>>>
>>> class PartyAnimal():
>>> x = 0
>>>
>>> def party(self):
>>> self.x = self.x + 1
>>> print('So far', self.x)
>>>
>>> an = PartyAnimal()
>>> an.party()
>>> an.party()
>>> an.party()
>>
>> This style is rather brittle. Consider the following variant:
>>
> class A:
>> ... x = ""
>> ...
> a = A()
> b = A()
> a.x += "a"
> a.x += "a"
> b.x += "b"
> a.x
>> 'aa'
> b.x
>> 'b'
> A.x
>> ''
>>
>> Seems to work. Now let's change x to something mutable:
>>
> A.x = []
> a = A()
> b = A()
> a.x += "a"
> a.x += "a"
> b.x += "b"
> a.x
>> ['a', 'a', 'b']
> b.x
>> ['a', 'a', 'b']
> A.x
>> ['a', 'a', 'b']
>>
>> Conclusion: don't do this except to learn how attributes work in Python.
> 
> Be careful: Your example looks nice and tidy because you're adding
> single-character strings onto a list. They happen to work as you'd
> expect. Normally, though, if you're adding onto a list, you probably
> want to use another list:
> 
> a.x += ["a"]
> 
> But you've successfully - if partly unwittingly - shown how hairy this can
> be :)

That was not an accident -- it was an attempt to make the two examples look 
as similar and harmless as possible. If the use of strings as a sequence 
distracts you use tuples instead:

>>> class A:
... x = ()
... 
>>> a = A()
>>> b = A()
>>> a.x += "alpha",
>>> a.x += "alpha",
>>> b.x += "beta",
>>> a.x
('alpha', 'alpha')
>>> b.x
('beta',)
>>> A.x
()
>>> A.x = []
>>> a = A()
>>> b = A()
>>> a.x += "alpha",
>>> a.x += "alpha",
>>> b.x += "beta",
>>> a.x
['alpha', 'alpha', 'beta']
>>> b.x
['alpha', 'alpha', 'beta']
>>> A.x
['alpha', 'alpha', 'beta']


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


ANN: distlib 0.2.7 released on PyPI

2018-04-16 Thread Vinay Sajip via Python-list
I've just released version 0.2.7 of distlib on PyPI [1]. For newcomers,
distlib is a library of packaging functionality which is intended to be
usable as the basis for third-party packaging tools.

The main changes in this release are as follows:

* Addressed #102: InstalledDistributions now have a modules attribute which is 
a list
  of top-level modules as read from top_level.txt, if that is in the 
distribution info.

* Fixed #103: Now https downloads are preferred to those over http. Thanks to
  Saulius Žemaitaitis for the patch.

* Fixed #104: Updated launcher binaries to properly handle interpreter paths 
with spaces.
  Thanks to Atsushi Odagiri for the diagnosis and fix.

* Fixed #105: cache_from_source is now imported from importlib.util where 
available.

* Added support for PEP 566 / Metadata 2.1.

A more detailed change log is available at [2].

Please try it out, and if you find any problems or have any suggestions for 
improvements,
please give some feedback using the issue tracker! [3]

Regards,

Vinay Sajip

[1] https://pypi.org/project/distlib/0.2.7/ 
[2] https://goo.gl/M3kQzR
[3] https://bitbucket.org/pypa/distlib/issues/new
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31904] Python should support VxWorks RTOS

2018-04-16 Thread Ned Deily

Ned Deily  added the comment:

As I commented on the PR, I think this PR should not be merged until and if 
there is a consensus that this support belongs in the standard cpython repo and 
there is an agreed-upon plan how this platform would be supported on going.  I 
think it needs an approved PEP.  We've allowed ourselves in the past to do a 
long-term disservice to our downstream users by merging in support for 
platforms that we were not equipped to support.  In any case, it would need to 
wait for 3.8.

--
nosy: +lukasz.langa, ned.deily
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue33288] Spam

2018-04-16 Thread Zachary Ware

Change by Zachary Ware :


--
Removed message: https://bugs.python.org/msg315364

___
Python tracker 

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



[issue33288] Spam

2018-04-16 Thread Zachary Ware

Change by Zachary Ware :


--
Removed message: https://bugs.python.org/msg315363

___
Python tracker 

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



[issue33288] Spam

2018-04-16 Thread Zachary Ware

Change by Zachary Ware :


--
nosy:  -stevensalbert
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
title: Diethealth -> Spam

___
Python tracker 

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



[issue33288] Diethealth

2018-04-16 Thread Steven Steven

Steven Steven  added the comment:

http://www.diethealthsupplements.com/

--

___
Python tracker 

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



[issue33288] Diethealth

2018-04-16 Thread Steven Steven

New submission from Steven Steven :

sue

--
messages: 315363
nosy: stevensalbert
priority: normal
severity: normal
status: open
title: Diethealth

___
Python tracker 

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



specifying the same argument multiple times with argparse

2018-04-16 Thread Larry Martell
Is there a way using argparse to be able to specify the same argument
multiple times and have them all go into the same list?

For example, I'd like to do this:

script.py -foo bar -foo baz -foo blah

and have the dest for foo have ['bar', 'baz', 'blah']
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33289] askcolor is returning floats for r, g, b values instead of ints

2018-04-16 Thread Bryan Oakley

New submission from Bryan Oakley :

Even though the underlying tcl/tk interpreter is returning ints, askcolor is 
converting the values to floats. My guess is this is an oversight related to 
the change in functionality of the / operator in python3.

this:

return (r/256, g/256, b/256), str(result)

should probably be this:

return (r//256, g//256, b//256), str(result)

--
components: Tkinter
messages: 315367
nosy: Bryan.Oakley
priority: normal
severity: normal
status: open
title: askcolor is returning floats for r,g,b values instead of ints
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32232] building extensions as builtins is broken in 3.7

2018-04-16 Thread Xavier de Gaye

Change by Xavier de Gaye :


--
pull_requests: +6188

___
Python tracker 

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



Re: Slow tarfile extract on armv7l Linux machine

2018-04-16 Thread Dan Stromberg
I'm not super-familiar with tarfile, though I did use it in one project.

First off, note that CPython is commonly 4x slower than C.  In fact,
it can be much worse at times.

Also...  Have you considered trying your code on Pypy3?

On Mon, Apr 16, 2018 at 9:10 AM, Jim MacArthur
 wrote:
> Hi, I'm seeing a very slow extraction of an uncompressed tar file using
> 'tarfile' in Python 3.5.3 vs. the native Debian tar tool. This is a console
> log from my machine:
>
> jimm@scw-01:~$ time tar xf update.tar
>
> real0m3.436s
> user0m0.430s
> sys 0m2.870s
> jimm@scw-01:~$ rm -rf home
> jimm@scw-01:~$ cat untar-test.py
> #!/usr/bin/env python3
>
> import tarfile
>
> tar = tarfile.open('update.tar')
>
> tar.extractall()
>
> jimm@scw-01:~$ time ./untar-test.py
>
> real0m12.216s
> user0m8.730s
> sys 0m3.030s
> jimm@scw-01:~$ uname -a
> Linux scw-01 4.3.5-std-1 #1 SMP Fri Feb 19 11:52:18 UTC 2016 armv7l
> GNU/Linux
> jimm@scw-01:~$ python3
> Python 3.5.3 (default, Jan 19 2017, 14:11:04)
> [GCC 6.3.0 20170118] on linux
> Type "help", "copyright", "credits" or "license" for more information.


>
> 
>
> I also tried this with 3.7.0b3 and I get the same result. On my desktop, an
> x86_64 running Ubuntu, there's little difference between tarfile and native
> tar. Obviously there will be some time spent starting Python but the above
> seems too much. Does anyone have any ideas what might cause this or where to
> look next? Does x86_64 do more of this in C code that's interpreted on
> armv7l, for example?
>
>
> --
> https://mail.python.org/mailman/listinfo/python-list
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33266] 2to3 doesn't parse all valid string literals

2018-04-16 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6187

___
Python tracker 

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



[issue31947] names=None case is not handled by EnumMeta._create_ method

2018-04-16 Thread miss-islington

miss-islington  added the comment:


New changeset 3bcca488fe753ae8cef9178e32237f84927c938e by Miss Islington (bot) 
in branch '3.7':
bpo-31947: remove None default for names param in Enum._create_ (GH-4288)
https://github.com/python/cpython/commit/3bcca488fe753ae8cef9178e32237f84927c938e


--
nosy: +miss-islington

___
Python tracker 

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



Re: how to set timeout for os.popen

2018-04-16 Thread eryk sun
On Mon, Apr 16, 2018 at 1:33 PM, Jugurtha Hadjar
 wrote:
> On 04/15/2018 12:01 PM, Ho Yeung Lee wrote:
>>
>> while 1:
>> runner = os.popen("tracert -d www.hello.com")
>> o=runner.read()
>>
>> how to set timeout and know that this is timeout?
>
> @contextmanager
> def timeout(duration, handler):
> """Timeout after `duration` seconds."""
> signal.signal(signal.SIGALRM, handler)
> signal.alarm(duration)
> try:
> yield
> finally:
> signal.alarm(0)

The OP is most likely using Windows, which has tracert.exe instead of
traceroute.

Windows doesn't implement POSIX signals. The C runtime emulates the
ones required by standard C. This includes SIGSEGV, SIGFPE, SIGILL
based on OS exceptions; SIGINT (Ctrl+C) and SIGBREAK (Ctrl+Break) for
console applications; and SIGABRT and SIGTERM for use in-process via C
raise() and abort().

There's no alarm function to interrupt a thread that's waiting on
synchronous I/O. You could implement something similar using another
thread that calls CancelSynchronousIo(). Altertable waits can also be
interrupted, but code has to be designed with this in mind.

That said, the OP can simply switch to using
subprocess.check_output(command_line, timeout=TIMEOUT). subprocess
supports a timeout on Windows by joining a worker thread that reads
from stdout.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: specifying the same argument multiple times with argparse

2018-04-16 Thread Peter Otten
Larry Martell wrote:

> Is there a way using argparse to be able to specify the same argument
> multiple times and have them all go into the same list?

action="append"

 
> For example, I'd like to do this:
> 
> script.py -foo bar -foo baz -foo blah
> 
> and have the dest for foo have ['bar', 'baz', 'blah']

$ cat script.py
#!/usr/bin/env python3
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--foo", action="append", default=[])
print(parser.parse_args().foo)
$ ./script.py --foo one --foo two --foo three
['one', 'two', 'three']


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


Re: specifying the same argument multiple times with argparse

2018-04-16 Thread Gary Herron

On 04/16/2018 02:31 PM, larry.mart...@gmail.com wrote:

Is there a way using argparse to be able to specify the same argument
multiple times and have them all go into the same list?

For example, I'd like to do this:

script.py -foo bar -foo baz -foo blah

and have the dest for foo have ['bar', 'baz', 'blah']



From the argparse web page 
(https://docs.python.org/3/library/argparse.html):


'append' - This stores a list, and appends each argument value to the 
list. This is useful to allow an option to be specified multiple times. 
Example usage:


>>>
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--foo', action='append')
>>> parser.parse_args('--foo 1 --foo 2'.split())
Namespace(foo=['1', '2'])


I hope that helps.


--
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
(425) 895-4418

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


[issue32232] building extensions as builtins is broken in 3.7

2018-04-16 Thread Xavier de Gaye

Xavier de Gaye  added the comment:

The compilation failure is a consequence of the changes made in issue 30860. 
Simply adding '#include "internal/pystate.h"' in Modules/_elementtree.c fixes 
the compilation although this is not the correct fix.

The modules configured in Modules/Setup keep being built with -DPy_BUILD_CORE 
while the refactoring done in issue 30860 imposes new constraints on the way 
headers are handled for modules accessing the Py_BUILD_CORE API. Most modules 
configured in Modules/Setup do not use this API and none of the commented out 
modules in this file (normally built by setup.py [1]) does. PR 6489 fixes this 
by introducing yet another CFLAGS named PY_NO_CORE_CFLAGS to only use 
-DPy_BUILD_CORE with Setup modules that use the Py_BUILD_CORE API.

[1] the _xxsubinterpreters module is the only one that sets -DPy_BUILD_CORE 
explicitly in setup.py

--
nosy: +xdegaye

___
Python tracker 

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



[issue33290] Python.org macOS pkg installs pip3 as pip

2018-04-16 Thread Gilbert Wilson

New submission from Gilbert Wilson :

The python-3.6.5-macosx10.6.pkg installs pip3 as pip. This means if you have 
both python2.7.x and 3.6.x you get unexpected and undesirable behavior. 
According to the release notes in 3.6.5:

Python 3 and Python 2 Co-existence

Python.org Python 3.6 and 2.7.x versions can both be installed on your system 
and will not conflict. Command names for Python 3 contain a 3 in them, python3 
(or python3.6), idle3 (or idle3.6), pip3 (or pip3.6), etc.  Python 2.7 command 
names contain a 2 or no digit: python2 (or python2.7 or python), idle2 (or 
idle2.7 or idle), etc.

The release notes for Python2.7.14 have a similarly worded note on Python 3 and 
Python 2 co-existence.

For both Pythons to properly coexist you must install Python2.7.x after 
installing Python3.6.x or manually fix the changes that the Python installers 
make to your ~/.profile PATH environmental variable.

$ which pip3
/Library/Frameworks/Python.framework/Versions/3.6/bin/pip3

$ ls -l $(dirname $(which pip3))
[SNIP]
-rwxr-xr-x  1 gilw  admin263 Apr 16 13:05 pip
-rwxr-xr-x  1 gilw  admin263 Apr 16 13:05 pip3
-rwxr-xr-x  1 gilw  admin263 Apr 16 13:05 pip3.6
[SNIP]

--
components: macOS
messages: 315369
nosy: dbxgil, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: Python.org macOS pkg installs pip3 as pip
versions: Python 3.6

___
Python tracker 

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



[issue33205] GROWTH_RATE prevents dict shrinking

2018-04-16 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

The capacity of the dict is 2/3 of its hashtable size: dk_usable < 2/3 * 
dk_size.

Currently the dict grows if dk_usable > 1/4 * dk_size, and preserves the size 
if dk_usable < 1/4 * dk_size. Note that it it can grow twice if dk_usable > 1/2 
* dk_size.

With the proposed change the dict will grow only if dk_usable > 1/3 * dk_size, 
preserve the size if 1/6 * dk_size < dk_usable < 1/3 * dk_size, and shrink if 
dk_usable < 1/6 * dk_size. After growing once it will no need to grow again 
until the number of item be increased.

This LGTM.

--

___
Python tracker 

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



[issue33285] pip upgrade runtime crash

2018-04-16 Thread Paul Moore

Paul Moore  added the comment:

Issues with pip should be reported at https://github.com/pypa/pip/issues rather 
than here. However, in this case, the issue is that you ran the command "pip 
install --upgrade pip" which will use the pip executable to upgrade itself, 
something that Windows blocks. To upgrade pip you should run the command 
"python -m pip install --upgrade pip", using "python -m pip" rather than plain 
"pip".

--
resolution:  -> third party
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



Can I execute a python code written in Python 2.7 (using numpy and tensor flow executed in linux) in Winpython 3.6 on Windows?

2018-04-16 Thread Rishika Sen
Here is the code that has been written in Python 2.7, numpy, tensorflow:
https://drive.google.com/open?id=1JZe7wfRcdlEF6Z5C0ePBjtte_2L4Kk-7

Can you please let me know what changes I have to make to execute it on 
WinPython 3.6? Else, is there a version on Python 2.7 in Winpython?

I have Winpython, I do not have Linux. 
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33234] Improve list() pre-sizing for inputs with known lengths

2018-04-16 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


--
keywords: +patch
pull_requests: +6190
stage:  -> patch review

___
Python tracker 

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



Re: Instance variables question

2018-04-16 Thread Steven D'Aprano
On Mon, 16 Apr 2018 09:03:47 -0700, Irv Kalb wrote:

> I have been writing OOP code for many years in other languages and for
> the past few years in Python.  I am writing new curriculum for a course
> on OOP in Python.


If you're going to be teaching Python, please don't teach terminology 
which is ambiguous and non-standard in the Python community.

The terminology we use is class and instance ATTRIBUTE, not "variable". 
The name is reflected in Python built-in functions getattr, setattr, 
delattr, as well as special dunder methods. While there are certain 
similarities, attributes and variables are quite different kinds of 
entities.

The syntax, semantics and implementation of variable and attribute access 
are different:

Syntax:

- variable access: uses bare names like `foo`

- attribute access: uses the dot pseudo-operator following almost
  any expression, such as `(result or calculation() + 1).attribute`

Semantics:

- variables are named values associated with a calculation; they are
  looked up across a relatively simple model involving a set of fixed
  scopes: locals, nonlocals (nested functions), globals, builtins

- attributes are intended as an abstraction of components of objects,
  for example dog.tail, car.engine, page.margins, etc, and are looked
  up by a much more complex model involving not just object inheritance
  but also the so-called "descriptor protocol"; unlike variables,
  attributes can also be computed on need

Implementation:

- variables are generally name/value pairs in a dictionary namespace,
  but in CPython at least, local variables are implemented using a
  faster table implementation

- attributes are also generally name/value pairs in a dictionary
  namespace, but they can also be computed at need using the
  special dunder methods __getattr__ and __getattribute__ or the
  property decorator


Additionally, the terms "class variable" and "instance variable" are 
ambiguous in Python, because classes and instances are first-class (pun 
not intended) values in Python. In the same way that people can talk 
about a variable intended to hold a string as a string variable, or one 
holding a float as a float variable, so we can talk about a variable 
intended to hold a class (or type) as a "class variable".

for s in ("hello", "world"):
print("s is a string variable:", repr(s))

for t in (list, tuple, set, frozenset):
print("t is a class variable:", repr(t))



[...]
> But there is something there that seems odd.  My understanding is that
> the "x = 0" would be defining a class variable, that can be shared by
> all PartyAnimal objects.  But he explains that because x is defined
> between the class statement and the "party" method, that this defines an
> instance variable x.   That way, it can be used in the first line of the
> "party" method as self.x to increment itself.

Indeed. Unlike some languages like Java, attributes are looked up at 
runtime, and instance attributes may shadow class attributes of the same 
name.

If you want to assign to a class attribute, rather than writing

self.x = value


you need to specify that you're writing to the class:

type(self).x = value



-- 
Steve

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


[issue33291] Cannot Install Stegano Package - Python 3.6.5 Base

2018-04-16 Thread Adam Klinger

New submission from Adam Klinger :

There seems to be an issue in the default setup.py which comes with the Python 
3.6.5 installer. Upon trying to install an additional package through pip the 
below is observed:

C:\Users\adamj\Desktop>pip install stegano
Collecting stegano
  Downloading 
https://files.pythonhosted.org/packages/77/76/07a61c042ac1a1cb3445689b4f140800b16d0e883a46049e221d7a92de66/Stegano-0.8.4.tar.gz
 (243kB)
100% || 245kB 3.3MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
  File "", line 1, in 
  File 
"C:\Users\adamj\AppData\Local\Temp\pip-install-sh3rd6wj\stegano\setup.py", line 
26, in 
readme = f.read()
  File "c:\python36\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 
1569: character maps to 

--
components: Unicode
messages: 315373
nosy: Adam Klinger, ezio.melotti, vstinner
priority: normal
severity: normal
status: open
title: Cannot Install Stegano Package - Python 3.6.5 Base
versions: Python 3.6

___
Python tracker 

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



[issue33291] issue in the default setup.py which comes with the Python 3.6.5 installer

2018-04-16 Thread Adam Klinger

Change by Adam Klinger :


--
title: Cannot Install Stegano Package - Python 3.6.5 Base -> issue in the 
default setup.py which comes with the Python 3.6.5 installer

___
Python tracker 

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



[issue33290] Python.org macOS pkg installs pip3 as pip

2018-04-16 Thread Ned Deily

Ned Deily  added the comment:

Actually, this appears to be a pip upgrade issue.  If you install 3.6.5 from 
the python.org installers, there is no pip link there, only pip3:

$ cd /Library/Frameworks/Python.framework/Versions/3.6/bin
$ ls -l
total 272
lrwxr-xr-x  1 root  admin  8 Apr 16 19:19 2to3 -> 2to3-3.6
-rwxrwxr-x  1 root  admin140 Mar 28 06:05 2to3-3.6
-rwxrwxr-x  1 root  admin281 Apr 16 19:19 easy_install-3.6
lrwxr-xr-x  1 root  admin  7 Apr 16 19:19 idle3 -> idle3.6
-rwxrwxr-x  1 root  admin138 Mar 28 06:05 idle3.6
-rwxrwxr-x  1 root  admin253 Apr 16 19:19 pip3
-rwxrwxr-x  1 root  admin253 Apr 16 19:19 pip3.6
lrwxr-xr-x  1 root  admin  8 Apr 16 19:19 pydoc3 -> pydoc3.6
-rwxrwxr-x  1 root  admin123 Mar 28 06:05 pydoc3.6
lrwxr-xr-x  1 root  admin  9 Apr 16 19:19 python3 -> python3.6
lrwxr-xr-x  1 root  admin 12 Apr 16 19:19 python3-32 -> python3.6-32
lrwxr-xr-x  1 root  admin 16 Apr 16 19:19 python3-config -> python3.6-config
-rwxrwxr-x  2 root  admin  25920 Mar 28 06:05 python3.6
-rwxrwxr-x  1 root  admin  13568 Mar 28 06:05 python3.6-32
lrwxr-xr-x  1 root  admin 17 Apr 16 19:19 python3.6-config -> 
python3.6m-config
-rwxrwxr-x  2 root  admin  25920 Mar 28 06:05 python3.6m
-rwxrwxr-x  1 root  admin   2081 Mar 28 06:05 python3.6m-config
lrwxr-xr-x  1 root  admin 10 Apr 16 19:19 pyvenv -> pyvenv-3.6
-rwxrwxr-x  1 root  admin480 Mar 28 06:05 pyvenv-3.6

But if you then upgrade to pip 10.0.0, which I'm guessing you did, you'll see:

$ ls -l
[...]
-rwxrwxr-x  1 root  admin138 Mar 28 06:05 idle3.6
-rwxr-xr-x  1 sysadmin  admin224 Apr 16 19:22 pip
-rwxr-xr-x  1 sysadmin  admin224 Apr 16 19:22 pip3
-rwxr-xr-x  1 sysadmin  admin224 Apr 16 19:22 pip3.6
lrwxr-xr-x  1 root  admin  8 Apr 16 19:19 pydoc3 -> pydoc3.6
[...]

So it appears the pip upgrade unconditionally installs both a pip and a pip3 
link.  It really shouldn't.

You should check the pip issue tracker and, if not already reported, open a new 
issue there:  https://github.com/pypa/pip/issues/

Thanks for the report!

--
nosy: +Marcus.Smith, dstufft, ncoghlan, paul.moore
resolution:  -> third party
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



Re: specifying the same argument multiple times with argparse

2018-04-16 Thread Larry Martell
On Mon, Apr 16, 2018 at 6:19 PM, Gary Herron  wrote:
> On 04/16/2018 02:31 PM, larry.mart...@gmail.com wrote:
>>
>> Is there a way using argparse to be able to specify the same argument
>> multiple times and have them all go into the same list?
>>
>> For example, I'd like to do this:
>>
>> script.py -foo bar -foo baz -foo blah
>>
>> and have the dest for foo have ['bar', 'baz', 'blah']
>
>
>
> From the argparse web page
> (https://docs.python.org/3/library/argparse.html):
>
> 'append' - This stores a list, and appends each argument value to the list.
> This is useful to allow an option to be specified multiple times. Example
> usage:
>

 parser = argparse.ArgumentParser()
 parser.add_argument('--foo', action='append')
 parser.parse_args('--foo 1 --foo 2'.split())
> Namespace(foo=['1', '2'])

Thanks! I did not see that in the docs.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33290] Python.org macOS pkg installs pip3 as pip

2018-04-16 Thread Ned Deily

Ned Deily  added the comment:

P.S. Of course, you'll probably need to manually remove that spurious pip 
command.

--

___
Python tracker 

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



[issue32232] building extensions as builtins is broken in 3.7

2018-04-16 Thread Ned Deily

Ned Deily  added the comment:

Thanks, Xavier, for your analysis and your PR!  We definitely meed to get this 
resolved before 3.7.0b4.  Given the complexity and potential impact on this 
area and that we are approaching the final beta, I think we need a few pairs of 
eyes to review it.  @doko, does the PR work for you?  @eric.snow and @ncoghlan, 
could you please take a look, too?  Thanks!

--
nosy: +vstinner
priority: deferred blocker -> release blocker

___
Python tracker 

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



[issue23403] Use pickle protocol 4 by default?

2018-04-16 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +6189

___
Python tracker 

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



[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

What's the specific exception you are getting?

BTW. This involves third-party code and this may be a bug in that code. An 
important difference between linux and windows is how multiprocessing launches 
additional processes.

--
nosy: +ronaldoussoren

___
Python tracker 

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



Re: Python installer hangs in Windows 7

2018-04-16 Thread jtshah619
On Monday, February 6, 2017 at 10:46:24 AM UTC+5:30, Jean-Claude Roy wrote:
>   I am trying to install Python 3.6.0 on a Windows 7 computer.
> The download of 29.1 MB is successful and I get the nextwindow.  I choose the 
> "install now" selection and thatopens the Setup Program window.
> Now the trouble starts:I get "Installing:" and the Initialization 
> progress...and nothing else.
> There is no additional disk activity, no progress on initialization, 
> andeverything appears dead.  Even after 20 minutes there is zero progress.
> I've repeated this as both a user and the administrator of this 
> Windowscomputer.  I get the same results in either case.
> If I go to the task manager it shows that Python 3.6.0 (32-bit) setup is 
> running.  If I try to end the task Iget the message that the program is not 
> responding.
> Do you have any suggestions as to how I can get past this?
> Thank you.

Uncheck the install for all users part and it will work and log into each user 
individually and then install.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread Łukasz Langa

Łukasz Langa  added the comment:

Well, now that I think about it, this is not even a *bug* fix since it's 
behavior that configparser had since 1997.

So that will have to go straight to 3.8.

--
versions: +Python 3.8 -Python 3.6

___
Python tracker 

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



[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread Łukasz Langa

Change by Łukasz Langa :


--
pull_requests: +6191

___
Python tracker 

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



[issue33292] Fix secrets.randbelow docstring

2018-04-16 Thread Vex Woo

New submission from Vex Woo :

- https://github.com/python/cpython/blob/master/Lib/secrets.py#L28

Please fix

"""Return a random int in the range [0, n)."""

to 

"""Return a random int in the range(0, n)."""

--
components: Library (Lib)
messages: 315376
nosy: Nixawk
priority: normal
severity: normal
status: open
title: Fix secrets.randbelow docstring
type: resource usage
versions: Python 3.8

___
Python tracker 

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



Re: How to save xarray data to csv

2018-04-16 Thread shalu . ashu50

On Tuesday, 17 April 2018 01:56:25 UTC+8, Rhodri James  wrote:
> On 16/04/18 15:55, shalu.ash...@gmail.com wrote:
> > Hello All,
> > 
> > I have used xarray to merge several netcdf files into one file and then I 
> > subset the data of my point of interest using lat/long. Now I want to save 
> > this array data (time,lat,long) into csv file but I am getting an error 
> > with my code:
> 
> 
> You don't say, but I assume you're using Python 2.x

Hi James, I am using WinPython Spyder 3.6. 
> 
> [snip]
> 
> > # xarray to numpy array
> > clt1=numpy.array(clt0sub)
> > # saving data into csv file
> > with open('combine11.csv', 'wb') as f:
> >  writer = csv.writer(f, delimiter=',')
> >  writer.writerows(enumerate(clt1))
> > 
> > getting this error - TypeError: a bytes-like object is required, not 'str'
> 
> Copy and paste the entire traceback please if you want help.  We have 
> very little chance of working out what produced that error without it.
> 
> > when I am removing "b" the error disappears
here i mean [with open('combine11.csv', 'wb') as f:] wb: writing binaries
if i am using "wb" so i m getting "TypeError: a bytes-like object is required, 
not 'str'"

if i am removing "b" and using only "w" so this error disappears and when i am 
writing data into txt/csv so it is just pasting what i am seeing in my console 
window. I mean i have 20045 time steps but i am getting 100.2...like that as 
previously mentioned. Not getting full time steps. It is like printscreen of my 
python console.

My question is how can i save multi-dimentional (3d: time series values, lat, 
long) data (xarrays) into csv. 

Thanks

> 
> Which "b"?  Don't leave us guessing, we might guess wrong.
> 
> > but the data saving in wrong format
> 
> Really?  It looks to me like you are getting exactly what you asked for. 
>   What format were you expecting?  What are you getting that doesn't 
> belong.  I suspect that you don't want the "enumerate", but beyond that 
> I have no idea what you're after.
> 
> -- 
> Rhodri James *-* Kynesim Ltd

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


Re: How to save xarray data to csv

2018-04-16 Thread shalu . ashu50
On Tuesday, 17 April 2018 02:01:19 UTC+8, Chris Angelico  wrote:
> On Tue, Apr 17, 2018 at 3:50 AM, Rhodri James  wrote:
> > You don't say, but I assume you're using Python 2.x
> >
> > [snip]
> >
> >> getting this error - TypeError: a bytes-like object is required, not 'str'
> 
> Actually, based on this error, I would suspect Python 3.x.
Yes Chris, I am using 3.x only

 But you're
> right that (a) the Python version should be stated for clarity
> (there's a LOT of difference between Python 3.3 and Python 3.7), and
> (b) the full traceback is very helpful.
> 
> ChrisA

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


[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread Łukasz Langa

Łukasz Langa  added the comment:

Hm. The documentation change was done in issue12036 but it seems this was 
actually never the case, contrary to what the conversation on that other issue 
there states.

I wouldn't change it for 3.6.6 anymore since it's pretty late in the release 
cycle.  This looks like an interesting bug fix for 3.7.

--

___
Python tracker 

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



[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6192

___
Python tracker 

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



[issue33251] ConfigParser.items returns items present in vars

2018-04-16 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6193

___
Python tracker 

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



[issue33292] Fix secrets.randbelow docstring

2018-04-16 Thread Roundup Robot

Change by Roundup Robot :


--
keywords: +patch
pull_requests: +6194
stage:  -> patch review

___
Python tracker 

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



[issue33286] Conflict between tqdm and multiprocessing on windows

2018-04-16 Thread schwemro

New submission from schwemro :

Apparently, there occurs a conflict between tqdm and multiprocessing. There is 
an AttributeError displayed. I provide here an minimal working example. It 
works on UNIX but unfortunately not on windows.

--
components: Windows
files: tqdm_multi.py
messages: 315353
nosy: paul.moore, schwemro, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Conflict between tqdm and multiprocessing on windows
type: compile error
versions: Python 3.6
Added file: https://bugs.python.org/file47537/tqdm_multi.py

___
Python tracker 

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