[issue35964] shutil.make_archive (xxx, tar, root_dir) is adding './' entry to archive which is wrong

2019-06-01 Thread Jeffrey Kintscher


Jeffrey Kintscher  added the comment:

I submitted a pull request that excludes '.' directory entries when adding 
directories to a tar archive.

--

___
Python tracker 

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



[issue35964] shutil.make_archive (xxx, tar, root_dir) is adding './' entry to archive which is wrong

2019-06-01 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


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

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-06-01 Thread Inada Naoki


Inada Naoki  added the comment:

> And I understood that Dino proposed to share one code instance as a memory 
> mapped file for *all* processes.

What instance means?  code object? co_code?
Anyway, Dino didn't propose such thing.  He only proposed accepting buffer 
object for code constructor.
He didn't describe how to use buffer object.  Python doesn't provide share 
buffer object inter processes.

There are no enough concrete information for estimate benefits.
We're discussing imagination, not concrete idea.

Let's stop discuss more, and wait Dino provide concrete example which can be 
used to estimate benefits.

--

___
Python tracker 

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



[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Cheryl, go ahead after reading the notes above.  Use an f-string for the 
runcommand argument and remember that it is run within the pristine user 
environment.  Otherwise, let's start with minimal changes.

--

___
Python tracker 

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



[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

My suspicion about posix=False was wrong.

>>> shlex.split(''' 1 "'a' 'b'" ''', posix=False)
['1', '"\'a\' \'b\'"']  # len(...[1]) = 9
>>> shlex.split(''' 1 '"a" "b"' ''')
['1', '"a" "b"']  # len = 7
f:\dev\3x>py -c "import sys; print(sys.argv)" 1 "'a' 'b'"
['-c', '1', "'a' 'b'"]  # Matches 'True'

>>> shlex.split(''' 1 '"a" "b"' ''', posix=False)
['1', '\'"a" "b"\'']
>>> shlex.split(''' 1 '"a" "b"' ''')
['1', '"a" "b"']  # Similar difference
f:\dev\3x>py -c "import sys; print(sys.argv)" 1 '"a" "b"'
['-c', '1', "'a", "b'"]  # crazy inversion and 3 args, matches neither

--

___
Python tracker 

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



[issue37130] pathlib.with_name() doesn't like unnamed files.

2019-06-01 Thread N.P. Khelili


New submission from N.P. Khelili :

Hi guys!

I'm new to python and working on my first real project with it
I'm sorry if it's not the right place for posting this.

I noticed that that pathlib.with_name() method does not accept to give a name 
to a path that does not already have one.

It seems a bit inconsistent knowing that the Path constructor does not require 
one...

>>> Path()
PosixPath('.')

>>> Path().resolve()
PosixPath('/home/nono')

but:
 
>>> Path().with_name('dodo')

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.7/pathlib.py", line 819, in with_name
raise ValueError("%r has an empty name" % (self,))
ValueError: PosixPath('.') has an empty name

whereas if you do:

>>> Path().resolve().with_name('dodo')
PosixPath('/home/dodo')

I first tought "explicit is better than implicit" and then why not allways use 
resolve first! That was not a big deal but then I tried:

>>> Path('..').with_name('dudu').resolve()
PosixPath('/home/nono/dudu')

( ! )

>>> Path('..').resolve().with_name('dudu')
PosixPath('/dudu')

It seems that the dots and slashes are in fact not really interpreted leading 
to:

>>> Path('../..').with_name('dudu')
PosixPath('../dudu')

>>> Path('../..').with_name('dudu').resolve()
PosixPath('/home/dudu')

( ! )
 
>>> Path('../..').resolve().with_name('dudu')

Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.7/pathlib.py", line 819, in with_name
raise ValueError("%r has an empty name" % (self,))
ValueError: PosixPath('/') has an empty name

Even if the doc briefly tells about this, I found this behavior quite 
disturbing

I don't know what could be the correct answer to this,
maybe making Path('..') as invalid as Path('.'),
or adding a few more lines in the doc...

Sincerly yours,

--
components: Library (Lib)
messages: 344250
nosy: Nophke
priority: normal
severity: normal
status: open
title: pathlib.with_name() doesn't like unnamed files.
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

When running IDLE normally, with a subprocess, it would be possible to pass 
arguments to python itself when IDLE restarts the user process (with
shell.restart_shell()).  That would be another issue.  We would have to look at 
whether any options would disable idlelib.run and how running code supervised 
might change results.

--

___
Python tracker 

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



[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I'll can work on a PR for this, unless you want to do it based on your research.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue36984] typing docs "versionadded" is inaccurate for many attributes

2019-06-01 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


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



[issue36984] typing docs "versionadded" is inaccurate for many attributes

2019-06-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13620
pull_request: https://github.com/python/cpython/pull/13737

___
Python tracker 

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



[issue5680] Simulate command-line arguments for program run in IDLE

2019-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

3 recent 'doit' requests (2 on PR 1589) raise my priority for this issue.

When a user runs a file from an editor, IDLE simulates, as well as it can, the 
user entering 'python -i path' in a system command line shell.   Both on a 
command line and in IDLE, the program starts with sys.argv = ['path'] (at least 
on my Windows system).  This can be shown by running a file with 'import sys; 
print(sys.path)' both ways.

The request for this issue is to simulate 'python -i path a1, a2, ...'.
The program should start with sys.argv = ['path', 'a1', 'a2', '...'], with the 
argument strings being the same as they would be if entered at a command line 
on the *same system*.

I have looked at least a bit at all 4 patches and have decided to start fresh, 
using just a few existing lines.  The latest of the 4 was submitted 2 years 
ago, while I was learning to use git.

By the following September, using config-extensions was obsolete.  *If* we want 
to save a command string across sessions, a line could be added to config-main. 
 But I am dubious about this.  I expect that users will want to vary argument 
values for 1 program and need different sets of arguments for different 
programs.


I want to use a subclass of idlelib.query.Query for the query box.  No need to 
reinvent it.

I believe that argument strings should be parsed into an argument list using 
shlex.split.  No need to reinvent that either.  But I am not an expert in this 
area and the doc it rather vague.  I suspect that 'posix=False' should be used 
on Windows.  Does anyone know?  Gabriel's patch is the only one using 
shlex.split, but always with the default 'posix=True'.

Saimadhav tested his patch on Debian.  The others did not say.  A 
verified-by-human htest should be added to runscript.py, and manual test 
running 'import sys; print(sys.argv)' from an editor done on the 3 major OSes.

--
stage: patch review -> needs patch
title: Command-line arguments when running in IDLE -> Simulate command-line 
arguments for program run in IDLE
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



[issue36985] typing.ForwardRef is undocumented

2019-06-01 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

Guido, I remember you were against exposing `ForwardRef` as public at some 
point, but recently you approved https://github.com/python/cpython/pull/13456 
that added it to `typing.__all__`. I don't have any particular opinion on this, 
but if you don't object, I think it would make sense to add a short section 
about this to the docs, since it may be exposed at runtime, e.g. in 
`List['Cls']`.

--
nosy: +gvanrossum

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-06-01 Thread Eric Snow


Eric Snow  added the comment:

FYI, after merging that PR I realized that the COMPUTE_EVAL_BREAKER macro isn't 
quite right.  While the following scenario worked before, now it doesn't:

1. interpreter A: _PyEval_AddPendingCall() causes the global
   eval breaker to be set
2. interpreter B: the next pass through the eval loop uses
   COMPUTE_EVAL_BREAKER; it has no pending calls so the global
   eval breaker is unset
3. interpreter A: the next pass through the eval loop does not
   run the pending call because the eval breaker is no longer set

This really isn't a problem because the eval breaker is triggered for the GIL 
pretty frequently.  Furthermore, it won't be a problem once the GIL is 
per-interpreter (at which point we will switch to a per-interpreter eval 
breaker).

If it is important enough then I can fix it.  I even wrote up a solution. [1]  
However, I'd rather leave it alone (hence no PR).  The alternatives are more 
complicated and the situation should be relatively short-lived.

FWIW, in addition to the solution I mentioned above, I tried a few other ways:

* have a per-interpreter eval breaker in addition to the global one
* have only a per-interpreter eval breaker (the ultimate objective)
* consolidate the pending calls for every interpreter every time
  UNSIGNAL_PENDING_CALLS and UNSIGNAL_ASYNC_EXC are used

However, each has performance penalties while the branch I created does not.  I 
try to be really careful when it comes to the performance of the eval loop. :)

[1] https://github.com/ericsnowcurrently/cpython/tree/eval-breaker-shared

--

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-06-01 Thread Eric Snow


Eric Snow  added the comment:

So far so good. :)  I'll keep an eye on things and if the buildbots are still 
happy then I'll add back _PyEval_FinishPendingCalls() in _Py_FinalizeEx() in a 
few days.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread David Radcliffe


David Radcliffe  added the comment:

I think that binomial(n, k) should return 0 when k > n or k < 0. This is a 
practical consideration. I'm concerned about evaluating sums involving binomial 
coefficients. Mathematicians are often rather loose about specifying the upper 
and lower bounds of summation, because the unwanted terms are zero anyway. 
These formulas should not result in value errors when they are implemented 
directly.

To give a simplistic example, the sum of the first n positive integers is 
binomial(n+1, 2), and the formula should still work if n is zero.

--
nosy: +David Radcliffe

___
Python tracker 

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



[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2019-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

yes ;-)

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



[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2019-06-01 Thread miss-islington


miss-islington  added the comment:


New changeset ac60d1afd2b04f61fe4c965740fa32809f2b84ed by Miss Islington (bot) 
in branch '3.7':
bpo-32411: IDLE: Remove line number sort in browser.py (GH-5011)
https://github.com/python/cpython/commit/ac60d1afd2b04f61fe4c965740fa32809f2b84ed


--
nosy: +miss-islington

___
Python tracker 

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



[issue37129] Add RWF_APPEND flag

2019-06-01 Thread Michal


Change by Michal :


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

___
Python tracker 

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



[issue37129] Add RWF_APPEND flag

2019-06-01 Thread Michal


Change by Michal :


--
components: Library (Lib)
nosy: bezoka, pablogsal, vstinner
priority: normal
severity: normal
status: open
title: Add RWF_APPEND flag
type: enhancement
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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-06-01 Thread Eric Snow


Eric Snow  added the comment:


New changeset 6a150bcaeb190d1731b38ab9c7a5d1a352847ddc by Eric Snow in branch 
'master':
bpo-33608: Factor out a private, per-interpreter _Py_AddPendingCall(). 
(gh-13714)
https://github.com/python/cpython/commit/6a150bcaeb190d1731b38ab9c7a5d1a352847ddc


--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Raymond Hettinger


Change by Raymond Hettinger :


--
pull_requests: +13617
pull_request: https://github.com/python/cpython/pull/13734

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Tim Peters


Tim Peters  added the comment:

Strongly prefer requiring 0 <= k <= n at first.  This is a programming 
language:  it will be applied to real problems, not to abstract proofs where 
some slop can be helpful in reducing the number of cases that need to be 
considered.

The Twitter fellow is certainly right that "0" is the clear answer to "how many 
5-element subsets does have a 4-element set have?", but in the context of real 
problems it's more likely (to my eyes) that a programmer asking that question 
of `comb()` has gotten confused.  It certainly would have been "an error" in 
any programming use for `comb()` I've ever had.

Raymond, I'm not clear on what you mean by "alias".  You mean supplying the 
same function under more than one name?  I'd be -1 on that (where would it end? 
 the answer to every future name bikeshedding issue then would be "all of the 
above").  But +1 on, e.g., adding a doc index entry for "binomial" pointing to 
"comb".

--

___
Python tracker 

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



[issue34722] Non-deterministic bytecode generation

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Bumping up the priority a bit on this one.  It would be nice to get it in for 
3.8.

--
priority: normal -> high
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



[issue29414] Change 'the for statement is such an iterator' in Tutorial

2019-06-01 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue29414] Change 'the for statement is such an iterator' in Tutorial

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset 218e47b61862470477922e9aba1a23fd3dab18ae by Raymond Hettinger 
(Marco Buttu) in branch 'master':
bpo-29414: Change 'the for statement is such an iterator' in Tutorial (GH-273)
https://github.com/python/cpython/commit/218e47b61862470477922e9aba1a23fd3dab18ae


--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

I'm particularly sceptical about real-world use-cases for k < 0. Maybe we 
should consider removing just the k > n requirement.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> I'd say leave it as-is for 3.8, see what the reaction is, 
> and maybe relax constraints in 3.9 if that seems appropriate.

I concur.  That said, the referenced tweet was a reaction :-)

