[issue33162] TimedRotatingFileHandler in logging module

2018-04-01 Thread Nitish

Change by Nitish :


--
nosy: +nitishch

___
Python tracker 

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



[issue33204] IDLE: remove \b from colorizer string prefix

2018-04-01 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6056

___
Python tracker 

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



[issue33204] IDLE: remove \b from colorizer string prefix

2018-04-01 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6055

___
Python tracker 

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



[issue33204] IDLE: remove \b from colorizer string prefix

2018-04-01 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset da58533ac67b01ce8f6466e6f03ff6b8b3bb04d5 by Terry Jan Reedy in 
branch 'master':
bpo-33204: IDLE: consistently color invalid string prefixes (#6344)
https://github.com/python/cpython/commit/da58533ac67b01ce8f6466e6f03ff6b8b3bb04d5


--

___
Python tracker 

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



[issue27212] Doc for itertools, 'islice()' implementation have unwanted behavior for recipe 'consume()'

2018-04-01 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks Cheryl.  This was nice work :-)

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



[issue27212] Doc for itertools, 'islice()' implementation have unwanted behavior for recipe 'consume()'

2018-04-01 Thread Raymond Hettinger

Raymond Hettinger  added the comment:


New changeset 325191bd6b3a2d5e3012adee868f19baf3e2c3ab by Raymond Hettinger 
(Cheryl Sabella) in branch '2.7':
[2.7] bpo-27212: Modify islice recipe to consume initial values preceding start 
(GH-6195) (GH-6339)
https://github.com/python/cpython/commit/325191bd6b3a2d5e3012adee868f19baf3e2c3ab


--

___
Python tracker 

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



[issue33197] Confusing error message when constructing invalid inspect.Parameters

2018-04-01 Thread Nitish

Nitish  added the comment:

Also, _ParameterKind class has a __str__ method. So, I guess it's better to use 
"{!s}" in the format string instead of using kind.name.

--

___
Python tracker 

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



[issue33197] Confusing error message when constructing invalid inspect.Parameters

2018-04-01 Thread Nitish

Nitish  added the comment:

@Antony Lee since you know the fix, do you want to submit a PR?

--
nosy: +nitishch

___
Python tracker 

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



[issue33204] IDLE: remove \b from colorizer string prefix

2018-04-01 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
stage: test needed -> patch review

___
Python tracker 

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



[issue33204] IDLE: remove \b from colorizer string prefix

2018-04-01 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

To see the visually verified test, run Lib/idlelib/colorizer as the main 
module, either from a command line or editor, and click the button.

--
stage: patch review -> test needed

___
Python tracker 

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



[issue33204] IDLE: remove \b from colorizer string prefix

2018-04-01 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +6054
stage: test needed -> patch review

___
Python tracker 

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



[issue33204] IDLE: remove \b from colorizer string prefix

2018-04-01 Thread Tim Peters

Tim Peters  added the comment:

Sounds good (removing \b) to me, Terry!

--
nosy: +tim.peters

___
Python tracker 

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



[issue33012] Invalid function cast warnings with gcc 8 for METH_NOARGS

2018-04-01 Thread Martin Panter

Martin Panter  added the comment:

Siddhesh, it looks like your fixes make the C function signatures match the 
signature expected in the PyMethodDef structure. If so, I suggest to remove the 
(PyCFunction) casts from those structure definitions as well. For instance, now 
that we have

  PyObject *Noddy_name(Noddy *self, PyObject *Py_UNUSED(ignored))

