[issue31888] Creating a UUID with a list throws bad exception

2017-10-27 Thread Tilman Krummeck

New submission from Tilman Krummeck :

I found a problem by accident on Python 3.5.3 with the uuid library.

Running this:

from uuid import UUID
UUID(["string"])

This throws an AttributeError:
Traceback (most recent call last):
  File "", line 1, in 
  File "C:\Users\Tilman 
Krummeck\AppData\Local\Programs\Python\Python35-32\lib\uuid.py", line 137, in 
__init__
hex = hex.replace('urn:', '').replace('uuid:', '')
AttributeError: 'list' object has no attribute 'replace'

This is for sure not intended to work, but should throw a type error in my 
opinion even before trying to create that UUID object.

--
components: Library (Lib)
messages: 305148
nosy: TilmanKrummeck
priority: normal
severity: normal
status: open
title: Creating a UUID with a list throws bad exception
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue31070] test_threaded_import: KeyError ignored in _get_module_lock..cb

2017-10-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

A recent numpy threaded import bug report that appears in 3.6.1 but is absent 
in 3.6.3: https://github.com/numpy/numpy/issues/9931

So that's additional evidence that this really was a pre-existing race 
condition that the new tests for the SystemError cases revealed.

--

___
Python tracker 

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



Re: Just a quick question about main()

2017-10-27 Thread Ian Kelly
On Oct 27, 2017 5:38 PM, "Ian Kelly"  wrote:

In addition to what others have answered, if the code in question has any
variables then I'll prefer to put it inside a function and call the
function. This ensures that the variables are local and not going. It's a
minor code hygiene point, but a good practice in my opinion.


s/going/global/ :P
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Just a quick question about main()

2017-10-27 Thread Ian Kelly
In addition to what others have answered, if the code in question has any
variables then I'll prefer to put it inside a function and call the
function. This ensures that the variables are local and not going. It's a
minor code hygiene point, but a good practice in my opinion.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What use is of this 'cast=float ,'?

2017-10-27 Thread Tim Chase
[rearranging for easier responding]

On 2017-10-27 13:35, Robert wrote:
> self.freqslider=forms.slider(
>  parent=self.GetWin( ),
>  sizer=freqsizer,
>  value=self.freq,
>  callback= self.setfreq,
>  minimum=−samprate/2,
>  maximum=samprate/2,
>  num_steps=100,
>  style=wx.SL_HORIZONTAL,
>  cast=float ,
>  proportion=1,
> )
> I am interested in the second of the last line.
> 
>  cast=float ,

The space doesn't do anything.  You have a parameter list, so the
comma just separates "cast=float" from the next parameter,
"proportion=1". The "cast=float" passes the "float()" function as a
way of casting the data.  In this case, it likely expects a function
that takes a number or string, and returns a number that can be used
to render the slider's value/position.

You could create one that works backwards:

  def backwards_float(input):
return -float(input) # note the "-" inverting the interpreted
  value

  forms.slider(
…
cast=backwards_float,
…
)

> I've tried it in Python. Even simply with 
> 
> float

This is just the float() function.

> it has no error, but what use is it?

It's good for passing to something like the above that wants a
function to call.  The body of the function likely has something like

   resulting_value = cast(value)

which, in this case is the same as

   resulting_value = float(value)

> I do see a space before the comma ','. Is it a typo or not?

I think it's unintended.


The whole question started off peculiar because outside of a
function-invocation

   thing = other,

with the comma creates a one-element tuple and assigns the resulting
tuple to "thing"

  >>> x = 42
  >>> x
  42
  >>> y = 42,
  >>> y
  (42,)

Usually people will be more explicit because that comma is easy to
miss, so they'll write

  >>> z = (42,)
  >>> z
  (42,)

so that later people reading the code know that it's intended to be a
one-element tuple.

-tkc






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


[issue31836] test_code_module fails after test_idle

2017-10-27 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4126
stage:  -> patch review

___
Python tracker 

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



[issue31836] test_code_module fails after test_idle

