[issue35740] openssl version 1.1.1 need to be there in cpython-source-deps for windows ARM64

2019-01-14 Thread Christian Heimes


Christian Heimes  added the comment:

3.7 uses OpenSSL 1.1.0. OpenSSL 1.1.1 adds TLS 1.3 and behaves differently than 
1.1.0. We cannot update 3.7 to 1.1.1 because it would break backwards 
compatibility. For 3.8, we can move to 1.1.1.

You either have to compile your own Python and OpenSSL 1.1.1 on Windows, 
convince OpenSSL upstream to fix 1.1.0, or wait until 3.8 comes out by the end 
of the year.

--
assignee: christian.heimes -> 
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
versions: +Python 3.8 -Python 3.7

___
Python tracker 

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



[issue35740] openssl version 1.1.1 need to be there in cpython-source-deps for windows ARM64

2019-01-14 Thread ossdev


Change by ossdev :


--
title: ssl version 1.1.1 need to be there in cpython-source-deps for windows 
ARM64 -> openssl version 1.1.1 need to be there in cpython-source-deps for 
windows ARM64

___
Python tracker 

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



[issue35740] openssl version 1.1.1 need to be there in cpython-source-deps for windows ARM64

2019-01-14 Thread ossdev


New submission from ossdev :

as per in https://github.com/openssl/openssl/issues/6856 , for windows on ARM64 
we need to switch to Openssl 1.1.1

--

___
Python tracker 

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



[issue35740] ssl version 1.1.1 need to be there in cpython-source-deps for windows ARM64

2019-01-14 Thread ossdev


Change by ossdev :


--
assignee: christian.heimes
components: SSL
nosy: christian.heimes, ossdev07
priority: normal
severity: normal
status: open
title: ssl version 1.1.1 need to be there in cpython-source-deps for windows 
ARM64
type: enhancement
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



[issue35738] Update timeit documentation to reflect default repeat of five

2019-01-14 Thread Henry Chen


Change by Henry Chen :


--
title: Update timeit documentation to reflect default repeat of three -> Update 
timeit documentation to reflect default repeat of five

___
Python tracker 

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



[issue35738] Update timeit documentation to reflect default repeat of three

2019-01-14 Thread Henry Chen


Change by Henry Chen :


--
keywords: +patch, patch, patch
pull_requests: +11196, 11197, 11198
stage:  -> patch review

___
Python tracker 

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



[issue35738] Update timeit documentation to reflect default repeat of three

2019-01-14 Thread Henry Chen


Change by Henry Chen :


--
keywords: +patch, patch
pull_requests: +11196, 11197
stage:  -> patch review

___
Python tracker 

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



[issue35738] Update timeit documentation to reflect default repeat of three

2019-01-14 Thread Henry Chen


Change by Henry Chen :


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

___
Python tracker 

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



[issue35739] Enable verbose of tests during PGO build on amd64 platforms

2019-01-14 Thread Jorge Ramos


Change by Jorge Ramos :


--
keywords: +patch, patch, patch
pull_requests: +11193, 11194, 11195
stage:  -> patch review

___
Python tracker 

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



[issue35739] Enable verbose of tests during PGO build on amd64 platforms

2019-01-14 Thread Jorge Ramos


Change by Jorge Ramos :


--
keywords: +patch, patch
pull_requests: +11193, 11194
stage:  -> patch review

___
Python tracker 

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



[issue35739] Enable verbose of tests during PGO build on amd64 platforms

2019-01-14 Thread Jorge Ramos


Change by Jorge Ramos :


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

___
Python tracker 

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



[issue35739] Enable verbose of tests during PGO build on amd64 platforms

2019-01-14 Thread Jorge Ramos


New submission from Jorge Ramos :

It would be interesting to allow regrtests to output to command line during 
testing with PGO enabled. The default behavior is to not display output unless 
some fatal error occurs ("quiet" mode).

Making this issue to create a pull request.

--
components: Build, Windows
messages: 333648
nosy: neyuru, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Enable verbose of tests during PGO build on amd64 platforms
type: enhancement
versions: Python 3.7, Python 3.8

___
Python tracker 

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



[issue26410] "incompatible pointer type" while compiling Python3.5.1

2019-01-14 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
status: open -> closed
superseder:  -> Use Py_uintptr_t instead of void* for atomic pointers

___
Python tracker 

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



[issue26410] "incompatible pointer type" while compiling Python3.5.1

2019-01-14 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
resolution:  -> duplicate
stage:  -> resolved

___
Python tracker 

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



[issue35661] Store the venv prompt in pyvenv.cfg

2019-01-14 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Steve, thanks for explaining that.  I understand what you're saying now.  It's 
funny but because the context prompt has the space added at the end when it's 
created (`context.prompt = '(%s) ' % prompt`), I added it to the test, but 
completely forgot about it.  I was thinking about just getting back what was 
inside the parentheses without considering at all what the whole line looked 
like.

--

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-01-14 Thread Alexey Izbyshev


Alexey Izbyshev  added the comment:

> Until muscl decides to provide an "#ifdef __MUSL__"-like or any way that it's 
> musl, I propose to not support musl: don't use os.posix_spawn() but 
> _posixsubprocess.

FYI, I'm researching how to use vfork(), focusing on Linux, but I'll need more 
time to study the current state of affairs of libcs. Both musl and glibc don't 
use "pure" vfork() now because of perceived danger of miscompilation due to 
sharing of the stack between the parent and the child. They switched to 
clone(CLONE_VM|CLONE_VFORK), which is basically the same but allows the caller 
to provide a separate stack for the child. There are also additional subtle 
issues related to signal handling (and pthread cancellation in particular) 
which I need to study.
 
If I find vfork()-like approach feasible, I'll open a separate issue. The bonus 
of this approach is that it doesn't depend on a particular libc, so both glibc 
(including older versions) and musl could be supported.

--

___
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

2019-01-14 Thread Barry A. Warsaw


Barry A. Warsaw  added the comment:

