[issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15

2018-05-05 Thread Raymond Hettinger

New submission from Raymond Hettinger :

When upgrading from 2.7.14 to 2.7.15 on MacOS, the tooltips have stopped 
showing up:

>>> range(
 ^--- formerly a tooltip box would pop-up at this point

--
assignee: terry.reedy
components: IDLE
messages: 316198
nosy: rhettinger, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE tooltips stopped working between 2.7.14 and 2.7.15
type: behavior
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



[issue33411] All console message are in the error output in bash interpretor

2018-05-05 Thread Martin Panter

Martin Panter  added the comment:

The exception message and stack trace is documented to go to stderr: 
.

Whether the prompt “>>>” goes to stderr or stdout depends on quirks of the 
environment. Issue 1927 currently proposes to make it always go to stderr.

--
nosy: +martin.panter

___
Python tracker 

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



[issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15 on MacOS

2018-05-05 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
title: IDLE tooltips stopped working between 2.7.14 and 2.7.15 -> IDLE tooltips 
stopped working between 2.7.14 and 2.7.15 on MacOS

___
Python tracker 

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



[issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15

2018-05-05 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
components: +macOS
nosy: +ned.deily, ronaldoussoren

___
Python tracker 

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



[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Daniel Chimeno

New submission from Daniel Chimeno :

In the secrets module documentation, the examples in `15.3.4. Recipes and best 
practices` need change things, I think this examples must run after a copy & 
paste into user terminal.

Options for first example:
1:

import string
from secrets import choice
alphabet = string.ascii_letters + string.digits
password = ''.join(choice(alphabet) for i in range(8))


2:
```
import string
import secrets
alphabet = string.ascii_letters + string.digits
password = ''.join(secrets.choice(alphabet) for i in range(8))


I've looked in the devguide, but I haven't found what's the standard approach 
here.

First issue here, be nice :)

--
assignee: docs@python
components: Documentation
messages: 316200
nosy: dchimeno, docs@python
priority: normal
severity: normal
status: open
title: Import secrets module in secrets examples
type: enhancement
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



[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Daniel Chimeno

Daniel Chimeno  added the comment:

Relevant link: 
https://docs.python.org/3.7/library/secrets.html#recipes-and-best-practices

--

___
Python tracker 

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



[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

I've always expected that documentation for a module can assume that the module 
itself, and/or the function being described, has been imported.

On the other hand, I have no objection to making this explicit, especially in 
the recipes section where it might not be as clear which functions come from 
the module and which are builtins.

I'm inclined to go for your 2nd option, import the module and use a 
full-qualified name:

password = ''.join(secrets.choice(alphabet) for i in range(8))

--
nosy: +steven.daprano

___
Python tracker 

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



[issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15 on MacOS

2018-05-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Tooltips still work fine on Windows and given Serhiy's edit, I presume the same 
is true on Linux.  As far as I remember and have recorded in NEWS.txt, IDLE on 
2.7 is unchanged for over a year, since sometime before 2.7.13 was released.  
It is too easy to break something and not notice.  The IDLE tests, such as they 
are for 2.7, run without error.

If you haven't, run IDLE from a terminal to see if any TclErrors or other 
exceptions get displayed.  The immediately relevant files in idlelib, if you 
want to play with with debug prints, are CallTips.py and CallTipWindow.py.

--

___
Python tracker 

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



[issue33430] Import secrets module in secrets examples

2018-05-05 Thread Daniel Chimeno

Change by Daniel Chimeno :


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

___
Python tracker 

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



[issue33431] Change description about doc in programming, faq.

2018-05-05 Thread lvhuiyang

Change by lvhuiyang :


--
assignee: docs@python
components: Documentation
nosy: docs@python, lvhuiyang
priority: normal
severity: normal
status: open
title: Change description about doc in programming, faq.
type: performance
versions: Python 2.7, 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



[issue33431] Change description about doc in programming, faq.

2018-05-05 Thread lvhuiyang

Change by lvhuiyang :


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

___
Python tracker 

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



[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 4a1bc26832048325aecc01a4783a4984496d52d2 by Serhiy Storchaka (Bo 
Bayles) in branch '2.7':
[2.7] bpo-32362: Fix references to non-existent multiprocessing.Connection() 
(GH-6223) (GH-6646)
https://github.com/python/cpython/commit/4a1bc26832048325aecc01a4783a4984496d52d2


--

___
Python tracker 

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



[issue33419] Add functools.partialclass

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

> I'm not sure that this should be in the stdlib. The three-line function can 
> be enough for your simple case, and it is too simple for including it in the 
> stdlib. But for general stdlib quality solution it lacks many details.
>
> 1. It doesn't work with classes that implement the constructor as __new__, 
> but not __init__. It may need of using metaclasses with overridden __call__. 
> But how then handle classes with custom metaclasses?
>
> Can you illustrate how you would do it for these kinds of classes?

I wouldn't try to implement the generic partialclass() at first place. 
But if I should, the possible code:

     class PartialMeta(type(cls)):
     __call__ = partialmethod(type(cls).__call__, *args, **kwargs)
     class PartialClass(cls, metaclass=PartialMeta):
     pass
     return PartialClass

Not sure it works.

Another solution -- add a wrapped __new__, but __new__ and __init__ 
should be added only when they where defined in the original class or 
its parenthesis. There may be caveats with inheriting from some builtin 
classes.

> Anyway, I think using __new__ on user classes is extremely rare.

This is not good reason of not supporting them. The library function 
should support all corner cases.

> 2. inspect.signature() doesn't give the correct signature as for partial(). 
> This requires changing the inspect module.
>
> Good point.  I can look into this.
>
> 3. pickling and copying of instances are broken in many cases. Pickling a 
> class is always broken. I afraid that this can't be solved without 
> significant reworking of the pickle and the copy modules.
>
> Okay, interesting, but this doesn't seem relevant to partialclass.

If you generate a class, it should behave correctly. Otherwise you could 
just use partial().

> 4. It adds instance attributes __dict__ and __weakref__ even if they were 
> disabled by using __slots__. This increases the size of instances and breaks 
> some properties.
>
> Can we just copy the parent class' __slots__ to the partialclass return value?

This is not so easy. You should add an empty __slots__ if the original 
class doesn't have __dict__ in instances. And testing that may be 
non-trivial task.

> 6. Many alternate constructors and copying methods are broken. For example 
> the copy() method of partialclass(defaultdict, list) in your example. There 
> is no general solution of this, it should be solved individually for every 
> class.
>
> Ultimately, if pickling works, then copying should work too.  The usual way I 
> do it is implementing __getnewargs__, etc.   This should work fine?

I meant the defaultdict.copy() method, not the copy module,

> Should we discuss this on github?

The bug tracker is the place for the design discussion. GitHub is a 
place for discussing implementation details.

It looks to me that this should first be discussed on Python-ideas. You 
should convince core developers that it is worth to add this feature, 
and provide a plan of solving all implementation problems mentioned above.

--

___
Python tracker 

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



[issue33429] IDLE tooltips stopped working between 2.7.14 and 2.7.15 on MacOS

2018-05-05 Thread Ned Deily

Change by Ned Deily :


--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Tooltip not display with macOS 64-bit installer 3.6.5 but work 
with macOS 64-bit/32-bit installer

___
Python tracker 

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



[issue33432] No locale alias mapping key for en_IL

2018-05-05 Thread Licht Takeuchi

New submission from Licht Takeuchi :

The new locale en_IL is added to glibc.
But there is no key for this in the locale alias mapping.
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=146ffc146fe3bf97cd3bc1a649f1ffa8acfa4a0d
https://github.com/python/cpython/blob/master/Lib/locale.py#L850

The locale in latest Ubuntu 18.04 contains en_IL as valid locale, but Python 
cannot resolve this.
This makes test failure in pandas.
https://github.com/pandas-dev/pandas/issues/20957

```
(pandas-dev) [pandas] locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
ja_JP.utf8
POSIX
```

--
components: Library (Lib)
messages: 316206
nosy: licht-t
priority: normal
severity: normal
status: open
title: No locale alias mapping key for en_IL
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



[issue33432] No locale alias mapping key for en_IL

2018-05-05 Thread Licht Takeuchi

Change by Licht Takeuchi :


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

___
Python tracker 

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



[issue33432] No locale alias mapping key for en_IL

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This is a duplicate of issue20087. The patch that adds an alias for en_IL was 
merged, but then reverted.

--
nosy: +serhiy.storchaka
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Mismatch between glibc and X11 locale.alias

___
Python tracker 

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



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 3a04598f63960e72025a91c682aec51b6b460413 by Serhiy Storchaka 
(Cheryl Sabella) in branch '2.7':
bpo-32857: Raise error when tkinter after_cancel() is called with None. 
(GH-5701) (GH-6620)
https://github.com/python/cpython/commit/3a04598f63960e72025a91c682aec51b6b460413


--

___
Python tracker 

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



[issue32857] tkinter after_cancel does not behave correctly when called with id=None

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



[issue32362] multiprocessing.connection.Connection misdocumented as multiprocessing.Connection

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



[issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss

2018-05-05 Thread Dong-hee Na

Dong-hee Na  added the comment:

Looks like this issue is related with bpo-23607.

Since a decimal object is failed on PyFloat_Check(obj) of 
_PyTime_ObjectToDenominator,
This regression bug is happened due to no chance to get float value from a 
Decimal object.
https://bugs.python.org/issue23607

@serhiy.storchaka
What do you think?

--
nosy: +corona10, serhiy.storchaka

___
Python tracker 

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



[issue33432] No locale alias mapping key for en_IL

2018-05-05 Thread Licht Takeuchi

Licht Takeuchi  added the comment:

en_IL has significant impact because this is English locale and now supported 
in the latest Ubuntu. Is there any plan to add only en_IL?

--

___
Python tracker 

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



[issue33432] No locale alias mapping key for en_IL

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

This should be discussed in issue20087.

--

___
Python tracker 

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



[issue33296] datetime.datetime.utcfromtimestamp call decimal causes precision loss

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I think this issue is not just related to issue23607, but a duplicate of it.

--
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Inconsistency in datetime.utcfromtimestamp(Decimal)

___
Python tracker 

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



[issue33433] ipaddress is_private misleading for IPv4 mapped IPv6 addresses

2018-05-05 Thread Thomas Kriechbaumer

New submission from Thomas Kriechbaumer :

ipaddress.IPv4Address and ipaddress.IPv6Address provide a is_private function 
that indicates if the address (or network) is part of a "private" IP range, as 
designated by the IANA special-use registry.

The current documentation is as follows:
> is_private
>True if the address is allocated for private networks. See 
> iana-ipv4-special-registry (for IPv4) or iana-ipv6-special-registry (for 
> IPv6).


However, IPv4-mapped IPv6 addresses are currently being reported as "private" 
by this function (see 
https://github.com/python/cpython/commit/22c31764262b02338265a059c738b8d24fd9a0e4#diff-0fc57874e463b95dbdfe6f80ae918ea1R1869).

I consider this a bug or at least counter-intuitive, because e.g. 
:::8.8.8.8 is most definitely NOT a private IP address, and yet the 
ipaddress.is_private function reports True.
The IANA special-use registry does not contain any references to "being 
private" for the :: region. It just designates it to be used for 
IPv4-mapped address.

--
components: Library (Lib)
messages: 316213
nosy: Thomas Kriechbaumer
priority: normal
severity: normal
status: open
title: ipaddress is_private misleading for IPv4 mapped IPv6 addresses
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



[issue20087] Mismatch between glibc and X11 locale.alias

2018-05-05 Thread Licht Takeuchi

Licht Takeuchi  added the comment:

Hi all,

The locale in the latest Ubuntu 18.04 contains en_IL as valid locale, but 
Python cannot resolve this.
This makes test failure in pandas.
https://github.com/pandas-dev/pandas/issues/20957

en_IL has significant impact because this is English locale and now supported 
in the latest Ubuntu. Is there any plan to add only en_IL?

(Note that I've already created the PR. ( 
https://github.com/python/cpython/pull/6707 ))

```
(pandas-dev) [pandas] locale -a
C
C.UTF-8
en_AG
en_AG.utf8
en_AU.utf8
en_BW.utf8
en_CA.utf8
en_DK.utf8
en_GB.utf8
en_HK.utf8
en_IE.utf8
en_IL
en_IL.utf8
en_IN
en_IN.utf8
en_NG
en_NG.utf8
en_NZ.utf8
en_PH.utf8
en_SG.utf8
en_US.utf8
en_ZA.utf8
en_ZM
en_ZM.utf8
en_ZW.utf8
ja_JP.utf8
POSIX
```

--
nosy: +licht-t

___
Python tracker 

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



[issue33419] Add functools.partialclass

2018-05-05 Thread Nick Coghlan

Nick Coghlan  added the comment:

Note that Neil did start with a python-ideas discussion, and was directed over 
here, since the idea seemed simple enough, and worth pursuing.

As Serhiy notes though, there are many more subtleties to be addressed here 
than I first thought.

That said, as long as __init__, __new__ and __slots__ are handled appropriately 
in the partial subclass, I think custom metaclasses should largely take care of 
themselves, so it would be better to avoid the compatibility implications of 
injecting an implicit metaclass.

The slots case should be adequately handled by doing:

if hasattr(cls, "__slots__"):
__slots__ = ()

The __new__ case may have some quirks due to the fact it's technically 
implemented as an implicitly static method, but I *think* that can be covered 
by defining it as:

if cls.__new__ is not object.__new__:
__new__ = partialmethod(cls.__new__, *args, **kwds)

and relying on the native class machinery to include the same kind of fixup 
that it applies for any other __new__ method implementation.

__init__ will need a similar "has it been overridden?" check to the one in 
__new__ (comparing the unbound methods via "cls.__init__ is not 
object.__init__").


Some of the other issues that Serhiy mentions are real problems with the 
approach (like pickle compatibility, alternate constructor support, etc), but I 
think those can simply be noted in the documentation, with the following 
double-subclassing recipe noted as a suggested way of handling them:

class MySubclass(partialclass(BaseClass, *args, **kwds)):
...
# MySubclass supports pickle as it's reachable by name
# Custom constructors can be overloaded as needed here

(Note: if you're not seeing 
https://github.com/python/cpython/blob/master/Doc/whatsnew/3.8.rst locally, 
check that you're accidentally working on the 3.7 branch, instead of the master 
branch)

--

___
Python tracker 

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



[issue20087] Mismatch between glibc and X11 locale.alias

2018-05-05 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
keywords: +patch
pull_requests: +6401
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



[issue20087] Mismatch between glibc and X11 locale.alias

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Benjamin's patch did two things: 1) made the glibc alias table taking 
precedence over the X11 one; 2) updated the alias mapping with new glibc. The 
first part is controversial, but updating the alias mapping with new glibc is 
made regularly. PR 6708 updates it with glibc 2.27. This adds 39 new aliases 
and fixes issue32781 and issue33432.

--

___
Python tracker 

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



[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset b2043bbe6034b53f5ad337887f4741b74b70b00d by Serhiy Storchaka 
(Andrés Delfino) in branch 'master':
bpo-33422: Fix quotation marks getting deleted when looking up byte/string 
literals on pydoc. (GH-6701)
https://github.com/python/cpython/commit/b2043bbe6034b53f5ad337887f4741b74b70b00d


--

___
Python tracker 

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



[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6402

___
Python tracker 

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



[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6403

___
Python tracker 

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



[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread miss-islington

miss-islington  added the comment:


New changeset 351782b9927c610ff531100dbdcbbd19d91940a3 by Miss Islington (bot) 
in branch '3.7':
bpo-33422: Fix quotation marks getting deleted when looking up byte/string 
literals on pydoc. (GH-6701)
https://github.com/python/cpython/commit/351782b9927c610ff531100dbdcbbd19d91940a3


--
nosy: +miss-islington

___
Python tracker 

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



[issue33427] Dead link in "The Python Standard Library" page

2018-05-05 Thread Dong-hee Na

Change by Dong-hee Na :


--
keywords: +patch
pull_requests: +6404
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



[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread miss-islington

miss-islington  added the comment:


New changeset 0ba812b1bee65a6cad16f153a7f5074bc271e0e5 by Miss Islington (bot) 
in branch '3.6':
bpo-33422: Fix quotation marks getting deleted when looking up byte/string 
literals on pydoc. (GH-6701)
https://github.com/python/cpython/commit/0ba812b1bee65a6cad16f153a7f5074bc271e0e5


--

___
Python tracker 

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



[issue31628] test_emails failure on FreeBSD

2018-05-05 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
nosy: +belopolsky, lemburg

___
Python tracker 

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



[issue33241] Tooltip not display with macOS 64-bit installer 3.6.5 but work with macOS 64-bit/32-bit installer

2018-05-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

This affects the popup tool tip in IDLE also.  Raymond, am I correct in 
thinking that the labels appearing in dialogs (Preferences, Search) still work?

A IDLE tool tip is a Toplevel.  Its parent is a Text widget.  It contains a 
non-blank Label widget. It is normally positioned on the lines below, with the 
left edge under the opening '('.  IDLE also does the following, where tw is the 
python Toplevel instance (tooltip window) and tw._w its tk counterpart.

try:
# This command is only needed and available on Tk >= 8.4.0 for OSX
# Without it, call tips intrude on the typing process by grabbing
# the focus.
tw.tk.call("::tk::unsupported::MacWindowStyle", "style", tw._w,
   "help", "noActivates")
except TclError:
pass

To determine whether the popup is entirely missing or just the label, this 
might work.  Enter the following in an IDLE editor.

range
0123456789abcdef...
0123456789abcdef...

Go back up and enter '(' after 'range'.  A blank box should obscure '5' and to 
the right.

--
assignee:  -> terry.reedy
components: +IDLE, macOS
nosy: +rhettinger, ronaldoussoren, terry.reedy
type:  -> behavior
versions: +Python 2.7, 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



[issue33241] Tooltip not display with macOS 64-bit installer 3.6.5 but work with macOS 64-bit/32-bit installer

2018-05-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

#33429, now closed, is Raymond's report about IDLE tooltips not working in 
2.7.15, released earlier this week, after working in 2.7.14.

--

___
Python tracker 

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



[issue33422] Fix and update string/byte literals in help()

2018-05-05 Thread Andrés Delfino

Change by Andrés Delfino :


--
pull_requests: +6405

___
Python tracker 

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



[issue14384] Add "default" kw argument to operator.itemgetter and operator.attrgetter

2018-05-05 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Here are a few more thoughts and a concrete example for clarity.

Itemgetter/Attrgetter were designed to make multiple lookups (possibly 
multi-level) and to return a tuple that need not be homogenous.  A single 
default value likely doesn't make sense in any of those contexts. 

Consider:

attrgetter('programmer.lang', 'team.dept')

Various behaviors you might want:

(o.programmer.lang if hasattr(o, 'programmer') else o.avg_joe.lang, 
o.team.dept)

(o.programmer.lang if hasattr(o.programmer) else 'python', o.team.dept)

(o.programmer.long, o.team.dept if hasattr(o.team, 'dept') else 
'accounting')

try:
return (o.programmer.lang, o.team.dept)
except AttributeError:
return ('python', 'accounting')

Other than the OP's example with a universal default value of None (which would 
like require more tests downstream), I can't think of any meaningful default 
value that would apply to both programmer.lang and team.dept.

If this proposal is to go forward, its needs a more informative use case than 
the toy example provided on python-ideas:

p1 = {'x': 43; 'y': 55} 
x, y, z = itemgetter('x', 'y', 'z', default=0)(values) 
print(x, y, z) 
43, 55, 0 

And if it does go forward, I would suggest that the semantics of default be an 
entire result tuple rather than a scalar applied on an attribute by attribute 
basis:

attrgetter('programmer.lang', 'team.dept', default=('python', 'accounting'))
attrgetter('temperature', 'humidity', 'altitude', default=('22°C', '50%', 
"0 meters MSL"))
attrgetter('foo', default=None)

That would still meet the OP's use case, but would be more broadly applicable 
and not make the assumption that every field has the same default value.  

Even with that improvement, users would still likely be better-off writing a 
function that explicitly says what they want to do.  For example, the OP's use 
case can already be written like this:

get = lambda obj:  getattr(obj, 'foo', None)
return get(args) or get(config) or get(env)

That is easy and unambiguous.  Writing a separate function allows all of the 
above cases to be written cleanly.  There isn't any need to trick-out 
itemgetter() for this.

--

___
Python tracker 

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



[issue33426] Behavior of os.path.join does not match documentation

2018-05-05 Thread Michael Klatt

Michael Klatt  added the comment:

For me, the ambiguity is due to the phrases "exactly one directory separator" 
and "the only way to produce a trailing separator".

I would suggest:

"The return value is the concatenation of path and any members of *paths so 
that there is a directory separator (os.sep) following each part except the 
last. An empty part is ignored unless it is the last part, in which case the 
result will end in a separator."

Or:

"The return value is the concatenation of path and any members of *paths such 
that there is guaranteed to be a directory separator (os.sep) following each 
part except the last. An empty part is ignored unless it is the last part, in 
which case the result will end in a separator."

--

___
Python tracker 

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



[issue20087] Mismatch between glibc and X11 locale.alias

2018-05-05 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset cedc9b74202d8c1ae39bca261cbb45d42ed54d45 by Serhiy Storchaka in 
branch 'master':
bpo-20087: Update locale alias mapping with glibc 2.27 supported locales. 
(ПР-6708)
https://github.com/python/cpython/commit/cedc9b74202d8c1ae39bca261cbb45d42ed54d45


--

___
Python tracker 

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



[issue20087] Mismatch between glibc and X11 locale.alias

2018-05-05 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6406

___
Python tracker 

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



[issue20087] Mismatch between glibc and X11 locale.alias

2018-05-05 Thread miss-islington

Change by miss-islington :


--
pull_requests: +6407

___
Python tracker 

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



[issue33412] Tkinter hangs if using multiple threads and event handlers

2018-05-05 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

When I closed the main thread by clicking [x], thus destroying root, both event 
threads raised instead of hanging.  So my experiment involved calling 
root.destroy instead of setting running to False.  The better result when 
running under IDLE might be due to IDLE's run process executes 
tcl.call('update') about 20 times per second.  Even if the exception idea could 
be made to work, it seems like a kludge.

Waiting on the event threads from a separate non-gui thread and leaving the 
main thread fully functional and responsive until the gui threads die seems 
much cleaner.  Perhaps this should be recommended as a standard way to shut 
down the main thread when there might be active gui threads.  Thank you for 
following through with this to get a solution we both like.

--

___
Python tracker 

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



[issue21592] Make statistics.median run in linear time

2018-05-05 Thread Dong-hee Na

Change by Dong-hee Na :


--
pull_requests: +6408

___
Python tracker 

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