I suggest changing

  PyMethodDef Noddy_methods[] = {
  {"name", (PyCFunction)Noddy_name, METH_NOARGS, ...

to

  PyMethodDef Noddy_methods[] = {
  {"name", Noddy_name, METH_NOARGS, ...

I suspect the casts were only added to hide compiler warnings related to this 
bug.

If you are proposing to add an ellipsis (...) to the definition of PyCFunction, 
that seems misguided. I understand this is incompatible under standard C. Are 
you relying on a GCC extension perhaps? Python is used with other compilers too.

--
nosy: +martin.panter

___
Python tracker 

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



[issue33204] IDLE: remove \b from colorizer string prefix

2018-04-01 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The current test is part of the htest.  The section
# All valid prefixes for unicode and byte strings should be colored
contains "ur'is invalid'".  This should be moved to a new section with other 
invalid combinations.

# Invalid combinations of legal characters should be half colored.
ur'x', ru'x', uf'x', fu'x', UR'x'
(only one CAPS example is needed now).

--

___
Python tracker 

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



[issue33204] IDLE: remove \b from colorizer string prefix

2018-04-01 Thread Terry J. Reedy

New submission from Terry J. Reedy :

Lib\idlelib\colorizer.py, line 25, is:
  stringprefix = r"(?i:\br|u|f|fr|rf|b|br|rb)?"

The r prefix, but only the r prefix, must be preceded by a non-word character.

On pydev thread "IDLE colorizer", MRAB noted: "The \b will apply only to the 
first choice. Shouldn't it be more like:
  stringprefix = r"(?:\b(?i:r|u|f|fr|rf|b|br|rb))?"

I think the \b should be removed instead.  Currently uf'a' gets f'a' colored, 
while ur'a' only gets  'a' colored.  (Tim Peters pointed out the difference 
with a different example.) I prefer coloring the maximal legal string rather 
than the minimum.I think the contrast between two chars legal by 
themselves, but differently colored when put together, makes the bug more 
obvious.

--
assignee: terry.reedy
components: IDLE
messages: 314793
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: IDLE: remove \b from colorizer string prefix
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue30940] Documentation for round() is incorrect.

2018-04-01 Thread Lisa Roach

Change by Lisa Roach :


--
keywords: +patch
pull_requests: +6053

___
Python tracker 

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



[issue33199] PyDict_Copy() can leave 'ma_version_tag' uninitialized

2018-04-01 Thread INADA Naoki

Change by INADA Naoki :


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

___
Python tracker 

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



[issue33199] PyDict_Copy() can leave 'ma_version_tag' uninitialized

2018-04-01 Thread INADA Naoki

Change by INADA Naoki :


--
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue33196] SEGV in mp.synchronize.Lock.__repr__ in spawn'ed proc if ctx mismatched

2018-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thanks for the report.  Indeed I think it would be worth preventing this 
programmer error.

--
nosy: +pitrou
stage:  -> needs patch
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



[issue15088] PyGen_NeedsFinalizing is public, but undocumented

2018-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Cheryl: it may be useful to do a code search to find out whether any 
third-party projects are relying on PyGen_NeedsFinalizing.

--

___
Python tracker 

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



[issue33192] asyncio should use signal.set_wakeup_fd on Windows

2018-04-01 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
components: +Library (Lib)
stage:  -> needs patch
type:  -> behavior

___
Python tracker 

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



[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Does anyone seriously write "{*()}" instead of "set()"?

It doesn't seem to be laughing to me.

--
nosy: +pitrou

___
Python tracker 

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



[issue27212] Doc for itertools, 'islice()' implementation have unwanted behavior for recipe 'consume()'

2018-04-01 Thread Cheryl Sabella

Change by Cheryl Sabella :


--
pull_requests: +6051

___
Python tracker 

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



[issue22781] ctypes: Differing results between Python and C.

2018-04-01 Thread Martin Panter

Martin Panter  added the comment:

Eryk Sun’s explanation makes this sound like a duplicate of Issue 15453, which 
shows GCC on Linux packing structures into a single byte, and ctypes using the 
size of the expanded integer type.

--
nosy: +martin.panter
resolution:  -> duplicate
superseder:  -> ctype with packed bitfields does not match native compiler

___
Python tracker 

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



[issue33199] PyDict_Copy() can leave 'ma_version_tag' uninitialized

2018-04-01 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
nosy: +inada.naoki, rhettinger

___
Python tracker 

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



[issue33144] random._randbelow optimization

2018-04-01 Thread Wolfgang Maier

Wolfgang Maier  added the comment:

ok, I've created issue 33203 to deal with raising ValueError in _randbelow 
consistently.

--

___
Python tracker 

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



[issue33203] random.choice: raise IndexError on empty sequence even when not using getrandbits internally

2018-04-01 Thread Wolfgang Maier

Change by Wolfgang Maier :


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

___
Python tracker 

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



[issue33203] random.choice: raise IndexError on empty sequence even when not using getrandbits internally

2018-04-01 Thread Wolfgang Maier

New submission from Wolfgang Maier :

from https://docs.python.org/3/library/random.html#random.choice:

Return a random element from the non-empty sequence seq. If seq is empty, 
raises IndexError.

Indeed:
>>> import random
>>> random.choice([])
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/wolma/cpython/random.py", line 259, in choice
raise IndexError('Cannot choose from an empty sequence') from None
IndexError: Cannot choose from an empty sequence

but when not using getrandbits internally:
>>> class MyRandom(random.Random):
... def random(self):
... return super().random()
... 
>>> my_random=MyRandom()
>>> my_random.choice([])
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/wolma/cpython/random.py", line 257, in choice
i = self._randbelow(len(seq))
  File "/home/wolma/cpython/random.py", line 245, in _randbelow
rem = maxsize % n
ZeroDivisionError: integer division or modulo by zero

This is because the ValueError that random.choice tries to catch gets raised 
only in the getrandbits-dependent branch of Random._randbelow, but not in the 
branch using only Random.random (even though Random._randbelow suggests uniform 
behaviour.

--
components: Library (Lib)
messages: 314787
nosy: rhettinger, serhiy.storchaka, wolma
priority: normal
severity: normal
status: open
title: random.choice: raise IndexError on empty sequence even when not using 
getrandbits internally
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33202] os.walk mentions os.listdir instead of os.scandir

2018-04-01 Thread Andrés Delfino

New submission from Andrés Delfino :

Documentation states that, for walk, "errors from the listdir() call are 
ignored". That's no longer the case since 3.5. Change mention to listdir() to 
scandir().

--
assignee: docs@python
components: Documentation
messages: 314786
nosy: adelfino, docs@python
priority: normal
pull_requests: 6049
severity: normal
status: open
title: os.walk mentions os.listdir instead of os.scandir
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



[issue33191] Refleak in posix_spawn

2018-04-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

https://github.com/python/cpython/pull/6332 appears to address this.

--

___
Python tracker 

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



[issue33201] Modernize "Extension types" documentation

2018-04-01 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
keywords: +patch
pull_requests: +6048
stage: needs patch -> patch review

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread miss-islington

miss-islington  added the comment:


New changeset ab8457232121dfdfb1d4bfcf806a842fbe402722 by Miss Islington (bot) 
in branch '3.7':
bpo-20104: Add os.posix_spawn documentation. (GH-6334)
https://github.com/python/cpython/commit/ab8457232121dfdfb1d4bfcf806a842fbe402722


--
nosy: +miss-islington

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:

PR 6332 is overall a good cleanup.  I pushed a couple changes to that PR and 
left comments for some others.  It should go in.

There are basic tests for os.posix_spawn in test_posix.py.  More would be nice 
as we don't currently have any for the error paths.

The API is intentionally low level and simple as that is what the os (posix) 
module is all about.

--

___
Python tracker 

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



[issue33201] Modernize "Extension types" documentation

2018-04-01 Thread Antoine Pitrou

New submission from Antoine Pitrou :

The "Defining New Types" in the C extension docs uses outdated idioms (e.g. 
pre-C99 struct initialization) and could do with a good refresh.

--
assignee: docs@python
components: Documentation
messages: 314782
nosy: docs@python, pitrou
priority: normal
severity: normal
stage: needs patch
status: open
title: Modernize "Extension types" documentation
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread Gregory P. Smith

Gregory P. Smith  added the comment:


New changeset 79760ed256987cead08d668b95675afba6b3760f by Gregory P. Smith in 
branch 'master':
bpo-20104: Add os.posix_spawn documentation. (#6334)
https://github.com/python/cpython/commit/79760ed256987cead08d668b95675afba6b3760f


--

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6047

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread Gregory P. Smith

Change by Gregory P. Smith :


--
pull_requests: +6046

___
Python tracker 

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



[issue33189] pygettext doesn't work with f-strings

2018-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I agree that pygettext should not and can not support f-strings, but the error 
should be better. The problem is that an f-string expression is tokenized as 
literal strings, but eval() can't evaluate it out of context.

--
nosy: +eric.smith, serhiy.storchaka
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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 6332 fixes issues found by me in os.posix_spawn(). It is not completed yet, 
needed documentation and tests. And I have doubts about API.

--

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +6045
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



[issue29753] Ctypes Packing Bitfields Incorrectly - Linux

2018-04-01 Thread Marc Le Roy

Marc Le Roy  added the comment:

No solution found to solve this issue ?
The anomaly is not a cross platform inconsistency, it is an inconsistency 
between the behaviours of GCC and ctypes, both under Linux or Cygwin, when 
defining packed structures :

[Marc@I7-860 ~/dev/python/ctypes-bitfields-bug] make test
./bitfield_test1
sizeof(BF32) = 12 ; Memory dump of BF32 = 0x
sizeof(BF64) = 12 ; Memory dump of BF64 = 0x
python3 bitfield_test1.py
sizeof(BF32) = 16 ; Memory dump of BF32 = 0xff00ff00ff00ff00
sizeof(BF64) = 16 ; Memory dump of BF64 = 0x

--
Added file: https://bugs.python.org/file47511/ctypes-bitfields-bug.tar.gz

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

Notice that some of the errors identified at the end of 5109 were already 
corrected by the other PRs in this issue.

--

___
Python tracker 

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



[issue33189] pygettext doesn't work with f-strings

2018-04-01 Thread Stefan Behnel

Stefan Behnel  added the comment:

Is there really a use case for this?

I would normally expect place holders to get replaced *after* translation, i.e. 
in the translated text, not before.

--
nosy: +scoder

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:

In PR6331 I am trying to address all issues identified by Serhiy.

--

___
Python tracker 

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



[issue33191] Refleak in posix_spawn

2018-04-01 Thread Pablo Galindo Salgado

Change by Pablo Galindo Salgado :


--
pull_requests: +6044

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread Ned Deily

Ned Deily  added the comment:

> perhaps it would be better to remove this undocumented feature from 3.7

We need to make a decision about this before the b4 cutoff in 4 weeks.  But it 
would not be fair to ask people to put in the effort to try to fix things if 
there is not a good chance for success and if people's time could be better 
spent on currently more important issues.  Greg, Pablo, others: opinions?

--

___
Python tracker 

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



[issue33194] Path-file objects does not have method to delete itself if its a file

2018-04-01 Thread Marco Rougeth

Marco Rougeth  added the comment:

Wow, I never saw unlink term related to removing files (obviously I'm not an 
old-school Unix greybeard). @nsj could you point me the thread you talked 
about? or  help me find it? I looked in the archive in the last three months 
and couldn't find it.

Thank you.

--

___
Python tracker 

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



[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Don't know. :-)

Consider this as a 1st April egg.

--

___
Python tracker 

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



[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Mark Dickinson

Mark Dickinson  added the comment:

Does anyone seriously write "{*()}" instead of "set()"?

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I'm trying to fix issues with os.posix_spawn(), but there are so much of them, 
that perhaps it would be better to remove this undocumented feature from 3.7.

--

___
Python tracker 

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



[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue33200] Optimize the empty set "literal"

2018-04-01 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

The following PR optimizes bytecode for the empty set "literal": {*()}.

Currently it is compiled to

LOAD_CONST   0 (())
BUILD_SET_UNPACK 1

It will optimized to

BUILD_SET0

$ ./python -m perf timeit --duplicate 1000 '{*()}'

Unpatched:  Mean +- std dev: 68.6 ns +- 1.1 ns
Patched:Mean +- std dev: 31.8 ns +- 2.8 ns

--
components: Interpreter Core
messages: 314769
nosy: benjamin.peterson, brett.cannon, ncoghlan, serhiy.storchaka, yselivanov
priority: normal
severity: normal
status: open
title: Optimize the empty set "literal"
type: performance
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



[issue33199] PyDict_Copy() can leave 'ma_version_tag' uninitialized

2018-04-01 Thread pdox

New submission from pdox :

PyDict_Copy leaves 'ma_version_tag' uninitialized when the dictionary being 
copied has a split table.

--
components: Interpreter Core
messages: 314768
nosy: pdox
priority: normal
severity: normal
status: open
title: PyDict_Copy() can leave 'ma_version_tag' uninitialized
type: behavior
versions: Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue33198] Build on Linux with --enable-optimizations fails

2018-04-01 Thread Florian Schulze

New submission from Florian Schulze :

While the tests run there is a segfault:
https://travis-ci.org/collective/buildout.python/jobs/360190312#L2529
Started with b2 and still happens in b3, b1 built fine.

--
components: Build, Tests
messages: 314767
nosy: fschulze
priority: normal
severity: normal
status: open
title: Build on Linux with --enable-optimizations fails
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



[issue32713] tarfile.itn breaks if n is a negative float

2018-04-01 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue33096] ttk.Treeview.insert() does not allow to insert item with "False" iid

2018-04-01 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue33132] Possible refcount issues in the compiler

2018-04-01 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
versions: +Python 2.7

___
Python tracker 

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



[issue33132] Possible refcount issues in the compiler

2018-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 72f3e0887500e00867fa16ce5aaab12fae853b63 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-33132: Fix reference counting issues in the compiler. (GH-6209). 
(GH-6322)
https://github.com/python/cpython/commit/72f3e0887500e00867fa16ce5aaab12fae853b63


--

___
Python tracker 

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



[issue33195] PyArg_Parse* should deprecate 'u' and 'z' family.

2018-04-01 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

See also issue24009. We should get rid of using these units in the stdlib.

I'm not sure about deprecating Py_BuildValue() units right now. They can be 
redefined in terms of wchar_t, and they are already implemented with 
PyUnicode_FromWideChar().

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue33197] Confusing error message when constructing invalid inspect.Parameters

2018-04-01 Thread Antony Lee

New submission from Antony Lee :

Python 3.6.4

In [15]: inspect.Parameter("foo", kind=inspect.Parameter.VAR_KEYWORD, 
default=42)
---
ValueErrorTraceback (most recent call last)
 in ()
> 1 inspect.Parameter("foo", kind=inspect.Parameter.VAR_KEYWORD, 
default=42)

/usr/lib/python3.6/inspect.py in __init__(self, name, kind, default, 
annotation)
2442 if kind in (_VAR_POSITIONAL, _VAR_KEYWORD):
2443 msg = '{} parameters cannot have default 
values'.format(kind)
-> 2444 raise ValueError(msg)
2445 self._default = default
2446 self._annotation = annotation

ValueError: 4 parameters cannot have default values

Note the "interesting" error message that starts with "4 parameters ..." (yes, 
I guess that inspect.Parameter == 4 internally...).

Probably just a matter of making the error f'{kind.name} parameters ...'.

--
components: Library (Lib)
messages: 314764
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Confusing error message when constructing invalid inspect.Parameters
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



[issue33130] functools.reduce signature/docstring discordance

2018-04-01 Thread Nick Coghlan

Nick Coghlan  added the comment:

+1 for switching over to `iterable` in the reduce docstring.

As a possible enhancement for 3.8+ only, it would be reasonable to start 
converting functools over to Argument Clinic in order to improve the 
introspection support. (Note that only some APIs could be converted though, as 
others have more complex signatures that AC doesn't yet support: 
https://bugs.python.org/issue20291)

--

___
Python tracker 

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