2017-10-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 5a4bbcd479ce86f68bbe12bc8c16e3447f32e13a by Terry Jan Reedy in 
branch 'master':
bpo-31836: Test_code_module now passes with sys.ps1, ps2 set (#4070)
https://github.com/python/cpython/commit/5a4bbcd479ce86f68bbe12bc8c16e3447f32e13a


--

___
Python tracker 

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



[issue31858] IDLE: cleanup use of sys.ps1 and never set it.

2017-10-27 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
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



[issue31858] IDLE: cleanup use of sys.ps1 and never set it.

2017-10-27 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests:  -4109

___
Python tracker 

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



[issue31858] IDLE: cleanup use of sys.ps1 and never set it.

2017-10-27 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests:  -4108

___
Python tracker 

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



[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4125

___
Python tracker 

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



[issue13657] IDLE doesn't recognize resetting sys.ps1.

2017-10-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The part about startup files in my last message is probably wrong.  If one 
starts IDLE by 'import idlelib.idle' after setting 'sys.ps1 = 'me ', then the 
setting is recognized.  However, a startup file that runs in the user process 
will not affect sys.ps1 in the IDLE process.  We could add a command line 
option -p "prompt", but I don't see this as sufficiently important.

At least some shells and consoles recognize special characters in a prompt 
string to create the prompt.  For instance, the default setting on Windows is 
"$P$G", which I presume stands for 'working directory path' and 'greater than 
symbol', with a result such as "F:/dev/3x>".  (I have no idea where this is 
documented.)  Python and IDLE will print the literal string instead.  Custom 
prompts therefore seem like an advanced feature, not one aimed at beginners.

--
title: IDLE doesn't support sys.ps1 and sys.ps2. -> IDLE doesn't recognize 
resetting sys.ps1.

___
Python tracker 

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



[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
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



[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests:  -4123

___
Python tracker 

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



[issue31858] IDLE: cleanup use of sys.ps1 and never set it.

2017-10-27 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4124

___
Python tracker 

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



[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 6a2957de08e0c2d73f3124d12874b408cda4633d by Terry Jan Reedy (Miss 
Islington (bot)) in branch '3.6':
bpo-31860: Make the font sample in the IDLE font configuration dialog editable. 
(GH-4106) (#4154)
https://github.com/python/cpython/commit/6a2957de08e0c2d73f3124d12874b408cda4633d


--

___
Python tracker 

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



[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4123

___
Python tracker 

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



[issue2771] Test issue

2017-10-27 Thread Ezio Melotti

Change by Ezio Melotti :


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

___
Python tracker 

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



[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4122
stage: commit review -> patch review

___
Python tracker 

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



Re: Speed Race between old and new version 'working with files'

2017-10-27 Thread Steve D'Aprano
On Sat, 28 Oct 2017 09:11 am, japy.ap...@gmail.com wrote:

> import time
> 
> avg = float(0)

That should be written as 

avg = 0.0

or better still not written at all, as it is pointless.


> # copy with WITH function and execute time
> for i in range(500):
> start = time.clock()

time.clock() is an old, platform-dependent, low-resolution timer. It has been
deprecated in recent versions of Python. It is better to use:

from timeit import default_timer as clock

and use that, as the timeit module has already chosen the best timer available
on your platform.

In fact, you probably should be using timeit rather than re-inventing the
wheel, unless you have a good reason.

> with open('q://my_projects/cricket.mp3', 'rb') as old,
> open('q://my_projects/new_cricket.mp3', 'wb') as new:
> for j in old:
> new.write(j)

Reading a *binary file* line-by-line seems rather dubious to me. I wouldn't do
it that way, but for now we'll just keep it.

The simplest way to do this time comparison would be: 


oldfile = 'q://my_projects/cricket.mp3'
newfile = 'q://my_projects/new_cricket.mp3'

from timeit import Timer

def test_with():
with open(oldfile, 'rb') as old, \
open(newfile, 'wb') as new:
for line in old:
new.write(line)

def test_without():
old = open(oldfile, 'rb')
new = open(newfile, 'wb')
for line in old:
new.write(line)
old.close()
new.close()

setup = "from __main__ import test_with, test_without"

t1 = Timer("test_with()", setup)
t2 = Timer("test_without()", setup)

print('Time using with statement:')
print(min(t1.repeat(number=100, repeat=5)))
print('Time not using with statement:')
print(min(t2.repeat(number=100, repeat=5)))


On my computer, that gives a value of about 5.3 seconds and 5.2 seconds
respectively. That figure should be interpreted as:

- the best value of five trials (the 'repeat=5' argument);

- each trial calls the test_with/test_without function 100 times
  (the 'number=100' argument)

so on my computer, each call to the test function takes around 5/100 seconds,
or 50ms. So there's no significant speed difference between the two: using
the with statement is a tiny bit slower (less than 2% on my computer).

[...]
> avg += (stop - start) / 500

Better to skip the pointless initialision of avg and just write:

avg = (stop - start)/500

> avg += (stop - start) / 500
> print('Execute time with OLD version : ', avg)

That *adds* the time of the second test to the original timing, so your last
line should be:

print('Execute time with NEW version plus time with OLD version : ', avg)

to be accurate. But I don't think that's what you intended.




-- 
Steve
“Cheer up,” they said, “things could be worse.” So I cheered up, and sure
enough, things got worse.

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


[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset ed6554c487fb2403bc88be6deee611c7a4171d33 by Terry Jan Reedy 
(Serhiy Storchaka) in branch 'master':
bpo-31860: Make the font sample in the IDLE font configuration dialog editable. 
(#4106)
https://github.com/python/cpython/commit/ed6554c487fb2403bc88be6deee611c7a4171d33


--

___
Python tracker 

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



[issue26618] _overlapped extension module of asyncio uses deprecated WSAStringToAddressA() function

2017-10-27 Thread Berker Peksag

Berker Peksag  added the comment:

Unfortunately, Python 3.5 is now in security-fix-only mode. Closing this 'out 
of date'.

--
nosy: +berker.peksag
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
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



[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

Makes sense.  I guess I didn't think of it being frozen because I was thinking 
of it being more like the Recent Files list, but pre-populated if it were 
empty.  As you said, probably not worth the effort.  :-)

--

___
Python tracker 

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



Re: from packaging import version as pack_version ImportError: No module named packaging

2017-10-27 Thread Cameron Simpson

On 27Oct2017 15:56, David Gabriel  wrote:

I am running a python code that generates for me this error :

from packaging import version as pack_version
ImportError: No module named packaging

I googled it and I have found so many suggestions regarding updating 'pip'
and installing python-setuptools but all of these did not fix this issue.


You need to fetch the "packaging" module. That is what pip is for, eg:

 pip install --user packaging

The --user is to install it in your "personal" python library space.

Cheers,
Cameron Simpson  (formerly c...@zip.com.au)
--
https://mail.python.org/mailman/listinfo/python-list


[issue24291] Many servers (wsgiref, http.server, etc) can truncate large output blobs

2017-10-27 Thread Martin Panter

Martin Panter  added the comment:

Closing because I understand it is too late to do anything for 3.5 now.

--
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



Speed Race between old and new version 'working with files'

2017-10-27 Thread japy . april
import time

avg = float(0)

# copy with WITH function and execute time
for i in range(500):
start = time.clock()
with open('q://my_projects/cricket.mp3', 'rb') as old, 
open('q://my_projects/new_cricket.mp3', 'wb') as new:
for j in old:
new.write(j)
stop = time.clock()

avg += (stop - start) / 500
print('Execute time with WITH version : ', avg)

# copy with OLD version OPEN FILE function and execute time
for i in range(500):
start = time.clock()
old = open('q://my_projects/cricket.mp3', 'rb')
new = open('q://my_projects/old_cricket.mp3', 'wb')
for j in old:
new.write(j)
old.close()
new.close()
stop = time.clock()

avg += (stop - start) / 500
print('Execute time with OLD version : ', avg)
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue18670] Using read_mime_types function from mimetypes module gives resource warning

2017-10-27 Thread Martin Panter

Martin Panter  added the comment:

The patches would mask an OSError raised by the “readfp” call, which would be a 
change in behaviour. But moving the call does not seem to be necessary; why not 
leave it outside the “try” statement?

--
nosy: +martin.panter

___
Python tracker 

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



Re: What use is of this 'cast=float ,'?

2017-10-27 Thread edmondo . giovannozzi
Il giorno venerdì 27 ottobre 2017 22:35:45 UTC+2, Robert ha scritto:
> Hi,
> 
> I read below code snippet on line. I am interested in the second of the last 
> line.
> 
>  cast=float ,
> 
> 
> I've tried it in Python. Even simply with 
> 
> float
> 
> 
> it has no error, but what use is it?
> 
> 
> I do see a space before the comma ','. Is it a typo or not?
> 
> 
> Thanks,
> 
> 
> 
> self.freqslider=forms.slider(
>  parent=self.GetWin( ),
>  sizer=freqsizer,
>  value=self.freq,
>  callback= self.setfreq,
>  minimum=−samprate/2,
>  maximum=samprate/2,
>  num_steps=100,
>  style=wx.SL_HORIZONTAL,
>  cast=float ,
>  proportion=1,
> )

cast is the name of keyword argument of the function slider called "cast". It 
likely means that it should return a float. Quite likely inside the function 
"slider" there will be something like 

return cast(...)

that if you pass float will become equivalent to

return float(...)

Of course I don't know that function so take it as just a likely possibility.

By the way, it can be a method of an object named forms or a function in a 
module named forms.

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


[issue31863] Inconsistent returncode/exitcode for terminated child processes on Windows

2017-10-27 Thread Eryk Sun

Eryk Sun  added the comment:

If a multiprocessing Process gets terminated by any means other than its 
terminate() method, it won't get this special TERMINATE (0x1) exit code 
that allows the object to pretend the exit status is POSIX -SIGTERM. In 
general, the exit code will be 1. IMO, Process.terminate should be consistent 
with typical exit code of 1 and thus consistent with Popen.terminate. However, 
I'm adding Davin and Antoine to the nosy list in case they disagree -- before 
you go to the trouble of creating a PR.

--
nosy: +davin, pitrou
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



[issue31881] subprocess.returncode not set depending on arguments to subprocess.run

2017-10-27 Thread Nick

Change by Nick :


--
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



[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Cheryl, thanks for explaining, in part, why I don't want to do this ;-).  Using 
the the current .def, .cfg system would mean that the default sample would be 
frozen.  I want to be able to change it.

--

___
Python tracker 

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



Re: Just a quick question about main()

2017-10-27 Thread Ned Batchelder

On 10/27/17 2:05 PM, ROGER GRAYDON CHRISTMAN wrote:

While teaching my introductory course in Python, I occasionally see
submissions containing the following two program lines, even before
I teach about functions and modules:

if __name__ = '__main__':
...  main()

When I ask about it, I hear things like they got these from other instructors,
or from other students who learned it from their instructors, or maybe
from some on-line programming tutorial site.

I'm all on board with the first of these two lines -- and I teach it myself
as soon as I get to modules.

My question is more about the second.

Do "real" Pythonista's actually define a new function main() instead
of putting the unit test right there inside the if?

Or am I correct in assuming that this main() is just an artifact from
people who have programmed in C, C++, or Java for so long that
they cannot imagine a program without a function named "main"?


There's no need for "if __name__ == '__main__':" for unit tests. You can 
let unittest or pytest discover the tests themselves, and run them.


I often write this clause:

    if __name__ == '__main__':
    sys.exit(main(sys.argv))

Then I can write tests that call main() to be sure it does what I think 
it does.


Or, I can let setuptools entry_points handle that clause for me:

    entry_points={
    'console_scripts': [
    'coverage = coverage.cmdline:main',
    ],
    },


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


[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2017-10-27 Thread Nathaniel Smith

Nathaniel Smith  added the comment:

>  On the other hand, sane requests will have the exact multiple most of the 
> time anyway.

The ways we've discussed using aligned allocation in numpy wouldn't follow this 
requirement without special checking. Which isn't necessarily a big deal, and 
numpy won't necessarily use this API anyway. But I would suggest being very 
clear about exactly what you guarantee and what you don't :-).

--

___
Python tracker 

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



[issue31430] [Windows][2.7] Python 2.7 compilation fails on mt.exe crashing with error code C0000005

2017-10-27 Thread David Bolen

David Bolen  added the comment:

Sounds good.  I must admit I hadn't actually gone looking for a standalone 
installer yet, but just assumed it would exist.

The Win10 worker now has the .NET 3.5 feature installed (which also installed 
2.0 and 3.0).  Builds seem fine even after removing the temporary exe config 
file I had put in place.

So I think we should be good for this issue.

--

___
Python tracker 

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



[issue29890] Constructor of ipaddress.IPv*Interface does not follow documentation

2017-10-27 Thread Ilya Kulakov

Ilya Kulakov  added the comment:

Can this be included into the next bugfix release?

--

___
Python tracker 

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



What use is of this 'cast=float ,'?

2017-10-27 Thread Robert
Hi,

I read below code snippet on line. I am interested in the second of the last 
line.

 cast=float ,


I've tried it in Python. Even simply with 

float


it has no error, but what use is it?


I do see a space before the comma ','. Is it a typo or not?


Thanks,



self.freqslider=forms.slider(
 parent=self.GetWin( ),
 sizer=freqsizer,
 value=self.freq,
 callback= self.setfreq,
 minimum=−samprate/2,
 maximum=samprate/2,
 num_steps=100,
 style=wx.SL_HORIZONTAL,
 cast=float ,
 proportion=1,
)
-- 
https://mail.python.org/mailman/listinfo/python-list


PEP Post-History

2017-10-27 Thread Barry Warsaw
We’ve made a small change to the PEP process which may affect readers of 
python-list and python-ideas, so I’d like to inform you of it.  This change was 
made to PEP 1 and PEP 12.

PEPs must have a Post-History header which records the dates at which the PEP 
is posted to mailing lists, in order to keep the general Python community in 
the loop as a PEP moves to final status.  Until now, PEPs in development were 
supposed to be posted at least to python-dev and optionally to python-list[1].  
This guideline predated the creation of the python-ideas mailing list.

We’ve now changed this guideline so that Post-History will record the dates at 
which the PEP is posted to python-dev and optionally python-ideas.  python-list 
is dropped from this requirement.

python-dev is always the primary mailing list of record for Python development, 
and PEPs under development should be posted to python-dev as appropriate.  
python-ideas is the list for discussion of more speculative changes to Python, 
and it’s often where more complex PEPs, and even proto-PEPs are first raised 
and their concepts are hashed out.  As such, it makes more sense to change the 
guideline to include python-ideas and/or python-dev.  In the effort to keep the 
forums of record to a manageable number, python-list is dropped.

If you have been watching for new PEPs to be posted to python-list, you are 
invited to follow either python-dev or python-ideas.

Cheers,
-Barry (on behalf of the Python development community)

https://mail.python.org/mailman/listinfo/python-dev
https://mail.python.org/mailman/listinfo/python-ideas

Both python-dev and python-ideas are available via Gmane.

[1] PEPs may have a Discussions-To header which changes the list of forums 
where the PEP is discussed.  In that case, Post-History records the dates that 
the PEP is posted to those forums.  See PEP 1 for details.



signature.asc
Description: Message signed with OpenPGP
-- 
https://mail.python.org/mailman/listinfo/python-announce-list

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


[issue31883] Cygwin: heap corruption bug in wcsxfrm

2017-10-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

According to your reference a problem is fixed in recent Cygwin versions, isn't?

Skipping the test on Cygwin means that wcsxfrm() will be untested on this 
platform. Future regressions will be unnoticed.

--

___
Python tracker 

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



PEP Post-History

2017-10-27 Thread Barry Warsaw
We’ve made a small change to the PEP process which may affect readers of 
python-list and python-ideas, so I’d like to inform you of it.  This change was 
made to PEP 1 and PEP 12.

PEPs must have a Post-History header which records the dates at which the PEP 
is posted to mailing lists, in order to keep the general Python community in 
the loop as a PEP moves to final status.  Until now, PEPs in development were 
supposed to be posted at least to python-dev and optionally to python-list[1].  
This guideline predated the creation of the python-ideas mailing list.

We’ve now changed this guideline so that Post-History will record the dates at 
which the PEP is posted to python-dev and optionally python-ideas.  python-list 
is dropped from this requirement.

python-dev is always the primary mailing list of record for Python development, 
and PEPs under development should be posted to python-dev as appropriate.  
python-ideas is the list for discussion of more speculative changes to Python, 
and it’s often where more complex PEPs, and even proto-PEPs are first raised 
and their concepts are hashed out.  As such, it makes more sense to change the 
guideline to include python-ideas and/or python-dev.  In the effort to keep the 
forums of record to a manageable number, python-list is dropped.

If you have been watching for new PEPs to be posted to python-list, you are 
invited to follow either python-dev or python-ideas.

Cheers,
-Barry (on behalf of the Python development community)

https://mail.python.org/mailman/listinfo/python-dev
https://mail.python.org/mailman/listinfo/python-ideas

Both python-dev and python-ideas are available via Gmane.

[1] PEPs may have a Discussions-To header which changes the list of forums 
where the PEP is discussed.  In that case, Post-History records the dates that 
the PEP is posted to those forums.  See PEP 1 for details.



signature.asc
Description: Message signed with OpenPGP
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31884] subprocess set priority on windows

2017-10-27 Thread Eryk Sun

Change by Eryk Sun :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue31884] subprocess set priority on windows

2017-10-27 Thread Eryk Sun

Change by Eryk Sun :


--
versions: +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



[issue31430] [Windows][2.7] Python 2.7 compilation fails on mt.exe crashing with error code C0000005

2017-10-27 Thread Steve Dower

Steve Dower  added the comment:

I don't remember exactly how VS 2008 handled the installation, but it likely 
wasn't designed with Windows 8 in mind :)

I believe since Windows 8, the Windows Features approach is the correct way to 
install it, and I'm not even sure you can download installers any more. 
Certainly the docs [1] do not link anywhere.

1: 
https://docs.microsoft.com/en-us/dotnet/framework/install/dotnet-35-windows-10

--

___
Python tracker 

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



Re: Just a quick question about main()

2017-10-27 Thread Grant Edwards
On 2017-10-27, Chris Angelico  wrote:
> On Sat, Oct 28, 2017 at 5:05 AM, ROGER GRAYDON CHRISTMAN  wrote:
>> While teaching my introductory course in Python, I occasionally see
>> submissions containing the following two program lines,[...]

>> if __name__ = '__main__':
>> ...  main()

> If it's JUST for unit tests, I'd expect no main(), but instead to have
> it go straight into unittest.main(). IMO, the construct you show there
> implies three things:
>
> 1) This module is intended to be run from the command line
> 2) This module is intended to be imported by other modules
> 3) If imported by another module, this can also be invoked as if it
>were the top-level app.

I sometimes create a main function out of habit even if I can't
imagine a case #3.

A typical situation that I often encounter is that I write a set of
functions to perform some task(s) via a serial or network connection
using some industrial protocol.  [For example, updating firmware in a
device.]

There are often two use cases:

1) It can be used from the command-line as a stand-alone application
   with various command line options and arguments that specify the
   operation[s] to be performed. 

2) It can be imported by a GUI application in order to provide to the
   GUI framework code the functions that can be called to do the
   individual operations.

Even if the real-world end-user use case is purely the GUI one, it's
often far easier and faster to also include a main() for deveopment
and testing of the functions provided to the GUI.

-- 
Grant Edwards   grant.b.edwardsYow! ONE LIFE TO LIVE for
  at   ALL MY CHILDREN in ANOTHER
  gmail.comWORLD all THE DAYS OF
   OUR LIVES.

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


Re: Compression of random binary data

2017-10-27 Thread Ian Kelly
On Thu, Oct 26, 2017 at 8:48 PM,   wrote:
> Shouldn't that be?
>
> py> 16 * (-7/16 * math.log2(7/16) - 6/16 * math.log2(6/16)) =

No, that's failing to account for 3/16 of the probability space.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Compression of random binary data

2017-10-27 Thread Ian Kelly
On Thu, Oct 26, 2017 at 8:19 PM,   wrote:
> It looks like that averages my two examples.

I don't know how you can look at two numbers and then look at a third
number that is larger than both of them and conclude it is the
average.

> H by the way that equation is really coolwhy does it return a high 
> bit count when compared to >>>dec to bin?

I don't understand what you're asking. The binary representation of
either of those number is 16 bits, which is larger than my 15.8.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: Just a quick question about main()

2017-10-27 Thread Thomas Jollans
On 27/10/17 20:05, ROGER GRAYDON CHRISTMAN wrote:
> While teaching my introductory course in Python, I occasionally see
> submissions containing the following two program lines, even before
> I teach about functions and modules:
> 
> if __name__ = '__main__':
> ...  main()
> 
> When I ask about it, I hear things like they got these from other instructors,
> or from other students who learned it from their instructors, or maybe
> from some on-line programming tutorial site.
> 
> I'm all on board with the first of these two lines -- and I teach it myself
> as soon as I get to modules.
> 
> My question is more about the second.
> 
> Do "real" Pythonista's actually define a new function main() instead
> of putting the unit test right there inside the if?

Perhaps not for unit tests, but for scripts, particularly if they come
with a larger package, this is actually fairly common: it allows
setuptools to generate a wrapper script that runs with the Python
version and environment it was installed with.

https://python-packaging.readthedocs.io/en/latest/command-line-scripts.html

Combined with the way "python -m ..." works, this leads to slightly
silly-looking __main__.py modules like this:

https://github.com/jupyter/jupyter_core/blob/master/jupyter_core/__main__.py


> 
> Or am I correct in assuming that this main() is just an artifact from
> people who have programmed in C, C++, or Java for so long that
> they cannot imagine a program without a function named "main"?
> 
> I guess I'm not stuck on that habit, since my programming experiences
> go way back to the old Fortran days
> 
> 
> Roger Christman
> Pennsylvania State University
> 

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


Re: Just a quick question about main()

2017-10-27 Thread Chris Angelico
On Sat, Oct 28, 2017 at 5:23 AM, Chris Angelico  wrote:
> On Sat, Oct 28, 2017 at 5:05 AM, ROGER GRAYDON CHRISTMAN  wrote:
>> While teaching my introductory course in Python, I occasionally see
>> submissions containing the following two program lines, even before
>> I teach about functions and modules:
>>
>> if __name__ = '__main__':
>> ...  main()
>>
>> When I ask about it, I hear things like they got these from other 
>> instructors,
>> or from other students who learned it from their instructors, or maybe
>> from some on-line programming tutorial site.
>>
>> I'm all on board with the first of these two lines -- and I teach it myself
>> as soon as I get to modules.
>>
>> My question is more about the second.
>>
>> Do "real" Pythonista's actually define a new function main() instead
>> of putting the unit test right there inside the if?
>>
>> Or am I correct in assuming that this main() is just an artifact from
>> people who have programmed in C, C++, or Java for so long that
>> they cannot imagine a program without a function named "main"?
>
> If it's JUST for unit tests, I'd expect no main(), but instead to have
> it go straight into unittest.main(). IMO, the construct you show there
> implies three things:
>
> 1) This module is intended to be run from the command line
> 2) This module is intended to be imported by other modules
> 3) If imported by another module, this can also be invoked as if it
> were the top-level app.
>
> If #1 is not true, you don't need any sort of "if name is main" code,
> because that's not the point. If #2 is not true, you don't need to
> guard your main routine, because the condition will always be true.
> (Note that external unit tests count as

Whoops, premature send. External unit tests count as importing this
from another module, so that satisfies that.

But if #3 is not the case, then you might well have an "if name is
main" block, but there's no point having "def main()". Unless you
would import the module *and then call main*, don't bother having a
main(). Just have whatever other code you need, right there in the
'if' block. One thing I'll often do, for instance, is to have a pure
function that can be imported, and then do some simple command-line
parsing:

def spamify(ham, eggs, sausages):
"""Spamify stuff"""

if __name__ == "__main__":
import sys
_, ham, eggs, sausages, *_ = sys.argv + ["", "", ""]
print(spamify(ham, eggs, sausages))

No point having a main() to do that; the real work is in the
importable function, and for command-line usage, it simply calls that
function and prints the result.

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


Re: Just a quick question about main()

2017-10-27 Thread Chris Angelico
On Sat, Oct 28, 2017 at 5:05 AM, ROGER GRAYDON CHRISTMAN  wrote:
> While teaching my introductory course in Python, I occasionally see
> submissions containing the following two program lines, even before
> I teach about functions and modules:
>
> if __name__ = '__main__':
> ...  main()
>
> When I ask about it, I hear things like they got these from other instructors,
> or from other students who learned it from their instructors, or maybe
> from some on-line programming tutorial site.
>
> I'm all on board with the first of these two lines -- and I teach it myself
> as soon as I get to modules.
>
> My question is more about the second.
>
> Do "real" Pythonista's actually define a new function main() instead
> of putting the unit test right there inside the if?
>
> Or am I correct in assuming that this main() is just an artifact from
> people who have programmed in C, C++, or Java for so long that
> they cannot imagine a program without a function named "main"?

If it's JUST for unit tests, I'd expect no main(), but instead to have
it go straight into unittest.main(). IMO, the construct you show there
implies three things:

1) This module is intended to be run from the command line
2) This module is intended to be imported by other modules
3) If imported by another module, this can also be invoked as if it
were the top-level app.