FWIW, itertools.combinations(seq, r) returns 0 values when r > len(seq).

Tim, what do you think?

--

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset bdbad71b9def0b86433de12cecca022eee91bd9f by Serhiy Storchaka in 
branch 'master':
bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108)
https://github.com/python/cpython/commit/bdbad71b9def0b86433de12cecca022eee91bd9f


--

___
Python tracker 

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



[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2019-06-01 Thread miss-islington


Change by miss-islington :


--
pull_requests: +13616
pull_request: https://github.com/python/cpython/pull/13732

___
Python tracker 

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



[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2019-06-01 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 1a4d9ffa1aecd7e750195f2be06d3d16c7a3a88f by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-32411: IDLE: Remove line number sort in browser.py (#5011)
https://github.com/python/cpython/commit/1a4d9ffa1aecd7e750195f2be06d3d16c7a3a88f


--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

> What are your thoughts?

Sigh. I don't object to extending to `k < 0` and `k > n`, but once we've made 
that extension it's impossible to undo if we decide we'd rather have had the 
error checking. I'd really like to see some convincing use-cases. Quotes from 
Concrete Mathematics (fine book though it is) don't amount to use-cases.

I'd say leave it as-is for 3.8, see what the reaction is, and maybe relax 
constraints in 3.9 if that seems appropriate. But if a majority of others 
really want to make the change now, that's okay with me.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Just a heads up from issue37125: The leak is was fixed by PR13725.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

One other idea: it may be worth putting in an alias for "binomial" to improve 
findability and readability in contexts where a person really does what 
binomial coefficients and is not otherwise thinking about counting contexts.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Mark, please see:  https://twitter.com/daveinstpaul/status/1134919179361034240

What are your thoughts?

--

___
Python tracker 

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



[issue37128] Add math.perm()

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

> +0 from me.  It is inevitable that this will be requested now that we have 
> comb().

Exactly my thoughts, too. I don't think I'll have any use for `math.perm`; the 
main reason to add it will be to satisfy all those who got taught combinations 
and permutations at the same time, see them as a unit, and then get surprised 
when they find `math.comb` without `math.perm`.

The good part is that now that we have math.comb, I think everything about the 
API of math.perm is already clear (including what to call it).

--

___
Python tracker 

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



[issue26468] shutil.copy2 raises OSError if filesystem doesn't support chmod

2019-06-01 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue37128] Add math.perm()

2019-06-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue37128] Add math.perm()

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

+0 from me.  It is inevitable that this will be requested now that we have 
comb().  The need for this is much less though.

--
nosy: +rhettinger

___
Python tracker 

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



[issue37128] Add math.perm()

2019-06-01 Thread Serhiy Storchaka


New submission from Serhiy Storchaka :

The function which returns the number of ways to choose k items from n items 
without repetition and without order was added in issue35431. This functions is 
always goes in pair with other function, which returns the number of ways to 
choose k items from n items without repetition and with order. These functions 
are always learned together in curses of combinatorics. Often C(n,k) is 
determined via P(n,k) (and both are determined via factorial).

P(n, k) = n! / (n-k)!
C(n, k) = P(n, k) / k!

The proposed PR adds meth.perm(). It shares most of the code with math.comb().

--
components: Library (Lib)
messages: 344226
nosy: lemburg, mark.dickinson, serhiy.storchaka, stutzbach
priority: normal
severity: normal
status: open
title: Add math.perm()
type: enhancement
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



[issue26791] shutil.move fails to move symlink (Invalid cross-device link)

2019-06-01 Thread Jeffrey Kintscher


Change by Jeffrey Kintscher :


--
nosy: +Jeffrey.Kintscher

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Tim Peters


Tim Peters  added the comment:

I prefer that a negative int raise ValueError, but am OK with it using the 
absolute value instead (i.e., what it does now).

--

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

> I am going to add the imath module.

Aimed at 3.8, or 3.9? This seems somewhat rushed for 3.8.

--

___
Python tracker 

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



[issue34303] micro-optimizations in functools.reduce()

2019-06-01 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

I'd expect any math module function accepting integers to be sufficiently 
duck-typed to accept integer-like things (i.e., objects that implement 
`__index__`), in just the same way that the regular math module functions (sin, 
log, atan, sqrt, ...) accept arbitrary objects defining `__float__`. We already 
do this for gcd, factorial.

--

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

> Is everyone comfortable with how negative numbers are handled by this patch?

Not entirely, but it's not terribly wrong and it's consistent with how 
`int.bit_length` works. (I'm also a bit uncomfortable about `int.bit_length`s 
behaviour on negative numbers, but it is the way it is.)

--

___
Python tracker 

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



[issue34303] micro-optimizations in functools.reduce()

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:


New changeset e5f6207ba6cb510d9370519ba869296be01787be by Raymond Hettinger 
(Sergey Fedoseev) in branch 'master':
bpo-34303: Micro-optimizations in functools.reduce() (GH-8598)
https://github.com/python/cpython/commit/e5f6207ba6cb510d9370519ba869296be01787be


--
nosy: +rhettinger

___
Python tracker 

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



[issue37125] math.comb is leaking references

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Please file this in the tracker issue so that the discussions don't sprawl.  
Thx.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

NumPy integer types are not subclasses of int.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Why do we want __index__ support?  This seems like an unnecessary extension 
without relevant use cases.

--

___
Python tracker 

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



[issue36842] Implement PEP 578

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset 3b57f50efc16c65df96914ec53bc8d3dc28e18b6 by Pablo Galindo in 
branch 'master':
bpo-36842: Pass positional only parameters to code_new audit hook (GH-13707)
https://github.com/python/cpython/commit/3b57f50efc16c65df96914ec53bc8d3dc28e18b6


--
nosy: +pablogsal

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I am going to add the imath module. If we decide to add popcount(), it may be 
better to add it in this module instead of int class.

--

___
Python tracker 

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



[issue29882] Add an efficient popcount method for integers

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Is everyone comfortable with how negative numbers are handled by this patch?  
It might be better to limit the domain and raise a ValueError rather than make 
a presumption about what the user intends.

--
nosy: +rhettinger

___
Python tracker 

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



[issue37125] math.comb is leaking references

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Fixed by https://github.com/python/cpython/pull/13725

--
resolution:  -> fixed
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



[issue5680] Command-line arguments when running in IDLE

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Can be bump this up in priority?  The patch has been awaiting review for a good 
while.

--

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +13614
pull_request: https://github.com/python/cpython/pull/13731

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Paul Moore


Paul Moore  added the comment:

> User would like Python logging of Unicode characters to be consistent

It is consistent. The encoding of

logging.basicConfig(filename='c:\\my_log.log')

is consistent with the encoding of

open('c:\\my_log.log')

Both use the system default encoding, which is not UTF-8. There is some 
discussion going on right now, as to whether it *should* be, but it isn't, and 
I wouldn't consider changing the behaviour of loging *without* changing the 
behaviour of open() to be consistent.

Logging to the console is consistent with the standard IO streams, and it was 
PEP 528 (https://www.python.org/dev/peps/pep-0528/) that made that change - 
before that, the standard IO streams, and logging to the console, used the 
console codepage.

So, while I agree that the behaviour takes a bit of work to understand, it's 
not (IMO) inconsistent, nor is it (IMO) a bug.

--

___
Python tracker 

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



[issue36885] Make makeunicode.py script more readable

2019-06-01 Thread Stefan Behnel


Change by Stefan Behnel :


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



[issue32515] Add an option to trace to run module as a script

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-06-01 Thread Eric Snow


Eric Snow  added the comment:

I've made a few tweaks and Victor did some cleanup, so I'm going to try the PR 
again.  At first I'm also going to disable the _PyEval_FinishPendingCalls() 
call in _Py_FinalizeEx() and then enable it is a separate PR.

Also, I've opened bpo-37127 specifically to track the problem with 
_PyEval_FinishPendingCalls() during _Py_FinalizeEx(), to ensure that the 
disabled call doesn't slip through the cracks. :)

--

___
Python tracker 

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



[issue33608] Add a cross-interpreter-safe mechanism to indicate that an object may be destroyed.

2019-06-01 Thread Eric Snow


Eric Snow  added the comment:

That's really helpful, Pavel!  Thanks for investigating so thoroughly.  I'm 
going to double check all the places I've made the assumption that "tstate" 
isn't NULL and likewise for "tstate->interp".

Is there an issue open for the bug in multiprocessing?  If not, would you mind 
opening one?

--

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Łukasz, this PR will fix the x86 Gentoo Refleaks 3.x and friends, so I would 
recommend landing this before the release.

--
nosy: +lukasz.langa

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:

Different people have different ideas of what a default should be. You can 
pretty much guarantee that whatever a default is, someone will think it should 
be something else. The basicConfig functionality has been around in its present 
form since 2003, and people in general haven't had a problem with the current 
defaults. There is no case for changing a default unless there is a consensus 
among lots of people that a default needs changing.

--
stage: resolved -> 

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2019-06-01 Thread Eric Snow


Eric Snow  added the comment:

Also, someone did manage to investigate and identify a likely cause:

https://bugs.python.org/issue33608#msg342791

--

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2019-06-01 Thread Mark Dickinson


Mark Dickinson  added the comment:

I like the delegation of `float` and `complex` to use `__index__` that was 
introduced in GH-13108; it would be nice to have that regardless of which 
solution is decided on for `__int__` and `__index__`.

--

___
Python tracker 

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



[issue34155] email.utils.parseaddr mistakenly parse an email

2019-06-01 Thread Abhilash Raj


Abhilash Raj  added the comment:

I don't know if we can make the API consistent between parseaddr and the 
parsing header value since they are completely different even right now. Like 
you already noticed there is no way to register defects and instead parseaddr 
returns ('', '') to denote the failure to parse.

About parsing malicious domain, my line of thinking was along the lines of 
presenting whatever is there to user of the API, without 'hiding' that 
information. It would be harder to figure out the exception if the domain is 
missing. 

Even though the domain is parsed in the `domain` value, the value itself is 
clearly invalid. Any attempt to ever use that Address() will definitely cause 
an error (perhaps, there should be a sanity check in SMTP.send_message for 
that?).

--

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Jonathan


Jonathan  added the comment:

> Learning is not a waste of time. You're entitled to your opinion, but this is 
> not a bug in logging. We'll have to agree to disagree.

I agree and value learning a great deal. However learning should happen on your 
own time, NOT when a program crashes randomly and tries taking you down the 
rabbit hole. I like learning but not about unrelated things when I'm trying to 
do useful work.

Fine, if you don't consider this a bug, consider it a feature request. "User 
would like Python logging of Unicode characters to be consistent" is not an 
unreasonable request.

--
status: closed -> open
type: behavior -> enhancement

___
Python tracker 

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



[issue20092] type() constructor should bind __int__ to __index__ when __index__ is defined and __int__ is not

2019-06-01 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:

Learning is not a waste of time. You're entitled to your opinion, but this is 
not a bug in logging. We'll have to agree to disagree.

--

___
Python tracker 

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



[issue36839] Support the buffer protocol in code objects

2019-06-01 Thread Stefan Krah


Stefan Krah  added the comment:

The managed buffer can be shared:

>>> b = b'12345'
>>> m1 = memoryview(b)
>>> m2 = memoryview(m1)
>>> gc.get_referents(m1)[0]

>>> gc.get_referents(m2)[0]



And I understood that Dino proposed to share one code instance as a memory 
mapped file for *all* processes.

--
nosy: +skrah

___
Python tracker 

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



[issue37127] Handling pending calls during runtime finalization may cause problems.

2019-06-01 Thread Eric Snow


New submission from Eric Snow :

In Python/lifecycle.c (Py_FinalizeEx) we call _Py_FinishPendingCalls(), right 
after we stop all non-daemon Python threads but before we've actually started 
finalizing the runtime state.  That call looks for any remaining pending calls 
(for the main interpreter) and runs them.  There's some evidence of a bug there.

In bpo-33608 I moved the pending calls to per-interpreter state.  We saw 
failures (sometimes sporadic) on a few buildbots (e.g. FreeBSD) during runtime 
finalization.  However, nearly all of the buildbots were fine, so it may be a 
question of architecture or slow hardware.  See bpo-33608 for details on the 
failures.

There are a number of possibilities, but it's been tricky reproducing the 
problem in order to investigate.  Here are some theories:

* daemon threads (a known weak point in runtime finalization) block pending 
calls from happening until some time after portions of the runtime have already 
been cleaned up
* there's a race that causes the pending calls machinery to get caught in some 
sort infinite loop (e.g. a pending call fails and gets re-queued)
* a corner case in the pending calls logic that triggers only during 
finalization

Here are some other points to consider:

* do we have the same problem during subinterpreter finalization 
(Py_EndInterpreter() rather than runtime finalization)?
* perhaps the problem extends beyond finalization, but the conditions are more 
likely there
* the change for bpo-33608 could have introduced the bug rather that exposing 
an existing one

--
assignee: eric.snow
components: Interpreter Core
messages: 344202
nosy: eric.snow
priority: normal
severity: normal
stage: test needed
status: open
title: Handling pending calls during runtime finalization may cause problems.
type: crash

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 2b843ac0ae745026ce39514573c5d075137bef65 by Serhiy Storchaka in 
branch 'master':
bpo-35431: Refactor math.comb() implementation. (GH-13725)
https://github.com/python/cpython/commit/2b843ac0ae745026ce39514573c5d075137bef65


--

___
Python tracker 

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



[issue28595] shlex.shlex should not augment wordchars

2019-06-01 Thread Vinay Sajip


Vinay Sajip  added the comment:


New changeset 56624a99a916fd27152d5b23364303acc0d707de by Vinay Sajip (Evan) in 
branch 'master':
bpo-28595: Allow shlex whitespace_split with punctuation_chars (GH-2071)
https://github.com/python/cpython/commit/56624a99a916fd27152d5b23364303acc0d707de


--

___
Python tracker 

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



[issue37111] Logging - Inconsistent behaviour when handling unicode

2019-06-01 Thread Jonathan


Jonathan  added the comment:

> I have no idea what you mean by this.

I don't see how I can be clearer. What are the reasons for NOT implementing 
logging to file be unicode as a default? Logging to screen is unicode as a 
default. What are the reasons for not wanting consistency?

> A simple Internet search for "basicConfig encoding" yields for me as the 
> second result this Stack Overflow question 

Indeed, and it was from that question I got my solution in fact. The problem 
was the 30-60 minutes I wasted before that trying to figure out why my program 
was crashing and why it was only crashing *sometimes*. I'd written the logging 
part of the program a year ago and not really touched it since, so the logging 
module being a possible culprit was not even in my mind when the program 
crashed.

> As my example illustrated, it's quite easy to log Unicode in log files.

Yes, things are easy when you know it's necessary. It's the process of 
discovery that's an unnecessary waste of people's time. That's why I raised 
this and that's why I would consider this a bug in my own software. It's 
inconsistent, it invites problems, and it wastes peoples time.

--

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

The problem here is that there is a reference cycle with 
threading.ExceptHookArgs but structseq objects are not tracked by the GC.

--

___
Python tracker 

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



[issue36993] zipfile: tuple IndexError on extract

2019-06-01 Thread Berker Peksag


Berker Peksag  added the comment:

@alter-bug-tracer, could you please create test files for the cases Serhiy has 
just mentioned?

--

___
Python tracker 

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



[issue37125] math.comb is leaking references

2019-06-01 Thread Mark Dickinson


Change by Mark Dickinson :


--
nosy: +mark.dickinson

___
Python tracker 

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



[issue34271] Please support logging of SSL master secret by env variable SSLKEYLOGFILE

2019-06-01 Thread Christian Heimes


Change by Christian Heimes :


--
pull_requests: +13612
pull_request: https://github.com/python/cpython/pull/13728

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

❯ ./python -m test test_threading -m test_excepthook_thread_None -R :
Run tests sequentially
0:00:00 load avg: 1.38 [1/1] test_threading
beginning 9 repetitions
123456789
.
test_threading leaked [364, 364, 364, 364] references, sum=1456
test_threading leaked [164, 164, 164, 164] memory blocks, sum=656
test_threading failed

== Tests result: FAILURE ==

1 test failed:
test_threading

Total duration: 159 ms
Tests result: FAILURE

--

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
priority: normal -> high

___
Python tracker 

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



[issue33346] Syntax error with async generator inside dictionary comprehension

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Ping, should we include this in beta1 or as is a "bugfix" this can be 
backported?

--

___
Python tracker 

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



[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2019-06-01 Thread Raymond Hettinger


Change by Raymond Hettinger :


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



[issue36993] zipfile: tuple IndexError on extract

2019-06-01 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It is not enough. IndexError can be raised for ln == 8 or 16 when file_size, 
compress_size and header_offset are all set to 0x.

--

___
Python tracker 

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



[issue37122] Make co->co_argcount represent the total number of positional arguments in the code object

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


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



[issue37122] Make co->co_argcount represent the total number of positional arguments in the code object

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset cd74e66a8c420be675fd2fbf3fe708ac02ee9f21 by Pablo Galindo in 
branch 'master':
bpo-37122: Make co->co_argcount represent the total number of positonal 
arguments in the code object (GH-13726)
https://github.com/python/cpython/commit/cd74e66a8c420be675fd2fbf3fe708ac02ee9f21


--

___
Python tracker 

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



[issue32411] Idlelib.browser: stop sorting dicts created by pyclbr

2019-06-01 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Can this move forward now?

--
nosy: +rhettinger

___
Python tracker 

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



[issue37126] test_threading is leaking references

2019-06-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/1/builds/601

OK (skipped=1)
.
test_threading leaked [9770, 9772, 9768] references, sum=29310
test_threading leaked [3960, 3961, 3959] memory blocks, sum=11880
2 tests failed again:
test_asyncio test_threading

--
components: Tests
messages: 344191
nosy: pablogsal, vstinner
priority: normal
severity: normal
status: open
title: test_threading is leaking references
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



[issue37123] test_multiprocessing fails randomly on Windows

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

Sorry, I posted the same link twice. Here is the test_venv failure:

https://buildbot.python.org/all/#/builders/58/builds/2538

--

___
Python tracker 

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



[issue37123] test_multiprocessing fails randomly on Windows

2019-06-01 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

I couldn't find the traceback for test_venv in the buildbot logs. They were 
skipped and fixed as part of issue35978.

--
components: +Tests
nosy: +xtreak
type:  -> behavior
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



[issue37125] math.comb is leaking references

2019-06-01 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

It seems that https://github.com/python/cpython/pull/13725 fixes the leak:

❯ ./python -m test test_math -R :
Run tests sequentially
0:00:00 load avg: 1.55 [1/1] test_math
beginning 9 repetitions
123456789
.

== Tests result: SUCCESS ==

1 test OK.

Total duration: 26 sec 283 ms
Tests result: SUCCESS

--

___
Python tracker 

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



[issue36976] email: AttributeError

2019-06-01 Thread Berker Peksag


Change by Berker Peksag :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Certain Malformed email causes email.parser to throw 
AttributeError

___
Python tracker 

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



[issue35431] Add a function for computing binomial coefficients to the math module

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

math.comb is leaking, I opened https://bugs.python.org/issue37125 to track it.

--
nosy: +pablogsal

___
Python tracker 

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



[issue37125] math.comb is leaking references

2019-06-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

./python Lib/test/bisect_cmd.py test_math -R 2:2

...

WARNING: Running tests with --huntrleaks/-R and less than 3 warmup repetitions 
can give false positives!
Run tests sequentially
0:00:00 load avg: 1.32 [1/1] test_math
beginning 4 repetitions
1234

test_math leaked [12352, 12352] references, sum=24704
test_math leaked [1, 1] memory blocks, sum=2
test_math failed

== Tests result: FAILURE ==

1 test failed:
test_math

Total duration: 663 ms
Tests result: FAILURE
ran 1 tests/2
exit 2
Tests failed: continuing with this subtest

Tests (1):
* test.test_math.IsCloseTests.testComb

Bisection completed in 13 iterations and 0:00:11

--
components: Interpreter Core, Tests
messages: 344185
nosy: pablogsal, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: math.comb is leaking references
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



[issue36992] zipfile: AttributeError on extract (LZMA)

2019-06-01 Thread Berker Peksag


Berker Peksag  added the comment:

This is a duplicate of issue 36991 and will be fixed by the same PR.

--
nosy: +berker.peksag
resolution: not a bug -> duplicate
superseder:  -> zipfile: AttributeError on extract

___
Python tracker 

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



[issue37124] test_msilib is potentially leaking references and memory blocks

2019-06-01 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:

This is likely to be caused by: 

https://github.com/python/cpython/pull/13688

--

___
Python tracker 

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



[issue37124] test_msilib is potentially leaking references and memory blocks

2019-06-01 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +steve.dower

___
Python tracker 

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



[issue37124] test_msilib is potentially leaking references and memory blocks

2019-06-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

BUILDBOT FAILURE REPORT
===

Builder name: AMD64 Windows8.1 Refleaks 2.7
Builder url: https://buildbot.python.org/all/#/builders/33/
Build url: https://buildbot.python.org/all/#/builders/33/builds/604

Failed tests




Test leaking resources
--

- test_msilib is leaking references


Build summary
-

== Tests result: FAILURE then FAILURE ==

360 tests OK.

10 slowest tests:
- test_bsddb3: 4042.9s
- test_mmap: 434.0s
- test_multiprocessing: 313.8s
- test_shelve: 246.5s
- test_mailbox: 239.3s
- test_ssl: 227.2s
- test_lib2to3: 135.6s
- test_largefile: 131.5s
- test_decimal: 126.0s
- test_urllib2_localnet: 122.6s

1 test failed:
test_msilib

42 tests skipped:
test_aepack test_al test_applesingle test_bsddb185 test_cd test_cl
test_commands test_crypt test_curses test_dbm test_dl test_epoll
test_fcntl test_fork1 test_gdb test_gdbm test_gl test_grp
test_imgfile test_ioctl test_kqueue test_linuxaudiodev test_macos
test_macostools test_mhlib test_nis test_openpty test_ossaudiodev
test_pipes test_poll test_posix test_pty test_pwd test_readline
test_resource test_scriptpackages test_spwd test_sunaudiodev
test_threadsignals test_wait3 test_wait4 test_zipfile64
2 skips unexpected on win32:
test_gdb test_readline

1 re-run test:
test_msilib

Total duration: 1 hour 20 min


Tracebacks
--



Current builder status
--

The builder is failing currently

Commits
---



Other builds with similar failures
--

-  https://buildbot.python.org/all/#/builders/80/builds/608
-  https://buildbot.python.org/all/#/builders/132/builds/505

--
components: Tests
messages: 344182
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_msilib is potentially leaking references and memory blocks
type: behavior
versions: Python 2.7, Python 3.7

___
Python tracker 

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



[issue36993] zipfile: tuple IndexError on extract

2019-06-01 Thread Berker Peksag


Change by Berker Peksag :


--
keywords: +patch
pull_requests: +13611
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/13727

___
Python tracker 

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



[issue36993] zipfile: tuple IndexError on extract

2019-06-01 Thread Berker Peksag


Berker Peksag  added the comment:

This report is valid. Serhiy has improved error reporting of the extra field in 
feccdb2a249a71be330765be77dee57121866779.

counts can indeed be an empty tuple:

elif ln == 0:
counts = ()

If I'm reading section 4.5.3 of 
https://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT correctly, I think 
we need to raise BadZipFile if ln == 0.

--
components: +Library (Lib)
nosy: +berker.peksag, serhiy.storchaka
resolution: not a bug -> 
stage: resolved -> needs patch
status: closed -> open
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



[issue37123] test_multiprocessing fails randomly on Windows

2019-06-01 Thread Pablo Galindo Salgado


New submission from Pablo Galindo Salgado :

https://buildbot.python.org/all/#/builders/58/builds/2539
https://buildbot.python.org/all/#/builders/58/builds/2539

Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", 
line 327, in test_multiprocessing
out, err = check_output([envpy, '-c',
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_venv.py", 
line 42, in check_output
raise subprocess.CalledProcessError(
subprocess.CalledProcessError: Command 
'['d:\\temp\\tmp_qt0ywa6\\Scripts\\python_d.exe', '-c', 'from multiprocessing 
import Pool; print(Pool(1).apply_async("Python".lower).get(3))']' returned 
non-zero exit status 3221225477.



==
FAIL: test_mymanager (test.test_multiprocessing_spawn.WithManagerTestMyManager)
--
Traceback (most recent call last):
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\_test_multiprocessing.py",
 line 2806, in test_mymanager
self.assertEqual(manager._process.exitcode, 0)
AssertionError: -15 != 0
--

--
messages: 344180
nosy: pablogsal
priority: normal
severity: normal
status: open
title: test_multiprocessing fails randomly on Windows

___
Python tracker 

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



  1   2   >