On Jan 14, 2019, at 17:30, STINNER Victor  wrote:
> 
> I don't think that you will like it, but I feel that a PEP will be needed
> here to list use cases and explain what replace .pth files for each use
> case. Maybe no replacement for some use cases is fine. The PEP doesn't have
> to be long.
> 
> I also expect that it's going to be a large backward incompatible change. A
> PEP can summerize the rationale, schedule deprecation, etc.

+1

> Any volunteer around? Barry, Nick, someone else?

I will volunteer to co-author.  I would definitely like at least Nick and/or 
Jason to help.

--

___
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

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

I don't think that you will like it, but I feel that a PEP will be needed
here to list use cases and explain what replace .pth files for each use
case. Maybe no replacement for some use cases is fine. The PEP doesn't have
to be long.

I also expect that it's going to be a large backward incompatible change. A
PEP can summerize the rationale, schedule deprecation, etc.

Any volunteer around? Barry, Nick, someone else?

--

___
Python tracker 

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



[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2019-01-14 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

> Maybe the methods could all rely on `get_names` that
> return `dir(self.__class__)`,

Please read the previous posts on the subject.  The only reason to do this is 
if we want the module to explicitly support attaching methods directly to 
instances.  That practice has disadvantages (no access to self) and it is at 
odds with the design of the module (nothing we ever intended to explicitly 
support) and it is outside of usual Python norms (methods attached to classes). 
 AFAICT, the OP's need could be met using traditional (and supported) 
techniques such as class composition.  Accordingly, there isn't any need to go 
down this more unusual path.

--

___
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

2019-01-14 Thread Antoine Pitrou


Antoine Pitrou  added the comment:

> Is that true outside of virtual environments?

Not in my experience.  But I'm not sure special-casing virtual environments 
will make the situation easier to understand ;-)

--

___
Python tracker 

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



[issue32496] lib2to3 fails to parse a ** of a conditional expression

2019-01-14 Thread Ori Avtalion


Ori Avtalion  added the comment:

This can be circumvented by adding parenthesis:

  dummy(**(kwargs if kwargs else dict()))

--
nosy: +salty-horse

___
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

