[issue32461] the first build after a change to Makefile.pre.in uses the old Makefile

2017-12-30 Thread Xavier de Gaye

New submission from Xavier de Gaye :

After applying the attached Makefile.pre.in.diff that changes the text of the 
message printed by the 'Makefile' target, the make command gives:

$ make
CONFIG_FILES=Makefile.pre CONFIG_HEADERS= /bin/sh config.status
config.status: creating Makefile.pre
make -f Makefile.pre Makefile
make[1]: Entering directory '/path/to/master'
/bin/sh ./Modules/makesetup -c ./Modules/config.c.in \
-s Modules \
Modules/Setup.local \
Modules/Setup
This is the new Makefile. The Makefile was updated, you may need to re-run 
make.  <--- new Makefile
make[1]: Leaving directory '/path/to/master'
/bin/sh ./Modules/makesetup -c ./Modules/config.c.in \
-s Modules \
Modules/Setup.local \
Modules/Setup
The Makefile was updated, you may need to re-run make.  
  <--- old Makefile
gcc -pthread -c -Wno-unused-result -Wsign-compare -g -Og -Wall 
-Wstrict-prototypes-std=c99 -Wext
ra -Wno-unused-result -Wno-unused-parameter -Wno-missing-field-initializers 
-Werror=implicit-functio
n-declaration   -I. -I./Include-DPy_BUILD_CORE \
-DABIFLAGS='"dm"' \
-DMULTIARCH=\"x86_64-linux-gnu\" \
-o Python/sysmodule.o ./Python/sysmodule.c



The two messages printed by the 'Makefile' target show that make is still 
running the previous Makefile after completing the sub-make (i.e. after the 
line "make[1]: Leaving directory '/path/to/master'").

--
components: Build
files: Makefile.pre.in.diff
keywords: patch
messages: 309270
nosy: xdegaye
priority: normal
severity: normal
stage: needs patch
status: open
title: the first build after a change to Makefile.pre.in uses the old Makefile
type: behavior
versions: Python 2.7, Python 3.6, Python 3.7
Added file: https://bugs.python.org/file47356/Makefile.pre.in.diff

___
Python tracker 

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



[issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional

2017-12-30 Thread devurandom

Change by devurandom :


--
nosy: +devurandom

___
Python tracker 

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



[issue32460] don't use tentative declarations

2017-12-30 Thread Benjamin Peterson

Change by Benjamin Peterson :


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

___
Python tracker 

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



[issue32460] don't use tentative declarations

2017-12-30 Thread Benjamin Peterson

New submission from Benjamin Peterson :

Tentative declarations (non-extern declarations without initializers) are 
legacy C-ism that we should eschew by ensuring all our declarations have 
initializers.

--
components: Build
messages: 309269
nosy: benjamin.peterson
priority: normal
severity: normal
status: open
title: don't use tentative declarations
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



[issue29237] Create enum for pstats sorting options

2017-12-30 Thread Marcel Widjaja

Marcel Widjaja  added the comment:

I'd like to try to work on this one

--
nosy: +mawidjaj

___
Python tracker 

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



[issue32459] Capsule API usage docs are incompatible with module reloading (etc)

2017-12-30 Thread Nick Coghlan

New submission from Nick Coghlan :

After commenting [1] on the fact that the current datetime module C API [2] is 
problematic due to its reliance on C level global variables, I discovered that 
this is actually the outcome of our recommended approach to using capsules to 
export a C API as function pointers: 
https://docs.python.org/3/extending/extending.html#providing-a-c-api-for-an-extension-module

So we first need to fix the documentation to propose a reloading friendly way 
of using capsules in other extension modules, and then we can then propose 
updating the public datetime C API accordingly (probably by defining new macros 
that accept the capsule reference as their first argument).

[1] https://bugs.python.org/issue10381#msg309214
[2] https://docs.python.org/3/c-api/datetime.html
[3] 
https://docs.python.org/3/extending/extending.html#providing-a-c-api-for-an-extension-module

--
messages: 309266
nosy: brett.cannon, eric.snow, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Capsule API usage docs are incompatible with module reloading (etc)
type: behavior

___
Python tracker 

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



[issue10381] Add timezone support to datetime C API

2017-12-30 Thread Nick Coghlan

Nick Coghlan  added the comment:

https://bugs.python.org/issue32459 covers defining a module-reloading-friendly 
way of using capsules.

For this issue, I now think it makes sense to just ignore that problem, and add 
whatever you need to the existing API.

--

___
Python tracker 

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



[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2017-12-30 Thread Benjamin Peterson

Change by Benjamin Peterson :


--
pull_requests: +4936
stage: resolved -> patch review

___
Python tracker 

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



[issue31530] Python 2.7 readahead feature of file objects is not thread safe

2017-12-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

Unfortunately, it looks like this fix causes a regression. Some programs rely 
on being able to seek() and write to a file on multiple threads. For example, 
py.test captures the standard streams by redirecting them to a tmpfile and then 
truncating+seeking to 0 after every test. This change broke that situation when 
multiple threads are logging. Anyway, there's no real fundamental reason to 
prevent concurrent access, since the underlying stdio implementation is 
threadsafe. I think we'll have to resurrect my PR.

--
resolution: fixed -> 
status: closed -> open

___
Python tracker 

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



[issue23859] asyncio: document behaviour of wait() cancellation

2017-12-30 Thread Chris Jerdonek

Change by Chris Jerdonek :


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



[issue23859] asyncio: document behaviour of wait() cancellation

2017-12-30 Thread Chris Jerdonek

Change by Chris Jerdonek :


--
nosy: +chris.jerdonek

___
Python tracker 

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



[issue10381] Add timezone support to datetime C API

2017-12-30 Thread Nick Coghlan

Nick Coghlan  added the comment:

On 31 December 2017 at 01:34, Paul Ganssle  wrote:
> That said, I think it would be really good if we could get a fast path for 
> timezone creation and access to the UTC singleton into the Python 3.7 
> release. I think it's kind of a big disparity between the Python and C APIs 
> that's existed for too long already.

It turns out the API already *is* exported as a capsule:
https://github.com/python/cpython/blob/master/Include/datetime.h#L149

Our general guidance for capsule usage is just outdated, and the
datetime API follows that dated advice:
https://docs.python.org/3/extending/extending.html#providing-a-c-api-for-an-extension-module

I'll file a separate issue for that docs problem later (the tracker is
reporting 502 Proxy Error for me right now)

--

___
Python tracker 

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



[issue32424] Synchronize copy methods between Python and C implementations of xml.etree.ElementTree.Element

2017-12-30 Thread Gordon P. Hemsley

Gordon P. Hemsley  added the comment:

As discussed above, starting with msg309074, __deepcopy__() is being added to 
the Python implementation because it already exists in the C implementation.

And additional tests have in fact uncovered further discrepancies between the 
Python and C implementations with regard to copying behavior.

PR 5046 has changes that I believe are ready for review.

--

___
Python tracker 

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



[issue32399] _uuidmodule.c cannot build on AIX - different typedefs of uuid_t, etc..

2017-12-30 Thread Antoine Pitrou

Change by Antoine Pitrou :


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



[issue32399] _uuidmodule.c cannot build on AIX - different typedefs of uuid_t, etc..

2017-12-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:


New changeset 0d3ccb4395cccb11a50289c84c9a0dbbac03c647 by Antoine Pitrou 
(Michael Felt) in branch 'master':
bpo-32399: Starting with AIX6.1 there is support in libc.a for uuid (RFC4122) 
(#4974)
https://github.com/python/cpython/commit/0d3ccb4395cccb11a50289c84c9a0dbbac03c647


--

___
Python tracker 

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



[issue30861] StreamReader does not return reamaing and ready data buffer before raise the Exeption

2017-12-30 Thread pfreixes

pfreixes  added the comment:

Yeps, any update on this bug and the fix proposed?

--

___
Python tracker 

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



[issue32448] subscriptable

2017-12-30 Thread R. David Murray

R. David Murray  added the comment:

Well, in that case having 'organizer' in the error message wouldn't help you 
untangle your code ;)

--

___
Python tracker 

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



[issue32452] Brackets and Parentheses used in an ambiguous way

2017-12-30 Thread R. David Murray

R. David Murray  added the comment:

"round brackets" would require just as much thought (if not more...it's not a 
thing at all in American typographical language) for an American to understand 
as the unadorned bracket does for the rest of you, so the best compromise is 
"parenthesis instead of square brackets", since parenthesis is used elsewhere 
in the docs.

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



[issue32451] python -m venv activation issue when using cygwin on windows

2017-12-30 Thread R. David Murray

R. David Murray  added the comment:

cygwin in not currently fully supported (there are people working on it, 
though).  Can you determine if this is a bug in cygwin's bash support, or 
something else?  It certainly works with bash shell on unix.  I would presume 
that from cygwin one would want the posix way to work, and that it should be 
possible.

--
nosy: +erik.bray, r.david.murray

___
Python tracker 

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



[issue8231] Unable to run IDLE without write-access to home directory

2017-12-30 Thread Ned Deily

Ned Deily  added the comment:

> Ned diagnosed #32447 as likely due to the space in the user name.

Actually, that's not what the primary problem was. It was a severely 
misconfigured home directory, both permissions and groups.  I'm not sure how 
that situation was created (possibly through inadvertent sysadmin commands from 
the shell) but it's not something that IDLE needs to worry about; such a 
configuration breaks lots of other system programs.  In other words, the OP's 
system was broken.

--

___
Python tracker 

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



[issue32458] test_asyncio failures on Windows

2017-12-30 Thread Yury Selivanov

Yury Selivanov  added the comment:

Please keep this issue open.

--

___
Python tracker 

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



[issue32458] test_asyncio failures on Windows

2017-12-30 Thread Yury Selivanov

Yury Selivanov  added the comment:


New changeset 0c36bed1c46d07ef91d3e02e69e974e4f3ecd31a by Yury Selivanov in 
branch 'master':
bpo-32458: Temporarily mask start-tls proactor test on Windows (#5054)
https://github.com/python/cpython/commit/0c36bed1c46d07ef91d3e02e69e974e4f3ecd31a


--

___
Python tracker 

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



[issue32458] test_asyncio failures on Windows

2017-12-30 Thread Yury Selivanov

Yury Selivanov  added the comment:

I'm leaving on a two-weeks vacation today.  To avoid risking breaking the 
workflow, I'll mask this tests on AppVeyor.  I'll investigate this when I get 
back.

--
assignee:  -> yselivanov
components: +asyncio -Library (Lib), Tests
priority: normal -> high

___
Python tracker 

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



[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2017-12-30 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

Next up - implementing the ResourceReader ABC.

--

___
Python tracker 

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



[issue32458] test_asyncio failures on Windows

2017-12-30 Thread Yury Selivanov

Change by Yury Selivanov :


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

___
Python tracker 

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



[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

The Mac issue is the inability to add .xyz directories to the home directory.  
You can test a fix by entering 'mkdir .idlerc' at the terminal prompt.

The IDLE issue is that IDLE quits when it cannot create .idlerc. In this 
respect, this is a duplicate of #8231.  That this can happen after what seemed 
like a 'normal' install (on a home machine?) gives me a bit more impetus to 
work on that issue.

--
assignee: terry.reedy -> 
superseder:  -> Unable to run IDLE without write-access to home directory

___
Python tracker 

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



[issue32248] Port importlib_resources (module and ABC) to Python 3.7

2017-12-30 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:


New changeset deae6b451fefd5fd3143dd65051e1d341e5a5f84 by Barry Warsaw in 
branch 'master':
bpo-32248 - Implement importlib.resources (#4911)
https://github.com/python/cpython/commit/deae6b451fefd5fd3143dd65051e1d341e5a5f84


--

___
Python tracker 

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



[issue8231] Unable to run IDLE without write-access to home directory

2017-12-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Ned diagnosed #32447 as likely due to the space in the user name. What matters 
for this issue is that a) someone can do that and b) IDLE likely could continue 
running anyway.  There might then be problems with saving files from the 
editor, so any warning message should include that possibility.

--

___
Python tracker 

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



[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2017-12-30 Thread Eryk Sun

Eryk Sun  added the comment:

Here's a way to trigger this error that's unrelated to the PATH environment 
variable:

>>> subprocess.call('python', executable=r'C:\Program 
Files\Python36\.\python.exe')
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
[...]

Apparently Windows doesn't normalize the process image path if it uses only 
backslash as the path separator. It normalizes it if at least one backslash is 
replaced with a slash.

--
nosy: +eryksun

___
Python tracker 

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



[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-30 Thread Ned Deily

Ned Deily  added the comment:

P.S. You might consider creating a new account without the embedded space and 
moving your files there; it will probably cause other problems for you in the 
future.  I notice that the current System Preferences -> Users & Groups 
interface won't even let you create a login account with a space in it.

--

___
Python tracker 

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



[issue8231] Unable to run IDLE without write-access to home directory

2017-12-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Another duplicate: #32411, MacOS 10.3.1, user apparently cannot write to home 
dir.  Starting IDLE in terminal results in

 Warning: unable to create user config directory
/Users/Steve Margetts/.idlerc
 Check path and permissions.
 Exiting!

--

___
Python tracker 

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



[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-30 Thread Ned Deily

Ned Deily  added the comment:

OK, that confirms that your home directory permissions are incorrect.  Not sure 
how that happened, possibly by an inadvertent chown command.  Note that you 
need to be careful when using shell commands because your user name has a space 
character in it, so you have to be sure to enclose it in quotes in the shell 
("Steve Margetts") and there may be third-party scripts that don't handle that 
case well; generally, it's best to avoid using spaces in the Unix login name.  
Anyway, there are several ways to correct the problem but it looks like the 
easiest might be to use a procedure that Apple provides to reset permissions.  
It is described here:

https://www.macobserver.com/tmo/article/os-x-repair-home-folder-permissions

Good luck!

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



[issue28494] is_zipfile false positives

2017-12-30 Thread John Jolly

John Jolly  added the comment:

Fix submitted that evaluates the ECD structure and validates the first CD 
entry. The fix also handles empty zipfiles.

IMO the purpose of this API is to *quickly* verify that the file is a valid 
zipfile. With this fix, the API only reads another 46 bytes of data (after a 
seek, of course). This should still qualify as "quick", especially after having 
potentially read 64k of data.

Perhaps a full zip validator would be appropriate in addition to is_zipfile. 
That would be more appropriate as a full feature rather than in this bugfix.

--
nosy: +jjolly

___
Python tracker 

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



[issue32458] test_asyncio failures on Windows

2017-12-30 Thread Antoine Pitrou

New submission from Antoine Pitrou :

It seems test_asyncio fails sporadically on AppVeyor:
https://ci.appveyor.com/project/python/cpython/build/3.7.0a0.10081#L2650

==
ERROR: test_start_tls_server_1 
(test.test_asyncio.test_sslproto.ProactorStartTLS)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_asyncio\test_sslproto.py", line 284, 
in test_start_tls_server_1
asyncio.wait_for(main(), loop=self.loop, timeout=10))
  File "C:\projects\cpython\lib\asyncio\base_events.py", line 440, in 
run_until_complete
return future.result()
  File "C:\projects\cpython\lib\asyncio\tasks.py", line 398, in wait_for
raise futures.TimeoutError()
concurrent.futures._base.TimeoutError
==
FAIL: test_start_tls_server_1 (test.test_asyncio.test_sslproto.ProactorStartTLS)
--
Traceback (most recent call last):
  File "C:\projects\cpython\lib\test\test_asyncio\functional.py", line 43, in 
tearDown
self.fail('unexpected calls to loop.call_exception_handler()')
AssertionError: unexpected calls to loop.call_exception_handler()

--
components: Library (Lib), Tests
messages: 309244
nosy: asvetlov, giampaolo.rodola, pitrou, yselivanov
priority: normal
severity: normal
status: open
title: test_asyncio failures on Windows
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



[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2017-12-30 Thread Ray Donnelly

Ray Donnelly  added the comment:

.. though I will also ask the scons people to change this to use pushd and %CD% 
instead. Even if you were to make Python capable of handling such bad input, 
who knows what other programs will fail, and build systems should be extra 
careful not to mess the environment up like this.

--

___
Python tracker 

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



[issue32457] Windows Python cannot handle an early PATH entry containing ".." and python.exe

2017-12-30 Thread Ray Donnelly

New submission from Ray Donnelly :

Over on the Anaconda Distribution we received a (private) bug report about a 
crash when trying to use scons. I thought initially it was due to one of our 
patches but I tested it out with official CPython and also with WinPython and 
ran into the same crash.

To reproduce this, from cmd.exe on CPython (here I installed CPython as part of 
Visual Studio 2017, then updated it to the latest 3.6.4 release):

```
set "PATH=C:\Program Files (x86)\Microsoft Visual 
Studio\Shared\Python36_64\Scripts\..;%PATH%"

python.exe

..

python
Fatal Python error: Py_Initialize: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'

Current thread 0x0328 (most recent call first):
```

The trigger for this bug is the following batch code in scons.bat:

https://bitbucket.org/scons/scons/src/c0172db149b1a151eeb76910d55c81746bfede05/src/script/scons.bat?at=default&fileviewer=file-view-default#scons.bat-19

My current thinking is that the best fix here is to modify 
get_progpath()/get_program_full_path() so that it uses PathCchCanonicalizeEx() 
at 
https://github.com/python/cpython/blob/9bee329130aae5a13050c08dab9d349b76e66835/PC/getpathp.c#L558-L559

--
components: Windows
messages: 309242
nosy: Ray Donnelly, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows Python cannot handle an early PATH entry containing ".." and 
python.exe
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



[issue28494] is_zipfile false positives

2017-12-30 Thread John Jolly

Change by John Jolly :


--
pull_requests: +4934
stage:  -> patch review

___
Python tracker 

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



[issue32418] Implement Server.get_loop() method

2017-12-30 Thread Andrew Svetlov

Change by Andrew Svetlov :


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



[issue32418] Implement Server.get_loop() method

2017-12-30 Thread Andrew Svetlov

Andrew Svetlov  added the comment:


New changeset ffcb4c0165827d0a48ea973cc88bc134c74879fb by Andrew Svetlov in 
branch 'master':
bpo-32418: Postfix, raise NotImplementdError and close resources in tests 
(#5052)
https://github.com/python/cpython/commit/ffcb4c0165827d0a48ea973cc88bc134c74879fb


--

___
Python tracker 

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



[issue32448] subscriptable

2017-12-30 Thread Alexander Mohr

Alexander Mohr  added the comment:

oh for second example I meant something like this:

>>> class Foo: pass
>>> Foo.organizer = None
>>> Foo.blah = Foo
>>> Foo.blah.organizer = None
>>> Foo.blah.organizer[0]

ya this is just a pie in the sky request :)

--

___
Python tracker 

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



[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-30 Thread Steve Margetts

Steve Margetts  added the comment:

Including tilde...

Last login: Sat Dec 30 10:47:07 on ttys001
mkdir: /Users/Steve Margetts/.bash_sessions: Permission denied
touch: /Users/Steve 
Margetts/.bash_sessions/8B76B0D2-2C88-4FE0-A8F6-C7FB8C13A2A8.historynew: No 
such file or directory
iMac:~ Steve Margetts$ ls -led ~
drwxr-xr-x  21 501  staff  714 30 Dec 10:40 /Users/Steve Margetts
iMac:~ Steve Margetts$

--

___
Python tracker 

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



[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-30 Thread Ned Deily

Ned Deily  added the comment:

Just to be sure, please try again with the command as Ronald requested, i.e. 
include the tilde "~":

ls -led ~

--

___
Python tracker 

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



[issue32456] PYTHONIOENCODING=undefined doesn't work in Python 3

2017-12-30 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

In Python 2.7 setting PYTHONIOENCODING=undefined mostly works as expected.

$ PYTHONIOENCODING=undefined python -c 'print(123)'
123
$ PYTHONIOENCODING=undefined python -c 'print("abc")'
abc
$ PYTHONIOENCODING=undefined python -c 'print(u"abc")'
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.7/encodings/undefined.py", line 19, in encode
raise UnicodeError("undefined encoding")
UnicodeError: undefined encoding

Most tests (except test_doctest and test_gdb) are passed with 
PYTHONIOENCODING=undefined.

But in Python 3 setting PYTHONIOENCODING=undefined seems just silently 
terminates the interpreter (exited with code 1).

--
components: IO, Interpreter Core, Unicode
messages: 309237
nosy: benjamin.peterson, ezio.melotti, lemburg, ncoghlan, serhiy.storchaka, 
vstinner
priority: normal
severity: normal
status: open
title: PYTHONIOENCODING=undefined doesn't work in Python 3
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue32418] Implement Server.get_loop() method

2017-12-30 Thread Andrew Svetlov

Change by Andrew Svetlov :


--
pull_requests: +4933

___
Python tracker 

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



[issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip()

2017-12-30 Thread Sanyam Khurana

Change by Sanyam Khurana :


--
pull_requests: +4932

___
Python tracker 

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



[issue23749] asyncio missing wrap_socket (starttls)

2017-12-30 Thread Yury Selivanov

Yury Selivanov  added the comment:

> I think the feature is significant enough for a What's New entry.

Sure, Elvis and I will go through all NEWS items when it's time for what's new 
;)

--

___
Python tracker 

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



[issue23749] asyncio missing wrap_socket (starttls)

2017-12-30 Thread Barry A. Warsaw

Barry A. Warsaw  added the comment:

@yselivanov - thanks for adding this, it's a huge win.

I think the feature is significant enough for a What's New entry.

--

___
Python tracker 

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



[issue10381] Add timezone support to datetime C API

2017-12-30 Thread Paul Ganssle

Paul Ganssle  added the comment:

@Nick

I'm certainly fine with re-configuring my PR to center around a new capsule 
module with deprecation of the old C API (though if you have any examples of 
what you have in mind that would be helpful to me). Certainly the "C global 
needs to be initiated" problem has bitten me in the past and I'm certain will 
continue to bite people in the future.

That said, I think it would be really good if we could get a fast path for 
timezone creation and access to the UTC singleton into the Python 3.7 release. 
I think it's kind of a big disparity between the Python and C APIs that's 
existed for too long already.

--

___
Python tracker 

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



[issue19678] smtpd.py: channel should be passed to process_message

2017-12-30 Thread Sanyam Khurana

Change by Sanyam Khurana :


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



[issue32455] PyCompile_OpcodeStackEffect() and dis.stack_effect() are not particularly useful

2017-12-30 Thread Serhiy Storchaka

New submission from Serhiy Storchaka :

The information provided by PyCompile_OpcodeStackEffect() and 
dis.stack_effect() (added in issue19722) is not enough for practical use.

1. Some opcodes (like JUMP_IF_TRUE_OR_POP or FOR_ITER) have different stack 
effect when when execution is continued from the following opcode or jumped to 
the address specified by oparg. Thus there are two different values for stack 
effect of these opcodes.

2. Some opcodes (RETURN_VALUE, RAISE_VARARGS) stops execution. Their stack 
effect doesn't have meaning, and the following opcodes should be ignored.

3. Some opcodes (JUMP_ABSOLUTE, JUMP_RELATIVE) always jump. The opcodes 
following them should be ignored.

4. Some opcodes (like SETUP_FINALLY or SETUP_WITH) need additional space on the 
stack for raised exceptions. Their stack effect is virtual. Its value can't be 
used for calculating the actual position on the stack. This isn't documented.

The possible solution is to add a boolean flag for distinguishing the stack 
effects in case of consequent execution and jumping. Return a special sentinel 
or raise an exception if the opcode doesn't pass execution in this direction.

--
components: Interpreter Core, Library (Lib)
messages: 309232
nosy: eric.snow, larry, ncoghlan, serhiy.storchaka
priority: normal
severity: normal
status: open
title: PyCompile_OpcodeStackEffect() and dis.stack_effect() are not 
particularly useful
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



[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-30 Thread Steve Margetts

Steve Margetts  added the comment:

OK, those commands give:

iMac:~ Steve Margetts$ ls -led
drwxr-xr-x  21 501  staff  714 30 Dec 10:40 .
iMac:~ Steve Margetts$ id
uid=503(Steve Margetts) gid=20(staff) 
groups=20(staff),12(everyone),61(localaccounts),79(_appserverusr),80(admin),81(_appserveradm),98(_lpadmin),33(_appstore),100(_lpoperator),204(_developer),250(_analyticsusers),395(com.apple.access_ftp),398(com.apple.access_screensharing),399(com.apple.access_ssh)
iMac:~ Steve Margetts$

--

___
Python tracker 

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



[issue32453] shutil.rmtree can have O(n^2) performance on large dirs

2017-12-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


Added file: https://bugs.python.org/file47355/bench_rmtree.py

___
Python tracker 

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



[issue32453] shutil.rmtree can have O(n^2) performance on large dirs

2017-12-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I have tested shutil.rmtree() with a large number of files using modified 
benchmark from issue28564. For 40 files it takes less than 5 seconds. From 
the comment to the coreutils benchmark 
(http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=24412edeaf556a):

# Using rm -rf to remove a 400k-entry directory takes:
# - 9 seconds with the patch, on a 2-yr-old system
# - 350 seconds without the patch, on a high-end system (disk 20-30% faster) 
threshold_seconds=60

Running the coreutils benchmark gives the result 3 seconds on my computer.

It seems to me that this issue have been fixed in the kernel.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue32443] Add Linux's signalfd() to the signal module

2017-12-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

> Regardless, it'd be nice to have it available in the stdlib so it could be 
> used if deemed useful.

Agreed.

> Signals are process global state, no thread compatible library can rightfully 
> take ownership of a one.

But then is the signalfd() idea for subprocess doomed as well?

--

___
Python tracker 

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



[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-30 Thread Ronald Oussoren

Ronald Oussoren  added the comment:

There appears to be a permission issue with the home directory.

What's the output of the following commands in a terminal window:

$ ls -led ~
$ id

The home directory should be owned by the "uid" shown by the second command, 
and should be writable by the user, the output of "ls" should show something 
like this:

drwxr-xr-x@ 336 ronald  staff  10752 Dec 30 12:52 /Users/ronald
 0: group:everyone deny delete

In particular the mode at the start should start with "drwx".

--

___
Python tracker 

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



[issue32454] Add socket.close(fd) function

2017-12-30 Thread Antoine Pitrou

Change by Antoine Pitrou :


--
nosy: +paul.moore, steve.dower, tim.golden, zach.ware

___
Python tracker 

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



[issue32453] shutil.rmtree can have O(n^2) performance on large dirs

2017-12-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

I don't think filesystem-specific optimizations belong in the Python stdlib.  
Python is compatible with multiple operating systems, including Windows, macOS, 
Android, many POSIX variants.  It would be much better if this were fixed in 
the kernel...

--
nosy: +pitrou

___
Python tracker 

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



[issue32447] IDLE shell won't open on Mac OS 10.13.1

2017-12-30 Thread Steve Margetts

Steve Margetts  added the comment:

Thanks for the help. I've installed ActiveTCL 8.5.18.0 as per the Python 
recommendation. Running from terminal:

Last login: Fri Dec 29 16:46:22 on ttys001
mkdir: /Users/Steve Margetts/.bash_sessions: Permission denied
touch: /Users/Steve 
Margetts/.bash_sessions/224C387E-8E74-4020-A5CC-F275EFB79EAE.historynew: No 
such file or directory
iMac:~ Steve Margetts$ python3.6
Python 3.6.4 (v3.6.4:d48ecebad5, Dec 18 2017, 21:07:28) 
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import tkinter
>>>

Did not bring up any error message. However, subsequently trying to run IDLE 
from terminal brought up:

Last login: Sat Dec 30 10:42:04 on ttys000
mkdir: /Users/Steve Margetts/.bash_sessions: Permission denied
touch: /Users/Steve 
Margetts/.bash_sessions/58F5E574-277D-4413-9B03-4B24ED9B4C21.historynew: No 
such file or directory
iMac:~ Steve Margetts$ python3.6 -m idlelib

 Warning: unable to create user config directory
/Users/Steve Margetts/.idlerc
 Check path and permissions.
 Exiting!

iMac:~ Steve Margetts$ 

Does this look like a permissions issue? If so, any idea what to try next? I'm 
logged on as an administrator on a home computer. Is this likely to be a 
security setting issue? Thanks again for any help - I'm a child of the GUI and 
the last time I coded anything was in BBC Basic!

--

___
Python tracker 

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



[issue28134] socket.socket(fileno=fd) does not work as documented

2017-12-30 Thread Christian Heimes

Christian Heimes  added the comment:

Issue #32454 adds socket.close(fd) function.

--

___
Python tracker 

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



[issue32454] Add socket.close(fd) function

2017-12-30 Thread Christian Heimes

Change by Christian Heimes :


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

___
Python tracker 

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



[issue32454] Add socket.close(fd) function

2017-12-30 Thread Christian Heimes

New submission from Christian Heimes :

os.close(fd) of a socket fd does not work some platforms, e.g. Windows. In the 
past we have used socket.socket(fileno=fd).close() to close a socket in a 
platform independent way. With #28134 it may no longer work in all cases, most 
noticeable when the socket has neither been connected nor bound yet and 
auto-detection of type and family is used.

Instead of adding more hacks, I propose to add a socket.close(fd) function as 
cross-platform way to close a socket fd. It won't be the first function that 
mimics an o' module function. The socket module already has the undocumented 
socket.dup(fd) function.

--
messages: 309224
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Add socket.close(fd) function
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



[issue32439] Clean up the code for compiling comparison expressions

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