[issue34414] Absolute imports conflict with local files

2018-08-17 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This has nothing to do with absolute imports at all.

You have two toplevel modules in an entry on sys.path that is before the stdlib 
(see the earlier message by Eric V. Smit for documentation on how the path is 
initialised). The name of one of those modules shadows the name of a stdlib 
module.

Absolute imports are what avoids a similar problem in another situation. Given:

   foo/
 __init__.py
 a.py
 math.py

When you import "foo.a" the code in "a.py" is executed as a module in package. 
When that code does "import math" absolute imports ensure that this always 
references the stdlib version, not the module in the package. Module "foo.a" 
should use "from . import math" (relative import) or "import foo.math" 
(absolute import) to access functionality in foo.math.

Again, this is not a bug but normal behaviour.

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



[issue34413] Porting section of 3.5 "What's New" doc does not mention bytecode changes.

2018-08-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I don't think this needs to be exposed in What's New. This is a very low level 
implementation detail and isn't interested for most users. I think it would 
just distract attention from more significant changes.

But it may be worth to document this change in the NEWS file.

Changes in BUILD_MAP affected more users and also was not mentioned in the NEWS 
file. It was documented in the dis module documentation only in issue26213.

--

___
Python tracker 

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



[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread Sebastian Rittau


New submission from Sebastian Rittau :

The documentation at 
https://docs.python.org/3/library/urllib.request.html#urllib.request.HTTPErrorProcessor
 does not list the two arguments "request" and "response" that 
HTTPErrorProcessor.http_response() and https_response() actually require. (I 
checked the implementation in Python 3.5 and 3.7.)

--
assignee: docs@python
components: Documentation
messages: 323638
nosy: docs@python, srittau
priority: normal
severity: normal
status: open
title: Arguments missing from documentation for 
HTTPErrorProcessor.http(s)_response()
versions: Python 3.5, Python 3.7

___
Python tracker 

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



[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread Sebastian Rittau


Change by Sebastian Rittau :


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

___
Python tracker 

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



[issue20104] expose posix_spawn(p)

2018-08-17 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Benjamin, Gregory, could you please look at PR 6693? Is it what you want?

--

___
Python tracker 

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



[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset 02c4d4b6dcd772ec3a7fdca517118f3fa53b0b88 by Berker Peksag (Miss 
Islington (bot)) in branch '3.6':
bpo-34418: Fix HTTPErrorProcessor documentation (GH-8793)
https://github.com/python/cpython/commit/02c4d4b6dcd772ec3a7fdca517118f3fa53b0b88


--

___
Python tracker 

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



[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread Berker Peksag


Berker Peksag  added the comment:

Thanks for the report and for the patch! 3.5 is in security-fix-only mode, so 
it doesn't get documentation fixes anymore.

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
type:  -> behavior
versions: +Python 3.6, Python 3.8 -Python 3.5

___
Python tracker 

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-08-17 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
pull_requests: +8272

___
Python tracker 

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



[issue34414] Absolute imports conflict with local files

2018-08-17 Thread Jonathan Hadida


Jonathan Hadida  added the comment:

With regards to "This has nothing to do with absolute imports at all.", I would 
like to point out that the "import math" statement that I am complaining about 
IS WITHIN THE NUMPY MODULE. So it seems very related to this bug.

How can "import math", **written within NumPy**, be an absolute import if I 
import numpy from within my own module, but not from a script?  According to 
your example, NumPy shouldn't have any issue loading the standard math module 
instead of my local file.

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

___
Python tracker 

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



[issue34414] Absolute imports conflict with local files

2018-08-17 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

This behaviour is not a bug, even if it can be confusing at times.

Please read .

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

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


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

___
Python tracker 

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



[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8269

___
Python tracker 

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



[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread Berker Peksag


Berker Peksag  added the comment:


New changeset c53aaec793e018edef4e72a3edbd338b10db10aa by Berker Peksag 
(Sebastian Rittau) in branch 'master':
bpo-34418: Fix HTTPErrorProcessor documentation (GH-8793)
https://github.com/python/cpython/commit/c53aaec793e018edef4e72a3edbd338b10db10aa


--
nosy: +berker.peksag

___
Python tracker 

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



[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8270

___
Python tracker 

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

A PR is in preparation.

--

___
Python tracker 

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



[issue34418] Arguments missing from documentation for HTTPErrorProcessor.http(s)_response()

2018-08-17 Thread miss-islington


miss-islington  added the comment:


New changeset 05d89ef785ab3cb6dd28f10f312f68f8e6a163ce by Miss Islington (bot) 
in branch '3.7':
bpo-34418: Fix HTTPErrorProcessor documentation (GH-8793)
https://github.com/python/cpython/commit/05d89ef785ab3cb6dd28f10f312f68f8e6a163ce


--
nosy: +miss-islington

___
Python tracker 

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



[issue34414] Absolute imports conflict with local files

2018-08-17 Thread Jonathan Hadida


Jonathan Hadida  added the comment:

Thanks again for your reply, I really appreciate your time.

Every language I know has reserved keywords, and a restricted syntax. Nothing 
to complain about there. Banning the use of tabs (PEP8) is pretty odd; but 
restricting file-names is just a whole new level. 

Is the list of python modules set in stone somewhere, or are we supposed to 
rename scripts every time a new module with a conflicting name is introduced?

Should we start checking for the authenticity of the modules loaded when 
writing a Python library? Maybe keep a version-specific, platform-specific list 
of checksums and iterate all builtin modules at the beginning of any script?

Not being able to tell whether "import math" will load the standard math 
module, not only because of the names of local files, **but also because of 
those surrounding ANY script that will ever load my library**; are we supposed 
to control for the user's folders too then? I would happily stop complaining 
and just reverse sys.path at the beginning of my script if I could, but I 
cannot even trust that "import sys" will work as intended!

What a feature.

--

___
Python tracker 

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee

2018-08-17 Thread Michael Osipov


New submission from Michael Osipov <1983-01...@gmx.net>:

It seems like an oversight of the author, though it is not clear why this 
happily compiles with clang 3.4.1 on FreeBSD 10.4-STABLE and GCC on RHEL6.

The error is (HP-UX 11.31 and HP C/aC++ B3910B A.06.28.03 [Dec 13 2016]):

> /opt/aCC/bin/cc -Ae +z -O -I./Include -I. -I/usr/local/include 
> -I/var/osipovmi/cpython/Include -I/var/osipovmi/cpython -c 
> /var/osipovmi/cpython/Modules/selectmodule.c -o 
> build/temp.hp-ux-B.11.31-ia64-3.8-pydebug/var/osipovmi/cpython/Modules/selectmodule.o
> "/var/osipovmi/cpython/Modules/selectmodule.c", line 412: warning #4232-D:
>   conversion from "PyObject *" to a more strictly aligned type
>   "PyDictObject *" may cause misaligned access
>   self->ufd_len = PyDict_GET_SIZE(self->dict);
>   ^
> 
> "/var/osipovmi/cpython/Modules/selectmodule.c", line 849: error #2130:
>   expected a "{"
>   static PyObject *
>   ^
> 
> "/var/osipovmi/cpython/Modules/selectmodule.c", line 898: error #2101:
>   "timeout_obj" has already been declared in the current scope
>   PyObject *result_list = NULL, *timeout_obj = NULL;
>  ^
> 
> 2 errors detected in the compilation of 
> "/var/osipovmi/cpython/Modules/selectmodule.c".


caused by:

> +static PyObject *
> +select_devpoll_modify_impl(devpollObject *self, int fd,
> +   unsigned short eventmask)
> +/*[clinic end generated code: output=bc2e6d23aaff98b4 
> input=f0d7de3889cc55fb]*/
>  static PyObject *
>  devpoll_modify(devpollObject *self, PyObject *args)
>  {
> -return internal_devpoll_register(self, args, 1);
> +return internal_devpoll_register(self, fd, eventmask, 1);
>  }

Signature change, but prototype has not been changed.

>  static PyObject *
> -poll_poll(pollObject *self, PyObject *args)
> +select_poll_poll_impl(pollObject *self, PyObject *timeout_obj)
> +/*[clinic end generated code: output=876e837d193ed7e4 
> input=7a446ed45189e894]*/
>  {
> -PyObject *result_list = NULL, *timeout_obj = NULL;
> +PyObject *result_list = NULL;
>  int poll_result, i, j;
>  PyObject *value = NULL, *num = NULL;
>  _PyTime_t timeout = -1, ms = -1, deadline = 0;
>  int async_err = 0;
> 
> -if (!PyArg_ParseTuple(args, "|O:poll", _obj)) {
> -return NULL;
> -}
> -
> -if (timeout_obj != NULL && timeout_obj != Py_None) {
> +if (timeout_obj != Py_None) {

timeout_obj has been added to the function signature, but the internal NULL 
assignment has not been removed.

--
components: Build, Library (Lib)
messages: 323640
nosy: michael-o
priority: normal
severity: normal
status: open
title: selectmodule.c does not compile on HP-UX due to 
bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee
type: compile error
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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Michael Osipov


Change by Michael Osipov <1983-01...@gmx.net>:


--
title: selectmodule.c does not compile on HP-UX due to 
bpo-31938/6dc57e2a20c5beb99e8bf5eb04cc836d53fa9aee -> selectmodule.c does not 
compile on HP-UX due to bpo-31938/6dc57e2a20c

___
Python tracker 

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
keywords: +easy (C)
nosy: +taleinat
stage:  -> needs patch

___
Python tracker 

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



[issue14886] json C vs pure-python implementation difference

2018-08-17 Thread Stéphane Wirtel

Stéphane Wirtel  added the comment:

We have received a notification about this bug for 3.5

--
nosy: +matrixise
versions: +Python 3.5, Python 3.6, Python 3.7, Python 3.8 -Python 2.7, Python 
3.2, Python 3.3

___
Python tracker 

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Tal Einat


Tal Einat  added the comment:


New changeset 0e6e7a1e52a53090e33ebef13f8f1fbe9bec2375 by Tal Einat (Michael 
Osipov) in branch 'master':
bpo-34419: selectmodule.c does not compile on HP-UX due to bpo-31938 (GH-8796)
https://github.com/python/cpython/commit/0e6e7a1e52a53090e33ebef13f8f1fbe9bec2375


--

___
Python tracker 

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



[issue31938] Convert selectmodule.c to Argument Clinic

2018-08-17 Thread Tal Einat


Tal Einat  added the comment:


New changeset 0e6e7a1e52a53090e33ebef13f8f1fbe9bec2375 by Tal Einat (Michael 
Osipov) in branch 'master':
bpo-34419: selectmodule.c does not compile on HP-UX due to bpo-31938 (GH-8796)
https://github.com/python/cpython/commit/0e6e7a1e52a53090e33ebef13f8f1fbe9bec2375


--

___
Python tracker 

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Tal Einat


Tal Einat  added the comment:

Michael, thanks for catching this and supplying a PR!

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



[issue34419] selectmodule.c does not compile on HP-UX due to bpo-31938/6dc57e2a20c

2018-08-17 Thread Michael Osipov


Michael Osipov <1983-01...@gmx.net> added the comment:

Bevakasha!

--

___
Python tracker 

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



[issue14886] json C vs pure-python implementation difference

2018-08-17 Thread Stefan Behnel


Stefan Behnel  added the comment:

FWIW, the C implementation of the sequence encoder uses PySequence_Fast(), so 
adding a lower priority instance check that calls the same encoding function 
would solve this.

https://github.com/python/cpython/blob/cfa797c0681b7fef47cf93955fd06b54ddd09a7f/Modules/_json.c#L1730

Probably not something to fix in Py3.5/6 anymore, though.

--
nosy: +scoder
versions:  -Python 3.5, Python 3.6

___
Python tracker 

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



[issue19050] [Windows] fflush called on pointer to potentially closed file

2018-08-17 Thread Tal Einat


Tal Einat  added the comment:

I agree this should probably be ignored for security-only branches.  However, 
AFAIK 2.7 is still in bugfix status, not security-only.  If there's interest, 
I'm happy to build with AMK's fix on 2.7 on Windows to see if it works, and if 
so provide a PR.

--
nosy: +taleinat

___
Python tracker 

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



[issue28113] Remove Py_CreateSymbolicLinkW

2018-08-17 Thread Berker Peksag


Berker Peksag  added the comment:

Eryk, would you like to address Steve's comments and convert your patch to a 
GitHub pull request? Let me know if you don't have time to prepare a new patch.

--
nosy: +berker.peksag
versions:  -Python 3.6, Python 3.7

___
Python tracker 

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



[issue28113] Remove Py_CreateSymbolicLinkW

2018-08-17 Thread Steve Dower


Steve Dower  added the comment:

One other thing, I have come across some CI configurations recently where TEMP 
is not the best choice (e.g. when it's a mount point in a VM/container). It 
seems likely that at some point we'll centralize the "working directory" for 
the test suite in a way that can be overridden easily, so using one of the 
test.support members instead of %TEMP% directly will make that easier.

--

___
Python tracker 

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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2018-08-17 Thread Matej Cepl


Change by Matej Cepl :


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



[issue23847] Add xml pretty print option to ElementTree

2018-08-17 Thread Matej Cepl


Change by Matej Cepl :


--
versions: +Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34416] PyCapsule_Import seems to release the GIL without acquiring it

2018-08-17 Thread Paul Ganssle


Paul Ganssle  added the comment:

> It does not seem to me that two threads have the GIL at the same time.

To be clear, this was never my contention. I was under the impression that if 
you take the GIL with PyGILState_Ensure(), the GIL was held until you called 
PyGILState_Release(), as with a traditional lock, so I was puzzled as to why 
Thread 2 was *releasing* the GIL even though I had very much not released it.

>From our discussion off the issue tracker, it seems that your contention is 
>that any C API calls can arbitrarily release the GIL, and the calling function 
>can not be said to "hold" the GIL. If this is true than this is not a bug and 
>can be closed.

--

___
Python tracker 

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



[issue34420] Complete your registration to Python tracker -- keysnSwaZe6PtikiEZf4bdIXIiuwFyFZFxp

2018-08-17 Thread Berker Peksag


Change by Berker Peksag :


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



[issue34420] Complete your registration to Python tracker -- keysnSwaZe6PtikiEZf4bdIXIiuwFyFZFxp

2018-08-17 Thread sai arjun


New submission from sai arjun :

I have received the email.

Sent from Mail for Windows 10

From: Python tracker
Sent: 16 August 2018 17:08
To: venkkar...@yahoo.com
Subject: Complete your registration to Python tracker -- 
keysnSwaZe6PtikiEZf4bdIXIiuwFyFZFxp

To complete your registration of the user "arjun" with
Python tracker, please do one of the following:

- send a reply to rep...@bugs.python.org and maintain the subject line as is 
(the
reply's additional "Re:" is ok),

- or visit the following URL:

https://bugs.python.org/?@action=confrego=snSwaZe6PtikiEZf4bdIXIiuwFyFZFxp

--
messages: 323657
nosy: arjun
priority: normal
severity: normal
status: open
title: Complete your registration to Python tracker -- 
keysnSwaZe6PtikiEZf4bdIXIiuwFyFZFxp

___
Python tracker 

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



[issue34421] Cannot install package with unicode module names on Windows

2018-08-17 Thread Julien Malard


Change by Julien Malard :


--
components: Distutils
nosy: dstufft, eric.araujo, julien.malard
priority: normal
severity: normal
status: open
title: Cannot install package with unicode module names on Windows
type: crash
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



[issue34200] importlib: python -m test test_pkg -m test_7 fails randomly

2018-08-17 Thread Brett Cannon


Brett Cannon  added the comment:

I can't reproduce with master on macOS.

--

___
Python tracker 

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



[issue33939] Provide a robust O(1) mechanism to check for infinite iterators

2018-08-17 Thread Koos Zevenhoven


Koos Zevenhoven  added the comment:

I'd say there are three different problems related to this:

(1) The inability of infinite iterators/iterables to say anything about their 
length

(2) The inability to interrupt C-level loops

(3) The horrible consequences of things like list(itertools.count()) that fill 
up the memory


The problems overlap only partially. Unfortunately, fixing any single one of 
these problems does not eliminate the two others. For example, (2) and (3) may 
happen just as well without the iterator protocol being involved. And (1) may 
just prevent you from checking if the iterable has enough elements for whatever 
you're doing.

--
nosy: +koos.zevenhoven

___
Python tracker 

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



[issue34417] imp.find_module reacts badly to iterator

2018-08-17 Thread Eric Snow


Eric Snow  added the comment:

There are several issues at hand here, Phillip.  I'll enumerate them below.

Thanks for taking the time to let us know about this.  However, I'm closing 
this issue since realistically the behavior of imp.find_module() isn't going to 
change, particularly in Python 2.7.  Even though the issue is closed, feel free 
to reply, particularly about how you are using imp.find_module() (we may be 
able to point you toward how to use importlib instead).

Also, I've changed this issue's type to "enhancement".  imp.find_module() is 
working as designed, so what you are looking for is a feature request.  
Consequently there's a much higher bar for justifying a change.  Here are 
reasons why the requested change doesn't reach that bar:

1. Python 2.7 is closed to new features.

So imp.find_module() is not going to change.

2. Python 2.7 is nearing EOL.

We highly recommend that everyone move to Python 3 as soon as possible.  
Hopefully you are in a position to do so.  If you're stuck on Python 2.7 then 
you miss the advantages of importlib, along with a ton of other benefits.

If you are not going to be able to migrate before 2020 then send an email to 
python-l...@python.org asking for recommendations on what to do.

3. Starting in Python 3.4, using the imp module is discouraged/deprecated.

  "Deprecated since version 3.4: The imp package is pending deprecation in 
favor of importlib." [1]

The importlib package should have everything you need.  What are you using 
imp.find_module() for?  We should be able to demonstrate the equivalent using 
importlib.

4. The import machinery is designed around using a list (the builtin type, not 
the concept) for the "module search path".

* imp.find_module(): "the list of directory names given by sys.path is 
searched" [2]
* imp.find_module(): "Otherwise, path must be a list of directory names" [2]
* importlib.find_loader() (deprecated): "optionally within the specified path" 
(which defaults to sys.path) [3]
* importlib.util.find_spec(): doesn't even have a "path" parameter [4]
* ModuleSpec.submodule_search_locations: "List of strings for where to find 
submodules" [5]
* sys.path: "A list of strings that specifies the search path for modules. ... 
Only strings and bytes should be added to sys.path; all other data types are 
ignored during import." [6]


[1] https://docs.python.org/3/library/imp.html#module-imp
[2] https://docs.python.org/3/library/imp.html#imp.find_module
[3] https://docs.python.org/3/library/importlib.html#importlib.find_loader
[4] https://docs.python.org/3/library/importlib.html#importlib.util.find_spec
[5] 
https://docs.python.org/3/library/importlib.html#importlib.machinery.ModuleSpec.submodule_search_locations
[6] https://docs.python.org/3/library/sys.html#sys.path

--
nosy: +brett.cannon, eric.snow
resolution:  -> wont fix
stage:  -> resolved
status: open -> closed
type: behavior -> enhancement

___
Python tracker 

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



[issue34416] PyCapsule_Import seems to release the GIL without acquiring it

2018-08-17 Thread Brett Cannon


Brett Cannon  added the comment:

"From our discussion off the issue tracker, it seems that your contention is 
that any C API calls can arbitrarily release the GIL, and the calling function 
can not be said to "hold" the GIL. If this is true than this is not a bug and 
can be closed."

Correct, because the GIL is a global lock for the whole process, anyone can 
release it and then acquire it, leading to interleaving and no one owning their 
locking of it.

--
nosy: +brett.cannon
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



[issue34422] __name__ not available for classes in typing module

2018-08-17 Thread Gabriel Tremblay


New submission from Gabriel Tremblay :

Types under the typing module used to behave like other python classes 
regarding the __name__ attribute before Python 3.7. The behavior seems to have 
changed to a non-standard way.

Py3.6 
>>> from typing import List
>>> dir(List)
['__abstractmethods__', '__add__', '__args__', '__class__', '__contains__', 
'__delattr__', '__delitem__', 
'__dir__', '__doc__', '__eq__', '__extra__', '__format__', '__ge__', 
'__getattribute__', '__getitem__', '_
_gt__', '__hash__', '__iadd__', '__imul__', '__init__', '__init_subclass__', 
'__iter__', '__le__', '__len_
_', '__lt__', '__module__', '__mul__', '__ne__', '__new__', '__next_in_mro__', 
'__orig_bases__', '__origin
__', '__parameters__', '__reduce__', '__reduce_ex__', '__repr__', 
'__reversed__', '__rmul__', '__setattr__
', '__setitem__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', 
'__tree_hash__', '_abc_cache',
 '_abc_negative_cache', '_abc_negative_cache_version', '_abc_registry', 
'append', 'clear', 'copy', 'count'
, 'extend', 'index', 'insert', 'pop', 'remove', 'reverse', 'sort']
>>> List.__name__
'List'


Py3.7:
>>> from typing import List
>>> dir(List)
['__args__', '__call__', '__class__', '__delattr__', '__dict__', '__dir__', 
'__doc__', '__eq__', '__format__', '__ge__', '__getattr__', '__getattribute__', 
'__getitem__', '__gt__', '__hash__', '__init__', '__init_subclass__', 
'__instancecheck__', '__le__', '__lt__', '__module__', '__mro_entries__', 
'__ne__', '__new__', '__origin__', '__parameters__', '__reduce__', 
'__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', 
'__str__', '__subclasscheck__', '__subclasshook__', '__weakref__', '_inst', 
'_name', '_special', 'copy_with']
>>> List.__name__
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.7/typing.py", line 699, in __getattr__
raise AttributeError(attr)
AttributeError: __name__
>>> List._name
'List'

--
components: Interpreter Core
messages: 323663
nosy: Gabriel Tremblay
priority: normal
severity: normal
status: open
title: __name__ not available for classes in typing module
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue34365] datetime's documentation refers to "comparison [...] falling back to the default scheme of comparing object addresses"

2018-08-17 Thread Steve Dower


Change by Steve Dower :


--
keywords: +easy
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue34408] possible null pointer dereference in pystate.c

2018-08-17 Thread Steve Dower


Change by Steve Dower :


--
nosy: +eric.snow, vstinner

___
Python tracker 

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



[issue34421] Cannot install package with unicode module names on Windows

2018-08-17 Thread Julien Malard


Change by Julien Malard :


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

___
Python tracker 

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



[issue20849] add exist_ok to shutil.copytree

2018-08-17 Thread Joshua Bronson


Change by Joshua Bronson :


--
nosy: +jab

___
Python tracker 

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2018-08-17 Thread R. David Murray


R. David Murray  added the comment:

check out https://devguide.python.org.  (Basically, banch and generate a PR on 
github).  And please open a new issue for this.

--

___
Python tracker 

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



[issue20849] add exist_ok to shutil.copytree

2018-08-17 Thread Joshua Bronson


Joshua Bronson  added the comment:

I submitted a new PR in https://github.com/python/cpython/pull/8792 that 
addresses the outstanding concerns in @ofekmeister's original PR. It includes 
passing tests and passes all the GitHub PR status checks. Does it look ok to 
merge? Thanks.

--

___
Python tracker 

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



[issue32367] [Security] CVE-2017-17522: webbrowser.py in Python does not validate strings

2018-08-17 Thread Michał Radwański

Change by Michał Radwański :


--
pull_requests: +8277

___
Python tracker 

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



[issue29386] select.epoll.poll may behave differently if timeout = -1 vs timeout = None

2018-08-17 Thread Berker Peksag


Berker Peksag  added the comment:

Thanks for the report.

Looking at the Kernel source code, there doesn't seem to be any difference 
between -1, -100, or -255: 
https://github.com/torvalds/linux/blob/9bd553929f68921be0f2014dd06561e0c8249a0d/fs/eventpoll.c#L1747-L1761

Do you know any other OS that implements or mimicks epoll() other than Illumos? 
Since 
https://github.com/joyent/illumos-joyent/commit/d21b3b2e1bbefbd2f6158ed5d329cd58f86677ab,
 Illumos follows Linux's behavior, so I'm not sure whether we should do 
something similar to 
https://github.com/python/cpython/commit/6cfa927ceb931ad968b5b03e4a2bffb64a8a0604
 for epoll.poll().

--
nosy: +berker.peksag
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue34415] Typo in logging.Formatter docstring

2018-08-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The default format depends on the style.  From 3.8:

class Formatter()
   
def __init__(self, fmt=None, datefmt=None, style='%'):
...
self._fmt = self._style._fmt

It appears that the class docstring was not updated when the style parameter 
was added, in 3.2.  So I think more change is needed.  I will try to make a 
proposal later.

--
nosy: +terry.reedy, vinay.sajip

___
Python tracker 

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



[issue24218] Also support SMTPUTF8 in smtplib's send_message method.

2018-08-17 Thread Jens Troeger


Jens Troeger  added the comment:

New issue: https://bugs.python.org/issue34424

--

___
Python tracker 

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



[issue34424] Unicode names break email header

2018-08-17 Thread Jens Troeger

New submission from Jens Troeger :

See also this comment and ensuing conversation: 
https://bugs.python.org/issue24218?#msg322761

Consider an email message with the following:

message = EmailMessage()
message["From"] = Address(addr_spec="b...@foo.com", display_name="Jens Troeger")
message["To"] = Address(addr_spec="f...@bar.com", display_name="Martín Córdoba")

It’s important here that the email itself is `ascii` encodable, but the names 
are not. Flattening the object 
(https://github.com/python/cpython/blob/master/Lib/smtplib.py#L964) incorrectly 
inserts multiple linefeeds, thus breaking the email header, thus mangling the 
entire email:

flatmsg: b'From: Jens Troeger \r\nTo: Fernando 
=?utf-8?q?Mart=C3=ADn_C=C3=B3rdoba?= \r\r\r\r\r\nSubject:\r\n 
Confirmation: …\r\n…'

After an initial investigation into the BytesGenerator (used to flatten an 
EmailMessage object), here is what’s happening.

Flattening the body and attachments of the EmailMessage object works, and 
eventually _write_headers() is called to flatten the headers which happens 
entry by entry 
(https://github.com/python/cpython/blob/master/Lib/email/generator.py#L417-L418).
 Flattening a header entry is a recursive process over the parse tree of the 
entry, which builds the flattened and encoded final string by descending into 
the parse tree and encoding & concatenating the individual “parts” (tokens of 
the header entry).

Given the parse tree for a header entry like "Martín Córdoba " 
eventually results in the correct flattened string:

'=?utf-8?q?Mart=C3=ADn_C=C3=B3rdoba?= \r\n'

at the bottom of the recursion for this “Mailbox” part. The recursive callstack 
is then:

_refold_parse_tree _header_value_parser.py:2687
fold [Mailbox] _header_value_parser.py:144
_refold_parse_tree _header_value_parser.py:2630
fold [Address] _header_value_parser.py:144
_refold_parse_tree _header_value_parser.py:2630
fold [AddressList] _header_value_parser.py:144
_refold_parse_tree _header_value_parser.py:2630
fold [Header] _header_value_parser.py:144
fold [_UniqueAddressHeader] headerregistry.py:258
_fold [EmailPolicy] policy.py:205
fold_binary [EmailPolicy] policy.py:199
_write_headers [BytesGenerator] generator.py:418
_write [BytesGenerator] generator.py:195

The problem now arises from the interplay of 

# 
https://github.com/python/cpython/blob/master/Lib/email/_header_value_parser.py#L2629
encoded_part = part.fold(policy=policy)[:-1] # strip nl

which strips the '\n' from the returned string, and

# 
https://github.com/python/cpython/blob/master/Lib/email/_header_value_parser.py#L2686
return policy.linesep.join(lines) + policy.linesep

which adds the policy’s line separation string linesep="\r\n" to the end of the 
flattened string upon unrolling the recursion.

I am not sure about a proper fix here, but considering that the linesep policy 
can be any string length (in this case len("\r\n") == 2) a fixed truncation of 
one character [:-1] seems wrong. Instead, using:

encoded_part = part.fold(policy=policy)[:-len(policy.linesep)] # strip nl

seems to work for entries with and without Unicode characters in their display 
names.

--
components: email
messages: 323686
nosy: _savage, barry, r.david.murray
priority: normal
severity: normal
status: open
title: Unicode names break email header
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue34425] :s formatting broken for objects without __format__

2018-08-17 Thread Jason Spencer


New submission from Jason Spencer :

Objects with __str__ but WITHOUT __format__ are string-convertible and 
default-to-str formattable.  But the explicit use of '{:s}' as a format string 
fails to format these objects as expected.  Either it is no longer the case 
that '{}' and '{:s}' are equivalent format strings, or formatting for {:s} is 
broken.  Users would not expect the following to be true.

(Tested in 3.5.3 and 3.6.  Maybe be the same in later releases.)

Python 3.5.3 (default, Jan 19 2017, 14:11:04) 
[GCC 6.3.0 20170118] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> class Coord:
...   def __init__(self, a, b):
... self.a=a
... self.b=b
...   def __str__(self):
... return '{:d}:{:d}'.format(self.a, self.b)
... 
>>> c = Coord(3,4)
>>> str(c)
'3:4'
>>> '{:s}'.format(c)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: unsupported format string passed to Coord.__format__
>>> '{}'.format(c)
'3:4'
>>> '{!s:s}'.format(c)
'3:4'
>>>

--
components: Interpreter Core
messages: 323688
nosy: Jason Spencer
priority: normal
severity: normal
status: open
title: :s formatting broken for objects without __format__
type: behavior
versions: Python 3.5, Python 3.6

___
Python tracker 

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



[issue24011] Add error checks to PyInit_signal()

2018-08-17 Thread Berker Peksag


Berker Peksag  added the comment:

All of the PyModule_AddIntMacro() changes have already been applied in 
https://github.com/python/cpython/commit/6782b14bcba612e4a39e41992c77306217b91e30.

The remaining parts are:

-x = PyLong_FromLong((long)NSIG);
-if (!x || PyDict_SetItemString(d, "NSIG", x) < 0)
+if (PyModule_AddIntMacro(m, NSIG))
 goto finally;
-Py_DECREF(x);

---

- PyExc_IOError, NULL);
-if (ItimerError != NULL)
-PyDict_SetItemString(d, "ItimerError", ItimerError);
+ PyExc_IOError, NULL);
+if (PyModule_AddObject(m, "ItimerError", ItimerError))
+goto finally;

--
nosy: +berker.peksag

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread miss-islington


miss-islington  added the comment:


New changeset 4d4d23d8317fbc95eec789f349dd1db4c0b24fc3 by Miss Islington (bot) 
in branch '3.6':
bpo-34381: refer to 'Running & Writing Tests' in README.rst (GH-8797)
https://github.com/python/cpython/commit/4d4d23d8317fbc95eec789f349dd1db4c0b24fc3


--
nosy: +miss-islington

___
Python tracker 

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



[issue34188] Allow dict choices to "transform" values in argpagse

2018-08-17 Thread Matthijs Kooijman


Matthijs Kooijman  added the comment:

One way to make the original example from Victor work, is to use the following 
action class:

  class ConvertChoices(argparse.Action):
 
  """   
 
  Argparse action that interprets the `choices` argument as a dict  
  
  mapping the user-specified choices values to the resulting option 
  
  values.   
 
  """   
 
  def __init__(self, *args, choices, **kwargs): 
  
  super().__init__(*args, choices=choices.keys(), **kwargs) 
  
  self.mapping = choices
 

 
  def __call__(self, parser, namespace, value, option_string=None): 
  
  setattr(namespace, self.dest, self.mapping[value])

--

___
Python tracker 

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



[issue34407] datetime.time.isoformat function has inconsistent behavior with timezone

2018-08-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
nosy: +belopolsky
versions:  -Python 3.4, Python 3.5

___
Python tracker 

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



[issue34423] Overflow when casting from double to time_t, and_PyTime_t.

2018-08-17 Thread Michał Radwański

Change by Michał Radwański :


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

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8276

___
Python tracker 

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



[issue34391] test_ftplib is failing with TLS 1.3

2018-08-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Is there more to do on this?  Tests pass on Windows with 1 skip, but I don't 
know if the failure condition applies here.
test_check_hostname (test.test_ftplib.TestTLS_FTPClass) ... skipped 'FIXME: 
bpo-32706'

--
nosy: +terry.reedy

___
Python tracker 

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



[issue24010] Add error checks to PyInit__locale()

2018-08-17 Thread Berker Peksag


Berker Peksag  added the comment:

A variant of localemodule.patch without error checking for 
PyModule_AddIntMacro() has been applied in 
https://github.com/python/cpython/commit/ff4fddde57d5579dff3a83d99e20cd06366b10d6.

Christian, can this be closed or do we still need to add error checking to all 
PyModule_AddIntMacro() usages?

--
nosy: +berker.peksag

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
assignee:  -> terry.reedy
components: +Documentation
versions: +Python 2.7, Python 3.6, Python 3.8

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8275

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset cae8ff93a696aa7d74562a9eeaf27afac1f181b4 by Terry Jan Reedy 
(Michael Osipov) in branch 'master':
bpo-34381: refer to 'Running & Writing Tests' in README.rst (GH-8797)
https://github.com/python/cpython/commit/cae8ff93a696aa7d74562a9eeaf27afac1f181b4


--

___
Python tracker 

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



[issue34423] Overflow when casting from double to time_t, and_PyTime_t.

2018-08-17 Thread Michał Radwański

New submission from Michał Radwański :

Code triggering bug:

import time
time.sleep(2**63 / 10**9)

Result:

ValueError: sleep length must be non-negative

The problem is with the macro that checks the range of provided double:

Line 228 of Include/pymath.h:
#define _Py_InIntegralTypeRange(type, v) (_Py_IntegralTypeMin(type) <= v && v 
<= _Py_IntegralTypeMax(type))

The type here is _PyTime_t, which is a typedef to int64_t. 

Proposed solution is to change <= into <, since float(2**63-1) == float(2**63), 
and that means that none double can ever be equal to 2**63-1.

--
components: Interpreter Core
messages: 323676
nosy: belopolsky, enedil, lemburg, vstinner
priority: normal
severity: normal
status: open
title: Overflow when casting from double to time_t, and_PyTime_t.
type: behavior
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue34403] test_utf8_mode.test_cmd_line() fails on HP-UX due to false assumptions

2018-08-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

You might get more information asking questions on python-list.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34415] Typo in logging.Formatter docstring

2018-08-17 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
versions: +Python 3.8 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue34413] Porting section of 3.5 "What's New" doc does not mention bytecode changes.

2018-08-17 Thread Eric Snow


Eric Snow  added the comment:

Fair enough.  Having the note in the 3.5 docs should be fine. :)

--
resolution:  -> rejected
stage: needs patch -> 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



[issue24012] Add error checks to PyInit_pyexpat()

2018-08-17 Thread Berker Peksag


Berker Peksag  added the comment:

Some parts of the patch have already been applied into master:

* PySys_GetObject(): 
https://github.com/python/cpython/commit/7a5457b6878db61910c81017d10579edb7c91512

* PyDict_SetItem(): 
https://github.com/python/cpython/commit/3f9eee6eb4b25fe1926eaa5f00e02344b126f54d#diff-cc8b737f9996c36521d5b9db5ea1a032

The only remaining part is about PyModule_AddObject(), but there are already 
many usages of PyModule_AddObject() without doing any error checking, so I 
suggest closing this as 'outdated'.

--
nosy: +berker.peksag

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

An additional motivation for the change is that the instructions in the Testing 
section of the README are make based while the devguide section gives the OS- 
and version-specific 'python' based commands.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread miss-islington


miss-islington  added the comment:


New changeset eeece3cd331a1f57fabd55e026f2ea26bc4c by Miss Islington (bot) 
in branch '3.7':
bpo-34381: refer to 'Running & Writing Tests' in README.rst (GH-8797)
https://github.com/python/cpython/commit/eeece3cd331a1f57fabd55e026f2ea26bc4c


--

___
Python tracker 

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



[issue34401] [SOLUTION] Make test_gdb work on HP-UX

2018-08-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Why did you put '[SOLUTION]' in the title?  We do not use such conventions, and 
you provide no solution.

Why did you mark this as 'crash'?  What is the actual failure?

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34402] [SOLUTION] strftime fails on HP-UX