If #1 is not true, you don't need any sort of "if name is main" code,
because that's not the point. If #2 is not true, you don't need to
guard your main routine, because the condition will always be true.
(Note that external unit tests count as
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31883] Cygwin: heap corruption bug in wcsxfrm

2017-10-27 Thread Erik Bray

Erik Bray  added the comment:

To be clear, are you saying there shouldn't be a workaround to the underlying 
issue (I agree), or are you saying the test skip shouldn't even be added? I'm 
in favor of just skipping the test since it's still a problem on (currently) 
recent Cygwin versions. And it's not a very critical test so I'm happy to just 
skip it in this case.

--

___
Python tracker 

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



Just a quick question about main()

2017-10-27 Thread ROGER GRAYDON CHRISTMAN
While teaching my introductory course in Python, I occasionally see
submissions containing the following two program lines, even before
I teach about functions and modules:

if __name__ = '__main__':
...  main()

When I ask about it, I hear things like they got these from other instructors,
or from other students who learned it from their instructors, or maybe
from some on-line programming tutorial site.

I'm all on board with the first of these two lines -- and I teach it myself
as soon as I get to modules.

My question is more about the second.

Do "real" Pythonista's actually define a new function main() instead
of putting the unit test right there inside the if?

Or am I correct in assuming that this main() is just an artifact from
people who have programmed in C, C++, or Java for so long that
they cannot imagine a program without a function named "main"?

