[issue35013] Add more type checks for children of xml.etree.ElementTree.Element

2018-10-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue35008] Leaks xml.etree.ElementTree.Element.__setsate__()

2018-10-18 Thread miss-islington


miss-islington  added the comment:


New changeset bcbefe23fe2eb616a03c22764ba4ea79e12e3e28 by Miss Islington (bot) 
in branch '3.6':
bpo-35008: Fix possible leaks in Element.__setstate__(). (GH-9924)
https://github.com/python/cpython/commit/bcbefe23fe2eb616a03c22764ba4ea79e12e3e28


--
nosy: +miss-islington

___
Python tracker 

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



[issue35008] Leaks xml.etree.ElementTree.Element.__setsate__()

2018-10-18 Thread miss-islington


miss-islington  added the comment:


New changeset 5b9b9353de502853b42a20d950ad0ac1fadd05ea by Miss Islington (bot) 
in branch '3.7':
bpo-35008: Fix possible leaks in Element.__setstate__(). (GH-9924)
https://github.com/python/cpython/commit/5b9b9353de502853b42a20d950ad0ac1fadd05ea


--

___
Python tracker 

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



[issue34999] copy.copy and deepcopy do return same logger objects in 3.7

2018-10-18 Thread sebix


sebix  added the comment:

> I suggest as a workaround that a context manager approach could be used to 
> save and restore part of the logging configuration around various operations 
> (at least levels and handlers), as outlined here:

> https://docs.python.org/3/howto/logging-cookbook.html#using-a-context-manager-for-selective-logging

> This would avoid the need for making copies just to save and restore state.

Yeah, I learned about this possibility in my research before reporting this bug 
and I will try to use it - however I could not get it working yet. I adapted 
the bug's title as it turned out that - if I understood it correctly - the bug 
a bit different that I initially thought.

--

___
Python tracker 

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



[issue34914] Clarify text encoding used to enable UTF-8 mode

2018-10-18 Thread Nick Coghlan


Nick Coghlan  added the comment:

Your explanation is why this is a docs enhancement proposal rather than a
bug report: as far as we're aware, all encodings that get used as locale
encodings have the property that encoding "-X utf8" with the locale
encoding gives the same answer as encoding it with ASCII.

Encodings where this isn't true (like UTF-16-LE) don't get used as locale
encodings.

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Rémy Hubscher [:natim]

New submission from Rémy Hubscher [:natim] :

Asyncio.create_subprocess_exec accepts a list of str as parameter which lead to 
UnicodeEncodeError I think it should accept only bytes shouldn't it?

--
components: asyncio
messages: 327945
nosy: asvetlov, natim, yselivanov
priority: normal
severity: normal
status: open
title: asyncio subprocess accepts string as parameter which lead to 
UnicodeEncodeError
versions: 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



[issue35015] availability directive breaks po files

2018-10-18 Thread Julien Palard


New submission from Julien Palard :

