[issue23089] Update libffi config files

2018-09-03 Thread Zachary Ware


Zachary Ware  added the comment:

We no longer bundle a full copy of libffi, and the toplevel config.* files have 
been kept relatively up to date.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue19955] When adding .PY and .PYW to PATHEXT, it replaced string instead of appending

2018-09-03 Thread Zachary Ware


Change by Zachary Ware :


--
resolution:  -> works for me
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



[issue1654408] Windows installer should split tcl/tk and tkinter install options.

2018-09-03 Thread Zachary Ware


Zachary Ware  added the comment:

Since installing tkinter without Tcl/Tk would leave tkinter unusable without a 
separately installed and configured Tcl/Tk (and thus probably generate copious 
reports about tkinter being broken), I don't think this is a good idea.  If 
someone *really* wants a different Tcl/Tk environment, they can always create 
their own.  Closing as rejected.

Terry's suggestion about being able to install Tcl/Tk extensions sounds 
reasonable, but I haven't played around with it and that should have its own 
issue if we're going to do anything with it.

--
assignee: loewis -> 
resolution:  -> rejected
stage: test needed -> resolved
status: open -> closed
title: Installer should split tcl/tk and tkinter install options. -> Windows 
installer should split tcl/tk and tkinter install options.

___
Python tracker 

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



[issue34573] Simplify __reduce__() of set and dict iterators.

2018-09-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Seems there is a bug in the dict iter code, leading to a crash when pickle 
non-initial items iterator. Would be nice to add tests similar to issue34574, 
and if the bug will be exposed, fix it.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue26901] Argument Clinic test is broken

2018-09-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Thank you Pablo and Victor!

I do not mind backporting to 3.6. Argument Clinic still can take fixes, and 
they can add new tests.

--

___
Python tracker 

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



[issue34573] Simplify __reduce__() of set and dict iterators.

2018-09-03 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

Also take a look at the other places that have similar logic.  I believe these 
all went in at the same time. See commit 
31668b8f7a3efc7b17511bb08525b28e8ff5f23a

--
nosy: +kristjan.jonsson, rhettinger

___
Python tracker 

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



[issue8110] subprocess.py doesn't correctly detect Windows machines

2018-09-03 Thread Zachary Ware


Change by Zachary Ware :


--
pull_requests: +8514

___
Python tracker 

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



[issue34574] OrderedDict iterators are exhausted during pickling

2018-09-03 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


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

___
Python tracker 

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



[issue34574] OrderedDict iterators are exhausted during pickling

2018-09-03 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

In [1]: from collections import OrderedDict

In [2]: od = OrderedDict.fromkeys(range(10))

In [3]: it = iter(od)

In [4]: it.__reduce__()
Out[4]: (, ([0, 1, 2, 3, 4, 5, 6, 7, 8, 9],))

In [5]: list(it)
Out[5]: []

--
messages: 324551
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: OrderedDict iterators are exhausted during pickling
type: behavior

___
Python tracker 

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



[issue34573] Simplify __reduce__() of set and dict iterators.

2018-09-03 Thread Sergey Fedoseev


Change by Sergey Fedoseev :


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

___
Python tracker 

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



[issue34573] Simplify __reduce__() of set and dict iterators.

2018-09-03 Thread Sergey Fedoseev


New submission from Sergey Fedoseev :

Currently __reduce__() implementation of set and dict iterators saves items to 
list using next/PyList_Append(), it could be simplified by using 
PySequence_List().

--
components: Interpreter Core
messages: 324550
nosy: sir-sigurd
priority: normal
severity: normal
status: open
title: Simplify __reduce__() of set and dict 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



[issue21877] External.bat and pcbuild of tkinter do not match.

2018-09-03 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

The fixes, attached to other issues, works flawlessly for me.

--
nosy:  -BreamoreBoy

___
Python tracker 

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



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

2018-09-03 Thread Koos Zevenhoven


Koos Zevenhoven  added the comment:

That said, I agree with Antoine that being able to Ctrl-C would be the most 
useful of these fixes. But it seems clear that people are experiencing these 
issues differently (if at all).

--

___
Python tracker 

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



[issue34566] pipe read sometimes returns EOF but returncode is still None

2018-09-03 Thread Martin Panter


Martin Panter  added the comment:

The "grep" process may be closing its end of the pipe before it exits. Or if 
Grep leaves the pipe open when it exits, the OS may close the pipe before it 
makes the child exit status available. Either way, I suspect "p.stdout.read()" 
returns an empty string indicating the pipe is closed, but "p.poll()" returns 
None because the exit status is not yet ready. Even if it is the OS closing the 
pipe after the child exits, I doubt there is any guarantee about when that 
happens relative to the child's exit status becoming available.