I guess I'm not stuck on that habit, since my programming experiences
go way back to the old Fortran days


Roger Christman
Pennsylvania State University
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31887] docs for email.generator are missing a comment on special multipart/signed handling

2017-10-27 Thread R. David Murray

R. David Murray  added the comment:

The patch looks good to me if someone wants to make a PR out of it.  If you 
wouldn't mind digitally signing the CLA, Peter, that would make PSF legal 
happy, though I doubt a one sentence doc patch is really an issue.

--

___
Python tracker 

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



[issue31871] Support for file descriptor params in os.path

2017-10-27 Thread Éric Araujo

Éric Araujo  added the comment:

> support passing file descriptor instead of a path. os.path functions

Are you sure about that?  The docs for os.stat show the dir_fd parameter, used 
to avoid directory renaming issues or attacks, but it doesn’t say that the 
*path* argument can be an int file descriptor instead of a str file path.

--
nosy: +eric.araujo

___
Python tracker 

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



[issue31860] IDLE: Make font sample editable

2017-10-27 Thread Cheryl Sabella

Cheryl Sabella  added the comment:

I don't know if saving the changes would be too difficult.

1.  Create a new config file for the text (I think it would clutter the 
existing config files, but could also add it there).
2.  Load font_sample_text from the config file.
3.  In apply(), write the text back to the config file.

