[issue32264] move pygetopt.h into internal/

2017-12-12 Thread Benjamin Peterson

Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2017-12-12 Thread Allen Li

Change by Allen Li :


--
type:  -> enhancement

___
Python tracker 

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



[issue32299] unittest.mock.patch.dict.__enter__ should return the dict

2017-12-12 Thread Allen Li

New submission from Allen Li :

mock.patch.dict.__enter__ should return the patched dict/mapping object.

Currently it returns nothing (None).

This would make setting up fixtures more convenient:

 with mock.patch.dict(some.thing):
   some.thing['foo'] = 'bar'

 with mock.patch.dict(some.thing) as x:
   x['foo'] = 'bar'

--
components: Library (Lib)
messages: 308188
nosy: Allen Li
priority: normal
severity: normal
status: open
title: unittest.mock.patch.dict.__enter__ should return the dict
versions: Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

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



[issue32292] Building fails on Windows

2017-12-12 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-12 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue31901] atexit callbacks should be run at subinterpreter shutdown

2017-12-12 Thread Xavier G. Domingo

Change by Xavier G. Domingo :


--
nosy: +xgdomingo

___
Python tracker 

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



[issue32298] Email.quopriprime over-encodes characters

2017-12-12 Thread R. David Murray

R. David Murray  added the comment:

And of course tools can grep for "f...@bar.com": you can't use encoded words in 
an address, only in the display name.

However, it occurs to me that in fact the restriction applies only to phrases, 
so one could use a less restrictive character set in an unstructured header 
such as the Subject, and that would indeed be nice.  The old header folder 
(python 2.7 and python 3.x compat32 policy) can't do it, because they don't 
know anything about the syntax of the headers they fold, they just use a bunch 
of heuristics.  The new policies in python3, however, use a smarter folder from 
_header_value_parser, and that *does* have access to the full parse tree for 
the header, and so could make smart decisions about which character set to use 
for the encoded word encoding.

If you'd like to try your hand at a PR implementing this idea, I'll be happy to 
provide advice and do a review.  It's not going to be anywhere near as simple 
as the one line change you proposed here, though :)

--

___
Python tracker 

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



[issue32298] Email.quopriprime over-encodes characters

2017-12-12 Thread R. David Murray

R. David Murray  added the comment:

>From RFC 2047:

(3) As a replacement for a 'word' entity within a 'phrase', for example,
one that precedes an address in a From, To, or Cc header.  The ABNF
definition for 'phrase' from RFC 822 thus becomes:

phrase = 1*( encoded-word / word )

In this case the set of characters that may be used in a "Q"-encoded
'encoded-word' is restricted to: .  An 'encoded-word' that appears within a
'phrase' MUST be separated from any adjacent 'word', 'text' or
'special' by 'linear-white-space'.

The reason for this is that things like '@' are syntactically significant in 
headers and so must be encoded.

--
nosy: +r.david.murray
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



[issue5288] tzinfo objects with sub-minute offsets are not supported (e.g. UTC+05:53:28)

2017-12-12 Thread Paul Ganssle

Change by Paul Ganssle :


--
pull_requests: +4721

___
Python tracker 

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



[issue32267] strptime misparses offsets with microsecond format

2017-12-12 Thread Alexander Belopolsky

Change by Alexander Belopolsky :


--
nosy: +p-ganssle

___
Python tracker 

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



[issue32292] Building fails on Windows

2017-12-12 Thread Steve Dower

Steve Dower  added the comment:

It shouldn't be any different, but what about PCBuild/build.bat?

--

___
Python tracker 

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



[issue32298] Email.quopriprime over-encodes characters

2017-12-12 Thread Geoff Kuenning

Geoff Kuenning  added the comment:

Oops, that loop is a bit too generous.  Here's a better one:

for c in list(range(33, 61)) + [62] + list(range(64, 95)) + list(range(96,127)):

--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

Oh, PYTHONCOERCECLOCALE env var is read very early in main() by 
_Py_CoerceLegacyLocale(), it ignores -E command line option.

 * Ignoring -E and -I is safe from a security perspective, as we only use
 * the setting to turn *off* the implicit locale coercion, and anyone with
 * access to the process environment already has the ability to set
 * `LC_ALL=C` to override the C level locale settings anyway.

--

___
Python tracker 

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



[issue29240] PEP 540: Add a new UTF-8 mode

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

The PEP 538 has two open issues: bpo-30672 and bpo-32238.

I recently refactored the Py_Main() code so it should be simpler to implement 
the PEP 540: see bpo-32030.

--

___
Python tracker 

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



[issue32298] Email.quopriprime over-encodes characters

2017-12-12 Thread Geoff Kuenning

New submission from Geoff Kuenning :

Email.quopriprime creates a map of header and body bytes that need no encoding:

for c in b'-!*+/' + ascii_letters.encode('ascii') + digits.encode('ascii'):
_QUOPRI_HEADER_MAP[c] = chr(c)

This map is overly restrictive; in fact only two printable characters need to 
be omitted: the space and the equals sign.  The following revision to the loop 
creates a correct table:

for c in list(range(33, 61)) + list(range(62, 127)):
_QUOPRI_HEADER_MAP[c] = chr(c)

Why does this matter?  Well, first, it's wasteful since it creates messages 
with larger headers than necessary.  But more important, it makes it impossible 
for other tools to operate on the messages unless they're encoding aware; for 
example, one can't easily grep for "f...@bar.com" because the at sign is 
encoded as =40.

--
components: Library (Lib)
messages: 308181
nosy: gkuenning
priority: normal
severity: normal
status: open
title: Email.quopriprime over-encodes characters
type: behavior
versions: Python 3.4

___
Python tracker 

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



[issue32292] Building fails on Windows

2017-12-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Yes, both in x86 and x64. And `tools\buildbot\build.bat` fails regardless of 
whether I pass `-p x64` or not.

--

___
Python tracker 

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



[issue32292] Building fails on Windows

2017-12-12 Thread Steve Dower

Steve Dower  added the comment:

Is there one in x86 as well? Perhaps it isn't finding x64 tools properly (I've 
seen this once or twice in the past with VS 2015, but I think it was fixed at 
some point)

--

___
Python tracker 

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



[issue32292] Building fails on Windows

2017-12-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Le 13/12/2017 à 01:14, Steve Dower a écrit :
> 
> Strange, that should have been installed.
> 
> Do you see rc.exe anywhere in "C:\Program Files (x86)\Windows Kits\10"?

Yes, it's in "C:\Program Files (x86)\Windows Kits\10\bin\10.0.16299.0\x64"

--

___
Python tracker 

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



[issue32297] Few misspellings found in Python source code comments.

2017-12-12 Thread Eric V. Smith

Change by Eric V. Smith :


--
nosy: +eric.smith

___
Python tracker 

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