2019-01-14 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Jan 14, 2019, at 07:17, Nick Coghlan  wrote:
> 
> I'll also reiterate that I am *completely* opposed to deprecating the "append 
> entries to sys.path" usage model, as there is absolutely nothing wrong with 
> that (if distros are ending up with an overly cluttered system that's making 
> the standard path too long, then review the individual packages creating the 
> clutter, don't remove the interpreter feature).

Yes, there is as Victor and others points out.  They do magical things that are 
difficult to debug and diagnose, and have global effects on the entire Python 
operating environment.

I’d be less opposed to a mechanism that is isolated to just those Python 
applications that need them.  I’d like to know about use cases outside of 
Python applications that can’t be done any other way.

> That "append to sys.path" aspect of the feature is all that's needed to make 
> editable installs and virtual environment chaining work.
> 
> That means the aspect I'm in agreement with deprecating is the "arbitrary 
> code execution on startup" case, but even for that, I don't think we should 
> deprecate it until we have a comparable replacement that's more 
> self-evidently a way of allowing arbitrary code execution, and also more 
> obviously has the potential to make every interpreter startup in that Python 
> installation slower.

I think we’re all in agreement about deprecating arbitrary code execution, so 
maybe this issue can concentrate on that, while we figure out what, if anything 
to do about the path extension use case.

I don’t care about slow start up of the interactive interpreter, but I do 
strongly care about the start up times for Python applications in general.  
That’s why an opt-in mechanism is important.

> 1. In site.addsitedir, check for a __sitecustomize__ subdirectory after 
> checking for .pth files
> 2. If any Python files are found in that directory, execute them
> 3. If "python -x importtime" has been specified, report the execution time of 
> each of those files (this would allow both easy identification of any hooks 
> that are being executed, as well as which ones are taking up a lot of time)
> 
> There could then be a "-Z" option that offered a more limited form of "-S": 
> it would allow site.py itself to run, but disable the processing of 
> `sitecustomize.py` and `__sitecustomize__` entries.

Is that a global __sitecustomize__ directory you’re talking about, or something 
specific to a Python application (or library?).

--

___
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

2019-01-14 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Jan 14, 2019, at 04:14, Antoine Pitrou  wrote:
> 
> As I said: editable installs (`pip install -e`) are an important use case of 
> .pth files.

Is that true outside of virtual environments?  I care less about .pth files 
inside venvs, since those are typically isolated to a single development 
environment, and don’t affect Python applications or libraries globally.

--

___
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

2019-01-14 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

On Jan 14, 2019, at 04:02, STINNER Victor  wrote:
> 
> I really hate .pth files because the slow down Python startup time for *all* 
> applications whereas .pth files are usually specific to a very few 
> applications using one or two specific modules.
> 
> They can also modify the behavior of Python for all applications, with no way 
> to opt-out.
> 
> I would prefer to have an opt-in option, disabled by default.

I completely agree.  The other problem is that .pth-caused problems are very 
difficult to diagnose and debug.  Essentially you have to hack site.py to break 
into the loading machinery.  I have to believe that we can come up with a 
better mechanism that doesn’t suffer from these problems.

Do we have a single place to capture a list of .pth use cases?

--

___
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

2019-01-14 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

I like Nick's proposal. It has I believe the features that satisfy the 
use-cases of which I'm currently aware... with one edge case you may not have 
considered - support for multiple `__sitecustomize__` locations.

Consider, for example, the case where `__sitecustomize__` is in some system 
space unwritable by the user, but the package being installed is being 
installed in `--user` space.

Or consider the case where permissions aren't at play, but where you have a 
package installed in a different part of the PYTHONPATH. For example, [pip-run 
installs a sitecustomize 
module](https://github.com/jaraco/pip-run/blob/6203b1aa8cb52b5c181457054cf6ddaa40361437/pip_run/launch.py#L33-L44)
 in a temporary directory that it adds to sys.path. Ignoring for a moment the 
reason why it does this, I'd like to focus on the general need - that multiple 
paths on PYTHONPATH might expect `__sitecustomize__` support. You wouldn't want 
to have all of the `__sitecustomize__` hooks in one directory, because then 
they'll be decoupled from components that may or may not be in PYTHONPATH.

For these reasons, I think you'd want for `__sitecustomize__` to be supported 
to exist in multiple locations on PYTHONPATH and honor all of the files in all 
such directories, somewhat similar to how namespace packages are supported.

--

___
Python tracker 

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



[issue35738] Update timeit documentation to reflect default repeat of three

2019-01-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +vstinner

___
Python tracker 

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



[issue35732] Typo in library/warnings documentation

2019-01-14 Thread Cheryl Sabella


Cheryl Sabella  added the comment:

Closing as a duplicate of #35563, which converts the 'see above' to links.

--
nosy: +cheryl.sabella

___
Python tracker 

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



[issue35732] Typo in library/warnings documentation

2019-01-14 Thread Cheryl Sabella


Change by Cheryl Sabella :


--
resolution:  -> duplicate
stage: patch review -> resolved
status: open -> closed
superseder:  -> Doc: warnings.rst - add links to references

___
Python tracker 

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



[issue35738] Update timeit documentation to reflect default repeat of three

2019-01-14 Thread Jayanth Raman


New submission from Jayanth Raman :

In the Examples section of the timeit documentation, repeat() returns a list of 
size three.  But the default is now five and the documentation should reflect 
that.
Thanks.

--
assignee: docs@python
components: Documentation
messages: 333635
nosy: docs@python, jayanth
priority: normal
severity: normal
status: open
title: Update timeit documentation to reflect default repeat of three
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



[issue31658] xml.sax.parse won't accept path objects

2019-01-14 Thread Mickaël Schoentgen

Change by Mickaël Schoentgen :


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



[issue35735] Current "make test" status for AIX

2019-01-14 Thread Michael Felt


Change by Michael Felt :


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



[issue35735] Current "make test" status for AIX

2019-01-14 Thread Michael Felt


Michael Felt  added the comment:

Well, I can close this again - whatever was wrong with test_xml_etree_c 
disappeared - and a cursory look at test_os reveals that the issue might be the 
time lag between the NFS server where the temp files are made and the "local" 
sense of time.

Most of the time I do not have an issue, so closing as false positives.

--

___
Python tracker 

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



[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-14 Thread David Heiberg


David Heiberg  added the comment:

Ok thanks for your input, I will work on a PR and hopefully submit one tomorrow 
or Wednesday depending on schedule.

--

___
Python tracker 

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



[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-14 Thread wouter bolsterlee


wouter bolsterlee  added the comment:

the test could be sth like

x = uuid.uuid4()
y = weakref.ref(x)
assert x is y()

--

___
Python tracker 

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



[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-14 Thread Tal Einat


Tal Einat  added the comment:

Indeed, a PR for this should include a test that weakrefs work.

--

___
Python tracker 

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



[issue35701] [uuid] 3.8 breaks weak references for UUIDs

2019-01-14 Thread David Heiberg


David Heiberg  added the comment:

Since there has been no objection to this yet, would it be alright for me to 
take this as my first PR? 

On top of the change you mentioned to the __slots__ list, should there also be 
a test written so that a similar regression doesn't happen again?

--
nosy: +dheiberg

___
Python tracker 

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



[issue35537] use os.posix_spawn in subprocess

2019-01-14 Thread STINNER Victor

STINNER Victor  added the comment:

> https://wiki.musl-libc.org/faq.html

"""
Q: Why is there no __MUSL__ macro?

It’s a bug to assume a certain implementation has particular properties rather 
than testing. So far, every time somebody’s asked for this with a particular 
usage case in mind, the usage case was badly wrong, and would have broken 
support for the next release of musl. The official explanation: 
http://openwall.com/lists/musl/2013/03/29/13
"""

IMHO that's wrong. A software like Python heavily rely on the *exact* 
implementation of a libc.

https://github.com/python/cpython/pull/9224/files looks like a coarse heuristic 
to detect musl for example.

Until muscl decides to provide an "#ifdef __MUSL__"-like or any way that it's 
musl, I propose to not support musl: don't use os.posix_spawn() but 
_posixsubprocess.

--

___
Python tracker 

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



[issue34323] False timeout log message on proactor close

2019-01-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11190, 11191, 11192

___
Python tracker 

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



[issue34323] False timeout log message on proactor close

2019-01-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11190

___
Python tracker 

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



[issue34323] False timeout log message on proactor close

2019-01-14 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +11190, 11191

___
Python tracker 

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



[issue35737] crypt AuthenticationError introduced with new Linux kernel

2019-01-14 Thread Brett R


New submission from Brett R :

We are seeing a crash apparently in crypt.py when invoked via SaltStack and 
have narrowed it down to some change in the Linux kernel introduced by this 
security update: https://access.redhat.com/errata/RHSA-2018:3083

Linux kernel 3.10.0-862.14.4.el7.x86_64 works fine
Linux kernel 3.10.0-957.el7.x86_64 and later show this error:

2018-11-28T16:35:13.302740+00:00 ip-10-128-152-49 cloud-init: [INFO] 
Executing state cmd.script for [setup-secondary-ips]
2018-11-28T16:35:13.494523+00:00 ip-10-128-152-49 cloud-init: [ERROR   ] An 
exception occurred in this state: Traceback (most recent call last):
2018-11-28T16:35:13.497189+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/state.py", line 1889, in call
2018-11-28T16:35:13.500053+00:00 ip-10-128-152-49 cloud-init: **cdata['kwargs'])
2018-11-28T16:35:13.502780+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/loader.py", line 1839, in wrapper
2018-11-28T16:35:13.505822+00:00 ip-10-128-152-49 cloud-init: return f(*args, 
**kwargs)
2018-11-28T16:35:13.508537+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/states/cmd.py", line 1118, in script
2018-11-28T16:35:13.511297+00:00 ip-10-128-152-49 cloud-init: cmd_all = 
__salt__['cmd.script'](source, python_shell=True, **cmd_kwargs)
2018-11-28T16:35:13.514308+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/modules/cmdmod.py", line 2114, in script
2018-11-28T16:35:13.517107+00:00 ip-10-128-152-49 cloud-init: fn_ = 
__salt__['cp.cache_file'](source, saltenv)
2018-11-28T16:35:13.520171+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/modules/cp.py", line 474, in cache_file
2018-11-28T16:35:13.523112+00:00 ip-10-128-152-49 cloud-init: result = 
_client().cache_file(path, saltenv)
2018-11-28T16:35:13.526199+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/fileclient.py", line 188, in cache_file
2018-11-28T16:35:13.529055+00:00 ip-10-128-152-49 cloud-init: return 
self.get_url(path, '', True, saltenv, cachedir=cachedir)
2018-11-28T16:35:13.532046+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/fileclient.py", line 494, in get_url
2018-11-28T16:35:13.535280+00:00 ip-10-128-152-49 cloud-init: result = 
self.get_file(url, dest, makedirs, saltenv, cachedir=cachedir)
2018-11-28T16:35:13.538335+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/fileclient.py", line 1145, in get_file
2018-11-28T16:35:13.541621+00:00 ip-10-128-152-49 cloud-init: data = 
self.channel.send(load, raw=True)
2018-11-28T16:35:13.544750+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/utils/async.py", line 65, in wrap
2018-11-28T16:35:13.548071+00:00 ip-10-128-152-49 cloud-init: ret = 
self._block_future(ret)
2018-11-28T16:35:13.551304+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/utils/async.py", line 75, in 
_block_future
2018-11-28T16:35:13.554546+00:00 ip-10-128-152-49 cloud-init: return 
future.result()
2018-11-28T16:35:13.557950+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
2018-11-28T16:35:13.561205+00:00 ip-10-128-152-49 cloud-init: 
raise_exc_info(self._exc_info)
2018-11-28T16:35:13.564478+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run
2018-11-28T16:35:13.568139+00:00 ip-10-128-152-49 cloud-init: yielded = 
self.gen.throw(*exc_info)
2018-11-28T16:35:13.571683+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 312, in send
2018-11-28T16:35:13.575103+00:00 ip-10-128-152-49 cloud-init: ret = yield 
self._crypted_transfer(load, tries=tries, timeout=timeout, raw=raw)
2018-11-28T16:35:13.578736+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib64/python2.7/site-packages/tornado/gen.py", line 870, in run
2018-11-28T16:35:13.582255+00:00 ip-10-128-152-49 cloud-init: value = 
future.result()
2018-11-28T16:35:13.585869+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib64/python2.7/site-packages/tornado/concurrent.py", line 214, in result
2018-11-28T16:35:13.589636+00:00 ip-10-128-152-49 cloud-init: 
raise_exc_info(self._exc_info)
2018-11-28T16:35:13.593537+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib64/python2.7/site-packages/tornado/gen.py", line 876, in run
2018-11-28T16:35:13.597250+00:00 ip-10-128-152-49 cloud-init: yielded = 
self.gen.throw(*exc_info)
2018-11-28T16:35:13.604695+00:00 ip-10-128-152-49 cloud-init: File 
"/usr/lib/python2.7/site-packages/salt/transport/zeromq.py", line 284, in 
_crypted_transfer
2018-11-28T16:35:13.608535+00:00 ip-10-128-152-49 cloud-init: ret = yield 
_do_transfer()
2018-11-28T16:35:13.612022+00:00 ip-10-128-152-49 cloud-init: File 

[issue24780] unittest assertEqual difference output foiled by newlines

2019-01-14 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Sorry, I just stumbled upon issue2142 which is a similar report for unique_diff 
producing wrong output due to missing trailing newlines and could have been the 
original reason where the title was changed. But since there is a PR now 
towards adding a newline I think it's good to fix this on unittest side.

--

___
Python tracker 

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



[issue35736] Missing component in table after getElementsByTagName("nn")

2019-01-14 Thread Karthikeyan Singaravelan

Karthikeyan Singaravelan  added the comment:

It seems you have added a reply with the program at 
https://bugs.python.org/file48049/unnamed but it's filled with escaped HTML I 
hope. I assume you have a problem that there are 34 items with 'operation name' 
under grep and in the program it causes IndexError on 30th item.

# Download the file

➜  backups $ wget https://bugs.python.org/file48048/EbsService.wsdl

# Sample program 

➜  backups $ cat bpo35736.py
from xml.dom import minidom
xmldoc = minidom.parse('EbsService.wsdl')
operations = xmldoc.getElementsByTagName("operation")

for s in operations:
print(s.attributes['name'].value)

# The text reported in the original report
➜  backups $ python3.7 bpo35736.py | grep mammographieIndikationenErmitteln
mammographieIndikationenErmitteln
mammographieIndikationenErmitteln

# Run the program and there are 34 items
➜  backups $ python3.7 bpo35736.py | wc -l
  34
➜  backups $ grep 'operation name' EbsService.wsdl | wc -l
  34


Please try attaching the program as a message or file complete with imports so 
that I can run on my computer. From my initial program above this doesn't seem 
to be a bug with xml.etree and more of a logic problem with the code.

Thanks

--

___
Python tracker 

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



[issue35736] Missing component in table after getElementsByTagName("nn")

2019-01-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Please do not post a large amount of text as a message. This would make 
communication harder.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue35736] Missing component in table after getElementsByTagName("nn")

2019-01-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
Removed message: https://bugs.python.org/msg333624

___
Python tracker 

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



[issue35674] Expose os.posix_spawnp()

2019-01-14 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +11187, 11188, 11189

___
Python tracker 

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



[issue35674] Expose os.posix_spawnp()

2019-01-14 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +11187

___
Python tracker 

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



[issue35674] Expose os.posix_spawnp()

2019-01-14 Thread Joannah Nanjekye


Change by Joannah Nanjekye :


--
pull_requests: +11187, 11188

___
Python tracker 

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



[issue35721] _UnixSubprocessTransport leaks socket pair if Popen fails

2019-01-14 Thread Niklas Fiekas


Change by Niklas Fiekas :


--
keywords: +patch, patch, patch
pull_requests: +11184, 11185, 11186
stage:  -> patch review

___
Python tracker 

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



[issue35721] _UnixSubprocessTransport leaks socket pair if Popen fails

2019-01-14 Thread Niklas Fiekas


Change by Niklas Fiekas :


--
keywords: +patch, patch
pull_requests: +11184, 11185
stage:  -> patch review

___
Python tracker 

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



[issue35721] _UnixSubprocessTransport leaks socket pair if Popen fails

2019-01-14 Thread Niklas Fiekas


Change by Niklas Fiekas :


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

___
Python tracker 

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



[issue35736] Missing component in table after getElementsByTagName("nn")

2019-01-14 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Thanks for the report. Please post a minimal code snippet with what you are 
expecting and the actual output of the program explaining the problem and how 
it's a bug in Python and not the actual code's logic.

--
nosy: +xtreak

___
Python tracker 

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



[issue35723] Add "time zone index" cache to datetime objects

2019-01-14 Thread Paul Ganssle


Paul Ganssle  added the comment:

> I dislike adding a public API for an optimization. Would it be possible to 
> make it private? Would it make sense? tzidx => _tzidx.

This also would have been my preference, but it is unfortunately not possible 
because of the way tzinfo works. tzinfo is an abstract base class, which means 
that any changes to how `tzinfo` subclasses work *must* be implemented by the 
third party time zone providers. The tzidx() method is intended to be called 
*only* from `tzinfo` an optional feature, as such it must be public.

Maybe a better option would be to make it a magic method, to indicate that it 
is public but not intended to be called directly by users? `__tzidx__` or 
`__tzcache__`?


> In test of your PR, tzinfo allocates memory for its cache: 

>offsets = [timedelta(hours=0), timedelta(hours=1)]
>names = ['+00:00', '+01:00']
>dsts = [timedelta(hours=0), timedelta(hours=1)]

>This memory isn't free. I don't see how using an index completely prevents the 
>need to allocate memory for a cache.

That part is not free, but that's also not a cache, it's the underlying data 
for the tzinfo and is not modified over the object's lifetime. Most `tzinfo` 
subclasses are *already* implemented like this in one way or another, for 
example `dateutil.tz.tzfile` reads one of the binary tzdata files and produces 
a list of `ttinfo` objects, then looks up which one applies for each datetime.

The cache part of this is that *that lookup* is expensive, but also super easy 
to cache. In pytz this cache comes for free, because instead of using a list of 
offsets and figuring out which one to apply when you call `utcoffset()`, pytz 
creates a list of `tzinfo` objects with *fixed* offsets and eagerly attaches 
one to a datetime when you call `pytz.timezone.localize()/normalize()`. It's 
using the `tzinfo` field as a cache, but at the cost of breaking time zone 
semantics (which unfortunately use `is` to determine whether two datetimes are 
in the same zone or not), plus the cost of requiring *eager* resolution to this 
question rather than lazy.

> Somehow, we need a method to clear the cache and decide a caching policy. The 
> simplest policy is to have no limit. The re.compile() uses a cache of 512 
> entries. functools.lru_cache uses a default limit of 128 entries.

This is not necessary, actually, because of the way this cache works. This is a 
"write-once" cache *stored on the datetime itself*, and its cost is built in to 
the memory cost of the datetime itself. For CPython it will currently consume 
one of the alignment bytes, so there will be no additional memory use.

> Instead of adding a new API, would it be possible to reuse 
> functools.lru_cache somehow?

If it were possible to use an LRU cache in this situation, it would not be 
necessary to make a change in CPython at all. The problem with LRU cache or any 
other cache implemented as a mapping between datetime -> offset are as I 
mentioned, large memory use and the performance cost of creating an appropriate 
hash would greatly reduce the utility of this function. The proposed tzidx lets 
tzinfo implementers opt in to nearly all the advantages of pytz without any of 
the disadvantages.

>> 2. Because the implementation of datetime.__hash__ invokes utcoffset(), it 
>> is impossible to implement utcoffset in terms of a dictionary of tz-aware 
>> datetimes. This means that you need to construct a new, naive datetime, 
>> which is a fairly slow operation and really puts a damper in the utility of 
>> the cache.

> For special local timezones, would it be possible to explicitly exclude them, 
> and restrict the cache the simple timespace (fixed offset)?

I think there are many problems with this approach, but I'm going to hold off 
on answering this, because I think even if this were possible, an on-datetime 
cache makes much more sense than a mapping-based cache. If you still want this 
addressed given my other arguments let me know and I can give you a more 
thorough response.

Thank you for taking the time to review my proposal, Victor. I realize that it 
is a bit of a wall of text accompanying a pretty big PR, which is kinda the 
result of the fact that I had this idea 6+ months ago and I've been privately 
reworking and refining it (both in a code sandbox and in my head) for some time 
now, only to dump out the results of all my internal arguments all at once. I 
appreciate the feedback and I'm happy to do whatever possible to clarify my 
reasoning.

--

___
Python tracker 

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



[issue35736] Missing component in table after getElementsByTagName("nn")

2019-01-14 Thread Michael Krötlinger

New submission from Michael Krötlinger :

After operations = xmltree.getElementsByTagName("operation") the table does not 
contain operations antragstypenErmitteln and mammographieIndikationenErmitteln

--
files: EbsService.wsdl
messages: 333621
nosy: MiKr41
priority: normal
severity: normal
status: open
title: Missing component in table after getElementsByTagName("nn")
type: behavior
versions: Python 3.6
Added file: https://bugs.python.org/file48048/EbsService.wsdl

___
Python tracker 

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



[issue35698] [statistics] Division by 2 in statistics.median

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

> I find Steve's closing of the issue premature, but I'm not going to reverse 
> it.

Steven D'Aprano is the maintainer of the module (he wrote 450 and implemented 
it), he has the last word.

Steven D'Aprano, Raymond Hettinger and me are 3 core developers and in favor of 
closing the issue.

--

___
Python tracker 

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



[issue35698] [statistics] Division by 2 in statistics.median

2019-01-14 Thread Jonathan Fine


Jonathan Fine  added the comment:

I'm still thinking about this.

I find Steve's closing of the issue premature, but I'm not going to reverse it.

--

___
Python tracker 

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



[issue35698] [statistics] Division by 2 in statistics.median

2019-01-14 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

I agree that for numeric data, it isn't worth changing the behaviour of median 
to avoid the division in the case of two equal middle values.

Even if we did accept this feature request, it is not going to eliminate the 
change in type in all circumstances. median([1, 2]) will still return 1.5. And 
in practical terms, the conditions where this would apply are likely to be 
quite unusual for numeric data. (Ordinal data is likely to be a different 
story.)

One way or another, the caller has to expect that the median of an even number 
of ints may return a number which is a float. If the caller doesn't want that 
behaviour, they can use median_low or median_high, which never take the average 
and always return a value from the data set.

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



[issue33416] Add endline and endcolumn to every AST node

2019-01-14 Thread Aivar Annamaa


Aivar Annamaa  added the comment:

I strongly support this feature, because my IDE (https://thonny.org) needs to 
highlight AST nodes in the source code.

There would be many interested parties if you count the stars of this project: 
https://github.com/gristlabs/asttokens

--
nosy: +Aivar.Annamaa

___
Python tracker 

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



[issue35734] ipaddress's _BaseV4._is_valid_netmask fails to detect invalid netmask like 255.254.128.0

2019-01-14 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

Still 255.254.128.0 is a valid subnet.

If I understand correctly, rfc1519 relate to how public ip addresses should be 
attributed. It does not cover what private subnets you use and you still can 
such submask (as long as you own the whole /16 for example).

rfc950 explicitly allow for such subnets:

> Since the bits that identify the subnet are specified by a bitmask, they need 
> not be adjacent in the address. However, we recommend that the subnet bits be 
> contiguous and located as the most significant bits of the local address.

and I've heard of them being used (hence the complications and the need for 
rfc1519 for the public address space).

I'm in favor of closing this issue in favor of issue27860.

--

___
Python tracker 

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



[issue35723] Add "time zone index" cache to datetime objects

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

I dislike adding a public API for an optimization. Would it be possible to make 
it private? Would it make sense? tzidx => _tzidx.

> One other thing I might mention here is that I did explore the idea of 
> storing this cache on the tzinfo implementation itself, but it is problematic 
> for a number of reasons:
>
> 1. It would either need to use some sort of expiring cache (lru, ttl) or 
> require a great deal of memory, greatly reducing the utility - the proposed 
> implementation requires no additional memory.

In test of your PR, tzinfo allocates memory for its cache: 

offsets = [timedelta(hours=0), timedelta(hours=1)]
names = ['+00:00', '+01:00']
dsts = [timedelta(hours=0), timedelta(hours=1)]

This memory isn't free. I don't see how using an index completely prevents the 
need to allocate memory for a cache.

Somehow, we need a method to clear the cache and decide a caching policy. The 
simplest policy is to have no limit. The re.compile() uses a cache of 512 
entries. functools.lru_cache uses a default limit of 128 entries.

Instead of adding a new API, would it be possible to reuse functools.lru_cache 
somehow?

> 2. Because the implementation of datetime.__hash__ invokes utcoffset(), it is 
> impossible to implement utcoffset in terms of a dictionary of tz-aware 
> datetimes. This means that you need to construct a new, naive datetime, which 
> is a fairly slow operation and really puts a damper in the utility of the 
> cache.

For special local timezones, would it be possible to explicitly exclude them, 
and restrict the cache the simple timespace (fixed offset)?

--

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +11181, 11182

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +11181

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +11181, 11182, 11183

___
Python tracker 

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



[issue22616] Allow connecting AST nodes with corresponding source ranges

2019-01-14 Thread Edward K Ream


Edward K Ream  added the comment:

On Mon, Jan 14, 2019 at 5:24 AM Ivan Levkivskyi 
wrote:

Adding endline and endcolumn to every ast node will be a big improvement.

Edward
--
Edward K. Ream: edream...@gmail.com Leo: http://leoeditor.com/
--

--
nosy: +edreamleo

___
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

2019-01-14 Thread Nick Coghlan


Nick Coghlan  added the comment:

Namespace packages in general didn't rely on pth files - only the 
setuptools/pkg_resources implementation of them did.

I'll also reiterate that I am *completely* opposed to deprecating the "append 
entries to sys.path" usage model, as there is absolutely nothing wrong with 
that (if distros are ending up with an overly cluttered system that's making 
the standard path too long, then review the individual packages creating the 
clutter, don't remove the interpreter feature).

That "append to sys.path" aspect of the feature is all that's needed to make 
editable installs and virtual environment chaining work.

That means the aspect I'm in agreement with deprecating is the "arbitrary code 
execution on startup" case, but even for that, I don't think we should 
deprecate it until we have a comparable replacement that's more self-evidently 
a way of allowing arbitrary code execution, and also more obviously has the 
potential to make every interpreter startup in that Python installation slower.

I'm not really concerned about execution order issues between interdependent 
sitecustomize hooks, as there's already no ordering guarantee with .pth files, 
and if folks do need more control over the interdependencies for some reason 
then they can just rely on the regular import system rather than something 
sitecustomize specific.

So I think Chris Billington's proposed replacement is actually a reasonable 
idea:

1. In site.addsitedir, check for a __sitecustomize__ subdirectory after 
checking for .pth files
2. If any Python files are found in that directory, execute them
3. If "python -x importtime" has been specified, report the execution time of 
each of those files (this would allow both easy identification of any hooks 
that are being executed, as well as which ones are taking up a lot of time)

There could then be a "-Z" option that offered a more limited form of "-S": it 
would allow site.py itself to run, but disable the processing of 
`sitecustomize.py` and `__sitecustomize__` entries.

--

___
Python tracker 

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



[issue35734] ipaddress's _BaseV4._is_valid_netmask fails to detect invalid netmask like 255.254.128.0

2019-01-14 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

> I couldn't find any use of _is_valid_netmask() in the code, why should this 
> netmask be invalid?

There is an open issue to remove this method which is unused and undocumented 
issue27860. 

I have less knowledge on the subnet masking area but on searching the web there 
seems to be an RFC that asks for contiguous ones without intermixing zeroes 
that I hope OP is referring to.

* https://superuser.com/questions/601252/is-225-225-225-128-a-valid-subnet-mask
* 
https://superuser.com/questions/1151908/non-contiguous-subnet-mask/1151942#1151942

--

___
Python tracker 

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



[issue35734] ipaddress's _BaseV4._is_valid_netmask fails to detect invalid netmask like 255.254.128.0

2019-01-14 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I couldn't find any use of _is_valid_netmask() in the code, why should this 
netmask be invalid?

As far as I can tell this should be a valid one, is there a reason to refuse it?

--
nosy: +remi.lapeyre

___
Python tracker 

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



[issue34756] Few changes in sys.breakpointhook()

2019-01-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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

___
Python tracker 

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



[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2019-01-14 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

CC-ing Catherine Devlin and Todd Leonhardt so we can close the issue by either 
accepting or refusing such feature.

--

___
Python tracker 

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



[issue28657] cmd.Cmd.get_help() implementation can't see do_*() methods added dynamically by setattr()

2019-01-14 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +catherinedevlin, tleonhardt

___
Python tracker 

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



[issue22616] Allow connecting AST nodes with corresponding source ranges

2019-01-14 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

Closed as superseded by https://bugs.python.org/issue33416

--
superseder:  -> Add endline and endcolumn to every AST node

___
Python tracker 

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



[issue22616] Allow connecting AST nodes with corresponding source ranges

2019-01-14 Thread Ivan Levkivskyi


Change by Ivan Levkivskyi :


--
nosy: +levkivskyi
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



[issue33416] Add endline and endcolumn to every AST node

2019-01-14 Thread Ivan Levkivskyi


Ivan Levkivskyi  added the comment:

> I'm sure we will find use cases though I doubt that many compiler syntax 
> errors would benefit (since a syntax error means that we don't have a 
> completely matched grammar rule).

This is mostly useful for code analysis tools and IDEs.

> BTW, does this information have to be added by the parser or could there be 
> am AST module function that deduces the end locations from the start location 
> of next sibling node or from the parent node?

There may be some other ways to do it, but currently I am adding both 
`end_lineno` and `end_col_offset` to AST, and `n_end_lineno` and 
`n_end_col_offset` in CST. The latter are needed to easily take care of 
situations like `a + (b )`, and other corner cases. I could imagine it is 
possible to live with only end position information in AST to save some memory, 
but then the code will be much harder to maintain. We can discuss details in 
the PR.

> Do we know what other languages do (carry the full span info in the AST or 
> deduce the span after the fact)?

I didn't do real research, but quick browsing shows carrying the end position 
info is quite common. But more importantly as Serhiy noted, deducing might be 
just not possible in some situations.

> It is up to you Ivan.

OK, I will close the other one as superseded by this issue.

--

___
Python tracker 

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



[issue34756] Few changes in sys.breakpointhook()

2019-01-14 Thread miss-islington


miss-islington  added the comment:


New changeset 6d0254bae4d739b487fcaa76705a2d309bce8e75 by Miss Islington (bot) 
in branch '3.7':
bpo-34756: Silence only ImportError and AttributeError in sys.breakpointhook(). 
(GH-9457)
https://github.com/python/cpython/commit/6d0254bae4d739b487fcaa76705a2d309bce8e75


--
nosy: +miss-islington

___
Python tracker 

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



[issue34756] Few changes in sys.breakpointhook()

2019-01-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

The part of the clean up was applied in PR 9519. And since 
_PyObject_GetBuiltin() was gone, the rest of the clean up no longer applicable. 
The only part that is left is to make unexpected exceptions no longer silenced.

--

___
Python tracker 

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



[issue34756] Few changes in sys.breakpointhook()

2019-01-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11178, 11179

___
Python tracker 

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



[issue34756] Few changes in sys.breakpointhook()

2019-01-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11178, 11179, 11180

___
Python tracker 

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



[issue34756] Few changes in sys.breakpointhook()

2019-01-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11178

___
Python tracker 

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



[issue34756] Few changes in sys.breakpointhook()

2019-01-14 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:


New changeset 6fe9c446f8302553952f63fc6d96be4dfa48ceba by Serhiy Storchaka in 
branch 'master':
bpo-34756: Silence only ImportError and AttributeError in sys.breakpointhook(). 
(GH-9457)
https://github.com/python/cpython/commit/6fe9c446f8302553952f63fc6d96be4dfa48ceba


--

___
Python tracker 

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



[issue30235] Validate shutil supports path-like objects, update docs accordingly

2019-01-14 Thread Mickaël Schoentgen

Change by Mickaël Schoentgen :


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



[issue32689] shutil.move raises AttributeError if first argument is a pathlib.Path object and destination is a directory

2019-01-14 Thread Mickaël Schoentgen

Change by Mickaël Schoentgen :


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



[issue30235] Validate shutil supports path-like objects, update docs accordingly

2019-01-14 Thread Mickaël Schoentgen

Mickaël Schoentgen  added the comment:

There is another place where the use of Path objects is not yet working: when 
move() is given a directory as argument. A patch is in review in issue32689.

--

___
Python tracker 

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



[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

I proposed two different implementations to make time.strftime() more portable, 
so it seems like it's more complex than what I expected. I merged the datetime 
change since this one is self-sufficient, so someone can work on a time change 
on top of it.

--
nosy: +miss-islington

___
Python tracker 

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



[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-01-14 Thread miss-islington


miss-islington  added the comment:


New changeset 26122de1a80d1618ee80862cf3b8f73f8ec7d9cf by Miss Islington (bot) 
in branch '3.7':
bpo-35066: _dateime.datetime.strftime copies trailing '%' (GH-10692)
https://github.com/python/cpython/commit/26122de1a80d1618ee80862cf3b8f73f8ec7d9cf


--
nosy: +miss-islington

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

The test still pass on my Fedora 29 with:

diff --git a/Lib/idlelib/idle_test/test_squeezer.py 
b/Lib/idlelib/idle_test/test_squeezer.py
index 71eccd3693..e026567789 100644
--- a/Lib/idlelib/idle_test/test_squeezer.py
+++ b/Lib/idlelib/idle_test/test_squeezer.py
@@ -114,7 +114,7 @@ class SqueezerTest(unittest.TestCase):
 if root is None:
 root = get_test_tk_root(self)
 text_widget = Text(root)
-text_widget["font"] = ('Courier', 10)
+text_widget["font"] = ('', 10)
 text_widget.mark_set("iomark", "1.0")
 return text_widget
 
@@ -300,7 +300,7 @@ class SqueezerTest(unittest.TestCase):
 orig_auto_squeeze_min_lines = squeezer.auto_squeeze_min_lines
 
 # Increase both font size and auto-squeeze-min-lines.
-text_widget["font"] = ('Courier', 20)
+text_widget["font"] = ('', 20)
 new_auto_squeeze_min_lines = orig_auto_squeeze_min_lines + 10
 self.set_idleconf_option_with_cleanup(
 'main', 'PyShell', 'auto-squeeze-min-lines',
@@ -309,7 +309,7 @@ class SqueezerTest(unittest.TestCase):
 Squeezer.reload()
 # The following failed on Gentoo buildbots.  Issue title will be
 # IDLE: Fix squeezer test_reload.
-#self.assertGreater(squeezer.zero_char_width, orig_zero_char_width)
+self.assertGreater(squeezer.zero_char_width, orig_zero_char_width)
 self.assertEqual(squeezer.auto_squeeze_min_lines,
  new_auto_squeeze_min_lines)

--

___
Python tracker 

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



[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-01-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11175, 11176, 11177

___
Python tracker 

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



[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-01-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11175, 11176

___
Python tracker 

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



[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 454b3d4ea246e8751534e105548d141ed7b0b032 by Victor Stinner 
(MichaelSaah) in branch 'master':
bpo-35066: _dateime.datetime.strftime copies trailing '%' (GH-10692)
https://github.com/python/cpython/commit/454b3d4ea246e8751534e105548d141ed7b0b032


--

___
Python tracker 

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



[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-01-14 Thread miss-islington


Change by miss-islington :


--
pull_requests: +11175

___
Python tracker 

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



[issue35066] Inconsistency between dangling '%' handling in time.strftime() and datetime.strftime()

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

The behavior of strftime() with non-ASCII is not portable: bpo-34512.

A solution to make time.strftime() more portable would be to split the format 
string, format each "%xxx" substring separately but don't pass substrings 
between "%xxx" to strftime().

--

___
Python tracker 

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



[issue34512] Document platform-specific strftime() behavior for non-ASCII format strings

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

A solution to make time.strftime() more portable would be to split the format 
string, format each "%xxx" substring separately but don't pass substrings 
between "%xxx" to strftime(). There is a similar discussion about trailing "%": 
bpo-35066.

--
nosy: +vstinner

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Tal Einat


Tal Einat  added the comment:

> What if the old and the new font have the same width?

The font is set to Courier 10 in the test's setup, and it is then set to 
Courier 20 by the test before calling reload(). The zero character should 
certainly not have the same width in both cases.

ISTM that indeed the font must be missing, or something of that sort.

--

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

> Not really. This test, test_reload(), is specifically checking that the 
> reload() function updates zero_char_width after font changes.

What if the old and the new font have the same width?

--

___
Python tracker 

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



[issue33301] Add __contains__ to pathlib

2019-01-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


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



[issue35720] Memory leak in Modules/main.c:pymain_parse_cmdline_impl when using the CLI flag

2019-01-14 Thread SilentGhost


Change by SilentGhost :


--
nosy: +vstinner
type:  -> resource usage
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



[issue34384] os.readlink does not accept pathlib.Path on Windows

2019-01-14 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
status: open -> pending

___
Python tracker 

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



[issue33944] Deprecate and remove pth files

2019-01-14 Thread SilentGhost


Change by SilentGhost :


--
nosy: +SilentGhost

___
Python tracker 

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



[issue30235] Validate shutil supports path-like objects, update docs accordingly

2019-01-14 Thread Mickaël Schoentgen

Change by Mickaël Schoentgen :


--
nosy: +Tiger-222

___
Python tracker 

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



[issue35730] IDLE: Fix squeezer test_reload.

2019-01-14 Thread Tal Einat


Tal Einat  added the comment:

> The test rely on a specific font name and specific font size: maybe this 
> specific font is not available.

Can you help by checking this? Is there another font known to be universally 
available?

> Instead of skipping the test, would it make same to accept that 
> squeezer.zero_char_width does not change? I don't know IDLE nor the test.

Not really. This test, test_reload(), is specifically checking that the 
reload() function updates zero_char_width after font changes.

--

___
Python tracker 

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



[issue35378] multiprocessing.Pool.imaps iterators do not maintain alive the multiprocessing.Pool objects

2019-01-14 Thread STINNER Victor


STINNER Victor  added the comment:

According to all previous discussions, I now agree with having a strong 
reference.

--

___
Python tracker 

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



  1   2   >