Issues:
1.  Have a reset button so that the original sample text could be restored at 
some point?  If so, then need to store the original (current) text somewherem 
maybe a .def and .cfg version like for the other settings?  A reset button 
would also require some screen space from the text frame.

--
nosy: +csabella

___
Python tracker 

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



Re: Python noob having a little trouble with strings

2017-10-27 Thread Chris Angelico
On Sat, Oct 28, 2017 at 1:14 AM, Christopher Reimer
 wrote:
> On Oct 27, 2017, at 1:49 AM, Peter J. Holzer  wrote:
>>
>> BTW, I find it hard to believe that PyCharm for the Mac "comes with"
>> Python 2.6. Python 2.6 is quite old. The Linux version isn't bundled
>> with a python interpreter and just uses whatever is already installed on
>> the machine. I guess it's the same for the Mac: Your version of MacOS
>> happens to include Python 2.6, so this is what PyCharm uses.
>
> I find it hard to believe that a professor would recommend downloading an IDE 
> at the start of an intro class. Students usually start off with a text editor.

No, I can definitely believe it. Among other advantages, getting
everyone onto a cross-platform IDE will tend to paper over a lot of OS
differences. You have three sets of instructions for downloading some
IDE for Lin/Mac/Win, and then everything else is just "here's how you
do it in ".

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


[issue31887] docs for email.generator are missing a comment on special multipart/signed handling

2017-10-27 Thread Peter Wullinger

New submission from Peter Wullinger :

The documentation for email.generator.{Bytes,}Generator do not mention that 
Generator._handle_multipart_signed() exists and disables header folding for 
subparts of multipart/signed.

This may cause some frustration, since, as implemented, rendering a message 
part enclosed in multipart/signed causes headers to fold differently than 
rendering the respective message part individually:

>>> text = MIMEText('', 'plain', 'utf-8')
>>> text['X-X'] = 'a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d 
>>> e f g h i j k l m n o p'
>>> print(text.as_string())
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
X-X: a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k
 l m n o p


>>> signed = MIMEMultipart('signed', filename='smime.p7s')
>>> signed.attach(text)
>>> print(signed.as_string())
Content-Type: multipart/signed; filename="smime.p7s";
 boundary="===8046244967080646804=="
MIME-Version: 1.0

--===8046244967080646804==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
X-X: a b c d e f g h i j k l m n o p q r s t u v w x y z a b c d e f g h i j k 
l m n o p


--===8046244967080646804==--

This breaks SMIME signatures when using the partial render to generate the 
signature. 

A possible workaround is to set maxheaderlen=0 for the partial render, which is 
the same as what Generator._handle_multipart_signed() does, but to do that one 
needs to know about the special processing.

Attached is a suggestion at a documentation fix that remedies this problem at 
least for the online docs.

--
components: email
files: email-generator-multipart-signed-docs.patch
keywords: patch
messages: 305127
nosy: barry, dhke, r.david.murray
priority: normal
severity: normal
status: open
title: docs for email.generator are missing a comment on special 
multipart/signed handling
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8
Added file: 
https://bugs.python.org/file47243/email-generator-multipart-signed-docs.patch

___
Python tracker 

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



[issue31883] Cygwin: heap corruption bug in wcsxfrm

2017-10-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Since this bug has been fixed in Cygwin, I don't think we should add a 
workaround for it. The expected date of Python 3.7 release is 2018-06-15, this 
is far from the date of releasing the fixed Cygwin.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue4032] distutils doesn't search ".dll.a" as library on cygwin

2017-10-27 Thread Masayuki Yamamoto

Masayuki Yamamoto  added the comment:

I opened PR 4153 that is an alternative for PR 4136 (issue2445).

--

___
Python tracker 

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



[issue4032] distutils doesn't search ".dll.a" as library on cygwin

2017-10-27 Thread Masayuki Yamamoto

Change by Masayuki Yamamoto :


--
pull_requests: +4121

___
Python tracker 

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



Re: psycopg2.ProgrammingError: syntax error at or near "\"

2017-10-27 Thread Karsten Hilbert
On Fri, Oct 27, 2017 at 08:35:20AM -0700, maheshyadav1...@gmail.com wrote:

> I am using 'psycopg2' library to access my PostgreSQL database from a python. 
> I want to pass a variable input in psql query something like this :- 
> 
> psql>>\set my_user table1
> psql>>select * from :my_user limit 10;
> 
> So I am just running these sql commands and getting this error :-
> 
> >>> cur.execute("""\set my_user table1""")
> Traceback (most recent call last):
>   File "", line 1, in 
> psycopg2.ProgrammingError: syntax error at or near "\"
> LINE 1: \set my_user table1