2018-08-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Same comment as for #34401.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34381] Make tests with outbound connection optional

2018-08-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Closing this does not preclude the optional addition and merge of a PR for 2.7.

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



[issue34382] test_os.test_mode fails when directory base directory has g+s set

2018-08-17 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

'Backport' might or might not mean 2.7. You should be able to explicitly select 
versions in the box above.  I have no idea who should review this.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue34188] Allow dict choices to "transform" values in argpagse

2018-08-17 Thread Matthijs Kooijman


Matthijs Kooijman  added the comment:

I was today trying to achieve something similar. I also considered the solution 
using `type` argument, but that does not seem to play well with the `choices` 
argument. I was going to report that as a bug, but this issue seems similar 
enough to comment here instead.

The solution proposed by Paul works, in the sense that if 'I' is passed on the 
commandline, the parsed value because `int` (the actual type, not a string, not 
sure if Paul really intended that). However, when running --help with his 
example, you get:

usage: foo.py [-h] {,}

So:
  - Since the `choices` argument is used to display help text, `choices` should 
 contain the values that should be specified on the commandline (e.g. the 
*inputs* to the `type` converter.
 - Since the *type-converted* value is checked against the `choices` argument, 
`choices` should contain the *outputs* of the `type` converter.

AFAICS these two constraints cannot be fulfilled at the same time, except when 
no type conversion happens (or, when converted values can be stringified back 
to their unconverted value, which works in simple cases, I suppose).

IMHO this looks like a bug: `type` and `choices` do not play well together. 
Checking specified values against `choices` *before* type conversion happens 
seems more sensible to me and would fix this, as well  fullfil Victor's 
original usecase (though not with the syntax he suggests).

--
nosy: +Matthijs Kooijman

___
Python tracker 

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



[issue14465] xml.etree.ElementTree: add feature to prettify XML output

2018-08-17 Thread Stefan Behnel


Stefan Behnel  added the comment:

> Serialization of ElementTree in the stdlib is much slower than in lxml (see 
> issue25881). Perhaps it should be implemented in C. But it should be kept 
> simple for this.

Should I say it? That's a first class use case for Cython.


> Pretty-printing can be implemented as an outher preprocessing operation

Agreed. And that would actually be much simpler to implement in C.

--

___
Python tracker 

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



[issue34217] windows: cross compilation fails due to headers with uppercase

2018-08-17 Thread INADA Naoki


INADA Naoki  added the comment:

I googled and checked what MSDN uses before I merged these PRs.
For example: https://msdn.microsoft.com/ja-jp/library/bb394814.aspx

--

___
Python tracker 

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



[issue34424] Unicode names break email header

2018-08-17 Thread Jens Troeger


Jens Troeger  added the comment:

Pull request https://github.com/python/cpython/pull/8803/

--

___
Python tracker 

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



[issue34424] Unicode names break email header

2018-08-17 Thread Roundup Robot


Change by Roundup Robot :


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

___
Python tracker 

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



[issue34425] :s formatting broken for objects without __format__

2018-08-17 Thread Martin Panter


Martin Panter  added the comment:

It looks like you are describing the result of Issue 7994. Documentation:

https://docs.python.org/release/3.5.3/reference/datamodel.html#object.__format__
https://docs.python.org/release/3.5.3/whatsnew/3.4.html#api-and-feature-removals

--
nosy: +martin.panter
resolution:  -> not a bug
status: open -> pending
superseder:  -> object.__format__ should reject format strings

___
Python tracker 

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



[issue34426] "__lltrace__" seems to be wrong , "__ltrace__" is correct in Misc/SpecialBuilds.txt

2018-08-17 Thread Nojima Takahide


New submission from Nojima Takahide :

In the Section "LLTRACE" of $(Python3.6-source)/Misc/SpecialBuilds.txt , it 
describes variable name is "__lltrace__",however it seems to be wrong, 
"__ltrace__" is correct. Would someone correct this document?

--
assignee: docs@python
components: Documentation
messages: 323692
nosy: Nojima Takahide, docs@python
priority: normal
severity: normal
status: open
title: "__lltrace__"  seems to be wrong , "__ltrace__" is correct in 
Misc/SpecialBuilds.txt
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