[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 317def9fdb29893df1ab380d396fcdd2eafe0588 by Victor Stinner 
(Antoine Pitrou) in branch 'master':
bpo-17852: Revert incorrect fix based on misunderstanding of _Py_PyAtExit() 
semantics (#4826)
https://github.com/python/cpython/commit/317def9fdb29893df1ab380d396fcdd2eafe0588


--

___
Python tracker 

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



[issue32292] Building fails on Windows

2017-12-12 Thread Steve Dower

Steve Dower  added the comment:

Strange, that should have been installed.

Do you see rc.exe anywhere in "C:\Program Files (x86)\Windows Kits\10"? If not, 
might need to repair the SDK you just installed. It shouldn't be a separate 
option from anything else in there.

--

___
Python tracker 

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



[issue32297] Few misspellings found in Python source code comments.

2017-12-12 Thread Mikhail Afanasev

New submission from Mikhail Afanasev :

I have noticed few misspellings in Python source code comments while doing some 
research with the help of spelling and grammatic tools. I double checked all of 
them and corrected.
There is just one docstring affected. All the other changes are in Python 
source code comments. It also affects 49 different files from all the modules. 
I made a PR, and I think it's up to file maintainers to decide if they want to 
merge any of this edits. 
At this moment maintainer of idlelib package picked and merged changes which 
affect his pars independently.

--
messages: 308175
nosy: mehanig
priority: normal
pull_requests: 4720
severity: normal
status: open
title: Few misspellings found in Python source code comments.
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



[issue28459] _pyio module broken on Cygwin / setmode not usable

2017-12-12 Thread Masayuki Yamamoto

Masayuki Yamamoto  added the comment:

FYI, cygwin-pyio-setmode.patch includes two extra parts for running on Cygwin.  
First, fix import error for ctypes (unopened issue). Second, fix building 
_ctypes module (#4032 - PR 4153).

--

___
Python tracker 

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



[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread Masayuki Yamamoto

Masayuki Yamamoto  added the comment:

This issue seems to duplicate #28459.

#28459 has a patch (implement _setmode() by ctypes on _pyio).  I'm not sure 
_setmode() will be used in other places in the future, but the patch just works 
at the moment.
In addition, I have an idea which implements C extension (imitation msvcrt or 
just cygwin).

--

___
Python tracker 

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



[issue32270] subprocess closes redirected fds even if they are in pass_fds

2017-12-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Regarding fixing (1), I'm worrying about backward compatibility a bit.

Well, people shouldn't rely on bugs.  Otherwise we would never be able to fix 
bugs, lest someone relies on it.

--

___
Python tracker 

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



[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-12 Thread Guido van Rossum

Guido van Rossum  added the comment:

I like the current approach (PyObject_GetItem).  I agree with both of your 
reasons to prefer it.

--

___
Python tracker 

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



[issue20353] Hanging bug with multiprocessing + sqlite3 + tkinter (OS X 10.9 only)

2017-12-12 Thread Eitan Adler

Change by Eitan Adler :


--
nosy: +eadler

___
Python tracker 

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



[issue13829] exception error in _scproxy.so when called after fork

2017-12-12 Thread Eitan Adler

Change by Eitan Adler :


--
nosy: +eadler

___
Python tracker 

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



[issue27126] Apple-supplied libsqlite3 on OS X is not fork safe; can cause crashes

2017-12-12 Thread Eitan Adler

Change by Eitan Adler :


--
nosy: +eadler

___
Python tracker 

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



[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I just discovered that the fix is incorrect. See PR #4826 for reversion and a 
quick explanation.

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

___
Python tracker 

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



[issue32296] Implement asyncio._get_running_loop() and get_event_loop() in C

2017-12-12 Thread Yury Selivanov

Change by Yury Selivanov :


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

___
Python tracker 

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



[issue17852] Built-in module _io can lose data from buffered files at exit

2017-12-12 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
pull_requests: +4718

___
Python tracker 

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



[issue32296] Implement asyncio._get_running_loop() and get_event_loop() in C

2017-12-12 Thread Yury Selivanov

New submission from Yury Selivanov :

asyncio.get_event_loop(), and, subsequently asyncio._get_running_loop() are one 
of the most frequently executed functions in asyncio.  They also can't be sped 
up by third-party event loops like uvloop.

When implemented in C they become 4x faster.

--
assignee: yselivanov
components: asyncio
messages: 308169
nosy: asvetlov, lukasz.langa, yselivanov
priority: normal
severity: normal
status: open
title: Implement asyncio._get_running_loop() and get_event_loop() in C
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



[issue32295] User friendly message when invoking bdist_wheel sans wheel package

2017-12-12 Thread Éric Araujo

Éric Araujo  added the comment:

The devs probably choose to use distutils.Command as base class for maximum 
compatibility, but I suspect 99.99% of users use the setuptools integration 
(entry points 
https://github.com/pypa/wheel/blob/3a87ecebaba765475392ae2cdfa2a51cb78360e0/setup.py#L53-L54
 ) rather that distutils integration (explicit cmd_class setting in setup.py or 
--command-packages on the command line)

I’m inclined to reject the special case in distutils and encourage you to send 
the patch to setuptools (a similar PR, not option 1 or 2).

--

___
Python tracker 

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



[issue32295] User friendly message when invoking bdist_wheel sans wheel package

2017-12-12 Thread Ernest W. Durbin III

Ernest W. Durbin III  added the comment:

bdist_wheel is implemented as a distutils.core.Command, see 
https://github.com/pypa/wheel/blob/3a87ecebaba765475392ae2cdfa2a51cb78360e0/wheel/bdist_wheel.py

I was unable to find a good place to transparently hook in and catch the 
missing command class, but I agree that setuptools would be a far faster avenue 
to get this out to users.

Alternatives include:
  1) implementing bdist_wheel as a command in setuptools... which would have to 
get out of the way or call the real command when the wheel package is installed.
  2) trying to get wheel merged into setuptools, which would be a much larger 
project.

I'll see what option 1 looks like!

--

___
Python tracker 

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



[issue29970] Severe open file leakage running asyncio SSL server

2017-12-12 Thread Neil Aspinall

Change by Neil Aspinall :


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

___
Python tracker 

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



[issue32295] User friendly message when invoking bdist_wheel sans wheel package

2017-12-12 Thread Éric Araujo

Éric Araujo  added the comment:

I don’t know that bdist_wheel integrates with pure distutils without 
setuptools.  I think this PR should target setuptools (it will also make it 
propagate to users faster and regardless of Python version).

--

___
Python tracker 

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



[issue32295] User friendly message when invoking bdist_wheel sans wheel package

2017-12-12 Thread Ernest W. Durbin III

New submission from Ernest W. Durbin III :

Wheels are a well-known part of the Python packaging ecosystem at this point!

Many tutorials, gists, and other tools suggest to build wheels using setuptools 
and distutils, but may not remind users to install the wheel package.

In light of Issue 31634 being temporarily suspended and given that this does 
not interfere with experienced users implementing their own bdist_wheel 
command, it should be a welcome addition to help guide novice packagers in the 
right direction.

Result for a Python environment without the `wheel` package installed:

$ python3 setup.py bdist_wheel
usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
   or: setup.py --help [cmd1 cmd2 ...]
   or: setup.py --help-commands
   or: setup.py cmd --help

error: invalid command 'bdist_wheel'
note: The wheel package provides this command. See 
https://packaging.python.org/tutorials/distributing-packages/#wheels for 
information on packaging wheels

--
components: Distutils
messages: 308165
nosy: EWDurbin, dstufft, eric.araujo
priority: normal
pull_requests: 4715
severity: normal
status: open
title: User friendly message when invoking bdist_wheel sans wheel package
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



[issue32137] Stack overflow in repr of deeply nested dicts

2017-12-12 Thread Ben North

Change by Ben North :


--
pull_requests: +4716

___
Python tracker 

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



[issue32292] Building fails on Windows

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



[issue18533] Avoid error from repr() of recursive dictview

2017-12-12 Thread Ben North

Ben North  added the comment:

PR4823 created as per msg308086.

--

___
Python tracker 

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



[issue18533] Avoid error from repr() of recursive dictview

2017-12-12 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +4713
stage: test needed -> patch review

___
Python tracker 

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



[issue32101] Add PYTHONDEVMODE=1 to enable the developer mode

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 721e25c6535d08bd3d4d891fb2b540472e19f899 by Victor Stinner in 
branch 'master':
bpo-32101: Fix tests for PYTHONDEVMODE=1 (#4821)
https://github.com/python/cpython/commit/721e25c6535d08bd3d4d891fb2b540472e19f899


--

___
Python tracker 

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



[issue32294] test_semaphore_tracker() of test_multiprocessing_spawn fails with -W error

2017-12-12 Thread STINNER Victor

New submission from STINNER Victor :

vstinner@apu$ PYTHONWARNINGS=error ./python -W error -m test 
test_multiprocessing_spawn -v -m test_semaphore_tracker 
== CPython 3.7.0a3+ (heads/master:747f48e2e9, Dec 12 2017, 23:12:36) [GCC 7.2.1 
20170915 (Red Hat 7.2.1-2)]
== Linux-4.13.16-300.fc27.x86_64-x86_64-with-fedora-27-Twenty_Seven 
little-endian
== cwd: /home/vstinner/prog/python/master/build/test_python_29868
== CPU count: 8
== encodings: locale=UTF-8, FS=utf-8
Run tests sequentially
0:00:00 load avg: 0.52 [1/1] test_multiprocessing_spawn
test_semaphore_tracker (test.test_multiprocessing_spawn.TestSemaphoreTracker) 
... FAIL
Exception ignored in: <_io.FileIO name=7 mode='rb' closefd=True>
ResourceWarning: unclosed file <_io.BufferedReader name=7>

==
FAIL: test_semaphore_tracker 
(test.test_multiprocessing_spawn.TestSemaphoreTracker)
--
Traceback (most recent call last):
  File "/home/vstinner/prog/python/master/Lib/test/_test_multiprocessing.py", 
line 4380, in test_semaphore_tracker
_multiprocessing.sem_unlink(name2)
AssertionError: OSError not raised

--
Ran 1 test in 2.060s

FAILED (failures=1)
test test_multiprocessing_spawn failed
test_multiprocessing_spawn failed

1 test failed:
test_multiprocessing_spawn

Total duration: 2 sec
Tests result: FAILURE

--
components: Tests
messages: 308161
nosy: vstinner
priority: normal
severity: normal
status: open
title: test_semaphore_tracker() of test_multiprocessing_spawn fails with -W 
error
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



[issue32292] Building fails on Windows

2017-12-12 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

Thank you.  Though now I get the following issue:

   "c:\t\cpython\PCbuild\pcbuild.proj" (Build target) (1) ->
   "c:\t\cpython\PCbuild\pythoncore.vcxproj" (Build target) (2) ->
   (ResourceCompile target) ->
 TRACKER : error TRK0005: Failed to locate: "rc.exe". The system cannot
find the file specified. [c:\t\cpython\PCbuild\pythoncore.vcxproj]

--

___
Python tracker 

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



[issue32230] -X dev doesn't set sys.warnoptions

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

We found an agreement with Nick :-) I applied Nick's PR. The issue is now fixed:

vstinner@apu$ ./python -X dev -c 'import sys; print(sys.warnoptions)'
['default']

This PR also fix bpo-20361: -b and -bb options now have the highest priority.

The documentation is maybe not perfect, but Nick stated that he will update the 
doc with the implementation of his PEP 565.

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



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

Ok, I merged Nick's PR: -b and -bb options now have the highest priority. 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



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 747f48e2e92390c44c72f52a1239959601cde157 by Victor Stinner in 
branch 'master':
bpo-32230: Set sys.warnoptions with -X dev (#4820)
https://github.com/python/cpython/commit/747f48e2e92390c44c72f52a1239959601cde157


--

___
Python tracker 

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



[issue32230] -X dev doesn't set sys.warnoptions

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:


New changeset 747f48e2e92390c44c72f52a1239959601cde157 by Victor Stinner in 
branch 'master':
bpo-32230: Set sys.warnoptions with -X dev (#4820)
https://github.com/python/cpython/commit/747f48e2e92390c44c72f52a1239959601cde157


--

___
Python tracker 

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



[issue32282] When using a Windows XP compatible toolset, `socketmodule.c` fails to build

2017-12-12 Thread Maxime Belanger

Maxime Belanger  added the comment:

Works for me. We no longer rely on the `_xp` toolset so no objections.

--

___
Python tracker 

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



[issue32280] Expose `_PyRuntime` through a section name

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



[issue32101] Add PYTHONDEVMODE=1 to enable the developer mode

2017-12-12 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4712

___
Python tracker 

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



[issue32280] Expose `_PyRuntime` through a section name

2017-12-12 Thread Maxime Belanger

Maxime Belanger  added the comment:

Interesting, would this imply potentially multiple GILs? The major thing we 
need out of the structure is the (`Py_tss_t`) `autoTSSKey` in order to 
associate a native thread with its `PyThreadState`.

--

___
Python tracker 

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



[issue1410680] Add 'surgical editing' to ConfigParser

2017-12-12 Thread Fipaddict

Fipaddict  added the comment:

I would have liked for configparser to keep comments when my program re-write 
configuration file too.
Thanks

--

___
Python tracker 

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



[issue32230] -X dev doesn't set sys.warnoptions

2017-12-12 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4710

___
Python tracker 

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



[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2017-12-12 Thread STINNER Victor

Change by STINNER Victor :


--
pull_requests: +4711

___
Python tracker 

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



[issue31643] test_uuid: test_getnode and test_windll_getnode fail if connected to the Internet via an Android phone

2017-12-12 Thread Ivan Pozdeev

Ivan Pozdeev  added the comment:

> Xavier de Gaye  added the comment:
>
> On a Samsung device with Android 5.1 and tethering enabled, only one network 
> device has a MAC address and it is not an all-zero MAC address.
>
> Ivan can you please provide more information about this problem: which 
> device, what Android version, what is the output of 'ip link' ?

C:\> ipconfig -all
<...>
Samsung Galaxy S7 - Ethernet адаптер:

     DNS-суффикс этого подключения . . :
     Описание  . . . . . . . . . . . . : Android USB Ethernet/RNDIS
     Физический адрес. . . . . . . . . : 00-00-00-00-00-00
     Dhcp включен. . . . . . . . . . . : да
     Автонастройка включена  . . . . . : да
     IP-адрес  . . . . . . . . . . . . : 192.168.42.2
     Маска подсети . . . . . . . . . . : 255.255.255.0
     Основной шлюз . . . . . . . . . . : 192.168.42.129
     DHCP-сервер . . . . . . . . . . . : 192.168.42.129
     DNS-серверы . . . . . . . . . . . : 192.168.42.129

Device name: Samsung Galaxy S7
Model number: SM-G930F
Android version: 6.0.1
Firmware version: G930FXXU1APGJ
Baseband version: G930VVRS4APH1
Build number: MMB29M.G930VVRU2APG5

> Serhiy Storchaka  added the comment:
>
> I'm not sure that  is better than a random address. Even if an 
> all-zero MAC address is not explicitly prohibited it is used in a multiple 
> independent devices. A random address looks more appropriate fore the purpose 
> of generating a UUID.
The question is not whether it's good UUID source material. The 
question, for the purpose of the test, is whether it's valid getnode() 
output -- which it is for the current logic.

--
nosy: +__Vano

___
Python tracker 

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



[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-12 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

Guido, what is your preference for the implementation of ``__class_getitem__``: 
``PyObject_GetItem`` (current one) or ``type.__getitem__`` (old one)? Can we 
just go ahead with the version you like and then re-consider if some objections 
will appear? I am asking because you are going on vacation soon and there is a 
second part of implementation -- changes in typing (and someone needs to review 
them :-)

--

___
Python tracker 

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



[issue32292] Building fails on Windows

2017-12-12 Thread Steve Dower

Steve Dower  added the comment:

I changed the default Windows SDK version at some point, because it was falling 
back to v8.1 and we really ought to use v10. It auto-detects all the v10 
versions, so I'm guessing you haven't got any of them installed right now.

The dev guide just says to install VS 2017, which will include it. We should 
probably have manual install steps listed somewhere as well, though I'm 
hesitant to make the "getting started" steps too complex. And I've already 
switched 3.7 to use the v141 toolset, which is in VS 2017 but not VS 2015 (but 
it's binary compatible with the older v140, so shouldn't matter).

For VS 2015, you can get the Windows 10 SDK from 
https://developer.microsoft.com/windows/downloads/windows-10-sdk (only the 
headers and libraries option is required).

--

___
Python tracker 

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



[issue30256] Adding a SyncManager Queue proxy to a SyncManager dict or Namespace proxy raises an exception

2017-12-12 Thread Jordan Speicher

Change by Jordan Speicher :


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

___
Python tracker 

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



[issue32280] Expose `_PyRuntime` through a section name

2017-12-12 Thread Eric Snow

Eric Snow  added the comment:

Note that in the long term we are considering support for embedding multiple 
runtimes in a single process.  So anything that assumes there is only a single 
runtime in each process is problematic.

--

___
Python tracker 

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



[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-12 Thread R. David Murray

R. David Murray  added the comment:

We generally don't do advance type checking (look before you leap) in Python.  
This allows a type the programmer hadn't planned for to be used as long as it 
"quacks like" the expected type (this is called duck typing).  So the error was 
produced exactly where it should be and exactly as it should be: it was 
produced by the StringIO object you provided, when quopri tried to write the 
binary output that it produces to the object you handed it.

--

___
Python tracker 

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



[issue22671] Typo in class io.BufferedIOBase docs

2017-12-12 Thread Sanyam Khurana

Change by Sanyam Khurana :


--
pull_requests: +4708

___
Python tracker 

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



[issue32293] macos pkg fails 10.13.2

2017-12-12 Thread Lloyd Vancil

Change by Lloyd Vancil :


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



[issue32293] macos pkg fails 10.13.2

2017-12-12 Thread Lloyd Vancil

New submission from Lloyd Vancil :

the downloadble pkg file fails on attempt to install on 10.13.2  "no software 
to install"

--
components: macOS
messages: 308147
nosy: Lloyd Vancil, ned.deily, ronaldoussoren
priority: normal
severity: normal
status: open
title: macos pkg fails  10.13.2
type: behavior
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



[issue29970] Severe open file leakage running asyncio SSL server

2017-12-12 Thread Neil Aspinall

Neil Aspinall  added the comment:

I think there's been some confusion about what PR 480 was meant to fix - it 
helps in cases where connections are closed during handshake, but if a server 
connection is waiting for a handshake but never receives any data at all then 
it stays in that state forever.

As for a fix, how about giving SSLProtocol a method like:

def checkHandshakeDone(self):
if self._in_handshake == True:
self._abort()

and then at the end of _start_handshake() adding:

self._loop.call_later(10, self.checkHandshakeDone)

Then if the handshake is not complete within ten seconds of starting, the 
connection will be aborted.

--
nosy: +mocmocamoc

___
Python tracker 

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



[issue32292] Building fails on Windows

2017-12-12 Thread Antoine Pitrou

New submission from Antoine Pitrou :

Sorry if this looks more like a support request.  There's probably something 
wrong in my setup (I do have Visual Studio 2015 installed, though).

I am trying to build on Windows using "Tools\buildbot\build.bat -p x64".  It 
worked a few months ago.  Now I get:

Build FAILED.

   "c:\t\cpython\PCbuild\pcbuild.proj" (Build target) (1) ->
   "c:\t\cpython\PCbuild\pythoncore.vcxproj" (Build target) (2) ->
   (Desktop_PlatformPrepareForBuild target) ->
 C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Platforms\x64\P
   latformToolsets\v140\Toolset.targets(36,5): error MSB8036: The Windows S
   DK version 10.0.16299.0 was not found. Install the required version of W
   indows SDK or change the SDK version in the project property pages or by
right-clicking the solution and selecting "Retarget solution". [c:\t\cp
   ython\PCbuild\pythoncore.vcxproj]

0 Warning(s)
1 Error(s)

--
components: Windows
messages: 308145
nosy: paul.moore, pitrou, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Building fails on Windows
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



[issue32291] Value error for string shared memory in multiprocessing

2017-12-12 Thread Marc Guetg

New submission from Marc Guetg :

It seems like sharing a string over processes is not possible.

#!/usr/bin/env python3

import multiprocessing
import threading
import ctypes


def fun(share_c, share_s, set_c, set_s, name):
print(f'{name}: {share_c.value}; {share_s.value}')
share_c.value = set_c
share_s.value = set_s
print(f'{name}: {share_c.value}; {share_s.value}')


if __name__ == '__main__':
share_c = multiprocessing.Value(ctypes.c_wchar, 'a')
share_s = multiprocessing.Value(ctypes.c_wchar_p, 'aa')

print(f'pre_thread: {share_c.value}; {share_s.value}')
thread = threading.Thread(target=fun, args=(share_c, share_s, 
'b', 'bb', 'thread'))
thread.start()
thread.join()

print(f'post_thread: {share_c.value}; {share_s.value}')
process = multiprocessing.Process(target=fun, args=(share_c, 
share_s, 'c', 'cc', 'process'))
process.start()
process.join()

print(f'post_process: {share_c.value}', end='; ')
print(share_s.value)  # <--- Blows here

produces: 

pre_thread: a; aa
thread: a; aa
thread: b; bb
post_thread: b; bb
process: b; bb
process: c; cc
post_process: c; Traceback (most recent call last):
  File "test2.py", line 30, in 
print(share_s.value)  # <--- Blows here
  File "", line 5, in getvalue
ValueError: character U+ff92f210 is not in range [U+; U+10]

Where the character value in the error message is different every time. To me 
this seems like a bug as it is working properly with threads as well as single 
characters. (Maybe relevant question also here: 
https://stackoverflow.com/questions/47763878/how-to-share-string-between-processes?noredirect=1#comment82492062_47763878)

For the case it matters:
Python 3.6.1 (Anaconda 4.4.0) on RHEL 6

--
components: Library (Lib), Unicode
messages: 308144
nosy: ezio.melotti, magu, vstinner
priority: normal
severity: normal
status: open
title: Value error for string shared memory in multiprocessing
type: crash
versions: Python 3.6

___
Python tracker 

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



[issue30386] Add a build infrastructure for Android

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

See also the thread on python-dev:
[Python-Dev] Support of the Android platform
https://mail.python.org/pipermail/python-dev/2017-December/151171.html

--

___
Python tracker 

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



[issue32290] bolen-dmg-3.6: compilation failed with OSError: [Errno 23] Too many open files in system

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

A different but maybe related failure on x86 Tiger 3.x:

http://buildbot.python.org/all/#/builders/30/builds/323

==
ERROR: test_rapid_restart 
(test.test_multiprocessing_fork.WithThreadsTestManagerRestart)
--
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/_test_multiprocessing.py",
 line 2706, in test_rapid_restart
manager.start()
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/multiprocessing/managers.py", 
line 533, in start
reader, writer = connection.Pipe(duplex=False)
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/multiprocessing/connection.py",
 line 517, in Pipe
fd1, fd2 = os.pipe()
OSError: [Errno 23] Too many open files in system
==
ERROR: test_timeout (test.test_multiprocessing_fork.WithThreadsTestQueue)
--
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/_test_multiprocessing.py",
 line 1007, in test_timeout
q = multiprocessing.Queue()
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/multiprocessing/context.py", 
line 102, in Queue
return Queue(maxsize, ctx=self.get_context())
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/multiprocessing/queues.py", 
line 41, in __init__
self._reader, self._writer = connection.Pipe(duplex=False)
  File 
"/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/multiprocessing/connection.py",
 line 517, in Pipe
fd1, fd2 = os.pipe()
OSError: [Errno 23] Too many open files in system

--

___
Python tracker 

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



[issue32290] bolen-dmg-3.6: compilation failed with OSError: [Errno 23] Too many open files in system

2017-12-12 Thread STINNER Victor

New submission from STINNER Victor :

http://buildbot.python.org/all/#/builders/49/builds/67

...
http://buildbot.python.org/all/#/builders/49/builds/67
...
Installing collected packages: sphinxcontrib-websupport, setuptools, 
snowballstemmer, docutils, imagesize, urllib3, chardet, certifi, idna, 
requests, pytz, babel, alabaster, MarkupSafe, Jinja2, six, Pygments, Sphinx, 
blurb
  Found existing installation: setuptools 28.8.0
Uninstalling setuptools-28.8.0:
  Successfully uninstalled setuptools-28.8.0
  Running setup.py install for MarkupSafe: started
Running setup.py install for MarkupSafe: finished with status 'done'
Successfully installed Jinja2-2.10 MarkupSafe-1.0 Pygments-2.2.0 Sphinx-1.6.5 
alabaster-0.7.10 babel-2.5.1 blurb-1.0.5 certifi-2017.11.5 chardet-3.0.4 
docutils-0.14 idna-2.6 imagesize-0.7.1 pytz-2017.3 requests-2.18.4 
setuptools-38.2.4 six-1.11.0 snowballstemmer-1.2.1 
sphinxcontrib-websupport-1.0.1 urllib3-1.22
The venv has been created in the ./venv directory

Exception occurred:
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/util/osutil.py",
 line 230, in getcwd
OSError: [Errno 23] Too many open files in system
Traceback (most recent call last):
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/cmdline.py",
 line 306, in main
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/application.py",
 line 339, in build
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/builders/__init__.py",
 line 331, in build_update
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/builders/__init__.py",
 line 344, in build
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/environment/__init__.py",
 line 584, in update
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/environment/__init__.py",
 line 603, in _read_serial
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/environment/__init__.py",
 line 735, in read_doc
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/application.py",
 line 489, in emit
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/events.py",
 line 79, in emit
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/environment/collectors/dependencies.py",
 line 43, in process_doc
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/util/osutil.py",
 line 230, in getcwd
OSError: [Errno 23] Too many open files in system

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "./venv/bin/sphinx-build", line 11, in 
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/__init__.py",
 line 71, in main
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/__init__.py",
 line 113, in build_main
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/cmdline.py",
 line 309, in main
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/cmdline.py",
 line 105, in handle_exception
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Doc/venv/lib/python3.6/site-packages/sphinx/util/__init__.py",
 line 219, in save_traceback
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tempfile.py", 
line 335, in mkstemp
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tempfile.py", 
line 130, in _sanitize_params
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tempfile.py", 
line 296, in gettempdir
  File 
"/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/tempfile.py", 
line 231, in _get_default_tempdir
FileNotFoundError: [Errno 2] No usable temporary directory found in ['/tmp', 
'/var/tmp', '/usr/tmp', '.']
make: *** [build] Error 1
Traceback (most recent call last):
mkdir -p build
Building NEWS from Misc/NEWS.d with blurb
PATH=./venv/bin:$PATH sphinx-build -b html -d build/doctrees -D 
latex_elements.papersize=  . build/html 
Running Sphinx v1.6.5
making output directory...
loading pickled environment... not yet created
building [mo]: targets for 0 po files that are out of date
building [html]: targets for 465 source files that are out of date
updating environment: 465 added, 0 changed, 0 removed
reading sources... [  0%] about
reading sources... [  0%] bugs

...
main()
  File 
"/Users/db3l/buildarea.dmg/bolen-dmg-3.6/build/Mac/BuildScript/build-installer.py",
 line 1620, in main

[issue32282] When using a Windows XP compatible toolset, `socketmodule.c` fails to build

2017-12-12 Thread Steve Dower

Steve Dower  added the comment:

If you can't compile, security fixes aren't worth anything. And while we don't 
support XP, the v140_xp toolset is in more of a grey area. There are real ways 
you could be forced into using it besides targeting XP.

Max - I'd rather just remove the ifdef checks completely. Fairly sure I added 
them in the migration from VC10, but they are simply incorrect (the header is 
from the WinSDK which is not the same as _MSC_VER) and will always be there for 
the versions of the SDK we allow, even back to 3.5.

--
nosy: +larry
type:  -> compile error
versions: +Python 3.5

___
Python tracker 

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



[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread Zachary Ware

Zachary Ware  added the comment:

Right, so you should raise an issue with cherrypy :).  You're more likely to 
get a fix from them quickly, and their usage of _pyio is not correct anyway.

Also, note that Cygwin is not (anymore/yet) a fully-supported platform.  We're 
working towards that status, but aren't there yet.

--

___
Python tracker 

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



[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread Christian Heimes

Christian Heimes  added the comment:

Could you please file a bug with cherrypy and get it fixed?

Cygwin not yet officially supported and stable. Erik is working hard on stable 
support for 3.7.

--

___
Python tracker 

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



[issue30386] Add a build infrastructure for Android

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

See also https://github.com/python/buildmaster-config/pull/26 : "Add the 
Android build factory".

--

___
Python tracker 

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



[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread Matúš Valo

Matúš Valo  added the comment:

I am using not using _pyio module directly but I am using cherrypy server which 
is using this module (more precisely its component cheroot):
https://github.com/cherrypy/cheroot/blob/86c6b246ec7cb704c6f96123556db1a083301634/cheroot/makefile.py#L5

Regarding installation of cygwin environment, I can check it in other machine.

--

___
Python tracker 

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



[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread Zachary Ware

Zachary Ware  added the comment:

Presumably this issue does prevent us from testing _pyio on Cygwin, which is 
not ideal.  The outside usage of _pyio is definitely not supported, as 
Christian said, but this may be worth fixing anyway.

--
nosy: +masamoto, zach.ware
priority: normal -> low
stage:  -> needs patch
type: crash -> behavior
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue32268] quopri.decode(): string argument expected, got 'bytes'

2017-12-12 Thread Alexey Luchko

Alexey Luchko  added the comment:

Yes. With io.BytesIO() output, it works.

However, this kind of error messages is quite very confusing. It better be 
possible to distinguish binary and text streams, so one (including quopri 
module) could tell it won't work in advance %)

Thanks for referring to binascii module as well!

--

___
Python tracker 

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



[issue32288] Inconsistent behavior with slice assignment?

2017-12-12 Thread Stefan Krah

Stefan Krah  added the comment:

Thanks, David, you are of course right! -- I've worked so much with fixed 
arrays in the past year that Python's behavior seemed odd and unfathomable. :-)


[Numpy arrays can't adopt that behavior, because growing them would be too 
expensive.]

--

___
Python tracker 

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



[issue32276] there is no way to make tempfile reproducible (i.e. seed the used RNG)

2017-12-12 Thread Yaroslav Halchenko

Yaroslav Halchenko  added the comment:

I have spent too much time in Python to be able to compare to other languages 
;)  but anywhere I saw RNG being used, there was a way to seed it or to provide 
a state.  tempfile provides no such API

my usecase -- comparison of logs from two runs where I need to troubleshoot the 
point of divergence in execution .  Logs in our case (datalad) contain 
temporary directory filenames, so they always "diff" and I need to sift through 
them or to come up with some obscure sed regex to unify them.  I found in other 
projects of ours a really handy to be able to seed RNG globally so two runs 
result in identical execution path -- allows for easier 
reproducibility/comparison.  But when it got to those temporary filenames -- 
apparently I could not make it happen and would need to resort to some heavy 
monkey patching.

--

___
Python tracker 

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



[issue32288] Inconsistent behavior with slice assignment?

2017-12-12 Thread R. David Murray

R. David Murray  added the comment:

It actually makes sense that a slice assignment with a different length 
replacement list with a step of 1 works but any other step doesn't.  Logically 
you can see that you can cut out a chunk and replace it with a different sized 
chunk, but you can't do that if the step is not abs(1).  So a doc tweak may be 
appropriate.  And it is surprising that -1 doesn't work (but why would you ever 
use it? :), so that might be a buglet.

For a numpy array, I imagine the rules are different, so an error there on 
stride 1 is not that surprising either, though *perhaps* there is room for 
improvement on the numpy side.  (In other words, the stride 1 python behavior 
is "correct" from a python language perspective.)

And yes, it would be much easier to discuss these separate issues in separate 
issues.  Now you know for next time :)

--
nosy: +r.david.murray

___
Python tracker 

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



[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread R. David Murray

Change by R. David Murray :


--
nosy: +erik.bray

___
Python tracker 

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



[issue32288] Inconsistent behavior with slice assignment?

2017-12-12 Thread Stefan Krah

Stefan Krah  added the comment:

Okay, the different meanings of "extended slicing" seem to be an old
problem:

https://mail.python.org/pipermail/tutor/2007-July/055838.html


I assumed it referred to numpy's tuple indexing syntax, but it is
apparently also used for referring to the step value of a single
slice object.


Somehow I've always used the term for the tuple syntax.

--

___
Python tracker 

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



[issue32288] Inconsistent behavior with slice assignment?

2017-12-12 Thread Massimiliano Culpo

Massimiliano Culpo  added the comment:

Steven and Stefan, thanks for the quick replies, even though they are giving 
slightly different answers to the same questions :-)

@steven.daprano
> You refer to the docs that specify extended syntax as [start:stop:step] but 
> then you tried [start:stop,step] which is correctly an error. (Notice the 
> comma instead of colon.)

Maybe you missed the quote from the docs: "For example: a[start:stop:step] or 
a[start:stop, i]"

You say that the docs "specify extended syntax as [start:stop:step]". 
Apparently you're also surprised this syntax exists, and didn't notice that the 
error is not a SyntaxError, but a TypeError. I argue then that the syntax is 
there. If I get correctly what @skrah says, he seems to suggest that the syntax 
is there, but no built-in type is using it. Am I right?

> And again, your third issue to do with list.insert ... what is your actual 
> bug report? Have you found an example where these aren't equivalent?

I didn't say that. I actually said "`insert` really behaves like `s[i:i] = 
[x]`". But the docs from the interpreter say:
```
help(list.insert)
Help on method_descriptor:
insert(...)
L.insert(index, object) -- insert object before index

```
What does it mean to insert an object before index 101 or -101 of a 4 items 
list? I think if the help said "-- same as L[index:index] = [object]" I would 
have been fine with it.

> Please don't report three issues under one ticket, unless they are so closely 
> related that they cannot be separated.

Apologies if this was not correct (I see you started an issue with a smaller 
scope). But I thought they were closely related, because all three might have 
been fixed by a rewording of a few parts of the docs dealing with slices.

@skrah
> I see the first issue now and I agree that Python behaves strangely.

To be clear, I don't have issues with:
```
>>> lst = [1,2,3]
>>> lst[1:2] = [1,2,3,4,5]
>>> lst
[1, 1, 2, 3, 4, 5, 3]
```
in Python, which probably is a widely used idiom to modify lists. 

My concerns are with the fact that you get the same behavior when you use 
`lst[1:2:1]` (which in my understanding is an extended slice), but you get a 
`ValueError` for any other value of `slice.step`. That might be something worth 
clarifying as part of issue32289 maybe?

--

___
Python tracker 

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



[issue19431] Document PyFrame_FastToLocals() and PyFrame_FastToLocalsWithError()

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

> Currently you should call PyFrame_FastToLocalsWithError(), modify directly 
> f_locals, and call PyFrame_LocalsToFast().

When happens if PyFrame_LocalsToFast() isn't called? Does it crash or is it 
just slower?

--

___
Python tracker 

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



[issue32285] In `unicodedata`, it should be possible to check a unistr's normal form without necessarily copying it

2017-12-12 Thread STINNER Victor

STINNER Victor  added the comment:

> However, I'm concerned by your comment that you fall back on creating a 
> normalized copy and comparing.

The purpose of the function is to be faster than str == 
unicodedata.normalize(form, str). So yeah, any optimization is welcome.

But I don't bother with MAYBE suboptimal case which is implemented with: str == 
unicodedata.normalize(form, str). It can be optimized later, if needed.

If someone cares of performance, I will require a benchmark, since I only trust 
numbers :-)

--

___
Python tracker 

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



[issue32288] Inconsistent behavior with slice assignment?

2017-12-12 Thread Stefan Krah

Stefan Krah  added the comment:

I see the first issue now and I agree that Python behaves strangely.

Numpy
=

>>> x = array([1,2,3])
>>> x[1:2] = [1,2,3,4,5]
Traceback (most recent call last):
  File "", line 1, in 
ValueError: cannot copy sequence with size 5 to array axis with dimension 1


Python
==

>>> lst = [1,2,3]
>>> lst[1:2] = [1,2,3,4,5]
>>> lst
[1, 1, 2, 3, 4, 5, 3]

--

___
Python tracker 

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



[issue32289] Glossary does not define "extended slicing"

2017-12-12 Thread Steven D'Aprano

New submission from Steven D'Aprano :

Looking at issue 32288, I realised that the glossary doesn't define "extended 
slicing" or "extended slice", even though they are common terms. Although I 
thought I know what they meant, on closer reflection I realised I wasn't sure.

Does extended slicing refer to slice *objects* with a stride/step, as opposed 
to slice objects all the way back in Python 1.3 (yes, *one* point 3) that only 
had start and end?

Does it refer specifically to the two-colon form of slice *syntax*?

Both? Neither?

https://docs.python.org/3/glossary.html#term-slice

The only documentation I found is from the 2.3 What's New:

https://docs.python.org/2.3/whatsnew/section-slices.html

--
assignee: docs@python
components: Documentation
messages: 308125
nosy: Massimiliano Culpo, docs@python, steven.daprano
priority: normal
severity: normal
status: open
title: Glossary does not define "extended slicing"
type: enhancement

___
Python tracker 

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



[issue32288] Inconsistent behavior with slice assignment?

2017-12-12 Thread Stefan Krah

Stefan Krah  added the comment:

Python lists don't implement extended slices, try numpy arrays:

>>> import numpy as np
>>> x = array([[1,2,3], [4,5,6]])
>>> x[:, 2]
array([3, 6])
>>> 
>>> lst = [[1,2,3], [4,5,6]]
>>> lst[:, 2]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: list indices must be integers or slices, not tuple
>>> 

Was there any issue apart from the extended slices?

--
nosy: +skrah

___
Python tracker 

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



[issue32288] Inconsistent behavior with slice assignment?

2017-12-12 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

Please don't report three issues under one ticket, unless they are so closely 
related that they cannot be separated.

I don't understand what your second issue actually is. You refer to the docs 
that specify extended syntax as [start:stop:step] but then you tried 
[start:stop,step] which is correctly an error. (Notice the comma instead of 
colon.)

And again, your third issue to do with list.insert ... what is your actual bug 
report? Have you found an example where these aren't equivalent?

alist.insert(pos, value)

alist[pos:pos] = [value]

I don't understand your third bug report here... you show two examples where 
the insert function works as documented. You say you didn't expect the 
behaviour, but what behaviour did you expect?

--
nosy: +steven.daprano

___
Python tracker 

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



[issue32285] In `unicodedata`, it should be possible to check a unistr's normal form without necessarily copying it

2017-12-12 Thread Steven D'Aprano

Steven D'Aprano  added the comment:

Python 2.7 is in feature freeze, so this can only go into 3.7.

I would find this useful, and would like this feature. However, I'm concerned 
by your comment that you fall back on creating a normalized copy and comparing. 
That could be expensive, and shouldn't be needed. According to here:

http://unicode.org/reports/tr15/#Detecting_Normalization_Forms

in the worst case, you can incrementally check only the code points in doubt 
(around the "MAYBE" code points).

--
nosy: +steven.daprano
type:  -> enhancement
versions:  -Python 2.7

___
Python tracker 

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



[issue32226] Implement PEP 560: Core support for typing module and generic types

2017-12-12 Thread Ivan Levkivskyi

Ivan Levkivskyi  added the comment:

> As for __class_getitem__, why not implement type.__getitem__ instead of 
> hacking PyObject_GetItem()?

This question was raised by Mark Shannon on python-dev. Actually, my initial 
implementation did exactly this, but I didn't like it for two reasons:

1. dir(type) is already very long, I don't want to make it even longer.
2. Some users may be surprised that although ``type.__getitem__`` is defined, 
``int[something]`` will rise "TypeError: type object is not subscriptable"

Mark however disappeared since then, so I don't know what is his current 
opinion. I am however not as sure about this now. If there are some arguments 
for this, then I can revert to the older approach (implementing 
``type.__getitem__``).

--

___
Python tracker 

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



[issue32288] Inconsistent behavior with slice assignment?

2017-12-12 Thread Massimiliano Culpo

New submission from Massimiliano Culpo :

I am not really sure if what I am reporting is to be considered a bug in the 
interpreter (slice built-in), a lack in documentation or if it is just me not 
finding the proper references (in which case feel free to close this and sorry 
for the noise).

Anyhow, while trying to code a class that mimics built-in lists, I noticed a 
few seemingly inconsistent behaviors in the use of slices to set items.

This can be reduced down to this very simple example:
```
Python 3.6.2 (default, Jul 29 2017, 00:00:00) 
[GCC 4.8.4] on linux

# 1. Slice has start and stop, step is defaulted to None
>>> a = [1, 2, 3, 4]
>>> a[1:3] = [11, 22, 33, 44]
>>> a
[1, 11, 22, 33, 44, 4]

# 2. Same as above setting explicitly step == 1
>>> a = [1, 2, 3, 4]
>>> a[1:3:1] = [11, 22, 33, 44]
>>> a
[1, 11, 22, 33, 44, 4]

# 3. Trying to do the same thing with step == -1
# (I naively expected either [1, 44, 33, 22, 11, 4] or 2. to fail like 3.)
>>> a = [1, 2, 3, 4]
>>> a[3:1:-1] = [11, 22, 33, 44]
Traceback (most recent call last):
  File "", line 1, in 
ValueError: attempt to assign sequence of size 4 to extended slice of size 2
```

Now, the first issue: I tried to search what an "extended slice" is exactly, 
but found nothing in the docs. What is written here

https://docs.python.org/3/library/functions.html#slice

seems to suggest that an "extended slice" is a slice where `step is not None`, 
but then I would expect case 2. to behave the same as case 3. So to me it 
appears as either lack of documentation on the behavior, or a bug in 2.

Second issue: in the same page in the docs it's written

> slice objects are also generated when extended indexing syntax is used. For 
> example: a[start:stop:step] or a[start:stop, i]

I wasn't aware of the second syntax, and tried to use it:
```
>>> a = [1, 2, 3, 4]
>>> a[1:3:1]
[2, 3]
>>> a[1:3, 1]
Traceback (most recent call last):
  File "", line 1, in 
TypeError: list indices must be integers or slices, not tuple
```
I guess that's not the result one would expect...

Third issue: slightly related, but here

https://docs.python.org/3/library/stdtypes.html#mutable-sequence-types

I see that the documentation of `insert` reads:

> inserts x into s at the index given by i (same as s[i:i] = [x])

and from the interpreter:
```
help(list.insert)
Help on method_descriptor:
insert(...)
L.insert(index, object) -- insert object before index

```

Here the fact is that `insert` really behaves like `s[i:i] = [x]`, but in my 
understanding it doesn't keep the promise to `insert object before index`.
```
# "Out of bounds" on the right
>>> a = [1, 2, 3, 4]
>>> a.insert(101, 11)
>>> a
[1, 2, 3, 4, 11]

# "Out of bounds" on the left
>>> a.insert(-101, 11)
>>> a
[11, 1, 2, 3, 4]
```
I don't know honestly if docs are not clear here, or if it is just me, but I 
didn't expect this behavior and thought it was worth reporting.

Let me know if you need more information.

--
assignee: docs@python
components: Documentation, Interpreter Core
messages: 308120
nosy: Massimiliano Culpo, docs@python
priority: normal
severity: normal
status: open
title: Inconsistent behavior with slice assignment?
type: behavior
versions: Python 2.7, Python 3.4, 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



[issue32241] Add the const qualifier for char and wchar_t pointers to unmodifiable strings

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



[issue32241] Add the const qualifier for char and wchar_t pointers to unmodifiable strings

2017-12-12 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 4ae06c5337e01bdde28bce57b6b9166ad50947e3 by Serhiy Storchaka in 
branch 'master':
bpo-32241: Add the const qualifire to declarations of umodifiable strings. 
(#4748)
https://github.com/python/cpython/commit/4ae06c5337e01bdde28bce57b6b9166ad50947e3


--

___
Python tracker 

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



[issue19431] Document PyFrame_FastToLocals() and PyFrame_FastToLocalsWithError()

2017-12-12 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

frameobject.h is not included in any header file. Some effort was spent for 
avoiding including it in ceval.h, genobject.h, pystate.h and traceback.h. The 
whole content of frameobject.h is not available in the limited API. I'm not 
sure about the status of this API. This is not a very hight level API, but 
rather a very low level API. If document it, it should be documented on a 
separate page or on a page together with other low-level API.

> Serhiy: how are you supposed to modify local variables of a frame when these 
> variables are stored in "fast locals"?

Currently you should call PyFrame_FastToLocalsWithError(), modify directly 
f_locals, and call PyFrame_LocalsToFast(). This is very low-level manipulation. 
It exposes implementation details (at least you need to access PyFrameObject 
attributes directly). It should be documented that the most of PyFrame_* API is 
low-level and implementation specific. PyFrame_GetLineNumber() is an exception.

--

___
Python tracker 

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



[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread Christian Heimes

Christian Heimes  added the comment:

The msvcrt module is part of the standard library on Windows. Your cygwin 
installation may be incomplete.

By the way, why are you importing a private module? _pyio isn't a public API 
and shouldn't be used.

--
nosy: +christian.heimes

___
Python tracker 

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



[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread Matúš valo

Matúš valo  added the comment:

Previous import is working in python 2.7:
$ python
Python 2.7.14 (default, Oct 31 2017, 21:12:13)
[GCC 6.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import _pyio
>>>

--

___
Python tracker 

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



[issue32287] Import of _pyio module failed on cygwin

2017-12-12 Thread Matúš valo

New submission from Matúš valo :

When trying to impor _pyio from python3 in Cygwin, import fails with exception:
$ python3
Python 3.6.3 (default, Oct 31 2017, 19:00:36)
[GCC 6.4.0] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import _pyio
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python3.6/_pyio.py", line 17, in 
from msvcrt import setmode as _setmode
ModuleNotFoundError: No module named 'msvcrt'

This issue is breaking cherrypy server (cheroot component):
https://github.com/cherrypy/cheroot/blob/86c6b246ec7cb704c6f96123556db1a083301634/cheroot/makefile.py#L5

--
components: IO, Library (Lib)
messages: 308115
nosy: Matúš valo
priority: normal
severity: normal
status: open
title: Import of _pyio module failed on cygwin
type: crash
versions: Python 3.6

___
Python tracker 

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



[issue32137] Stack overflow in repr of deeply nested dicts

2017-12-12 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 4812 is an alternate fix for 3.6. It doesn't touch reprs of other types.

--

___
Python tracker 

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



  1   2   >