\set is a psql specific pseudo command rather than SQL. Only
SQL code can be run through psycopg2.

You want to read up on query parameter handling in the
psycopg2 docs. Psycopg2 and (/usr/bin/)psql(.exe) are not the
same thing.

Karsten
-- 
GPG key ID E4071346 @ eu.pool.sks-keyservers.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346
-- 
https://mail.python.org/mailman/listinfo/python-list


psycopg2.ProgrammingError: syntax error at or near "\"

2017-10-27 Thread maheshyadav1771
Hello,

I am using 'psycopg2' library to access my PostgreSQL database from a python. I 
want to pass a variable input in psql query something like this :- 

psql>>\set my_user table1
psql>>select * from :my_user limit 10;

So I am just running these sql commands and getting this error :-

>>> cur.execute("""\set my_user table1""")
Traceback (most recent call last):
  File "", line 1, in 
psycopg2.ProgrammingError: syntax error at or near "\"
LINE 1: \set my_user table1


Can anyone please help me out here.

Thanks,
Vipul
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue4032] distutils doesn't search ".dll.a" as library on cygwin

2017-10-27 Thread Erik Bray

Change by Erik Bray :


--
pull_requests: +4120
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: Python noob having a little trouble with strings

2017-10-27 Thread Christopher Reimer
On Oct 27, 2017, at 1:49 AM, Peter J. Holzer  wrote:
> 
> BTW, I find it hard to believe that PyCharm for the Mac "comes with"
> Python 2.6. Python 2.6 is quite old. The Linux version isn't bundled
> with a python interpreter and just uses whatever is already installed on
> the machine. I guess it's the same for the Mac: Your version of MacOS
> happens to include Python 2.6, so this is what PyCharm uses.

I find it hard to believe that a professor would recommend downloading an IDE 
at the start of an intro class. Students usually start off with a text editor.

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


[issue31886] Multiprocessing.Pool hangs after re-spawning several worker process.

2017-10-27 Thread olarn

New submission from olarn :

Multiprocessing's pool apparently attempts to repopulate the pool in an event 
of sub-process worker crash. However the pool seems to hangs after about ~ 
4*(number of worker) process re-spawns.

I've tracked the issue down to queue.get() stalling at multiprocessing.pool, 
line 102

Is this a known issue? Are there any known workaround?

To reproduce this issue:

import multiprocessing
import multiprocessing.util
import logging

multiprocessing.util._logger = multiprocessing.util.log_to_stderr(logging.DEBUG)
import time
import ctypes


def crash_py_interpreter():
print("attempting to crash the interpreter in ", 
multiprocessing.current_process())
i = ctypes.c_char('a'.encode())
j = ctypes.pointer(i)
c = 0
while True:
j[c] = 'a'.encode()
c += 1
j


def test_fn(x):
print("test_fn in ", multiprocessing.current_process().name, x)
exit(0)

time.sleep(0.1)


if __name__ == '__main__':

# pool = multiprocessing.Pool(processes=multiprocessing.cpu_count())
pool = multiprocessing.Pool(processes=1)

args_queue = [n for n in range(20)]

# subprocess quits
pool.map(test_fn, args_queue)

# subprocess crashes
# pool.map(test_fn,queue)

--
components: Library (Lib)
messages: 305124
nosy: olarn
priority: normal
severity: normal
status: open
title: Multiprocessing.Pool hangs after re-spawning several worker process.
type: behavior
versions: Python 2.7, Python 3.6

___
Python tracker 

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



[issue31885] Cygwin: socket test suites hang indefinitely due to bug in Cygwin

2017-10-27 Thread Erik Bray

Change by Erik Bray :


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

___
Python tracker 

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



[issue31885] Cygwin: socket test suites hang indefinitely due to bug in Cygwin

2017-10-27 Thread Erik Bray

New submission from Erik Bray :

Like issue31882, this is to mention an upstream bug in Cygwin that causes one 
of the tests in the test_socket test suite to hang indefinitely.  That bug is 
fixed upstream [1], but for now it would still be better to skip the test on 
Cygwin.

The bug is that in some cases a blocking send() (particularly for a large 
amount data) cannot be interrupted by a signal even if SA_RESTART is not set.

Fixes to this issue, along with issue31882, issue31883, and issue31878 provide 
the bare minimum for Cygwin to at least compile (not necessarily all optional 
extension modules) and run the test suite from start to finish (though there 
may be other tests that cause the interpreter to lock up, but that are 
currently masked by other bugs).


[1] https://cygwin.com/ml/cygwin-patches/2017-q2/msg00037.html

--
messages: 305123
nosy: erik.bray
priority: normal
severity: normal
status: open
title: Cygwin: socket test suites hang indefinitely due to bug in Cygwin
type: crash

___
Python tracker 

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



[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2017-10-27 Thread STINNER Victor

STINNER Victor  added the comment:

PR 4089 becomes much more larger than what I expected, so I propose to defer 
enhancements to following PR, especially the idea of "emulating" 
PyMem_AlignedAlloc() on top of PyMem_Malloc() if the user calls 
PyMem_SetAllocators() without implemented aligned_alloc.

--

___
Python tracker 

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



[issue31545] Fixing documentation for timedelta.

2017-10-27 Thread Utkarsh Upadhyay

Utkarsh Upadhyay  added the comment:

:)

There's still a lot of room for improvement on documentation front, esp. the 
inline __doc__s. I'll be working on that next.

~
ut

--

___
Python tracker 

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



[issue31884] subprocess set priority on windows

2017-10-27 Thread Mr JG Kent

Change by Mr JG Kent :


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

___
Python tracker 

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



[issue31884] subprocess set priority on windows

2017-10-27 Thread Mr JG Kent

Change by Mr JG Kent :


--
components: Library (Lib)
nosy: JamesGKent
priority: normal
severity: normal
status: open
title: subprocess set priority on windows
type: enhancement

___
Python tracker 

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



from packaging import version as pack_version ImportError: No module named packaging

2017-10-27 Thread David Gabriel
Dears,

I am running a python code that generates for me this error :

from packaging import version as pack_version
ImportError: No module named packaging

I googled it and I have found so many suggestions regarding updating 'pip'
and installing python-setuptools but all of these did not fix this issue.

Do you have any idea how can I solve this problem.
Thanks in advance.
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31883] Cygwin: heap corruption bug in wcsxfrm

2017-10-27 Thread Erik Bray

Change by Erik Bray :


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

___
Python tracker 

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



[issue31883] Cygwin: heap corruption bug in wcsxfrm

2017-10-27 Thread Erik Bray

New submission from Erik Bray :

There is an acknowledged bug in Cygwin's implementation of wcsxfrm() [1] that 
can cause heap corruption in certain cases.  This bug has since been fixed in 
Cygwin 2.8.1-1 [2] and all current and future releases.  However, that was 
relatively recent (July 2017) so it may still crop up.

I also have a workaround for this from the Python side, but rather than clutter 
the code with workarounds for platform-specific bugs I think it suffices just 
to skip the test in this case.

[1] https://cygwin.com/ml/cygwin/2017-05/msg00149.html
[2] https://cygwin.com/ml/cygwin-announce/2017-07/msg2.html