The "poll" method does not wait for the child to exit. Normally you use the 
"wait" method in this situation. I suspect this is a bug in the application, 
not in Python.

--
nosy: +martin.panter

___
Python tracker 

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



[issue17480] pyvenv should be installed someplace more obvious on Windows

2018-09-03 Thread Mark Lawrence


Change by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue17480] pyvenv should be installed someplace more obvious on Windows

2018-09-03 Thread Jason R. Coombs


Jason R. Coombs  added the comment:

Nice!

Linking to issue25427.

--

___
Python tracker 

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



[issue26901] Argument Clinic test is broken

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:

We decided to only fix 3.7 and master branches, not 3.6 and older: 
https://github.com/python/cpython/pull/9048

The initial issue has been fixed, so I close the issue.

A new issue might be opened if someone wants to extend the existing test suite 
(test_clinic).

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

___
Python tracker 

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



[issue26901] Argument Clinic test is broken

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 1e921236d7ecc77299d34380d6a2159e9db05a1a by Victor Stinner (Miss 
Islington (bot)) in branch '3.7':
bpo-26901: Fix the Argument Clinic test suite (GH-8879) (GH-9048)
https://github.com/python/cpython/commit/1e921236d7ecc77299d34380d6a2159e9db05a1a


--

___
Python tracker 

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



[issue16892] Windows bug picking up stdin from a pipe

2018-09-03 Thread Zachary Ware


Zachary Ware  added the comment:

Eryk's diagnosis sounds like this is not a bug in Python or something that 
Python needs to or even should fix.

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



[issue17480] pyvenv should be installed someplace more obvious on Windows

2018-09-03 Thread Zachary Ware


Zachary Ware  added the comment:

With pyvenv removed from 3.8 and various other proposals in other issues for 
where scripts should be installed on Windows, I'm going to go ahead and close 
this.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
versions: +Python 3.8 -Python 3.5

___
Python tracker 

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



[issue4453] MSI installer shows error message if "Compile .py files to bytecode" option is selected

2018-09-03 Thread Zachary Ware


Zachary Ware  added the comment:

According to Martin in msg112770, this was due to files that could not be 
compiled.  There shouldn't be any more of those added to 2.7 (which is the last 
version receiving binary releases using this installer scheme), so I'm closing 
the issue.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
versions: +Python 2.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue13081] Crash in Windows with unknown cause

2018-09-03 Thread Zachary Ware


Zachary Ware  added the comment:

As far as I can tell, this was an application bug in multiprocessing cleanup 7 
years ago.  I'm not sure there's really even anything to add to the docs for 
this, but if anyone disagrees or produces a patch, please reopen.

--
nosy: +davin, pitrou, zach.ware
resolution:  -> works for me
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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:

I missed the fact that find_executable() always lookup in the current 
directory, whereas shutil.which() doesn't. I abandoned my PR 8968 in favor of 
PR 9049 which only fix the case where PATH env var is not defined. This PR can 
easily be backported to all branches, whereas backporting PR 8968 to stable 
branches would be risky: changes to distutils are likely to break a random 
package on PyPI.

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

___
Python tracker 

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



[issue34530] distutils: find_executable() fails if the PATH environment variable is not set

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8511

___
Python tracker 

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



[issue33083] math.factorial accepts non-integral Decimal instances

2018-09-03 Thread Pablo Galindo Salgado


Pablo Galindo Salgado  added the comment:


New changeset e9ba3705de656215d52b8f8f4a2e7ad60190e944 by Pablo Galindo in 
branch 'master':
bpo-33083 - Make math.factorial reject arguments that are not int-like (GH-6149)
https://github.com/python/cpython/commit/e9ba3705de656215d52b8f8f4a2e7ad60190e944


--
nosy: +pablogsal

___
Python tracker 

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



[issue26901] Argument Clinic test is broken

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:

> Any chance to fix Argument Clinic test? Without this we can't add new 
> features, fix bugs and add tests for searching new bugs. This is critical for 
> further converting to Argument Clinic.

Done in master branch. But test_clinic.py is really basic, it should really be 
extended to add more tests!

I also proposed to backport test_clinic.py to 3.7: PR 9048.

Thanks Pablo for the initial fix and for your review of my PR!

--

___
Python tracker 

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



[issue21877] External.bat and pcbuild of tkinter do not match.

2018-09-03 Thread Zachary Ware


Zachary Ware  added the comment:

I believe this has been fixed some time in the last few years; Terry, please 
reopen this if I've missed something.

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



[issue26901] Argument Clinic test is broken

2018-09-03 Thread miss-islington


Change by miss-islington :


--
pull_requests: +8510

___
Python tracker 

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