The new availability directive introduced in  
2d6097d027e0dd3debbabc702aa9c98d94ba32a3 (https://bugs.python.org/issue11233) 
breaks po files (sphinx-build -b gettext):

Here's the diff I'm getting on os.po from os.rst:

 msgid ""
-"Availability: Unix, Windows.  :func:`spawnlp`, :func:`spawnlpe`, :func:"
-"`spawnvp` and :func:`spawnvpe` are not available on Windows.  :func:"
-"`spawnle` and :func:`spawnve` are not thread-safe on Windows; we advise you "
-"to use the :mod:`subprocess` module instead."
+"Availability: Unix, Windows.  spawnlp(), spawnlpe(), spawnvp() and "
+"spawnvpe() are not available on Windows.  spawnle() and spawnve() are not "
+"thread-safe on Windows; we advise you to use the subprocess module instead."

The roles has been removed in the po files (but not in the original rst files), 
so it looks like the availability directive caused the drop of roles, but I 
still don't understand why.

--
assignee: docs@python
components: Documentation
messages: 327946
nosy: docs@python, georg.brandl, mdk
priority: normal
severity: normal
status: open
title: availability directive breaks po files
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



[issue34765] Update install-sh

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset b7ad31c8926aad2fdd0d4661373c25cc9d753a40 by Victor Stinner 
(stratakis) in branch 'master':
bpo-34765: Update the install-sh file (GH-9592)
https://github.com/python/cpython/commit/b7ad31c8926aad2fdd0d4661373c25cc9d753a40


--
nosy: +vstinner

___
Python tracker 

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



[issue34765] Update install-sh

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

Thanks Charalampos Stratakis for the change!

> If there's no actual bug, it certainly does not need to be done on 
> maintenance branches.

I concur. Since install-sh has been updated in the master branch, I close the 
issue.

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



[issue35008] Leaks xml.etree.ElementTree.Element.__setsate__()

2018-10-18 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



[issue17837] Support for building on ppc64p7

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

I'm sorry, but since nobody is able to review or test your patch, I have to 
close this issue which didn't get any activity for 5 years :-(

--
nosy: +vstinner

___
Python tracker 

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



[issue17837] Support for building on ppc64p7

2018-10-18 Thread STINNER Victor


Change by STINNER Victor :


--
resolution:  -> out of date
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



[issue35016] \r to match add into address header with not-ascii character

2018-10-18 Thread Ivan Krivosheev

New submission from Ivan Krivosheev :

When convert email.message.Message to bytes, into header with non-ascii 
character in address add to match *\r* symbol.

Simple script for reproduce problem:

>>> from email.message import Message
>>> from email.policy import SMTP
>>> msg = Message(policy=SMTP)
>>> msg['To'] = 'Юзер Один '
>>> print(msg.as_bytes())

On python 3.5 result:

>>> b'To: =?utf-8?b?0K7Qt9C10YAg0J7QtNC40L0=?= \r\n\r\n'


On python 3.6, python 3.7:

   >>> b'To:\r\n =?utf-8?b?0K7Qt9C10YAg0J7QtNC40L0=?= 
\r\r\r\r\r\n\r\n'

--
components: email
files: email1.py
messages: 327950
nosy: barry, ikrivosheev, r.david.murray
priority: normal
severity: normal
status: open
title: \r to match add into address header with not-ascii character
type: behavior
versions: Python 3.6, Python 3.7
Added file: https://bugs.python.org/file47878/email1.py

___
Python tracker 

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



[issue34995] functools.cached_property does not maintain the wrapped method's __isabstractmethod__

2018-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Well, you can combine @abstractmethod with @property in an abstract class. This 
will give you type hints etc. @cached_property is a detail of concrete 
implementation.

--

___
Python tracker 

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



[issue34999] copy.copy and deepcopy do return same logger objects in 3.7

2018-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

So that I think we can close this issue, since this is not a bug, but an 
intentional behavior.

copy.copy() also consider functions and classes as atomic, although they are 
not immutable, and there are use cases for making a modified copy.

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

List of strings works on both my local Linux box and CPython test suite.

Please provide more info about the error. Stacktrace can help

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

Hi Remy,

> Asyncio.create_subprocess_exec accepts a list of str as parameter which lead 
> to UnicodeEncodeError I think it should accept only bytes shouldn't it?

Can you elaborate? On which OS? What is your error message? Can you paste a 
traceback?

--
nosy: +vstinner

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Rémy Hubscher [:natim]

Rémy Hubscher [:natim]  added the comment:

> List of strings works on both my local Linux box and CPython test suite.

Indeed that's why I posted this bug report, in my opinion it should work only 
with bytes string.

> Can you elaborate? On which OS? What is your error message? Can you paste a 
> traceback?

If you try to send a UTF-8 string on a linux box for instance, you might get a 
UnicodeEncodeError.

Let me try to provide you with a script to reproduce this error.

--

___
Python tracker 

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



[issue34999] copy.copy and deepcopy do return same logger objects in 3.7

2018-10-18 Thread Vinay Sajip


Vinay Sajip  added the comment:

Closing as per Serhiy's advice - assume that's OK.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

partial objects lack many other function attributes: __name__, __module__ (and 
__qualname__ doesn't make sense without __module__),  __annotations__, 
__get__(), etc. It would be nice to make these types more similar, but 
attributes shouldn't lie. And I am not sure what partial.__qualname__ can be. 
It shouldn't be the __qualname__ of the wrapped function, since the partial 
object differs from it, and is not accessible by same name.

--

___
Python tracker 

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



[issue34958] urllib.error.HTTPError.fp is not closed when error is finalized on Windows

2018-10-18 Thread Xiao Di Guan


Change by Xiao Di Guan :


--
nosy: +orsenthil

___
Python tracker 

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



[issue35012] [3.7] test_multiprocessing_spawn hangs randomly on AppVeyor

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

I identified a race condition:

https://bugs.python.org/issue33966
https://github.com/python/cpython/pull/7966

--

___
Python tracker 

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



[issue35012] [3.7] test_multiprocessing_spawn hangs randomly on AppVeyor

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

Extract of bpo-34714:

  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\spawn.py",
 line 107, in spawn_main
new_handle = reduction.duplicate(pipe_handle,
  File 
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\multiprocessing\reduction.py",
 line 79, in duplicate
return _winapi.DuplicateHandle(
PermissionError: [WinError 5] Access is denied

That's why I'm asking if this issue can be related to bpo-33966.

--

___
Python tracker 

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



[issue32789] Note missing from logging.debug() docs

2018-10-18 Thread Vinay Sajip


Change by Vinay Sajip :


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

___
Python tracker 

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



[issue35016] \r to match add into address header with not-ascii character

2018-10-18 Thread Ivan Krivosheev


Change by Ivan Krivosheev :


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



[issue35016] \r to match add into address header with not-ascii character

2018-10-18 Thread Ivan Krivosheev


Change by Ivan Krivosheev :


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

___
Python tracker 

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



[issue34987] A possible null pointer dereference in _pickle.c's save_reduce()

2018-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

You are right. Although, get_class() can return NULL without set an exception. 
We have to set an exception in such case (the same exception as for `obj_class 
!= cls` looks appropriate).

--

___
Python tracker 

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



[issue27741] datetime.datetime.strptime functionality description incorrect

2018-10-18 Thread Gus Goulart


Gus Goulart  added the comment:

As far as I can see, every time something changes on datetime.strptime(), it 
will invalidate that section of the documentation. On the other hand, I believe 
the comparison with datetime(*(time.strptime(date_string, format)[0:6])" is 
interesting and valuable to keep.
Given that, instead of "This is equivalent to [...]", I would suggest something 
like:
"This is similar to [...], but datetime.strptime() is better since it retains 
both microseconds and timezone data."

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Rémy Hubscher [:natim]

Rémy Hubscher [:natim]  added the comment:

I though this would be sufficient to actually reproduce the issue.
However it seems that if the system encoding is UTF-8 it does work properly.

Here is the traceback I had:

```
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 69: 
ordinal not in range(128)
  File "worker.py", line 393, in 
return_code = loop.run_until_complete(main(loop))
  File "asyncio/base_events.py", line 467, in run_until_complete
return future.result()
  File "worker.py", line 346, in main
'-f mp4', '-o', '{}/{}.mp4'.format(download_tempdir, video_id))
  File "worker.py", line 268, in run_command
proc = await create
  File "asyncio/subprocess.py", line 225, in create_subprocess_exec
stderr=stderr, **kwds)
  File "asyncio/base_events.py", line 1191, in subprocess_exec
bufsize, **kwargs)
  File "asyncio/unix_events.py", line 191, in _make_subprocess_transport
**kwargs)
  File "asyncio/base_subprocess.py", line 39, in __init__
stderr=stderr, bufsize=bufsize, **kwargs)
  File "asyncio/unix_events.py", line 697, in _start
universal_newlines=False, bufsize=bufsize, **kwargs)
  File "python3.6/subprocess.py", line 707, in __init__
restore_signals, start_new_session)
  File "python3.6/subprocess.py", line 1267, in _execute_child
restore_signals, start_new_session, preexec_fn)
```

--
Added file: https://bugs.python.org/file47879/demo.py

___
Python tracker 

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



[issue32789] Note missing from logging.debug() docs

2018-10-18 Thread Vinay Sajip


Vinay Sajip  added the comment:

Documentation for 3.6/3.7/3.8 updated. 3.5 is out of scope for this.

--
nosy: +vinay.sajip
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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Rémy Hubscher [:natim]

Rémy Hubscher [:natim]  added the comment:

I am adding the following info:

If I run the following on the Docker image where I got the error I get:

```
import sys
import locale

print(sys.getdefaultencoding())
print(locale.getpreferredencoding())
```

utf-8
ANSI_X3.4-1968

While if I run it on my machine I get:

utf-8
UTF-8

I don't know how to force the usage of the later locally to reproduce.

Settings LC_ALL=C and LANG=C didn't do the trick

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Rémy Hubscher [:natim]

Rémy Hubscher [:natim]  added the comment:

Here we go:

```
$ python3.7 demo.py 
utf-8
UTF-8
Traceback (most recent call last):
  File "demo.py", line 21, in 
asyncio.run(main())
  File "/usr/lib/python3.7/asyncio/runners.py", line 43, in run
return loop.run_until_complete(main)
  File "/usr/lib/python3.7/asyncio/base_events.py", line 568, in 
run_until_complete
return future.result()
  File "demo.py", line 14, in main
sys.stdout.write(out.decode('utf-8'))
UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' in position 1: 
ordinal not in range(128)
```

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I think you'll get the same error on `subprocess.run()` call if your current 
locale is not UTF-8.

I don't recall the details but the Intenet has a lot info about setting locale 
per user and system-wide.

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Rémy Hubscher [:natim]

Rémy Hubscher [:natim]  added the comment:

I believe Python 3.7 brings explicit unicode encoding/decoding.

If depending on the environment the create_subprocess_exec method can fail, I 
believe we should not try to encode the command lines attribute but rather 
enforce it to be bytes.

--

___
Python tracker 

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



[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
pull_requests: +9298

___
Python tracker 

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



[issue34963] String representation for types created with typing.NewType(…) are opaque and unappealing

2018-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

PR 9951 is a simpler way. It just sets __qualname__ (and __module__ for 
completeness).

>>> import typing
>>> UserId = typing.NewType('UserId', int)
>>> UserId


--

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-18 Thread Denis Ledoux


New submission from Denis Ledoux :

After the shutdown of a `BaseServer`, the server may accept a last single 
request if it is sent between the server socket polling and the polling timeout.

This can be problematic for instance for a server restart for which you do not 
want to interrupt the service, by not closing the listening socket during the 
restart. One request can fail because of this behavior.

Note that only one request will fail, following requests will not be accepted, 
as expected.

--
components: Library (Lib)
messages: 327969
nosy: beledouxdenis
priority: normal
severity: normal
status: open
title: socketserver accept a last request after shutdown
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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

I added the UTF-8 Mode for you, for the Docker use case: python3.7 -X utf8. 
Using that, Python ignores your locale and speaks UTF-8.

What is your locale? Try the "locale" command.

--

___
Python tracker 

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



[issue35017] socketserver accept a last request after shutdown

2018-10-18 Thread Denis Ledoux


Change by Denis Ledoux :


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

___
Python tracker 

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



[issue35015] availability directive breaks po files

2018-10-18 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Do you think it needs to be added to Doc\tools\templates?

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue35015] availability directive breaks po files

2018-10-18 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Sorry, I meant dummy.html in Docs\tools\templates.

--

___
Python tracker 

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



[issue35015] availability directive breaks po files

2018-10-18 Thread Julien Palard


Julien Palard  added the comment:

No, at first glance it looks like the implementation of the directive in 
pyspecific.py is "removing" the roles.

It's however not removing the roles while building the html, only removing it 
from po files, so there's a subtility I can't catch here (just spotted this, 
didn't have time to diagnose it in depth myself).

--

___
Python tracker 

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



[issue34996] Add name to process and thread pool

2018-10-18 Thread Antoine Pitrou


Change by Antoine Pitrou :


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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

> LC_CTYPE="POSIX"

I modified Python 3.7.1 to enable the UTF-8 Mode when the LC_CTYPE is "POSIX". 
In Python 3.7.0, the UTF-8 Mode is only enabled if the LC_CTYPE is "C".

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Rémy Hubscher [:natim]

Rémy Hubscher [:natim]  added the comment:

Here are the locale set:

```
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=
```

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Rémy Hubscher [:natim]

Rémy Hubscher [:natim]  added the comment:

Unicode is complicated, the answer is somewhere here: 
https://unicodebook.readthedocs.io/

Sorry for the bothering, I thought it was a bug but apparently it's a feature. 
Thank you for your help, thank you for making Python better.

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

This issue is not an asyncio bug: the bug occurs in subprocess.

The bug is not a subprocess bug: subprocess works as expected, it encodes 
Unicode with sys.getfilesystemencoding() (see os.fsencode()).

The bug is that you use non-ASCII strings whereas your filesystem encoding is 
ASCII.

You have a different options to fix *your* issue:

* Use a different locale which uses a UTF-8 locale
* Enable the Python 3.7 UTF-8 mode
* Wait for Python 3.7.1 (which enables automatically the UTF-8 Mode for 
LC_CTYPE="POSIX")

Note: You might want to read my ebook http://unicodebook.readthedocs.io/ which 
explains how to deal with Unicode.

--

___
Python tracker 

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



[issue35014] asyncio subprocess accepts string as parameter which lead to UnicodeEncodeError

2018-10-18 Thread Rémy Hubscher [:natim]

Rémy Hubscher [:natim]  added the comment:

> I modified Python 3.7.1 to enable the UTF-8 Mode when the LC_CTYPE is 
> "POSIX". In Python 3.7.0, the UTF-8 Mode is only enabled if the LC_CTYPE is 
> "C"

Ok works for me thanks :)

--

___
Python tracker 

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



[issue24294] DeprecationWarnings should be visible by default in the interactive REPL

2018-10-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: test needed -> resolved
status: pending -> closed
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue22872] multiprocessing.Queue raises AssertionError

2018-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I don't think we need to document AssertionError in older Python versions. This 
is an implementation detail. We don't document all exceptions that can be 
raised with improper use of the API. Just don't do this.

In addition, using the assert statement for validating user input or the object 
state which depends on user actions is a bad style. We shouldn't encourage this 
by documenting it as a behavior of the stdlib. It was a bug, and it is fixed 
now.

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

___
Python tracker 

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



[issue35015] availability directive breaks po files

2018-10-18 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34814] makesetup: must link C extensions to libpython when compiled in shared mode

2018-10-18 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +petr.viktorin

___
Python tracker 

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



[issue34790] Deprecate passing coroutine objects to asyncio.wait()

2018-10-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue35010] sort by partially reversed key tuple

2018-10-18 Thread Cyker Way


Cyker Way  added the comment:

Thank you very much for the great discussion here, especially Tim's great 
threads in *python-ideas* that give neat and insightful answers to this problem 
in different ways:

-   

-   

Since this topic is closed, future discussions probably should go to other 
python forums. But it might be good to draw some conclusions here for future 
reference.

First of all, either single-pass sort with a vector key or multi-pass sort with 
a scalar key may work better, depending on the input. However, in most cases, 
using multi-pass sort for such problem is the right way to go in the current 
python implementation. The multi-pass sort algorithm typically runs 2x faster 
or so than a single-pass sort algorithm. This is likely due to constants rather 
than asymptotic complexity. But when measured in real time, multi-pass sort 
algorithm clearly wins in most cases.

If your input is so special that it aligns much better with single-pass sort 
algorithms (overwhelming the constant advantage of multi-pass sort algorithm), 
you may use a single-pass sort algorithm. But there are actually different ways 
of implementing so. The algorithm posted in Tim's second thread on python-ideas 
is in fact different from mine in this bug thread, where Tim used a wrapper 
class for the keys and I used a wrapper class for the scalars. Since there are 
`n` keys but can be as many as `n * m` scalars, my method would be using more 
wrapper objects. So I expected it to run slower than Tim's. To my surprise, 
sometimes it works better. The reason is later found to be easy to understand: 
Wrapper objects are created only when a column needs to be reversed. The number 
of columns to be reversed is actually a factor controlling the running time. To 
give a fair evaluation, I created 50 random rows with 8 columns and control 
the number of columns to be reversed. The evaluation s
 hows my algorithm could have running time 80%-120% that of Tim's (excluding 
the special case where no column needs to be reversed). This shows a new 
direction of optimizing such algorithms.

Finally, this issue was rejected because the added benefits were deemed not 
enough to complicate the implementation. Considering the current multi-pass 
sort algorithm has a huge advantage and is easy to implement in python, this 
decision is fair. Users who care less about performance may write a key adapter 
in their own code if they want to stick with builtin sort functions. Users who 
do care about performance can use single-pass sort techniques mentioned in this 
issue in case multi-pass sort doesn't work well with their data.

--
Added file: https://bugs.python.org/file47880/performance-2.py

___
Python tracker 

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



[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-10-18 Thread Charalampos Stratakis


Change by Charalampos Stratakis :


--
pull_requests: +9301

___
Python tracker 

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



[issue34623] _elementtree.c doesn't call XML_SetHashSalt()

2018-10-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
assignee:  -> larry
nosy: +larry
priority: normal -> release blocker
versions:  -Python 2.7, 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



[issue35005] argparse should accept json and yaml argument types

2018-10-18 Thread Braden Groom


Braden Groom  added the comment:

I could try adding JSON and YAML argument types if that's what we want to do.

--
nosy: +bradengroom

___
Python tracker 

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



[issue35018] Sax parser provides no user access to lexical handlers

2018-10-18 Thread Jonathan Gossage


New submission from Jonathan Gossage :

While working on issues bpo-6686 and bpo-9371 I realized that the solution to 
both involved the use of Sax lexical handlers. Unfortunately, the Python SAX 
parser does not expose these handlers to the end user, however, support is 
available in expatreader.py and pyexpat.c.

What is missing is the LexicalHandler class which works the same way as the 
ContentHandler does for the more common handlers and provides a subclassable 
interface for these handlers. This class is present in the Java implementation 
of SAX2 and was also present in Pyxml.

I have already verified privately that this class works exactly as expected and 
I am working on a PR which will provide the class along with supporting unit 
tests that verify that the lexical handlers work.

--
messages: 327982
nosy: Jonathan.Gossage, taleinat
priority: normal
severity: normal
status: open
title: Sax parser provides no user access to lexical handlers
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



[issue34973] Crash in bytes constructor with mutating list

2018-10-18 Thread Alexandre Vassalotti


Alexandre Vassalotti  added the comment:

PR 9841 looks good to me. I wouldn't worry about the performance hit.

--

___
Python tracker 

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



[issue35019] Minor Bug found in asyncio - Python 3.5.3

2018-10-18 Thread Ken Bassford


New submission from Ken Bassford :

Found that when using the following function ...

"asyncio.start_server(self.processCmd, serverhost, serverport, loop=self.loop)"

If 'serverhost' is formatted as a ipaddress.IPv4Address() it will cause a very 
messy failure.

Formatting 'serverhost' as a string eliminates the problem, though I suspect 
that asyncio developers would/should accept IPv4/IPv6 objects, in addition to 
strings, as the host parameter.

--
components: asyncio
messages: 327984
nosy: asvetlov, bassford, yselivanov
priority: normal
severity: normal
status: open
title: Minor Bug found in asyncio - Python 3.5.3
type: behavior
versions: Python 3.5

___
Python tracker 

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



[issue30220] Why are custom messages for ValueError, TypeError suppressed in argparse?

2018-10-18 Thread paul j3


paul j3  added the comment:

I'm going to close this.

Python makes it easy to test for Exception class.  Testing exception messages 
is messy, especially if the test wants to compare the message against 'generic 
message'.

I don't see anything generic about the messages produced by `int('1.23')` and 
`float('xxx')`.

Argparse provides a custom class, ArgumentTypeError, for use when you want to 
pass a custom message.  Let's leave it at that, and not try to make things more 
complicated.

If there's to be any change it should be in the documentation as suggested in 
https://bugs.python.org/issue20039.

--
resolution:  -> not a bug
stage: test needed -> 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



[issue20039] Missing documentation for argparse.ArgumentTypeError

2018-10-18 Thread paul j3


paul j3  added the comment:

A related closed request: https://bugs.python.org/issue30220

that wants to test ValueError for non-generic message, instead of using 
ArgumentTypeError.

--

___
Python tracker 

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



[issue35005] argparse should accept json and yaml argument types

2018-10-18 Thread paul j3


paul j3  added the comment:

Adding a new 'type' function or factor is certainly possible, and probably will 
be free of backward compatibility issues.  But so far no other custom type has 
been added to argparse.

https://bugs.python.org/issue23884 - rejects adding a DateTime class

https://bugs.python.org/issue22884 - there are several outstanding issue 
dealing with the FileType class.  That hasn't aged well, since file IO 
standards have changed over the years.

--

___
Python tracker 

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



[issue35015] availability directive breaks po files

2018-10-18 Thread Ned Deily


Change by Ned Deily :


--
nosy: +vstinner
priority: normal -> deferred blocker
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



[issue35020] Add multisort recipe to sorting docs

2018-10-18 Thread Karthikeyan Singaravelan


New submission from Karthikeyan Singaravelan :

This issue handles the below : 

1. Adding a link to sorting HOWTO from list.sort docs as per msg327901
2. Adding multisort recipe to sorting HOWTO with an example as per msg327925.

I have raised a PR (GH-9931) for #1 but the issue35010 was closed and hence I 
will link to this issue. I would also suggest adding single pass sorting example

multisort recipe : 
https://mail.python.org/pipermail/python-ideas/2016-October/043045.html
single pass recipe : 
https://mail.python.org/pipermail/python-ideas/2016-October/043126.html

Since English is not my first language feedback welcome on the wording.

Thanks

--
assignee: docs@python
components: Documentation
messages: 327988
nosy: docs@python, xtreak
priority: normal
severity: normal
status: open
title: Add multisort recipe to sorting docs
type: enhancement
versions: Python 2.7, 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



[issue35020] Add multisort recipe to sorting docs

2018-10-18 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


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

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-10-18 Thread Thomas Wouters


New submission from Thomas Wouters :

The fix for issue #31752 (changeset 5ef883b096895a84123760859f0f34ad37bf2277 
for 2.7, as I ran into this while upgrading to 2.7.15) includes assertions that 
are easily triggered from user code:

>>> import datetime, numpy
>>> datetime.timedelta(seconds=numpy.int64(0))
python: .../Modules/datetimemodule.c:1859: accum: Assertion 
`_PyAnyInt_CheckExact(prod)' failed.
Aborted (core dumped)

The code asserts that the product of a known type and an unknown type is a 
known type, which is not a valid assumption. Pure-python reproducer (requires a 
build with assertions enabled, like a --with-pydebug build).

>>> import datetime
>>> class C(int):
... def __rmul__(self, other):
... return self
...
>>> datetime.timedelta(seconds=C())
python: .../Modules/datetimemodule.c:1859: accum: Assertion 
`_PyAnyInt_CheckExact(prod)' failed.
Aborted (core dumped)

(It fails in a similar way in at least Python 3.7, and since the fix was 
backported I'm going to assume 3.6 as well.)

Please do not use assertions for things that aren't guaranteed by the code 
making the assertions. These should either not be assertions, or the input 
types should be validated beforehand. I do not know why these assertions are 
being made in the first place. What do they guard against?

--
assignee: serhiy.storchaka
components: Interpreter Core
keywords: 3.6regression, 3.7regression
messages: 327989
nosy: gregory.p.smith, serhiy.storchaka, twouters
priority: high
severity: normal
stage: needs patch
status: open
title: Assertion failures in datetimemodule.c.
type: crash
versions: Python 2.7, 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



[issue31752] Assertion failure in timedelta() in case of bad __divmod__

2018-10-18 Thread Thomas Wouters


Thomas Wouters  added the comment:

This patch includes assertions that are easily triggered from user code: 
https://bugs.python.org/issue35021

--
nosy: +twouters

___
Python tracker 

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



[issue35019] Minor Bug found in asyncio - Python 3.5.3

2018-10-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

It could be a nice feature but I imagine about adding ipaddress objects support 
to all python APIs.
It could be done in a similar way as pathlib integration (os.fspath() and 
family).

--

___
Python tracker 

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



[issue35019] Minor Bug found in asyncio - Python 3.5.3

2018-10-18 Thread Damla Altun


Damla Altun  added the comment:

Working on it.

--
nosy: +Damla Altun

___
Python tracker 

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



[issue28053] parameterize what serialization is used in multiprocessing

2018-10-18 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
nosy: +pablogsal

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Mia culpa! I missed that the type of the right operand takes precedence when it 
is a subclass of the type of the left operand.

--

___
Python tracker 

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



[issue27869] test failures under Bash on Windows / WSL

2018-10-18 Thread Tal Einat


Tal Einat  added the comment:

As a side-effect, test_ssl hanging is causing builds configured with 
--enable-optimizations to hang.

(Tested with both 3.6.6 and 3.7.0 on Ubuntu 18.04 in WSL on Win 10 Pro 64-bit)

--
nosy: +taleinat

___
Python tracker 

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



[issue35005] argparse should accept json and yaml argument types

2018-10-18 Thread Bob Ippolito


Bob Ippolito  added the comment:

I don't think that this has anything in particular to do with the json module, 
at least it certainly shouldn't need any additional functionality from there.

YAML parsing isn't available in the stdlib last I checked, so that is probably 
not really up for consideration for direct integration.

In any case, I think the best approach would be to first do some research 
(StackOverflow, GitHub, etc.) to see how other folks are doing this in the 
wild, to see if there's a common pattern that should be made available in the 
stdlib.

--

___
Python tracker 

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



[issue35018] Sax parser provides no user access to lexical handlers

2018-10-18 Thread Jonathan Gossage


Change by Jonathan Gossage :


--
components: +XML

___
Python tracker 

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



[issue35001] ImportFrom level cannot be optional

2018-10-18 Thread Brett Cannon


Brett Cannon  added the comment:

There aren't any type hints in the 'ast' module in Python itself, so this is an 
issue with typeshed. Closing as "third party".

--
nosy: +brett.cannon
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue35019] Minor Bug found in asyncio - Python 3.5.3

2018-10-18 Thread Damla Altun


Change by Damla Altun :


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

___
Python tracker 

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



[issue33457] python-config ldflags, PEP 513 and explicit linking to libpython in python extensions

2018-10-18 Thread Nathaniel Smith


Nathaniel Smith  added the comment:

Also, python-config is inconsistent with distutils. It should link to libpython 
only in the cases where distutils does. (IIRC it's supposed to depend on 
whether python was built with --enable-shared.)

--
nosy: +njs

___
Python tracker 

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



[issue34936] tkinter.Spinbox.selection_element() raises TclError

2018-10-18 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 1deea5e53991b46351f6bb395b22365c9455ed88 by Serhiy Storchaka 
(Juliette Monsel) in branch 'master':
bpo-34936: Fix TclError in tkinter.Spinbox.selection_element(). (GH-9760)
https://github.com/python/cpython/commit/1deea5e53991b46351f6bb395b22365c9455ed88


--

___
Python tracker 

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



[issue35019] Minor Bug found in asyncio - Python 3.5.3

2018-10-18 Thread Andrew Svetlov


Andrew Svetlov  added the comment:

I mean if we implement something like PathLike [1] but for IP addresses to 
socket module and teach all socket APIs to accept IPLike objects along with str 
-- no asyncio change is required.

1. https://docs.python.org/3/library/os.html#os.PathLike

--

___
Python tracker 

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



[issue35005] argparse should accept json and yaml argument types

2018-10-18 Thread paul j3


paul j3  added the comment:

This kind of file read can be done just as easily after parsing.  For example 
using the function in my previous post:

In [127]: parser = argparse.ArgumentParser()
In [128]: parser.add_argument('-d','--data');
In [129]: args = parser.parse_args(['-d','@foo.json'])
In [130]: args
Out[130]: Namespace(data='@foo.json')
In [131]: args.data = readdata(args.data)
In [132]: args
Out[132]: Namespace(data={'foo': 12, 'bar': 'twelve'})

I've pointed out in various SO answers that using the 'type' parameter has just 
a few benefits.

- If you have many arguments that require this conversion, using type is a 
little more streamlined.  But it's not hard to iterate of a list of 'dest'.

- Using type routes the errors through the standard argparse mechanism, 
including the display of usage and system exit.  But the type function has to 
raise TypeError, ValueError, or ArgumentTypeError.  But you can also use 
'parser.error(...)' in the post parsing processing.

Error handling is the make-or-break-it issue.  What kinds of errors do we want 
to handle?  What if the file name is bad or not accessible?  What if the file 
is poorly formatted JSON?  How do other APIs handle these errors?

For example the function that I defined can raise a FileNotFoundError if the 
file isn't found, or a JSONDecodeError if the file is badly formed.  
JSONDecodeError is a subclass of ValueError, but IO errors are not.

If such a type function is added to argparse, the unittest file, 
test_argparse.py will have to have a number of test cases.  It will have to 
create a valid json test file, and possibly an invalid one.  It will have test 
working cases, and various error cases.  The amount of testing code is likely 
to be many times larger than the function code itself.  And we can't overlook 
the documentation additions.

--

___
Python tracker 

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



[issue35015] availability directive breaks po files

2018-10-18 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

I found this in the Sphinx doc.  This works on the English-language build OK, 
so I'm not sure if it's the cause of the issue.

http://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#gotchas

> No nested inline markup: Something like *see :func:`foo`* is not possible.

--

___
Python tracker 

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



[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

> It shouldn't be the __qualname__ of the wrapped function

Yes, I agree with you. I was thinking it should be similar to what it would be 
for a function defined at the same location.

--

___
Python tracker 

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



[issue34936] tkinter.Spinbox.selection_element() raises TclError

2018-10-18 Thread Juliette Monsel


Change by Juliette Monsel :


--
pull_requests: +9304

___
Python tracker 

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



[issue34988] Rc2 candidates: "gcc" not found on AIX

2018-10-18 Thread Michael Felt


Michael Felt  added the comment:

On 16/10/2018 21:35, Ned Deily wrote:
> Ned Deily  added the comment:
>
> I'm glad it works.  Any object to closing this issue then?
I have no objection. Should I do that?
>
> --
> resolution:  -> not a bug
> stage:  -> resolved
> status: open -> pending
>
> ___
> Python tracker 
> 
> ___
>

--
status: pending -> open

___
Python tracker 

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



[issue34988] Rc2 candidates: "gcc" not found on AIX

2018-10-18 Thread Ned Deily


Ned Deily  added the comment:

Done, thanks!

--
status: open -> closed

___
Python tracker 

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



[issue35021] Assertion failures in datetimemodule.c.

2018-10-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue35015] availability directive breaks po files

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

Hum, the english HTML rendering looks good to me:
https://docs.python.org/dev/library/os.html#os.spawnvpe

So only the PO files are broken, right?

--

___
Python tracker 

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



[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread STINNER Victor


STINNER Victor  added the comment:

functools.partial objects have no __qualname__ attribute, but they don't have a 
__name__ attribute neither.

$ python3
Python 3.6.6 (default, Jul 19 2018, 14:25:17) 
>>> import functools
>>> func=int
>>> p=functools.partial(func)
>>> p.__name__
AttributeError: 'functools.partial' object has no attribute '__name__'
>>> p.__qualname__
AttributeError: 'functools.partial' object has no attribute '__qualname__'
>>> repr(p)
"functools.partial()"

If you want to "inherit" the name of the "wrapped function", you may use: 
functools.update_wrapper().

I'm not sure that it's correct to inherit the name by default. 
functools.partial() creates a new function, so if it has a name, for me, it 
should be different.

I agree to close the issue, it's not a bug.

--
nosy: +vstinner

___
Python tracker 

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



[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue32174] nonASCII punctuation characters can not display in python363.chm.

2018-10-18 Thread Matej Cepl


Matej Cepl  added the comment:

It seems to me that this adds escape4chm as unconditional dependency on all 
platforms. Which seems like a bad idea to me, I don't think users on Linux or 
Mac OS X are that keen on *.chm files.

I think this change broke my build of python3-doc package on openSUSE (which 
built until now absolutely perfectly).

I don't even know, where the escape4chm plugin comes from. ???

--
nosy: +mcepl
Added file: https://bugs.python.org/file47881/python3-doc-3-7-rc2-log.txt

___
Python tracker 

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



[issue34475] functools.partial objects have no __qualname__ attribute

2018-10-18 Thread Chris Jerdonek


Chris Jerdonek  added the comment:

Sorry, I'm out of practice. I thought I closed this when I marked it rejected.

--

___
Python tracker 

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



[issue32174] nonASCII punctuation characters can not display in python363.chm.

2018-10-18 Thread Zachary Ware


Zachary Ware  added the comment:

What version of Python are you running Sphinx with?  Your error is that 
`html.entities` does not exist, which makes it sound like Python 2; bump it to 
Python 3 and you'll be fine.

--

___
Python tracker 

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



[issue28053] parameterize what serialization is used in multiprocessing

2018-10-18 Thread Pablo Galindo Salgado


Change by Pablo Galindo Salgado :


--
pull_requests: +9306

___
Python tracker 

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



[issue35016] \r to match add into address header with not-ascii character

2018-10-18 Thread R. David Murray


R. David Murray  added the comment:

Thanks for the report and patch, but this is a duplicate of #34424.  Your 
report prompted me to finally review the PR in that issue, though, so thanks 
twice :)

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



[issue26441] email.charset: to_splittable and from_splittable are not there anymore!

2018-10-18 Thread R. David Murray


R. David Murray  added the comment:


New changeset 5be00247ae0de2e24dd14bbe4d9ca159434a1710 by R. David Murray 
(Braden Groom) in branch 'master':
bpo-26441: Remove documentation for deleted to_splittable and from_splittable 
methods (#9865)
https://github.com/python/cpython/commit/5be00247ae0de2e24dd14bbe4d9ca159434a1710


--

___
Python tracker 

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



[issue26441] email.charset: to_splittable and from_splittable are not there anymore!

2018-10-18 Thread R. David Murray


R. David Murray  added the comment:

Thanks, Braden.

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



[issue31522] _mboxMMDF.get_string() fails to pass param to get_bytes()

2018-10-18 Thread R. David Murray


R. David Murray  added the comment:


New changeset d16f012f842e5719ff9fb90e217efc0f795853f2 by R. David Murray 
(Cheryl Sabella) in branch 'master':
bpo-31522: mailbox.get_string: pass `from_` parameter to `get_bytes` (#9857)
https://github.com/python/cpython/commit/d16f012f842e5719ff9fb90e217efc0f795853f2


--

___
Python tracker 

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



[issue35022] MagicMock should support `__fspath__`

2018-10-18 Thread Maxime Belanger


New submission from Maxime Belanger :

We have plenty of tests calling into `os.path.*` functions, and as Python 3.6+ 
gets more stringent about checking for `os.PathLike` compliance, it would 
greatly simplify our lives for `MagicMock` to support `__fspath__`.

--
components: Library (Lib)
messages: 328014
nosy: Maxime Belanger
priority: normal
severity: normal
status: open
title: MagicMock should support `__fspath__`
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



[issue35022] MagicMock should support `__fspath__`

2018-10-18 Thread Max Bélanger

Change by Max Bélanger :


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

___
Python tracker 

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



  1   2   >