--
messages: 305120
nosy: erik.bray
priority: normal
severity: normal
status: open
title: Cygwin: heap corruption bug in wcsxfrm

___
Python tracker 

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



[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-10-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset bb78898224c99cbf9c6beed8706869f9b66967c2 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
bpo-31174: Improve the code of test_tools.test_unparse. (GH-4146) (#4148)
https://github.com/python/cpython/commit/bb78898224c99cbf9c6beed8706869f9b66967c2


--

___
Python tracker 

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



[issue31882] Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in Cygwin

2017-10-27 Thread Erik Bray

Change by Erik Bray :


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

___
Python tracker 

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



[issue31882] Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in Cygwin

2017-10-27 Thread Erik Bray

New submission from Erik Bray :

Some of the tests for asyncio and asyncore block forever on Cygwin, due to a 
known (and seemingly difficult to fix) bug [1] in Cygwin involving SO_PEERCRED 
on UNIX sockets.

SO_PEERCRED is a socket option that can be used to exchange file ownership info 
of the socket at the time the connection was established (specifically on UNIX 
sockets).  This feature is technically supported on Cygwin, but the effect of 
the bug is that if two sockets are opened on the same process (even without 
using socketpair()), the credential exchange protocol can cause connect() on 
the "client" socket to block unless the "server" socket is already listen()-ing.

This situation is not all that common in practice (it is not a problem if the 
"client" and "server" are separate processes).  But it does show up in the test 
suite in a number of places, since both sockets belong to the same process.

I have a patch to work around this and will post a PR shortly.

[1] https://cygwin.com/ml/cygwin/2017-01/msg00054.html

--
messages: 305118
nosy: erik.bray
priority: normal
severity: normal
status: open
title: Cygwin: asyncio and asyncore test suites hang indefinitely due to bug in 
Cygwin
type: crash

___
Python tracker 

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



Re: How to plot

2017-10-27 Thread Andrew Z
 Rrhank you Thomas.

On Oct 27, 2017 04:23, "Thomas Jollans"  wrote:

> On 2017-10-27 07:18, Andrew Z wrote:
> > Hello,
> >  i'd like to create a graph/plot based a DB table's data, but not sure
> > where to start. I
> >
> >  also would like to have the following functionality:
> >  a. i'd like to have it in the separate window ( xwindow to be precise).
> >  b. and i'd like to have the graph updating with every record added to
> the
> > table.
> >
> > The workflow:
> >  a. main code is running and occasionally adding records to the table
> >  b. graph gets updated "automagically" and is shown in a separate from
> the
> > main terminal window.
> >
> > Main program does not have GUI, nor is Web based, just runs in the
> terminal
> > on Xwindows.
> >
> > i don't' really care about cross-platform compability and only want to
> run
> > that on linux xwindows.
> >
> > Thank you for your advise.
> >
>
> Matplotlib  is the standard Python plotting
> library, and it has GUI backends (Tk, Qt, Gtk, ...) that should be
> perfectly suitable for your purposes.
>
> The API maybe takes some getting used to, but there are plenty of
> examples to be found around the web, and the main documentation is quite
> good.
>
> If you need the plots to update quickly (it doesn't sound like it) then
> you might need to luck into something else, like pyqtgraph or vispy.
>
>
> --
> Thomas Jollans
> --
> https://mail.python.org/mailman/listinfo/python-list
>
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-10-27 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4114

___
Python tracker 

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



[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-10-27 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 7351f9e5a91c403d15c6d556f9989b443f1296f9 by Serhiy Storchaka in 
branch 'master':
bpo-31174: Improve the code of test_tools.test_unparse. (#4146)
https://github.com/python/cpython/commit/7351f9e5a91c403d15c6d556f9989b443f1296f9


--

___
Python tracker 

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



[issue31545] Fixing documentation for timedelta.

2017-10-27 Thread STINNER Victor

STINNER Victor  added the comment:

Thank you Utkarsh Upadhyay for finishing the change up to the documentation ;-)

--
nosy: +haypo

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2017-10-27 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 03eb11f0b354751248b427455b89e9340cfd2b47 by Victor Stinner (Erik 
Bray) in branch 'master':
bpo-16135: Cleanup: Code rot left over from OS/2 support (GH-4147)
https://github.com/python/cpython/commit/03eb11f0b354751248b427455b89e9340cfd2b47


--

___
Python tracker 

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



[issue16135] Removal of OS/2 support

2017-10-27 Thread Erik Bray

Change by Erik Bray :


--
pull_requests: +4113

___
Python tracker 

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



[issue18835] Add aligned memory variants to the suite of PyMem functions/macros

2017-10-27 Thread Stefan Krah

Stefan Krah  added the comment:

Should we care about the C11 restriction?

http://en.cppreference.com/w/c/memory/aligned_alloc

"size - number of bytes to allocate. An integral multiple of alignment"



posix_memalign and _aligned_malloc don't care about the multiple.

On the other hand, sane requests will have the exact multiple most
of the time anyway.

--

___
Python tracker 

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



[issue31872] SSL BIO is broken for internationalized domains

2017-10-27 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
versions:  -Python 3.5

___
Python tracker 

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



[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-10-27 Thread Berker Peksag

Berker Peksag  added the comment:

All PRs have been merged in both issues (this and bpo-31545) so I guess this 
issue can be closed now.

--
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



[issue31545] Fixing documentation for timedelta.

2017-10-27 Thread Berker Peksag

Berker Peksag  added the comment:

Thanks!

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

___
Python tracker 

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



[issue30302] Improve .__repr__ implementation for datetime.timedelta

2017-10-27 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 843ea47a034307c7b1ca642dd70f0269255b289a by Berker Peksag 
(Utkarsh Upadhyay) in branch 'master':
bpo-31545: Update documentation containing timedelta repr. (GH-3687)
https://github.com/python/cpython/commit/843ea47a034307c7b1ca642dd70f0269255b289a


--
nosy: +berker.peksag

___
Python tracker 

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



[issue31545] Fixing documentation for timedelta.

2017-10-27 Thread Berker Peksag

Berker Peksag  added the comment:


New changeset 843ea47a034307c7b1ca642dd70f0269255b289a by Berker Peksag 
(Utkarsh Upadhyay) in branch 'master':
bpo-31545: Update documentation containing timedelta repr. (GH-3687)
https://github.com/python/cpython/commit/843ea47a034307c7b1ca642dd70f0269255b289a


--
nosy: +berker.peksag

___
Python tracker 

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



headless python app for android/ios

2017-10-27 Thread Robin Becker
In the past we have developed reportlab applications for use on android/ios 
devices. We used Kivy for the gui and the kivy setup did allow us to create a 
working reportlab pdf producer under the kivy gui. It was not exactly easy, but 
in the end we had a working PDF producer.


A possible requirement is for pdf production using reportlab, but with others 
providing the gui using possible something called electron.


I know very little about what is actually possible to provide api's in python 
under ios/android. Can the front end spawn a python process or must we run some 
kind of background app with  listening sockets etc etc? Can applications call 
out to the world to download updated templates and so on?


Any pointers would be useful.
--
Robin Becker

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


[issue31415] Add -X option to show import time

2017-10-27 Thread INADA Naoki

INADA Naoki  added the comment:

Xoptions is not environment variable.

Some modules are imported before xoptions are parsed.
So negative cache for xoptions is little more complex than
negative cache for environment variable.

--

___
Python tracker 

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



[issue31174] test_tools leaks randomly references on x86 Gentoo Refleaks 3.6 and 3.x

2017-10-27 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +4112

___
Python tracker 

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



[issue31415] Add -X option to show import time

2017-10-27 Thread STINNER Victor

STINNER Victor  added the comment:

> I didn't think it's worth enough because import will be much slower than one 
> dict lookup.

I don't care much of performance. For the consistency with other environment 
variables, I like to only read the environment variable once ("at startup"), 
and not do it each time.

--

___
Python tracker 

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



[issue31878] Cygwin: _socket module does not compile due to missing ioctl declaration

2017-10-27 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4111

___
Python tracker 

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



Re: Compression of random binary data

2017-10-27 Thread Ben Bacarisse
Marko Rauhamaa  writes:

> Ben Bacarisse :
>
>>> In this context, "random data" really means "uniformly distributed
>>> data", i.e. any bit sequence is equally likely to be presented as
>>> input. *That's* what information theory says can't be compressed.
>>
>> But that has to be about the process that gives rise to the data, not
>> the data themselves.  No finite collection of bits has the property you
>> describe.
>
> Correct. Randomness is meaningful only in reference to future events.
> Once the events take place, they cease to be random.
>
> A finite, randomly generated collection of bits can be tested against a
> probabilistic hypothesis using statistical methods.

But beware of parlour tricks.  You can't reliably test for random
looking data that are, in fact, carefully crafted.  If the claim is
about compressing arbitrary data, then the claimant won't mind testing
inputs chosen by me!  The only reason this matters is that such people
usually won't reveal the algorithm.

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


[issue31861] aiter() and anext() built-in functions

2017-10-27 Thread Davide Rizzo

Davide Rizzo  added the comment:

I attempted to make a Python implementation (attached) to use in my code. There 
are a few questions in the comments.

One of the complications is the async equivalent of next with two arguments 
like next(iterator, default). It cannot return the result of __anext__() 
because it needs to catch StopAsyncIteration. So it should return an awaitable 
wrapper instead (in my Python code this is rendered as a coroutine). A 
secondary question is whether the default value should be returned as it is 
passed, or awaited on.

--
Added file: https://bugs.python.org/file47242/aiter_comp.py

___
Python tracker 

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



Re: Python noob having a little trouble with strings

2017-10-27 Thread Peter J. Holzer
On 2017-10-27 02:59, randyli...@gmail.com  wrote:
> On Thursday, October 26, 2017 at 7:41:10 PM UTC-7, boB Stepp wrote:
>> On Thu, Oct 26, 2017 at 9:25 PM,   wrote:
[...]
>> Why not find out for yourself and print these in the Python
>> interpreter?  For instance:
>> 
>> > py
>> Python 3.6.2 (v3.6.2:5fd33b5, Jul  8 2017, 04:57:36) [MSC v.1900 64
>> bit (AMD64)] on win32
[...]
> Hi Bob, thanks for responding. I'm not sure where to do so, my
> professor had us download Pycharm for mac's which uses python 2.6

Open "Python Console ..." in the "Tools" menu.

Or just open a terminal window and type "python" there.

BTW, I find it hard to believe that PyCharm for the Mac "comes with"
Python 2.6. Python 2.6 is quite old. The Linux version isn't bundled
with a python interpreter and just uses whatever is already installed on
the machine. I guess it's the same for the Mac: Your version of MacOS
happens to include Python 2.6, so this is what PyCharm uses.

Oh, and ask your professor if you are really supposed to use Python 2.6.
There are differences between versions (especially between 2.x and 3.x)
and you'll be hopelessly confused if you use 2.6 and your professor's
examples are written for 3.5.

hp


-- 
   _  | Peter J. Holzer| Fluch der elektronischen Textverarbeitung:
|_|_) || Man feilt solange an seinen Text um, bis
| |   | h...@hjp.at | die Satzbestandteile des Satzes nicht mehr
__/   | http://www.hjp.at/ | zusammenpaßt. -- Ralph Babel
-- 
https://mail.python.org/mailman/listinfo/python-list


[issue31877] Build fails on Cygwin since issue28180

2017-10-27 Thread Nick Coghlan

Nick Coghlan  added the comment:

Thanks for the patch!

--
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



[issue31877] Build fails on Cygwin since issue28180

2017-10-27 Thread Nick Coghlan

Nick Coghlan  added the comment:


New changeset 031c4bfadb69feeda82ce886d6b0cadc638d2e1e by Nick Coghlan (Erik 
Bray) in branch 'master':
bpo-31877: Add _Py_LegacyLocaleDetected and _PyCoerceLegacyLocale to 
pylifecycle.h (GH-4134)
https://github.com/python/cpython/commit/031c4bfadb69feeda82ce886d6b0cadc638d2e1e


--

___
Python tracker 

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



Re: How to plot

2017-10-27 Thread Thomas Jollans
On 2017-10-27 07:18, Andrew Z wrote:
> Hello,
>  i'd like to create a graph/plot based a DB table's data, but not sure
> where to start. I
> 
>  also would like to have the following functionality:
>  a. i'd like to have it in the separate window ( xwindow to be precise).
>  b. and i'd like to have the graph updating with every record added to the
> table.
> 
> The workflow:
>  a. main code is running and occasionally adding records to the table
>  b. graph gets updated "automagically" and is shown in a separate from the
> main terminal window.
> 
> Main program does not have GUI, nor is Web based, just runs in the terminal
> on Xwindows.
> 
> i don't' really care about cross-platform compability and only want to run
> that on linux xwindows.
> 
> Thank you for your advise.
> 

Matplotlib  is the standard Python plotting
library, and it has GUI backends (Tk, Qt, Gtk, ...) that should be
perfectly suitable for your purposes.

The API maybe takes some getting used to, but there are plenty of
examples to be found around the web, and the main documentation is quite
good.

If you need the plots to update quickly (it doesn't sound like it) then
you might need to luck into something else, like pyqtgraph or vispy.


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


Re: Let's talk about debuggers!

2017-10-27 Thread Robin Becker

On 25/10/2017 15:08, Michele Simionato wrote:

pdb plus plus: https://pypi.python.org/pypi/pdbpp

I like the idea, but in putty at least changing the terminal size causes pdb++ 
to detach immediately from the process and mess up the screen. I think this is 
caused by (5, 'Input/output error') here


/home/rptlab/devel/otr/local/lib/python2.7/site-packages/pyrepl/fancy_termios.py 
in tcsetattr




def copy(self):
return self.__class__(self.as_list())
def tcgetattr(fd):
return TermState(termios.tcgetattr(fd))
def tcsetattr(fd, when, attrs):
termios.tcsetattr(fd, when, attrs.as_list())

 error is here

class Term(TermState):
TS__init__ = TermState.__init__
def __init__(self, fd=0):
self.TS__init__(termios.tcgetattr(fd))
self.fd = fd



--
Robin Becker

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


[issue30989] Sort only when needed in TimedRotatingFileHandler's getFilesToDelete

2017-10-27 Thread Vinay Sajip

Vinay Sajip  added the comment:


New changeset afad147b59fe84b12317f7340ddd2deeecb22321 by Vinay Sajip (Lovesh 
Harchandani) in branch 'master':
bpo-30989: Sort in TimedRotatingFileHandler only when needed. (GH-2812)
https://github.com/python/cpython/commit/afad147b59fe84b12317f7340ddd2deeecb22321


--

___
Python tracker 

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



  1   2   >