[issue33931] Building 2.7 on Windows with PC\VS9.0 is broken

2018-06-22 Thread Zachary Ware


Change by Zachary Ware :


--
stage: patch review -> resolved
status: pending -> closed

___
Python tracker 

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



[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2018-06-22 Thread Benjamin Peterson


Benjamin Peterson  added the comment:


New changeset 482fac74999028af4764645a1f28dd4289b2f255 by Benjamin Peterson in 
branch '2.7':
[2.7] properly free memory in pgen. (GH-7869) (closes bpo-27780
https://github.com/python/cpython/commit/482fac74999028af4764645a1f28dd4289b2f255


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



[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2018-06-22 Thread Benjamin Peterson


Change by Benjamin Peterson :


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



[issue33877] Doc: Delete UNIX qualification for script running instructions

2018-06-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 1c9a72cc99d4f76a18755d7227bd1c375e44b4ad by Terry Jan Reedy 
(Andrés Delfino) in branch '2.7':
[2.7] bpo-33877: Remove UNIX qualification for running complete programs 
(GH-7744)
https://github.com/python/cpython/commit/1c9a72cc99d4f76a18755d7227bd1c375e44b4ad


--

___
Python tracker 

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



[issue33877] Doc: Delete UNIX qualification for script running instructions

2018-06-22 Thread Andrés Delfino

Change by Andrés Delfino :


--
pull_requests: +7476

___
Python tracker 

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



[issue33939] Raise OverflowError in __length_hint__ for consistently infinite iterators

2018-06-22 Thread bbayles


Change by bbayles :


--
nosy: +bbayles

___
Python tracker 

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



[issue33942] IDLE: Improve Apple MacOS Tcl/Tk warning and web page

2018-06-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I agree that an install screen is a better place for the link.  And if the 
3.6.7 installer links with an included 8.6, the 8.5.7/9 message will be 
obsolete for the included IDLE, hence no point in patching it.  Hooray.

I will open separate issues about printing the Tk version on startup, and 
possibly deprecating the use of 8.5 with IDLE, and if so, when.

--

___
Python tracker 

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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-22 Thread Barry A. Warsaw


Change by Barry A. Warsaw :


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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Nick Coghlan


Nick Coghlan  added the comment:

Concrete use case for the original path extension capability: "pew add", which 
chains virtual environments together (allowing shared environments with a 
common default dependency set, and then additional per-application dependencies)

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Nick Coghlan


Nick Coghlan  added the comment:

Strong -1 without a functional replacement that provides comparable LD_PRELOAD 
capabilities (it also needs a full PEP that analyses all of the ways that 
setuptools and other packaging utilities use these files, such as for the 
implementation of "develop" mode, and the processing of ".lnk" mode).

This change also needs to account for the Windows-only "._pth" files that 
override the path completely.

The main discussion list for such a PEP should be distutils-sig, *not* 
python-ideas or import-sig (since distutils-sig is where we're more likely to 
find folks that are actually relying on the feature, and hence have a clearer 
idea of what will need to change to maintain a comparable level of ecosystem 
level capability).

https://bugs.python.org/issue14803 is also related, as pth file processing 
should at least be delayed to run later than it does currently, and because 
"run code at startup" is one of the capabilities that would need replacing.

--
nosy: +ncoghlan

___
Python tracker 

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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-22 Thread Eric Snow


Change by Eric Snow :


--
nosy: +emilyemorehouse, eric.snow

___
Python tracker 

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



[issue31558] gc.freeze() - an API to mark objects as uncollectable

2018-06-22 Thread Eric Snow


Change by Eric Snow :


--
nosy: +eric.snow

___
Python tracker 

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



[issue33941] datetime.strptime not able to recognize invalid date formats

2018-06-22 Thread Chris Wilcox


Chris Wilcox  added the comment:

I looked a bit at _strptime.py and the corresponding tests and thought I would 
share my notes.

The regular expressions clearly allow non-zero padded values for both %d and %m 
matches. There is one test where the following is run: time.strptime("Mar 1", 
"%b %d"). So it seems intentional that %d and %m allow non-zero padded values.

It also just occurred to me that the example '181223' isn't ambiguous as %Y 
requires 4 digits and months cannot be more than 12. So it seems to me this 
could only be Y=1812,M=2,D=3.

There do exist cases in which they are truly ambiguous for non-zero padded 
values. For instance, 2018111 could potentially be 2018-Nov-1 or 2018-Jan-11. 
Python will deterministically take the most possible for the next value, so 
this will be November 11, 2018. Though, there is really no reason I can figure 
that can be assumed.

The edits required to stop allowing non-zero padded values were pretty 
straightforward and only one unit test (one that verifies 'Mar 1' comes after 
'Feb 29') had to be altered. That may point more to a need to add additional 
tests though than an endorsement that no one is using single digit day or month 
values.

--

___
Python tracker 

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



[issue30411] git doesn't support "-C" args under 1.8.5 occurs in configure.ac

2018-06-22 Thread Ned Deily


Ned Deily  added the comment:

Thanks for the PR.  I agree with Xiang Zhang that using --git-dir appears to be 
a better solution.  See other review comments on the PR.

--

___
Python tracker 

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



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

2018-06-22 Thread Eric Snow


Change by Eric Snow :


--
nosy: +emilyemorehouse

___
Python tracker 

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



[issue33607] [subinterpreters] Explicitly track object ownership (and allocator).

2018-06-22 Thread Eric Snow


Change by Eric Snow :


--
nosy: +emilyemorehouse

___
Python tracker 

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



[issue33868] test__xxsubinterpreters: test_subinterpreter() fails randomly on AMD64 Ubuntu Shared 3.x

2018-06-22 Thread Eric Snow


Change by Eric Snow :


--
nosy: +emilyemorehouse

___
Python tracker 

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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-22 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

Although I guess that would require modifications to lcg_urandom().  I don't 
feel qualified to change that function.

--

___
Python tracker 

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



[issue33946] os.symlink on Windows should use the new non-admin flag

2018-06-22 Thread Ethan Smith


New submission from Ethan Smith :

In the creators update CreateSymbolicLink added a dwflag 
SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE, which will allow any user to 
create a symlink (not only an admin). I think we should detect and try to use 
this flag if possible.

I also think it would be nice to suggest turning on developer mode if the 
windows version is at or newer than the creators update.

This should probably happen after https://bugs.python.org/issue28113

--
messages: 320288
nosy: Ethan Smith, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.symlink on Windows should use the new non-admin flag

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

There are lots of problems with pth files, although arbitrary code execution is 
probably the most egregious.  They are also notoriously difficult to debug, and 
happen before any control is given to user code.  They certainly are 
unnecessary for namespace packages, which I think they currently get used for 
often in Py 2/3 straddling code.

Maybe it will be okay to just fall back to sys.path extension, but I'd like to 
have a better understanding of exactly what the use cases are (in a pure Python 
3 world), and we have to address the other problems about discovery and 
debuggability.

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Brett Cannon


Brett Cannon  added the comment:

My only answer to Ethan is "don't use eggs". :)

--

___
Python tracker 

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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-22 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

We could make the hash_seed 64 bits.

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Ethan Smith


Ethan Smith  added the comment:

I am in favor of symlinks no longer being able to execute arbitrary code, 
however, I do think having them add to the path cannot be killed in two 
releases. Here is why:

1. Windows support for symlinks is still not automatic. In the creators update 
of Windows 10 (released March 2017), CreateSymbolicLink added a dwflag 
SYMBOLIC_LINK_FLAG_ALLOW_UNPRIVILEGED_CREATE. This requires the user to be in 
developer mode to work. CPython currently doesn't use this flag. (I will open 
an issue to add that in a moment). I worry that giving people little time to 
update will be troublesome.

2. All editable installs everywhere (AFAIK) and setuptools eggs (still somewhat 
common) use easy-install.pth to list where they are. I think breaking editable 
installs is a bad idea, as there is no clear solution for this. Also setuptools 
has a fair amount of work to do before it can replace egg installs.

So I think removing adding to the path will require much more thought and break 
a lot more code than removing arbitrary code execution.

--
nosy: +Ethan Smith

___
Python tracker 

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



[issue33927] Allow json.tool to have identical infile and outfile

2018-06-22 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


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

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

My understanding about symlinks on Windows is that they require a permission 
("Create symbolic links"), that normal users by default do not have. I'm not 
sure if this has changed recently.

--

___
Python tracker 

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



[issue33877] Doc: Delete UNIX qualification for script running instructions

2018-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset 688325ed1a4d549f03d886507c265093aa3b2cab by Miss Islington (bot) 
in branch '3.6':
bpo-33877: Remove UNIX qualification for running complete programs (GH-7744)
https://github.com/python/cpython/commit/688325ed1a4d549f03d886507c265093aa3b2cab


--

___
Python tracker 

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



[issue33877] Doc: Delete UNIX qualification for script running instructions

2018-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset f47d8983fe35239cccf4e623e4ad70c9e0f636f9 by Miss Islington (bot) 
in branch '3.7':
bpo-33877: Remove UNIX qualification for running complete programs (GH-7744)
https://github.com/python/cpython/commit/f47d8983fe35239cccf4e623e4ad70c9e0f636f9


--
nosy: +miss-islington

___
Python tracker 

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



[issue33870] pdb continue + breakpoint

2018-06-22 Thread Philip Rowlands


Philip Rowlands  added the comment:

Considering the semantics a little more, "cont 99" could be equivalent to

tbreak 99
cont

perhaps with an implicit clear on SIGINT.

This is similar in the simple case to "until 99", except "until" stops on frame 
boundaries, refuses to go backwards (e.g. in a loop), and doesn't take the full 
range of filename / lineno / function / condition.

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Thomas Kluyver


Thomas Kluyver  added the comment:

I don't want to use the execution features of .pth files, just their original 
functionality of adding extra directories to sys.path. I'd be very happy to see 
the arbitrary code execution 'feature' of .pth files go away.

Windows supports symlinks, but the last I heard was that creating them requires 
some obscure permission bit. It seems to be awkward enough that Windows users 
aren't happy with the "just use symlinks" approach, which was what I was 
originally trying.

--

___
Python tracker 

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



[issue32933] mock_open does not support iteration around text files.

2018-06-22 Thread Ned Deily


Ned Deily  added the comment:

Anthony's PR is awaiting merge.  Although Yury has reviewed it, as the core 
developers mocktest experts, it would be good if Michael and/or Robert could 
also take a look.

--
nosy: +ned.deily

___
Python tracker 

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



[issue33877] Doc: Delete UNIX qualification for script running instructions

2018-06-22 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
title: doc Mention Windows along UNIX for script running instructions -> Doc: 
Delete UNIX qualification for script running instructions

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Brett Cannon


Brett Cannon  added the comment:

Windows has symlinks now I believe, you just have to turn them on.

And I would say there is no need for alternative. If a package needs to do 
something funky they can do it in their __init__.py file. Otherwise if I don't 
import a package it shouldn't get to do anything crazy through a .pth file.

--

___
Python tracker 

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



[issue33877] doc Mention Windows along UNIX for script running instructions

2018-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7473

___
Python tracker 

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



[issue33877] doc Mention Windows along UNIX for script running instructions

2018-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7472

___
Python tracker 

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



[issue33877] doc Mention Windows along UNIX for script running instructions

2018-06-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset c9d43c702a53804c23ecb22a0dbf6a47c804d2b1 by Terry Jan Reedy 
(Andrés Delfino) in branch 'master':
bpo-33877: Remove UNIX qualification for running complete programs (GH-7744)
https://github.com/python/cpython/commit/c9d43c702a53804c23ecb22a0dbf6a47c804d2b1


--

___
Python tracker 

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



[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset e4db73058b6c31f71c64d0f87a10547f3cf72f20 by Miss Islington (bot) 
in branch '3.7':
bpo-33885: Replace "hook function" with "callable" (GH-7765)
https://github.com/python/cpython/commit/e4db73058b6c31f71c64d0f87a10547f3cf72f20


--
nosy: +miss-islington

___
Python tracker 

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



[issue33877] doc Mention Windows along UNIX for script running instructions

2018-06-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Thanks.  I did that and will merge when possible.

--
assignee: docs@python -> terry.reedy

___
Python tracker 

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



[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2018-06-22 Thread Ned Deily


Ned Deily  added the comment:

Thanks, Zackery.  @Benjamin, any opinion about a need for a 2.7 backport?  
Otherwise, it sounds like this can be closed.

--
nosy: +benjamin.peterson

___
Python tracker 

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



[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7471

___
Python tracker 

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



[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-22 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset c45cb479074b5d25f0d382d3109f527520a9f03c by Terry Jan Reedy 
(Andrés Delfino) in branch '3.6':
bpo-33885: Replace "hook function" with "callable" (GH-7765)
https://github.com/python/cpython/commit/c45cb479074b5d25f0d382d3109f527520a9f03c


--

___
Python tracker 

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



[issue33877] doc Mention Windows along UNIX for script running instructions

2018-06-22 Thread Ned Deily


Ned Deily  added the comment:

The statement is true for macOS (note macOS is the correct current styling per 
Apple); in general, macOS is a UNIX platform as far as Python is concerned.  
So, yes, it appears the documentation there could be simplified by eliminating 
the platform distinction.

--

___
Python tracker 

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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Barry: generating a 32 bit seed gives less entropy and so makes Python
easier to crash. If you need reproducible Python: generate a seed and set
the env var before starting Python. Tox does that. Regrtest should do that.

--

___
Python tracker 

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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-22 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

Nosying Nick.  I agree there's some overlap with Python startup restructuring, 
but it feels kind of orthogonal too.  I really am only exposing (some elements) 
of that structure to Python.

What might be interesting though would be if we want to expose the entire 
structure and not just the hash seeds, as I'm leaning toward here (given that 
we already have sys.hash_info).

--
nosy: +ncoghlan

___
Python tracker 

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



[issue33894] tempfile.tempdir cannot be unset

2018-06-22 Thread Philip Rowlands


Philip Rowlands  added the comment:

Thanks for the edit. I did try a PR but was defeated by build/doc tool's recent 
version requirements (and didn't want to send untested changes, however minor).

The reason for getting rid of "unset" is the confusion of "state", i.e. it has 
never been assigned to, or "action", i.e. the user is unsetting it.

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Thomas Kluyver


Thomas Kluyver  added the comment:

I'm generally in favour of getting rid of .pth files. But I did accept a PR 
adding support for them in Flit to act as a substitute for symlinks on Windows, 
to achieve something like a 'development install'. I'm not sure what the 
alternative is if they go away.

--
nosy: +takluyver

___
Python tracker 

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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

Nick plans to finish his PEP 432 for Python 3.8 and make the API public.
See with him? The PEP should document these structures but I was ahead and
made changes which were not scheduled and the PEP is now outdated.

--

___
Python tracker 

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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-22 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

I think there's another thing I'd like to change, and it seems like it's "just" 
an implementation detail.  In _Py_HashRandomization_Init(), if use_hash_seed is 
0, then we directly inject the random bits into the buffer, and then there's no 
hash_seed.  I'd like to change that so that if use_hash_seed is 0, then we 
create a random hash seed first, and then call lcg_urandom() for the hash 
secret.  That way, even if Python itself uses a random hash seed, we'll have a 
record of that in the runtime that can be used to reproduce the hashing.  In 
this case, I'd still leave use_hash_seed == 0, and that would tell you what 
combinations of env vars were used.

--

___
Python tracker 

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



[issue33943] doc Add references to logging.basicConfig

2018-06-22 Thread Ned Deily


Change by Ned Deily :


--
nosy: +vinay.sajip

___
Python tracker 

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



[issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name

2018-06-22 Thread Ned Deily


Change by Ned Deily :


--
nosy:  -lemburg

___
Python tracker 

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



[issue33941] datetime.strptime not able to recognize invalid date formats

2018-06-22 Thread Ned Deily


Change by Ned Deily :


--
nosy: +belopolsky

___
Python tracker 

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



[issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name

2018-06-22 Thread Ned Deily


Change by Ned Deily :


--
nosy: +belopolsky, lemburg

___
Python tracker 

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



[issue33934] locale.getlocale() seems wrong when the locale is yet unset (python3 on linux)

2018-06-22 Thread Ned Deily


Ned Deily  added the comment:

Can you say on which Linux platform/release you see this behavior and with 
which Python 3.6.3, i.e. from the platform distributor or built yourself?  If I 
understand your concern correctly, I cannot reproduce that behavior on a 
current Debian test system using either the Debian-supplied 3.6.6rc1 or with a  
3.6.3 built from source.  With either LANG unset or set to C (and with no LC* 
env vars set), I see:

$ unset LC_ALL LC_CTYPE LANG LANGUAGE
$ ./python
Python 3.6.3 (tags/v3.6.3:2c5fed86e0, Jun 22 2018, 16:08:11)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.getlocale()
(None, None)
>>> locale.getdefaultlocale()
(None, None)

Note that, as documented, the locale.getdefaultlocale() checks several env vars 
'LC_ALL', 'LC_CTYPE', 'LANG' and 'LANGUAGE'.  Are you certain that all of those 
env vars are unset when you run this test?

https://docs.python.org/3.6/library/locale.html#locale.getdefaultlocale

--
nosy: +ned.deily
versions:  -Python 3.4, 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



[issue33930] Segfault with deep recursion into object().__dir__

2018-06-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Serhiy, is this one of the cases we decided to leave as won't fix?

--
nosy: +serhiy.storchaka, terry.reedy

___
Python tracker 

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



[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-22 Thread Senthil Kumaran


Senthil Kumaran  added the comment:

@Terry, the change in terminology looks good to me.

--

___
Python tracker 

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



[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

I am not even sure what a 'hook function' is supposed to mean.  A beginner 
might think it means something other than any old callable.  Unless Sentil or 
someone objects within a week, I would merge this.  Ping me if nothing happens.

--
nosy: +terry.reedy

___
Python tracker 

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



[issue33877] doc Mention Windows along UNIX for script running instructions

2018-06-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The paragraph reads:

Under Unix, a complete program can be passed to the interpreter in three forms: 
with the -c string command line option, as a file passed as the first command 
line argument, or as standard input. If the file or standard input is a tty 
device, the interpreter enters interactive mode; otherwise, it executes the 
file as a complete program.

This is slightly confusing because a complete programs cannot be passed all at 
once if the file (regular or stdin) is interactive.

Not being a Windows expert, I was curious whether the standard input part is 
true for Win 10.  Indeed, both "python con:" and "python 

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



[issue33945] concurrent.futures ProcessPoolExecutor submit() blocks on results being written

2018-06-22 Thread Daniel Barcay


Daniel Barcay  added the comment:

adding experts bquinlan and pitrou for concurrent.futures to nosy-list as per 
bug tracker directions.

--
nosy: +bquinlan, pitrou

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-22 Thread Tal Einat


Change by Tal Einat :


--
pull_requests: +7470

___
Python tracker 

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



[issue33945] concurrent.futures ProcessPoolExecutor submit() blocks on results being written

2018-06-22 Thread Daniel Barcay


Daniel Barcay  added the comment:

Line number was incorrect due to local edits. 

Correct line number is process.py:L464  "self._result_queue.put(None)"

--

___
Python tracker 

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



[issue33945] concurrent.futures ProcessPoolExecutor submit() blocks on results being written

2018-06-22 Thread Daniel Barcay


New submission from Daniel Barcay :

I have tracked down the exact cause of a sizable performance issue in using 
concurrent.futures.ProcessPoolExecutors, especially visible in cases where 
large amounts of data are being copied across the result.

The line-number causing the bad behavior, and several remediation paths are 
included below. Since this affects core behavior of the module, I'm reticent to 
try out a patch myself unless someone chimes in on the approach.

---Bug Symptoms:
  ProcessPoolExecutor.submit() hangs for long periods of time 
non-deterministically (over 20 seconds in my job). See causes section below for 
exact cause. 
   This hanging makes multiprocess job submissions impossible from a real-time 
constrained main thread, where the results are large objects.

---Ideal behavior:
   submit() should not block on any results of other jobs, and non-blocking 
wake signal should be used instead of a blocking put() call.

---Bug Cause:
In ProcessPoolExecutor.submit() line 473, a wake signal is being sent to the 
management thread in the form of posting a message to the result queue, waking 
the thread if it was in recv() mode.

I'm not even sure that this wake-up is necessary, as removing it seems to work 
just fine for my use-case on OSX. However, let's presume that it is for the 
time being..

The fact that submit() blocks on the result_queue being serviced is 
unnecessary, and hinders large results from being sent back across in 
concurrent.futures.result().

---Possible remediations:

If a more fully-fledged Queue implementation were used, this signal could be 
replaced by the non-blocking version. Alternately multiprocess.Queue 
implementation could be extended to implement non-blocking put()


--- Reproduction Details
  I'm using concurrent.futures.ProcessPoolExecutor for a complicated 
data-processing use-case where the result is a large object to be sent across 
the result() channel. Create any such setup where the results are on the order 
of 50MB strings, submit 5-10 jobs at a time, and watch the time it takes to 
call submit().

--
components: Extension Modules
messages: 320257
nosy: dbarcay
priority: normal
severity: normal
status: open
title: concurrent.futures ProcessPoolExecutor submit() blocks on results being 
written
type: performance
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



[issue33927] Allow json.tool to have identical infile and outfile

2018-06-22 Thread Ned Deily


Change by Ned Deily :


--
nosy: +ezio.melotti, rhettinger

___
Python tracker 

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



[issue33923] py.ini cannot set 32/64bits for specific version

2018-06-22 Thread Ned Deily


Change by Ned Deily :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
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



[issue33921] Explain that '' can be used to bind to all interfaces for the AF_INET address family in the docs

2018-06-22 Thread Ned Deily


Ned Deily  added the comment:

John, since you raised the issue, would you like to provide a doc PR?

--
keywords: +easy
nosy: +ned.deily
stage:  -> needs patch
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



[issue33899] Tokenize module does not mirror "end-of-input" is newline behavior

2018-06-22 Thread Ned Deily


Change by Ned Deily :


--
nosy: +meador.inge

___
Python tracker 

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



[issue33885] doc Replace "hook function" with "callable" in urllib.request.urlretrieve

2018-06-22 Thread Ned Deily


Change by Ned Deily :


--
nosy: +orsenthil

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread Ned Deily


Ned Deily  added the comment:

Since the undocumented change in behavior from 3.6 to 3.7 appears to be causing 
some downstream regressions at this late stage, I think Victor's change should 
be cherry-picked for 3.7.0 final.

Nick or Eric, if you merge a 3.7 doc change, I'll cherry-pick that as well.

--

___
Python tracker 

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



[issue33942] IDLE: Improve Apple MacOS Tcl/Tk warning and web page

2018-06-22 Thread Ned Deily


Ned Deily  added the comment:

Jasper, as Terry notes, you can either download and install a version of 
ActiveState Tcl/Tk 8.5 (not 8.6) to use with the version of Python 3.6.5 
installed or, better, download and install from the alternate 10.9+ 64-bit-only 
Python 3.6.5 insteller from python.org which has a built-in version of Tcl/Tk 
8.6.

Terry, besides the reference in IDLE startup itself, there is a reference to 
the tcltk page in the macOS installer README which is displayed in the macOS 
installer during Python installation.  I believe that should be more than 
sufficient notice.  More importantly, I'm trying to deprecate use of the 
64-bit/32-bit installer.  Starting with the release of 3.7.0 and 3.6.6, the 
64-bit-only installer (with builtin Tk 8.6) will be the default download and 
for 3.7.0 both installer variants come with a builtin Tk 8.6.  And, unless some 
unforeseen problem pops up, I'm also planning to get rid of Tk 8.5 for good 
with 3.6.7 and 2.7.16.

--
assignee: terry.reedy -> ned.deily
resolution:  -> third party
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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Eric V. Smith


Eric V. Smith  added the comment:

Also +1.

--
nosy: +eric.smith

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-22 Thread Tal Einat


Tal Einat  added the comment:

>> Also sizehint=0 was rejected before 
>> 2fb9ae9dfc5a6830d902332ba93b13387e292ddb. Now it is accepted.

Please note that by "Now it is accepted" I meant in the current codebase, 
before PR 7840. In this regard, that PR changes nothing.

Given the documentation quoted by Victor, perhaps it would be wise to review 
that earlier change.

--

___
Python tracker 

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



[issue33942] IDLE: Improve Apple MacOS Tcl/Tk warning and web page

2018-06-22 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Jasper: when you installed 3.6.5 on your 10.11 machine, you had a choice of the 
64-/32-bit installer, good back to 10.6, and newer and better 64-bit installer, 
good back to 10.9.  Since it seems that the latter, the new and improved 
option, should work for you, why did you choose the former?  Did you see the 
discussion under macOS users: new as of 3.6.5?  Do we need to improve it?

Ned: there is no reference anymore on 
https://www.python.org/downloads/release/python-365/ to 
https://www.python.org/download/mac/tcltk/.  There should be.  How about making 
the last part of "The 10.6+ variant still requires installing a third-party 
version of Tcl/Tk 8.5.", from 'installing' to the end, a link to that page?

Jasper: as your movie shows, we warn about TK 8.5.9 being a problem every time 
you start IDLE.
"""
WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.
Visit http://www.python.org/download/mac/tcltk/ for current information.
"""
Did you see this?  Did you read it?  Did you visit the page?  Did you try to 
follow the instructions? 

How can we make this more prominent and action inducing, without being 
insulting.  How about
"""
WARNING!!! WARNING!!! WARNING!!! WARNING!!! WARNING!!!

The version of Tcl/Tk (8.5.9) is ancient and obsolete!

It is almost certainly the buggy and unstable Apple version.
If so, it will eventually crash, causing tkinter and IDLE to crash.

If you continue, DO NOT REPORT the problems that result.

Instead, go to either 
1. http://www.python.org/download/mac/tcltk/
for current information on getting a newer version of Tcl/Tk 8.5;

or (recommended)
2. https://www.python.org/downloads/mac-osx/
to get the macOS 64-bit installer, which includes Tcl/Tk 8.6,
and reinstall.
"""

The last bit about re-downloading and re-installing should be added in any case.

Ned: https://www.python.org/download/mac/tcltk/ lists 8.5.9 under Alternate 
Tcl/Tk.  There have been multiple reports, like this one, of 8.5.9 causing 
crashes.  Should 8.5.9 be Not Recommended, and the Alternate column deleted?

Me: tkVersionWarning() is untested.  To do so, the full tk version (patchlevel) 
should be read on startup, (and added to the sign-on message), and passed to 
this function.  Tests could then pass in different values.

The function could return '' or message instead of False or message.

--
components: +macOS
nosy: +ned.deily, ronaldoussoren
stage:  -> needs patch
title: IDLE crash when typing opening bracket -> IDLE: Improve Apple MacOS 
Tcl/Tk warning and web page
type: crash -> 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



[issue33919] Expose _PyCoreConfig structure to Python

2018-06-22 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Thanks for the hint!  I had a feeling there had to be an API to get at it, but 
I couldn’t find it.  Maybe we should start documenting the Python Secret 
Underscore API? :)

On Jun 22, 2018, at 00:04, STINNER Victor  wrote:
> 
> _PyCoreConfig *core_config = 
> &_PyGILState_GetInterpreterStateUnsafe()->core_config;
> ...
> PyStructSequence_SET_ITEM(seq, pos++, PyBool_FromLong(core_config->dev_mode));
> 
> The interpreter really owns the copy of these configs and they are kept until 
> the interpreter object is destroyed.

--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Christian Heimes


Christian Heimes  added the comment:

+1

--
nosy: +christian.heimes

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread miss-islington


miss-islington  added the comment:


New changeset 3747dd16d5d2af3499f586386e49740a0454cf44 by Miss Islington (bot) 
in branch '3.7':
bpo-33932: Calling Py_Initialize() twice does nothing (GH-7845)
https://github.com/python/cpython/commit/3747dd16d5d2af3499f586386e49740a0454cf44


--
nosy: +miss-islington

___
Python tracker 

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



[issue33671] Efficient zero-copy for shutil.copy* functions (Linux, OSX and Win)

2018-06-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8fbbdf0c3107c3052659e166f73990b466eacbb0 by Victor Stinner in 
branch 'master':
bpo-33671: Add support.MS_WINDOWS and support.MACOS (GH-7800)
https://github.com/python/cpython/commit/8fbbdf0c3107c3052659e166f73990b466eacbb0


--

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2018-06-22 Thread Barry A. Warsaw


New submission from Barry A. Warsaw :

pth files are evil.  They are very difficult to debug because they're processed 
too early.  They usually contain globs of inscrutable code.  Exceptions in pth 
files can get swallowed in some cases.  They are loaded in indeterminate order.

They are also unnecessary to support namespace packages in Python 3 (ignoring 
straddling code).

Let's start the process for removing them.

1. Deprecate pth files in Python 3.8 and turn them off with the -3 option.

2. Kill off pth file support once Python 2 is EOL'd.

--
components: Library (Lib)
messages: 320246
nosy: barry, brett.cannon, eric.snow
priority: normal
severity: normal
status: open
title: Deprecate and remove pth 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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread miss-islington


Change by miss-islington :


--
pull_requests: +7469

___
Python tracker 

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



[issue33941] datetime.strptime not able to recognize invalid date formats

2018-06-22 Thread Chris Wilcox


Chris Wilcox  added the comment:

As %m and %d denote zero padded forms of month and day it seems to me this 
shouldn't match. Executing a small c program `char* ret = strptime("181223", 
"%Y%m%d", &tm);` confirms that this is considered invalid to c. The datetime 
docs indicate that the behavior should match C89 so I would expect python to 
return ValueError here as well. 
https://docs.python.org/3/library/datetime.html#strftime-strptime-behavior

--
components: +Library (Lib) -Tests
nosy: +crwilcox
versions: +Python 2.7

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 209abf746985526bce255e2fba97d3246924885d by Victor Stinner in 
branch 'master':
bpo-33932: Calling Py_Initialize() twice does nothing (GH-7845)
https://github.com/python/cpython/commit/209abf746985526bce255e2fba97d3246924885d


--

___
Python tracker 

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



[issue33875] Allow dynamic password evaluation in pypirc configuration file.

2018-06-22 Thread Jakub Wilk


Change by Jakub Wilk :


--
nosy: +jwilk

___
Python tracker 

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



[issue33935] shutil.copyfile throws incorrect SameFileError on Google Drive File Stream

2018-06-22 Thread Steve Dower


Steve Dower  added the comment:

For Windows it would be best (though slower) to pass the paths through 
os._getfinalpathname before comparison. Detecting that function is an easy way 
to get the platform right, too.

Unfortunately, the MSDN docs don't make clear that the VSN can be modified, and 
even goes as far as saying you can compare the two values Eryk has pointed out 
that you shouldn't :(

The problem is that the values on Windows are coming directly from the 
filesystem, and apparently there's no requirement that they actually be 
provided by the filesystem...

--

___
Python tracker 

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



[issue33943] doc Add references to logging.basicConfig

2018-06-22 Thread Andrés Delfino

Change by Andrés Delfino :


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

___
Python tracker 

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



[issue33943] doc Add references to logging.basicConfig

2018-06-22 Thread Andrés Delfino

New submission from Andrés Delfino :

IMHO, the logging.basicConfig documentation could have some useful references 
for filemodes, time.strftime, printf-formatting, and logging level.

PR adds them.

--
assignee: docs@python
components: Documentation
messages: 320242
nosy: adelfino, docs@python
priority: normal
severity: normal
status: open
title: doc Add references to logging.basicConfig
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



[issue33939] Raise OverflowError in __length_hint__ for consistently infinite iterators

2018-06-22 Thread Nick Coghlan


Nick Coghlan  added the comment:

Using OverflowError wouldn't mean "I'm infinite", it would only mean "I'm 
larger than sys.maxsize" (the same way it does for range objects).

However, it may be that that's fine, since the information we really want to 
convey is:

1. Trying to store this iterable in memory would be a really bad idea
2. Even trying to iterate over this iterable to the end would probably also be 
a bad idea

And OverflowError conveys those pragmatic consequences pretty well.

(Returning math.inf isn't an option, since __length_hint__ is specified as 
returning an integer: https://www.python.org/dev/peps/pep-0424/)

--
title: Raise TypeError in __length_hint__ for consistently infinite iterators 
-> Raise OverflowError in __length_hint__ for consistently infinite iterators

___
Python tracker 

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



[issue33942] IDLE crash when typing opening bracket

2018-06-22 Thread Jasper Trooster


New submission from Jasper Trooster :

Sometimes when I type print in my code, the application crashes. Then a window 
pops up, saying that the program suddenly stopped (description of  error 
message below). When I click on the option to reopen IDLE, nothing happens, I 
have to manually reopen it again. I have already sent a report to Apple.

Description of the error message:
IDLE suddenly stopped.
Click on 'Reopen' to reopen the program. Click on 'Report' to view more 
information and send a report to Apple. 
(?)   (Ignore) (Report...) (Open)

I am coding on a Macbook from late 2008 on OSX El Capitan, version 10.11.6.

--
assignee: terry.reedy
components: IDLE
files: bug report.mov
messages: 320240
nosy: Japsert, terry.reedy
priority: normal
severity: normal
status: open
title: IDLE crash when typing opening bracket
type: crash
versions: Python 3.6
Added file: https://bugs.python.org/file47648/bug report.mov

___
Python tracker 

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



[issue31558] gc.freeze() - an API to mark objects as uncollectable

2018-06-22 Thread Jesús Cea Avión

Change by Jesús Cea Avión :


--
nosy: +jcea

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-22 Thread STINNER Victor

STINNER Victor  added the comment:

> Also sizehint=0 was rejected before 2fb9ae9dfc5a6830d902332ba93b13387e292ddb. 
> Now it is accepted.

DESCRIPTION
   epoll_create() creates a new epoll(7) instance.  Since Linux 2.6.8, the
   size argument is ignored, but must be  greater  than  zero;  see  NOTES
   below.

(...)

NOTES
   In  the  initial  epoll_create()  implementation,  the  size   argument
   informed  the  kernel of the number of file descriptors that the caller
   expected to add to the epoll instance.  The kernel used  this  informa‐
   tion  as a hint for the amount of space to initially allocate in inter‐
   nal data structures describing events.  (If necessary, the kernel would
   allocate  more  space  if the caller's usage exceeded the hint given in
   size.)  Nowadays, this hint is no longer required (the  kernel  dynami‐
   cally sizes the required data structures without needing the hint), but
   size must still be greater than zero, in order to ensure backward  com‐
   patibility when new epoll applications are run on older kernels.

--

___
Python tracker 

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



[issue33939] Raise TypeError in __length_hint__ for consistently infinite iterators

2018-06-22 Thread Erik Bray


Erik Bray  added the comment:

Per the discussion in https://trac.sagemath.org/ticket/24757, it would also be 
nice if some other common iterables like map and filter implemented a similar 
__length_hint__ which would interrogate whatever iterables were give as their 
argument(s).

To summarize the discussion in that ticket, it would be nice to at least know 
if I can expect some iterable to be finite without actually knowing its length. 
 Sure, if I passed in some arbitrary generator there's no way for the 
intepreter to know a priori if it will terminate.  But I would at least like to 
be able to manually mark whether I expect, as an intelligent developer, that 
under normal conditions the generator *should* terminate.  And this information 
should filter up to other iterators that I pass my generator to.  That way I 
can code defensively around whether or not I at least expect an iterator to be 
finite (even if not of a known length).

--
nosy: +erik.bray

___
Python tracker 

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



[issue33939] Raise TypeError in __length_hint__ for consistently infinite iterators

2018-06-22 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

By the way, there is a precedent for OverflowError on infinities:

>>> import math
>>> int(math.inf)
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: cannot convert float infinity to integer

--

___
Python tracker 

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



[issue32568] Fix handling of sizehint=-1 in select.epoll()

2018-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

> *flags* is deprecated and completely ignored.

What if tomorrow, Linux accepts a new flag, passing the flag would just be 
ignored? Maybe it's fine. Especially usually Python developers only use flags 
exposed in Python, and currently, only EPOLL_CLOEXEC is exposed and this flag 
is useless in the specific case of Python (Python always uses the flag).

--
nosy: +vstinner

___
Python tracker 

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



[issue33939] Raise TypeError in __length_hint__ for consistently infinite iterators

2018-06-22 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

I'm certainly in favor of adding a way for infinite iterators to state that 
they are infinite. I just feel like TypeError is way overused in Python. I also 
disagree that it's a category error: it's an iterable, so it does make sense to 
ask for its length.

You should also consider that there may be classes of iterables whose instances 
are sometimes finite and sometimes infinite. Then it's certainly not a category 
error.

So I would like a specific answer for "I'm infinite". If you don't like 
OverflowError, other options are ArithmeticError, IndexError, ValueError or 
simply returning math.inf

--

___
Python tracker 

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



[issue33939] Raise TypeError in __length_hint__ for consistently infinite iterators

2018-06-22 Thread Nick Coghlan


Nick Coghlan  added the comment:

OverflowError covers cases like greater-than-sys.maxsize range instances, where 
the object itself is conceptually finite, but the length can't be represented 
as a C integer.

This case is different: it's a category error where the question being asked 
doesn't even make sense for the affected type.

However, unlike len(), where a missing __len__() implementation inherently 
raises TypeError, backwards compatibility requires operator.length_hint() to 
handle a missing implementation __length_hint__ implementation as equivalent to 
an implementation that returns a length hint of 0.

--

___
Python tracker 

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



[issue33941] datetime.strptime not able to recognize invalid date formats

2018-06-22 Thread Raghunath Lingutla


New submission from Raghunath Lingutla :

Can not recognize invalid date values for %Y%m%d, %y%m%d, %Y%m%d %H:%M and few 
more formats. In Java we have setLenient option which help us to validate to 
pattern and convert only valid formats
Ex: datetime.strptime('181223', '%Y%m%d') 
For above input I am getting output as 1812-02-03 00:00:00 but expected output 
is error as ValueError: time data '181223' does not match format '%Y%m%d'

I tested below mentioned 4 modules. All modules giving same output

1) datetime.strptime

2) timestring.Date

3) parser.parse from dateutil

4) dateparser.parse

--
components: Tests
messages: 320233
nosy: Raghunath Lingutla
priority: normal
severity: normal
status: open
title: datetime.strptime not able to recognize invalid date formats
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



[issue33939] Raise TypeError in __length_hint__ for consistently infinite iterators

2018-06-22 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

Why TypeError? Wouldn't OverflowError be more suitable?

--
nosy: +jdemeyer

___
Python tracker 

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



[issue33940] datetime.strptime have no directive to convert date values with Era and Time Zone name

2018-06-22 Thread Raghunath Lingutla


New submission from Raghunath Lingutla :

Python3.6 module datetime.strptime didn't have directive to convert date values 
having Era designator (AD or BC) and time zone (Ex: EST, PST, -07:00)

Below are few example for date values which are not supported

2018-04-14 12:08:56 EST

2018-05-23 11:03:43 PST

2017-12-24 AD 12:08:56

2018-05-23 11:03:43 +05:30

--
components: Extension Modules
messages: 320231
nosy: RaghunathLingutla
priority: normal
severity: normal
status: open
title: datetime.strptime have no directive to convert date values with Era and 
Time Zone name
type: compile error
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



[issue31815] Make itertools iterators interruptible

2018-06-22 Thread Nick Coghlan


Nick Coghlan  added the comment:

Note: I've filed the "raise TypeError in __length_hint__" suggestion for 
infinite iterators separately in https://bugs.python.org/issue33939

--

___
Python tracker 

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



[issue33939] Raise TypeError in __length_hint__ for consistently infinite iterators

2018-06-22 Thread Nick Coghlan


New submission from Nick Coghlan :

This is a simpler proposal born out of https://bugs.python.org/issue31815: 
adding __length_hint__ implementations to some known-infinite iterators in 
itertools that always raise TypeError.

This means that iterator consumers that use the operator.length_hint() API will 
throw an error when asked to consume them, rather than entering an 
uninterruptible infinite loop.

The proposed methods added by this proposal would be:

* itertools.count.__length_hint__
* itertools.cycle.__length_hint__
* itertools.repeat.__length_hint__

Each of these would raise TypeError (to indicate an explicitly non-finite 
length), rather than returning the default of 0 (which length hint API 
consumers typically interpret as indicating an unknown-but-finite length)

--
messages: 320229
nosy: ncoghlan, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Raise TypeError in __length_hint__ for consistently infinite iterators
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



[issue27780] memory leaks in pgen build step abort build with address sanitizer enabled

2018-06-22 Thread Zackery Spytz


Zackery Spytz  added the comment:

These memory leaks were fixed in commit 
9ac11a752a19c3b8607582a3d5ccb615c467124b, though the fix wasn't applied to 2.7.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread Nick Coghlan


Nick Coghlan  added the comment:

Aye, I'm fine with deferring the programmatic deprecation for now - it's mainly 
the docs I'd like to see changed at the same time as the regression is fixed.

--

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread STINNER Victor


STINNER Victor  added the comment:

> While I agree the documentation issue means that this should be made to work 
> again for Python 3.7.1, I'd like for Python 3.7 to at least deprecate calling 
> Py_Initialize twice without an intervening Py_Finalize.

In term of timeline, I would prefer to fix the regression right now, and then 
see how to deprecate calling the function later :-)

--

___
Python tracker 

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



[issue33932] Calling Py_Initialize() twice now triggers a fatal error (Python 3.7)

2018-06-22 Thread Nick Coghlan


Nick Coghlan  added the comment:

While I agree the documentation issue means that this should be made to work 
again for Python 3.7.1, I'd like for Python 3.7 to at least deprecate calling 
Py_Initialize twice without an intervening Py_Finalize.

Otherwise the public multi-phase interpreter initialization API is going to 
have to cope with somebody starting the initialization process, and then 
calling a full Py_Initialize to finish it (instead of the new "complete 
initialization" API, whatever we end up calling that), and I'd prefer to keep 
the permitted state transitions more linear than that.

--

___
Python tracker 

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



  1   2   >