[issue26901] Argument Clinic test is broken

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 65fc98e7b1f62c2e621f04780a3a77c3498cc195 by Victor Stinner in 
branch 'master':
bpo-26901: Fix the Argument Clinic test suite (GH-8879)
https://github.com/python/cpython/commit/65fc98e7b1f62c2e621f04780a3a77c3498cc195


--

___
Python tracker 

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



[issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 84b0129b5e0a0e22aad22ae8db2e3833a228aa57 by Victor Stinner in 
branch '3.7':
_Py_CoerceLegacyLocale() restores LC_CTYPE on fail (GH-9044) (GH-9046)
https://github.com/python/cpython/commit/84b0129b5e0a0e22aad22ae8db2e3833a228aa57


--

___
Python tracker 

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



[issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:

test_c_locale_coerce pass again on AMD64 FreeBSD 10.x Shared 3.x, I close the 
issue.

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

___
Python tracker 

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



[issue34561] Replace list sorting merge_collapse()?

2018-09-03 Thread Tim Peters


Tim Peters  added the comment:

Looks like all sorts of academics are exercised over the run-merging order now. 
 Here's a paper that's unhappy because timsort's strategy, and 2-merge too, 
aren't always near-optimal with respect to the entropy of the distribution of 
natural run lengths:

"Nearly-Optimal Mergesorts:  Fast, Practical Sorting Methods That Optimally 
Adapt to Existing Runs"
J. Ian Munro
Sebastian Wild
https://arxiv.org/abs/1805.04154

Their alternatives are worth looking at too.  Offhand, their "powersort" 
ordering looks more promising to me than their "peeksort".  It was very 
deliberate that timsort looks at whether to merge a run immediately after 
identifying one, for the "freshness in memory hierarchy" reason.  That peeksort 
does not is, I expect, more significant in real life than the "one little 
blemish" they call it.

In any case, don't flip out over this.  On randomly ordered input, timsort 
already strongly tends toward perfectly balanced merges, and there's no 
significant improvement to be had over that.  On the other hand, on inputs with 
significant order that _can_ be exploited by this approach, the gains are far 
more due to "galloping" than to the order in which runs are merged.  All these 
papers ignore galloping entirely.  Example:  take range(1_000_000), cut it in 
half, and riffle shuffle it.  So you get

0 50 1 51 ... 49 99 or
50 0 51 1 ... 99 49

Either way, there are half a million natural runs, each of length 2.  Any 
balanced way of merging them is as good as it gets.  It's galloping alone that 
buys huge improvements in cases like this.

Especially in the context of Python, where object comparisons are (in general) 
far more expensive than moving pointers around, some excess in worst-case 
memory copying is, well, "one little blemish" ;-)

But still worth addressing if feasible.  Now that sorting often also adapts to 
avoid the relatively massive expense of PyObject_RichCompareBool, 
memory-movement costs become more important.  Approaches like 2-merge also give 
simpler merge_collapse() code that's easier to reason about, and reduces the 
worst-case stack size (which becomes very easy to compute in advance instead of 
the current puzzle).

--

___
Python tracker 

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



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

2018-09-03 Thread Lorenz Mende


Lorenz Mende  added the comment:

@jeremy: nice work
The fix works for me reproducable, tests run normal now.
Why dont you create a PR?

Can someone explain why this issue only came up with parallel tests?

--

___
Python tracker 

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



[issue34570] Segmentation fault in _PyType_Lookup

2018-09-03 Thread Stefan Behnel


Stefan Behnel  added the comment:

Thanks for the report.
Is the place where it crashes always the same?
Could it be that your system is running out of resources, e.g. RAM?

--
nosy: +scoder

___
Python tracker 

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



[issue34562] cannot install versions 3.6.5+ on Windows

2018-09-03 Thread Steve Dower


Steve Dower  added the comment:

It looks like you have some sort of network protection software that is not 
allowing the installer to download certain files.

Try running the installer with the "/layout [directory]" option to pre-download 
all the files you need from a machine that can access the internet, and then 
you can install optional components on any machine without needing network 
access.

--

___
Python tracker 

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



[issue34572] C unpickling bypasses import thread safety

2018-09-03 Thread Tim Burgess


Change by Tim Burgess :


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

___
Python tracker 

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



[issue34549] unittest docs could use another header

2018-09-03 Thread Grant Jenks


Change by Grant Jenks :


--
nosy: +grantjenks

___
Python tracker 

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



[issue34572] C unpickling bypasses import thread safety

2018-09-03 Thread Tim Burgess


New submission from Tim Burgess :

Retrieving and using a module directly from sys.modules (from C in this case) 
leads to a race condition where the module may be importing on another thread 
but has not yet been initialised.  For slow filesystems or large modules (e.g. 
numpy) this seems to lead to easily reproducible errors (the attached code 
fails 100% of the time on my work machine - CentOS 7).

I believe they have to be in sys.modules during this phase due to the 
possibility of circular references.

importlib handles this carefully with locking, but _pickle.c bypasses all that, 
leading to issues with threaded codes that use pickling, e.g. dask/distributed.

--
components: Extension Modules
files: reproducer_submit.py
messages: 324528
nosy: tjb900
priority: normal
severity: normal
status: open
title: C unpickling bypasses import thread safety
type: crash
versions: Python 3.6, Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47784/reproducer_submit.py

___
Python tracker 

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



[issue34567] test.pythoninfo: dump interpreter _PyCoreConfig

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


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



[issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 73b00becbdd40f6a80cfa00abf1ae650a2b5e454 by Victor Stinner in 
branch 'master':
bpo-34544: pymain_read_conf() don't change LC_ALL (GH-9045)
https://github.com/python/cpython/commit/73b00becbdd40f6a80cfa00abf1ae650a2b5e454


--

___
Python tracker 

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



[issue34485] _PyCoreConfig: add stdio_encoding and stdio_errors

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 73b00becbdd40f6a80cfa00abf1ae650a2b5e454 by Victor Stinner in 
branch 'master':
bpo-34544: pymain_read_conf() don't change LC_ALL (GH-9045)
https://github.com/python/cpython/commit/73b00becbdd40f6a80cfa00abf1ae650a2b5e454


--

___
Python tracker 

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



[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-03 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
components: +Library (Lib)
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



[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-03 Thread Serhiy Storchaka


Change by Serhiy Storchaka :


--
nosy: +gvanrossum, levkivskyi

___
Python tracker 

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



[issue34571] help(hashlib.blake2b) causes RuntimeError in 3.7

2018-09-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

It should be fixed in issue33729.

--
nosy: +serhiy.storchaka
resolution:  -> out of date
stage:  -> resolved
status: open -> closed
superseder:  -> Hashlib/blake2* missing 'data' keyword argument

___
Python tracker 

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



[issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8508

___
Python tracker 

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



[issue34571] help(hashlib.blake2b) causes RuntimeError in 3.7

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +christian.heimes

___
Python tracker 

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



[issue34571] help(hashlib.blake2b) causes RuntimeError in 3.7

2018-09-03 Thread mcdallas


New submission from mcdallas :

$ python3.7 
  
Python 3.7.0 (default, Jul 23 2018, 20:22:55)
[Clang 9.1.0 (clang-902.0.39.2)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import hashlib
>>> help(hashlib.blake2b)
Traceback (most recent call last):
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py",
 line 1996, in wrap_value
value = eval(s, module_dict)
  File "", line 1, in 
NameError: name '_blake2b' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py",
 line 1999, in wrap_value
value = eval(s, sys_module_dict)
  File "", line 1, in 
NameError: name '_blake2b' is not defined

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "", line 1, in 
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/_sitebuiltins.py",
 line 103, in __call__
return pydoc.help(*args, **kwds)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pydoc.py",
 line 1895, in __call__
self.help(request)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pydoc.py",
 line 1954, in help
else: doc(request, 'Help on %s:', output=self._output)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pydoc.py",
 line 1674, in doc
pager(render_doc(thing, title, forceload))
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pydoc.py",
 line 1667, in render_doc
return title % desc + '\n\n' + renderer.document(object, name)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pydoc.py",
 line 386, in document
if inspect.isclass(object): return self.docclass(*args)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pydoc.py",
 line 1237, in docclass
signature = inspect.signature(object)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py",
 line 3070, in signature
return Signature.from_callable(obj, follow_wrapped=follow_wrapped)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py",
 line 2820, in from_callable
follow_wrapper_chains=follow_wrapped)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py",
 line 2343, in _signature_from_callable
return _signature_fromstr(sigcls, obj, text_sig)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py",
 line 2067, in _signature_fromstr
p(name, default)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py",
 line 2037, in p
default_node = RewriteSymbolics().visit(default_node)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/ast.py",
 line 262, in visit
return visitor(node)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py",
 line 2024, in visit_Attribute
return wrap_value(value)
  File 
"/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/inspect.py",
 line 2001, in wrap_value
raise RuntimeError()
RuntimeError


same for blake2s

--
components: Library (Lib)
messages: 324524
nosy: mcdallas
priority: normal
severity: normal
status: open
title: help(hashlib.blake2b) causes RuntimeError in 3.7
type: behavior
versions: Python 3.7

___
Python tracker 

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



[issue34485] _PyCoreConfig: add stdio_encoding and stdio_errors

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8507

___
Python tracker 

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



[issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8506

___
Python tracker 

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



[issue34567] test.pythoninfo: dump interpreter _PyCoreConfig

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 2094c2bea4f79c31819994d8f0afa97ccc52cca8 by Victor Stinner in 
branch 'master':
bpo-34567: pythoninfo gets coreconfig (GH-9043)
https://github.com/python/cpython/commit/2094c2bea4f79c31819994d8f0afa97ccc52cca8


--

___
Python tracker 

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



[issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset 8ea09110d413829f71d979d8c7073008cb87fb03 by Victor Stinner in 
branch 'master':
_Py_CoerceLegacyLocale() restores LC_CTYPE on fail (GH-9044)
https://github.com/python/cpython/commit/8ea09110d413829f71d979d8c7073008cb87fb03


--

___
Python tracker 

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



[issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue34570] Segmentation fault in _PyType_Lookup

2018-09-03 Thread Pablosky


New submission from Pablosky :

Platform details:
Ubuntu 16.04 LTS (64 bit)
Python 2.7.12

I am using Robot framework environment for testing. It looks segmentation fault 
appears when there is a lot (like 20) of pybot (Robot Framework component) 
instances running in the system. When the crash appears single pybot instance 
is killed. Rest is fine.

It happens sporadically. Like 4% of pybot executions.

--
components: ctypes
files: segfault.txt
messages: 324521
nosy: Pablosky
priority: normal
severity: normal
status: open
title: Segmentation fault in _PyType_Lookup
type: crash
versions: Python 2.7
Added file: https://bugs.python.org/file47783/segfault.txt

___
Python tracker 

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



[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-03 Thread Pekka Klärck

Pekka Klärck  added the comment:

Basically I'd like to get answers to these two questions:

1. Are the changes deliberate and covered by the fact that typing is a 
provisional module, or could the old functionality be restored?

2. If we cannot get the old functionality back, is there some other way to 
reliable detect is an annotation a type defined in the typing module? This 
should cover both the `List` and `List[int]` cases.

--

___
Python tracker 

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



[issue34569] test__xxsubinterpreters.ShareableTypeTests._assert_values fails on AIX - 32-bit mode

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +eric.snow

___
Python tracker 

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



[issue34569] test__xxsubinterpreters.ShareableTypeTests._assert_values fails on AIX - 32-bit mode

2018-09-03 Thread Michael Felt


New submission from Michael Felt :

+364  def _assert_values(self, values):
  +365  for obj in values:
  +366  with self.subTest(obj):
  +367  interpreters.channel_send(self.cid, obj)
  +368  got = interpreters.channel_recv(self.cid)
  +369
  +370  self.assertEqual(got, obj)
  +371  self.assertIs(type(got), type(obj))
  +372  # XXX Check the following in the channel tests?
  +373  #self.assertIsNot(got, obj)
  +374

  +395  def test_int(self):
  +396  self._assert_values(range(-1, 258))
  +397

The assert fails on -1 with:

==
FAIL: test_int (test.test__xxsubinterpreters.ShareableTypeTests) [-1]
--
Traceback (most recent call last):
  File "/data/prj/python/python3-3.8.0/Lib/test/test__xxsubinterpreters.py", 
line 371, in _assert_values
self.assertEqual(got, obj)
AssertionError: 4294967295 != -1

Note that this value is the unsigned value for 32-bit int as -1

root@x066:[/data/prj/python/python3-3.8.0]grep 4294967295 /usr/include/sys/*.h
/usr/include/sys/limits.h:#define ULONG_MAX (4294967295UL)
/usr/include/sys/limits.h:#define UINT_MAX  (4294967295U)
/usr/include/sys/stdint.h:#define UINT32_MAX(4294967295U)

After quite a lot of "learning", I narrow the issue to:

 +1432  static int
 +1433  _long_shared(PyObject *obj, _PyCrossInterpreterData *data)
 +1434  {
 +1435  int64_t value = PyLong_AsLongLong(obj);
 +1436  if (value == -1 && PyErr_Occurred()) {
 +1437  if (PyErr_ExceptionMatches(PyExc_OverflowError)) {
 +1438  PyErr_SetString(PyExc_OverflowError, "try sending as 
bytes");
 +1439  }
 +1440  return -1;
 +1441  }
 +1442  data->data = (void *)value;
 +1443  data->obj = NULL;
 +1444  data->new_object = _new_long_object;
 +1445  data->free = NULL;
 +1446  return 0;
 +1447  }
 +1448

 +1426  static PyObject *
 +1427  _new_long_object(_PyCrossInterpreterData *data)
 +1428  {
 +1429  return PyLong_FromLongLong((int64_t)(data->data));
 +1430  }

The "value" is stored as a void data type, and the high-order 64-bits are zero. 
When it gets returned as a PyLong... it goes positive.

I do not dare touch anything here without some "mentoring".

Or, we change the test so that it knows it is in 32-bit mode, and compares with 
something else.

In short, "mentoring" requested.

p.s. not had time to test in 64-bit mode. Will post on that later.

--
messages: 324519
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: test__xxsubinterpreters.ShareableTypeTests._assert_values fails on AIX - 
32-bit mode

___
Python tracker 

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



[issue34566] pipe read sometimes returns EOF but returncode is still None

2018-09-03 Thread Marcel Plch


Change by Marcel Plch :


--
type:  -> behavior

___
Python tracker 

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



[issue34568] Types in `typing` not anymore instances of `type` or subclasses of "real" types

2018-09-03 Thread Pekka Klärck

New submission from Pekka Klärck :

= Introduction =

In Python 3.5 and 3.6 types defined in the typing module are instances of 
`type` and also subclasses of the "real" type they represent. For example, both 
`isinstance(typing.List, type)` and `issubclass(typing.List, list)` return 
true. In Python 3.7 the former returns false and the latter causes a TypeError. 
I could find anything related to these changes in the Python 3.7 release notes 
or from the documentation of the typing module.

I explain my use case and the problems these changes have caused below.

= Use case =

I'm implementing automatic argument conversion to Robot Framework, a generic 
open source test automation framework, based on function annotations. The idea 
is that if a user has defined a keyword like

def example(arg: int):
# ...

we can convert argument passed in plain text test data like

Example42

into the correct type automatically. For more details see this issue in our 
tracker:
https://github.com/robotframework/robotframework/issues/2890


= Problem 1 =

I have implemented converters for different types and use annotations to find 
out the expected type for each argument. To exclude non-type annotations, my 
code uses `isinstance(annotation, type)` but in Python 3.7 this excludes also 
types defined in the typing module.

I could apparently use `isinstance(annoation, (type, typing._GenericAlias))`, 
but touching private parts like is fragile and feels wrong in general.

= Problem 2 =

Each converter I've implemented is mapped to a certain type (e.g. `list`) and, 
when applicable, also to an abc (e.g. `collections.abc.MutableSequence`). When 
finding a correct converter for a certain type, the code uses an equivalent of 
`issubclass(type_, (converter.type, converter.abc))`. In Python 3.5 and 3.6 
this works also if the used type is defined in the typing module but with 
Python 3.7 it causes a TypeError.

I guess I could handle the types in the typing module by explicitly mapping 
converters also to these types (e.g. `typing.List`) and then using something 
like `type_ is converter.typing`. The problem is that although it would work 
with types like `List`, it wouldn't work if types are used like `List[int]`.

--
messages: 324518
nosy: pekka.klarck
priority: normal
severity: normal
status: open
title: Types in `typing` not anymore instances of `type` or subclasses of 
"real" types

___
Python tracker 

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



[issue34553] Python Crashes when trying to access any date related fields in MailItem

2018-09-03 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

This might help : https://github.com/mhammond/pywin32/issues

Thanks
-- 

Regards,
Karthikeyan S

--

___
Python tracker 

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



[issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:

My fix didn't work :-(

https://buildbot.python.org/all/#/builders/87/builds/1355

...
Fatal Python error: get_locale_encoding: failed to get the locale encoding: 
nl_langinfo(CODESET) failed
...

--

___
Python tracker 

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



[issue34567] test.pythoninfo: dump interpreter _PyCoreConfig

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


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

___
Python tracker 

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



[issue34567] test.pythoninfo: dump interpreter _PyCoreConfig

2018-09-03 Thread STINNER Victor


New submission from STINNER Victor :

test.pythoninfo should also dump the interpreter _PyCoreConfig. It would help 
to check if the C locale has been coerced for example.

--
components: Tests
messages: 324515
nosy: vstinner
priority: normal
severity: normal
status: open
title: test.pythoninfo: dump interpreter _PyCoreConfig
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



[issue34553] Python Crashes when trying to access any date related fields in MailItem

2018-09-03 Thread Vijay


Vijay  added the comment:

Thanks for the inputs. i will check with pywin32 team.
is there any pywin32 link to raise the case. please share if you know.

--

___
Python tracker 

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



[issue34284] Nonsensical exception message when calling `__new__` on non-instaniable objects

2018-09-03 Thread Vadim Pushtaev


Vadim Pushtaev  added the comment:

Also for `curses.panel.panel`:

>>> from curses.panel import panel
>>> panel.__new__(panel)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: object.__new__(_curses_panel.panel) is not safe, use 
_curses_panel.panel.__new__()

--

___
Python tracker 

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



[issue34485] _PyCoreConfig: add stdio_encoding and stdio_errors

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f01b2a1b84ee08df73a78cf1017eecf15e3cb995 by Victor Stinner in 
branch 'master':
bpo-34544: Fix setlocale() in pymain_read_conf() (GH-9041)
https://github.com/python/cpython/commit/f01b2a1b84ee08df73a78cf1017eecf15e3cb995


--

___
Python tracker 

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



[issue34544] FreeBSD: Fatal Python error: get_locale_encoding: failed to get the locale encoding: nl_langinfo(CODESET) failed

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:


New changeset f01b2a1b84ee08df73a78cf1017eecf15e3cb995 by Victor Stinner in 
branch 'master':
bpo-34544: Fix setlocale() in pymain_read_conf() (GH-9041)
https://github.com/python/cpython/commit/f01b2a1b84ee08df73a78cf1017eecf15e3cb995


--

___
Python tracker 

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



[issue34566] pipe read sometimes returns EOF but returncode is still None

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


--
nosy: +vstinner

___
Python tracker 

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



[issue34566] pipe read sometimes returns EOF but returncode is still None

2018-09-03 Thread Marcel Plch


Marcel Plch  added the comment:

original downstream issue - https://bugzilla.redhat.com/show_bug.cgi?id=1623070

--
title: pipe read sometimmes returns EOF but returncode is still None -> pipe 
read sometimes returns EOF but returncode is still None

___
Python tracker 

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



[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-09-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

@DeKrain: I agree

--
components: +Extension Modules -Library (Lib)

___
Python tracker 

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



[issue34566] pipe read sometimmes returns EOF but returncode is still None

2018-09-03 Thread Marcel Plch


New submission from Marcel Plch :

TL;DR: For reproducer, please see attached file and the end of this description 
for a runner script.

It seems that when pipe is being read it has a chance of returning EOF and not 
setting the return code.
This bug affects all (or at least a broad set of) architectures and is present 
in all versions. (2.7 and 3.8 were tested).
This bug is not reproducible when configured using --with-pydebug flag.
As a result, any code relying on proper setting of the returncode attribute 
might (and probably is going to) fail.
---
$ for i in $(seq 1 1000); do ./python script.py; done | grep poll | sort | uniq 
-c

Actual output:
630 output: '', return code: 0, pollstatus=0
370 output: '', return code: None, pollstatus=None

Expected output:
1000 output: '', return code: 0, pollstatus=0

--
components: Library (Lib)
files: script.py
messages: 324508
nosy: Dormouse759
priority: normal
severity: normal
status: open
title: pipe read sometimmes returns EOF but returncode is still None
versions: Python 3.8
Added file: https://bugs.python.org/file47782/script.py

___
Python tracker 

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



[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-09-03 Thread DeKrain


DeKrain  added the comment:

I think we should leave 'Extension Modules' in components field, because 
implementation of struct module is really written in C.

--

___
Python tracker 

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



[issue34485] _PyCoreConfig: add stdio_encoding and stdio_errors

2018-09-03 Thread STINNER Victor


Change by STINNER Victor :


--
pull_requests: +8503

___
Python tracker 

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



[issue34499] Extend registering of single-dispatch functions to parametrized generic pseudo-types

2018-09-03 Thread Łukasz Langa

Łukasz Langa  added the comment:

I agree with Ivan. This is a no go for parametrized pseudotypes.

--
resolution:  -> wont fix
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



[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-09-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

It's not as easy as that, the SystemError in the original report is caused by 
invalid use of a C-API due to partial initialisation of an _struct.Struct 
instance.

The solution is likely two-fold:

1) Ensure that __new__ fully initialises the fields in de C struct to some value

2) (Possibly) check that fields in the C structure have a sane value before 
using them. This part can have a measurable performance cost, and it would be 
nicer to avoid this by picking smart values in (1). 

The most important bit is the first step, even if that keeps raising 
SystemError when only calling Struct.__new__ because this avoid crashing the 
interpreter.

--

___
Python tracker 

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



[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-09-03 Thread Steven D'Aprano


Steven D'Aprano  added the comment:

Thanks for confirming the seg fault. I've changed this to a crasher.

Should we change the exception to RuntimeError?

--
components: +Library (Lib) -Extension Modules
type: behavior -> crash

___
Python tracker 

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



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

2018-09-03 Thread Berker Peksag


Change by Berker Peksag :


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

___
Python tracker 

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



[issue34536] Enum._missing_ doesn't raise TypeError when a non-Enum object is a returned

2018-09-03 Thread Karthikeyan Singaravelan


Change by Karthikeyan Singaravelan :


--
nosy: +xtreak

___
Python tracker 

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



[issue34505] urllib2 fails for proxy credentials that contains a '/' character

2018-09-03 Thread Karthikeyan Singaravelan


Karthikeyan Singaravelan  added the comment:

Can you please add some more detail on the problem and maybe a small script 
explaining what you expect and what the current output is? Clicking on the 
pinterest link gives no details.

Thanks

--
nosy: +xtreak

___
Python tracker 

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



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

2018-09-03 Thread STINNER Victor


STINNER Victor  added the comment:

> I am the AIX(tools) Michael, Michael O is the HP-UX Michael :p

Oh, I didn't notice that you two have the same first name :-)

> So I was not the one asking. IMHO - as the PEP was new, if I understood
correctly, in 3.7 - would be "nice" to see it back ported. However, like you - 
my goal is to get the tests passing on master, and
worry about backport later.

*My position didn't change since my last comment, same position for AIX and 
HP-UX: msg324289. I also updated my website to write down this policy:
https://pythondev.readthedocs.io/cpython.html#i-want-cpython-to-support-my-platform

By the way, please don't comment issues that are closed.

--

___
Python tracker 

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



[issue34532] Windows launcher exits with error after listing available versions

2018-09-03 Thread Brendan Gerrity


Change by Brendan Gerrity :


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



[issue34461] Availability of parsers in etree initializer

2018-09-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

I concur with Stefan. Not all users of ElementTree need to import 
ElementInclude, ElementPath and deprecated cElementTree. If you need 
ElementInclude or ElementPath, it is better to specify this explicitly. The 
star import is not recommended in general case (you even can't use it in a 
local scope in Python 3). The valid use of it is with modules that define a lot 
of names and are specially designed for this (like tkinter or turtle) and in an 
interactive session.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue34565] Launcher does not validate major versions

2018-09-03 Thread Brendan Gerrity


Brendan Gerrity  added the comment:

Added a commit that just changes the comment.

--

___
Python tracker 

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



[issue34461] Availability of parsers in etree initializer

2018-09-03 Thread nilanjan roy


nilanjan roy  added the comment:

@scoder: *xml* package organization have little confusion 

1. Current xml have exposed all the sub-packages from *__all__* scope from the 
initializer - so there are possibilities to write code from script 
a. *import xml as x* or *import xml.somepackage as x* => which is also possible 
even if I do not declare the sub-packages from *__all__* scope
of an initializer
b. as all the subpackages are available in xml initialzer scope- so this is 
allowed to developer to write *from xml import ** - but this flexibility will 
not work(which is contradictory)  as each of sub-package initializer doesn't 
have any inclusion(which i have included in PR) 

Regards,

--

___
Python tracker 

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



[issue34543] _struct.Struct: calling functions without calling __init__ results in SystemError

2018-09-03 Thread Ronald Oussoren


Ronald Oussoren  added the comment:

IMHO SystemError is the wrong exception, that exception is primarily used to 
signal implementation errors.

BTW. I can reproduce crashes in a couple of runs of your scriptlet:

Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 26 2018, 23:26:24) 
[Clang 6.0 (clang-600.0.57)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from _struct import Struct
>>> for i in range(10):
... L = [Struct.__new__(Struct) for j in range(1000)]
... for s in L:
... try:
... x = s.pack_into(bytearray())
... except SystemError:
... pass
... 
Traceback (most recent call last):
  File "", line 5, in 
TypeError: 'code' object cannot be interpreted as an integer
>>> 
>>> from _struct import Struct
>>> for i in range(10):
... L = [Struct.__new__(Struct) for j in range(1000)]
... for s in L:
... try:
... x = s.pack_into(bytearray())
... except SystemError:
... pass
... 
Traceback (most recent call last):
  File "", line 5, in 
TypeError: 'traceback' object cannot be interpreted as an integer
>>> 
>>> 
>>> 
>>> from _struct import Struct
>>> for i in range(10):
... L = [Struct.__new__(Struct) for j in range(1000)]
... for s in L:
... try:
... x = s.pack_into(bytearray())
... except SystemError:
... pass
... 
Segmentation fault: 11

--

___
Python tracker 

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



[issue34563] invalid assert on big output of multiprocessing.Process

2018-09-03 Thread Oleksandr Buchkovskyi


Oleksandr Buchkovskyi  added the comment:

By bigger than signed int i meant bigger than positive signed int

--

___
Python tracker 

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



[issue34563] invalid assert on big output of multiprocessing.Process

2018-09-03 Thread Oleksandr Buchkovskyi


Change by Oleksandr Buchkovskyi :


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



[issue34565] Launcher does not validate major versions

2018-09-03 Thread Serhiy Storchaka


Serhiy Storchaka  added the comment:

Wouldn't be better to fix a comment?

--

___
Python tracker 

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