[issue31651] io.FileIO cannot write more than 2GB (-4096) bytes??? must be documented (if not fixed)

2017-09-30 Thread Yaroslav Halchenko

Yaroslav Halchenko  added the comment:

Thank you for the follow-ups!  

Wouldn't it be better if Python documentation said exactly that 

On Linux, write() (and similar system calls) will transfer at most 0x7000 
(2,147,479,552) bytes, returning the number of bytes 
actually transferred.  (This is true on both 32-bit and 64-bit 
systems.)

Also, it might be nice to add a note on top, that this module is for 'low 
level' IO interface, and that it is recommended to use regular file type for 
typical file operations (not io.FileIO) to avoid necessity of dealing 
limitations such as the one mentioned.

--

___
Python tracker 

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



[issue31651] io.FileIO cannot write more than 2GB (-4096) bytes??? must be documented (if not fixed)

2017-09-30 Thread Eryk Sun

Eryk Sun  added the comment:

Additionally, the FileIO documentation states the following:

The read() (when called with a positive argument), readinto() and 
write() methods on this class will only make one system call.

The Linux man page for write() in turn states this:

On Linux, write() (and similar system calls) will transfer at most 
0x7000 (2,147,479,552) bytes, returning the number of bytes 
actually transferred.  (This is true on both 32-bit and 64-bit 
systems.)

--
nosy: +eryksun

___
Python tracker 

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



[issue29041] Reference leaks on Windows

2017-09-30 Thread Zachary Ware

Zachary Ware  added the comment:

Victor has cleaned these up, and we now have a buildbot running refleak checks 
on Windows every day (as long as it's not hung :)

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

___
Python tracker 

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



[issue28027] Remove Lib/plat-*/* files

2017-09-30 Thread Zachary Ware

Zachary Ware  added the comment:

Since we've reached 3.6.3 with no complaints that have made it to me, I'm going 
to go ahead and close the issue.

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

___
Python tracker 

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



[issue31652] make install fails: no module _ctypes

2017-09-30 Thread Zachary Ware

Zachary Ware  added the comment:

I expect that the root cause is missing libffi(-dev[el]) on your system, 
preventing _ctypes from building, so your quick fix would be to install that 
and try again.

However, not having _ctypes shouldn't cause installation to fail.  Donald, is 
ctypes a hard requirement for pip to install itself?  If so, ensurepip as 
called by `make install` should either gracefully handle a lack of ctypes or be 
disabled when ctypes is not available.

--
nosy: +dstufft, ncoghlan, zach.ware

___
Python tracker 

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



[issue31651] io.FileIO cannot write more than 2GB (-4096) bytes??? must be documented (if not fixed)

2017-09-30 Thread Benjamin Peterson

Benjamin Peterson  added the comment:

The docs to look at here are 
https://docs.python.org/3/library/io.html#io.RawIOBase.write, which points out 
that short writes can happen.

--
nosy: +benjamin.peterson
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



[issue31654] ctypes should support atomic operations

2017-09-30 Thread Daniel Colascione

New submission from Daniel Colascione :

Say we're using multiprocessing to share a counter between two processes and we 
want to atomically increment that counter. Right now, we need to protect that 
counter with a multiprocessing semaphore of some sort, then 1) acquire the 
semaphore, 2) read-modify-write the counter value, and 3) release the 
semaphore. What if we're preempted by a GIL-acquire request after step #1 but 
before step #3? We'll hold the semaphore until the OS scheduler gets around to 
running us again, which might be a while in the case of compute-bound tasks 
(especially if these tasks call C code that doesn't release the GIL).

Now, if some other process wants to increment the counter, it needs to wait on 
the first process's GIL! That partially defeats the purpose of multiprocessing: 
one of the nice things about multiprocessing is avoiding GIL-introduced latency!

If ctypes supported atomic operations, we could skip steps #1 and #3 entirely 
and operate directly on the shared memory region. Every operating system that 
supports threads at all also supports some kind of compare-and-exchange 
primitive. Compare-and-exchange is sufficient for avoiding the GIL contention I 
describe above.

--
components: ctypes
messages: 303442
nosy: Daniel Colascione
priority: normal
severity: normal
status: open
title: ctypes should support atomic operations
type: enhancement
versions: Python 3.8

___
Python tracker 

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



[issue31653] Don't release the GIL if we can acquire a multiprocessing semaphore immediately

2017-09-30 Thread Daniel Colascione

New submission from Daniel Colascione :

Right now, the main loop in semlock_acquire looks like this:

do {
Py_BEGIN_ALLOW_THREADS
if (blocking && timeout_obj == Py_None)
res = sem_wait(self->handle);
else if (!blocking)
res = sem_trywait(self->handle);
else
res = sem_timedwait(self->handle, );
Py_END_ALLOW_THREADS
err = errno;
if (res == MP_EXCEPTION_HAS_BEEN_SET)
break;
} while (res < 0 && errno == EINTR && !PyErr_CheckSignals());

Here, we unconditionally release the GIL even we could acquire the mutex 
without blocking! As a result, we could end up switching to another thread in 
the process and greatly increasing the latency of operations that lock and 
release multiple shared data structures.

Instead, we should unconditionally try sem_trywait, and only then, if we want 
to block, release the GIL and try sem_wait or sem_timedwait. This way, we'll 
churn only when we need to.

Note that threading.Lock works the way I propose.

--
components: Library (Lib)
messages: 303441
nosy: Daniel Colascione
priority: normal
severity: normal
status: open
title: Don't release the GIL if we can acquire a multiprocessing semaphore 
immediately
versions: Python 3.4, Python 3.5, 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



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


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



[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-09-30 Thread Martin Panter

Change by Martin Panter :


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

___
Python tracker 

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



[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-09-30 Thread Martin Panter

Martin Panter  added the comment:

.
Actually take back a lot of what I wrote above. I forgot that 
SimpleHTTPRequestHandler only supports HTTP 1.0; I don’t think it uses 
keep-alive or persistent connections, so it should close its TCP connections 
promptly. There may be something else going on.

Unfortunately I don’t have Chrome handy to experiment with. Perhaps it is 
holding a TCP connection open without making any request at all, and then 
trying to open a second connection. You would have to look at the TCP 
connections being created and shut down, and the HTTP requests being made, to 
verify.

--

___
Python tracker 

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



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset c8198c92320bc35b1e3de5ff0118bd8e20e8d68a by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-31460: Simplify the API of IDLE's Module Browser. (GH-3842) (#3843)
https://github.com/python/cpython/commit/c8198c92320bc35b1e3de5ff0118bd8e20e8d68a


--

___
Python tracker 

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



[issue31650] implement PEP 552

2017-09-30 Thread Barry A. Warsaw

Change by Barry A. Warsaw :


--
nosy: +barry

___
Python tracker 

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



[issue31639] http.server and SimpleHTTPServer hang after a few requests

2017-09-30 Thread Martin Panter

Martin Panter  added the comment:

The change in handling KeyboardInterrupt was my intention in Issue 23430. I 
hope it isn’t a problem on its own :)

Running the module with “python -m http.server” uses the HTTPServer class, 
based on socketserver.TCPServer. This only accepts one connection at a time, 
and waits for the SimpleHTTPRequestHandler class to finish handling each TCP 
connection before shutting it down and waiting for the next one. But 
SimpleHTTPRequestHandler supports persistent HTTP connections, meaning the TCP 
connection stays open after one HTTP request, ready for another. This prevents 
the simple TCPServer from accepting new connections.

What is probably happening is the browser is trying to make one request (e.g. 
for domain3.html) on a new connection while it has an existing persistent 
connection already open. Having multiple host names pointing to the same server 
is not going to help; perhaps the browser does not realize that the two 
connections are to the same TCP server or that it could reuse the old 
connection.

A simple workaround would be to use the socketserver.ThreadingMixIn or 
ForkingMixIn class. Each TCP connection will then be handled in a background 
thread. The mixed-in TCPServer will not wait for the handler, and will accept 
concurrent connections.

If you want to avoid multiple threads, I think it is also possible to augment 
the server and handler classes to use “select” or similar so that the server 
will still handle each HTTP request one at a time, but can wait for requests on 
multiple TCP connections. But it requires subclassing and overriding some 
methods with custom code, and probably depends on deeper knowledge of how the 
classes work than is specified in the documentation.

For existing versions of Python, I don’t there is much that could be done other 
than documenting the shortcomings of how a persistent HTTP connection vs 
multiple connections is handled.

--
nosy: +martin.panter

___
Python tracker 

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



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +3824

___
Python tracker 

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



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset d6bb65f378e34fe0c11fdb39588357ecf22964eb by Terry Jan Reedy in 
branch 'master':
bpo-31460: Simplify the API of IDLE's Module Browser. (#3842)
https://github.com/python/cpython/commit/d6bb65f378e34fe0c11fdb39588357ecf22964eb


--

___
Python tracker 

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



[issue31555] Windows pyd slower when not loaded via load_dynamic

2017-09-30 Thread Steve Dower

Steve Dower  added the comment:

The difference is on startup in how they generate sys.path entries.

Skip the install step and directly run the library in a clean virtual 
environment, so that no .pth or .egg files are in use. If the difference still 
occurs, show that it also occurs on a recent version of Python as well and we 
can look at it

I promise you, there is only one way that extension modules get loaded. The 
performance difference is not because of anything in core.

--
resolution:  -> third party
status: open -> closed

___
Python tracker 

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



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


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



[issue31652] make install fails: no module _ctypes

2017-09-30 Thread Dandan Lee

New submission from Dandan Lee :

The make install step fails with this error:

Traceback (most recent call last):
  File "/home/dandan/Downloads/cpython-3.7.0a1/Lib/runpy.py", line 193, in 
_run_module_as_main
"__main__", mod_spec)
  File "/home/dandan/Downloads/cpython-3.7.0a1/Lib/runpy.py", line 85, in 
_run_code
exec(code, run_globals)
  File "/home/dandan/Downloads/cpython-3.7.0a1/Lib/ensurepip/__main__.py", line 
4, in 
ensurepip._main()
  File "/home/dandan/Downloads/cpython-3.7.0a1/Lib/ensurepip/__init__.py", line 
189, in _main
default_pip=args.default_pip,
  File "/home/dandan/Downloads/cpython-3.7.0a1/Lib/ensurepip/__init__.py", line 
102, in bootstrap
_run_pip(args + [p[0] for p in _PROJECTS], additional_paths)
  File "/home/dandan/Downloads/cpython-3.7.0a1/Lib/ensurepip/__init__.py", line 
27, in _run_pip
import pip
  File "/tmp/tmpcg658x_c/pip-9.0.1-py2.py3-none-any.whl/pip/__init__.py", line 
28, in 
  File "/tmp/tmpcg658x_c/pip-9.0.1-py2.py3-none-any.whl/pip/vcs/mercurial.py", 
line 9, in 
  File "/tmp/tmpcg658x_c/pip-9.0.1-py2.py3-none-any.whl/pip/download.py", line 
36, in 
  File "/tmp/tmpcg658x_c/pip-9.0.1-py2.py3-none-any.whl/pip/utils/glibc.py", 
line 4, in 
  File "/home/dandan/Downloads/cpython-3.7.0a1/Lib/ctypes/__init__.py", line 7, 
in 
from _ctypes import Union, Structure, Array
ModuleNotFoundError: No module named '_ctypes'
Makefile:1080: recipe for target 'install' failed
make: *** [install] Error 1

Am I missing something?

--
components: Build
messages: 303434
nosy: Dandan Lee
priority: normal
severity: normal
status: open
title: make install fails: no module _ctypes
type: compile 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



[issue31649] IDLE: Make _htest, _utest parameters keyword-only.

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


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



[issue31649] IDLE: Make _htest, _utest parameters keyword-only.

2017-09-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset 40c54d5e1aaab91cb7df71f735112d20b5e5b755 by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-31649: Make IDLE's _htest, _utest parameters keyword-only. (GH-3839) 
(#3841)
https://github.com/python/cpython/commit/40c54d5e1aaab91cb7df71f735112d20b5e5b755


--

___
Python tracker 

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



[issue31649] IDLE: Make _htest, _utest parameters keyword-only.

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
pull_requests: +3822

___
Python tracker 

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



[issue31649] IDLE: Make _htest, _utest parameters keyword-only.

2017-09-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:


New changeset bfebfd81de21b7906df386fce845f2b1f5ffd212 by Terry Jan Reedy in 
branch 'master':
bpo-31649: Make IDLE's _htest, _utest parameters keyword-only. (#3839)
https://github.com/python/cpython/commit/bfebfd81de21b7906df386fce845f2b1f5ffd212


--

___
Python tracker 

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



[issue31557] tarfile: incorrectly treats regular file as directory

2017-09-30 Thread Nitish

Nitish  added the comment:

> This check was the source of a bug that caused tarfile to report a regular as 
> a directory because the file path was extra long, and when the tar write 
> truncated the path to the first 100B, it so happened to end on a slash.

AFAIK, '/' character is not allowed as part of a filename on Linux systems. Is 
this bug platform specific? Can you give the testcase you are referring to.

--
nosy: +nitishch

___
Python tracker 

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



[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-30 Thread Oren Milman

Change by Oren Milman :


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

___
Python tracker 

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



[issue20464] Update distutils sample config file in Doc/install/index.rst

2017-09-30 Thread Zachary Ware

Change by Zachary Ware :


--
versions: +Python 3.7 -Python 3.4, Python 3.5

___
Python tracker 

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



[issue20323] Argument Clinic: docstring_prototype output causes build failure on Windows

2017-09-30 Thread Zachary Ware

Zachary Ware  added the comment:

With two-pass gone, this is gone.

--
resolution: remind -> out of date
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



[issue31651] io.FileIO cannot write more than 2GB (-4096) bytes??? must be documented (if not fixed)

2017-09-30 Thread Yaroslav Halchenko

New submission from Yaroslav Halchenko :

originally detected on python 2.7, but replicated with python 3.5.3 -- 
apparently io.FileIO, if given a bytestring of 2GB or more, cannot write it all 
at once -- saves (and returns that size) only 2GB - 4096.

I found no indication for such behavior anywhere in the documentation. And it 
is surprising to me especially since regular file.write does it just fine!  
attached is the code snippet which I list below and which demonstrates it

$> python3 --version; python3 longwrite.py
Python 3.5.3
Written 2147479552 out of 2147483648
4096 bytes were not written
Traceback (most recent call last):
  File "longwrite.py", line 28, in 
assert in_digest == out_digest, "Digests do not match"
AssertionError: Digests do not match
python3 longwrite.py  7.03s user 5.80s system 99% cpu 12.848 total
1 11365 ->1.:Sat 30 Sep 2017 04:56:26 PM 
EDT:.
smaug:/mnt/btrfs/scrap/tmp
$> cat longwrite.py
# -*- coding: utf-8 -*-
import io
import os
import hashlib

s = u' '*(256**4//2)  #+ u"перфекто"
s=s.encode('utf-8')
#s=' '*(10)

in_digest = hashlib.md5(s).hexdigest()
fname = 'outlong.dat'

if os.path.exists(fname):
os.unlink(fname)

with io.FileIO(fname, 'wb') as f:
#with open(fname, 'wb') as f:
 n = f.write(s)

#n = os.stat(fname).st_size
print("Written %d out of %d" % (n, len(s)))
if n != len(s):
print("%d bytes were not written" % (len(s) - n))

# checksum
with open(fname, 'rb') as f:
out_digest = hashlib.md5(f.read()).hexdigest()
assert in_digest == out_digest, "Digests do not match"
print("all ok")

--
components: IO
files: longwrite.py
messages: 303429
nosy: Yaroslav.Halchenko
priority: normal
severity: normal
status: open
title: io.FileIO cannot write more than 2GB (-4096) bytes??? must be documented 
(if not fixed)
type: behavior
versions: Python 2.7, Python 3.5
Added file: https://bugs.python.org/file47182/longwrite.py

___
Python tracker 

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



[issue21411] Enable Treat Warning as Error on 32-bit Windows

2017-09-30 Thread Zachary Ware

Zachary Ware  added the comment:

We've introduced enough new warnings in the past 3 years that this is not 
viable at this point.  If we decide we want warnings in the compile stage to 
set the whole build to warnings, we can open an issue in 
https://github.com/python/buildmaster-config for that.

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



[issue23283] Backport Tools/clinic to 3.4

2017-09-30 Thread Zachary Ware

Zachary Ware  added the comment:

At this point in 3.4's life cycle, this is likely not worth the effort.

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

___
Python tracker 

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



[issue28046] Remove the concept of platform-specific directories

2017-09-30 Thread Zachary Ware

Zachary Ware  added the comment:

Are there any remaining outstanding issues here?

--
assignee: zach.ware -> 
status: open -> pending

___
Python tracker 

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



[issue25153] PCbuild/*.vcxproj* should use CRLF line endings

2017-09-30 Thread Zachary Ware

Zachary Ware  added the comment:

This has been done for a while via .gitattributes.

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

___
Python tracker 

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



[issue31120] [2.7] Python 64 bit _ssl compile fails due missing buildinf_amd64.h

2017-09-30 Thread Zachary Ware

Zachary Ware  added the comment:

Sorry it's taken me so long to get back to this, Hiren.  Do you still need it 
since 2.7.14 is out?

--

___
Python tracker 

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



[issue31645] openssl build fails in win32 if .pl extension is not associated with Perl

2017-09-30 Thread Zachary Ware

Change by Zachary Ware :


--
components: +Windows
nosy: +larry, 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



[issue31650] implement PEP 552

2017-09-30 Thread Benjamin Peterson

New submission from Benjamin Peterson :

Now that PEP 552 is accepted, we'll need an actual implementation. Besides the 
core import changes, there are some perquisites improvements. For one, our 
SipHash implementation needs to be changed to accept an arbitrary key. Also, 
the PEP also introduces the first "long" option to the interpreter, so the 
getopt implementation will have to be enhanced.

--
assignee: benjamin.peterson
components: Interpreter Core
messages: 303423
nosy: benjamin.peterson
priority: normal
severity: normal
stage: needs patch
status: open
title: implement PEP 552
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



[issue31592] assertion failure in Python/ast.c in case of a bad unicodedata.normalize()

2017-09-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue31627] test_mailbox fails if the hostname is empty

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



[issue31627] test_mailbox fails if the hostname is empty

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 1163fb9be08c6072455b59d6f954e60662d18e75 by Serhiy Storchaka in 
branch '2.7':
[2.7] bpo-31627: Make test_mailbox be lenient to empty hostname. (GH-3821) 
(#3838)
https://github.com/python/cpython/commit/1163fb9be08c6072455b59d6f954e60662d18e75


--

___
Python tracker 

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



[issue31627] test_mailbox fails if the hostname is empty

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset d9c21a45fdc83904753d91ad45e3eafa195f4713 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31627: Make test_mailbox be lenient to empty hostname. (GH-3821) 
(#3837)
https://github.com/python/cpython/commit/d9c21a45fdc83904753d91ad45e3eafa195f4713


--

___
Python tracker 

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



[issue31592] assertion failure in Python/ast.c in case of a bad unicodedata.normalize()

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset a4dfe1c9eaca6faf206f63a178233ffea208c906 by Serhiy Storchaka 
(Miss Islington (bot)) in branch '3.6':
[3.6] bpo-31592: Fix an assertion failure in Python parser in case of a bad 
unicodedata.normalize(). (GH-3767) (#3836)
https://github.com/python/cpython/commit/a4dfe1c9eaca6faf206f63a178233ffea208c906


--

___
Python tracker 

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



[issue28604] Exception raised by python3.5 when using en_GB locale

2017-09-30 Thread Andreas Schwab

Andreas Schwab  added the comment:

This causes test_float.py to fail with glibc > 2.26.

ERROR: test_float_with_comma (__main__.GeneralFloatCases)
--
Traceback (most recent call last):
  File "/home/abuild/rpmbuild/BUILD/Python-3.6.2/Lib/test/support/__init__.py", 
line 1590, in inner
return func(*args, **kwds)
  File "Lib/test/test_float.py", line 150, in test_float_with_comma
if not locale.localeconv()['decimal_point'] == ',':
  File "/home/abuild/rpmbuild/BUILD/Python-3.6.2/Lib/locale.py", line 110, in 
localeconv
d = _localeconv()
UnicodeDecodeError: 'locale' codec can't decode byte 0xa0 in position 0: 
Invalid or incomplete multibyte or wide character

--

--
nosy: +schwab

___
Python tracker 

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



[issue31649] IDLE: Make _htest, _utest parameters keyword-only.

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


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



[issue31649] IDLE: Make _htest, _utest parameters keyword-only.

2017-09-30 Thread Terry J. Reedy

New submission from Terry J. Reedy :

All calls in tests should pass as keyword.  Get better error message if pass 
wrong number of other arguments positionally.

--

___
Python tracker 

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



[issue31649] IDLE: Make _htest, _utest parameters keyword-only.

2017-09-30 Thread Terry J. Reedy

Change by Terry J. Reedy :


--
assignee: terry.reedy
components: IDLE
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: IDLE: Make _htest, _utest parameters keyword-only.
type: enhancement
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



[issue31460] IDLE: Revise ModuleBrowser API

2017-09-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

Menu item 'Module Browser' invokes '<>', which calls 
Editor_Window.open_module_browser.  If the window is an actual editor, its path 
is used; otherwise open_module is called.  In either case, ModuleBrowser is 
called with flist and path pieces.

PathBrowser subclasses ModuleBrowser.  Menu item 'Path Browser' invokes 
'<>', which calls Editor_Window.open_path_browser, which 
calles PathBrowser.  PathBrowser.__init__'s only parameter is flist and it does 
not call ModuleBrowser.__init__.  So the APIs are independent and can be 
modified or not separately.  

For ModuleBrowser, changing flist to master and changing (name, path) to to 
filepath can be done independently.

--

___
Python tracker 

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



[issue31627] test_mailbox fails if the hostname is empty

2017-09-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
pull_requests: +3819

___
Python tracker 

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



[issue31627] test_mailbox fails if the hostname is empty

2017-09-30 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3818

___
Python tracker 

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



[issue31592] assertion failure in Python/ast.c in case of a bad unicodedata.normalize()

2017-09-30 Thread Roundup Robot

Change by Roundup Robot :


--
pull_requests: +3817

___
Python tracker 

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



[issue31592] assertion failure in Python/ast.c in case of a bad unicodedata.normalize()

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 7dc46d8cf5854d9f4ce3271b29c21aea4872e8ad by Serhiy Storchaka 
(Oren Milman) in branch 'master':
bpo-31592: Fix an assertion failure in Python parser in case of a bad 
unicodedata.normalize(). (#3767)
https://github.com/python/cpython/commit/7dc46d8cf5854d9f4ce3271b29c21aea4872e8ad


--

___
Python tracker 

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



[issue31646] bug in time.mktime

2017-09-30 Thread Tim Peters

Tim Peters  added the comment:

Note that 2am doesn't exist on the local clock:  it leaps from 1:59:59 to 
3:00:00.  You're claiming that one answer is "correct", but why?  The relevant 
_standards_ don't appear to specify what happens when the input is senseless.  
Note that the behavior isn't really due to Python, but to the platform C 
libraries.

Windows is treating 2am as if DST were already in effect, so senseless times of 
the form 2:MM:SS are treated the same as 1:MM:SS before DST came into play.  
Linux is treating 2am as if the DST switch hadn't yet happened, so senseless 
times of the form 2:MM:SS are treated the same as 3:MM:SS after DST came into 
play.

In favor of the Windows approach, since the last second when DST wasn't in 
effect was 01:59:59, it "makes sense" to treat the senseless 02:00:00 as if the 
DST switch happened.  In favor of the Linux approach, since 2am in fact doesn't 
exist on the local clock, it "makes sense" to imagine that the user simply 
forgot to set the clock forward, so 02:00:00 should be treated as not being in 
DST.  Neither is compelling.

If you care a lot ;-), on any platform you can _force_ the choice by forcing 
tm_isdst to a non-negative value.  For example, here on Windows:

import time
base = [2014, 3, 9, 2, 0, 0, 0, 0, None]
for isdst in -1, 0, 1:
base[-1] = isdst
print("%2d" % isdst, time.mktime(time.struct_time(base)))

That prints:

-1 1394348400.0
 0 1394352000.0
 1 1394348400.0

Which confirms that Windows is treating the senseless time as if DST were 
already in effect - but can be forced to treat it as if DST weren't in effect 
by setting tm_isdst to 0.

--
nosy: +tim.peters

___
Python tracker 

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



[issue31555] Windows pyd slower when not loaded via load_dynamic

2017-09-30 Thread Safihre

Safihre  added the comment:

Very good question!

5000 times via imp.load_dynamic:
 yEnc C New  took  5870 ms
 yEnc C New  took  5878 ms
 yEnc C New  took  5835 ms
5000 times via "pip: having the .pyd in site-packages"
 yEnc C New  took  6489 ms
 yEnc C New  took  6369 ms
 yEnc C New  took  6390 ms

Difference ~450 ms

1 times via imp.load_dynamic:
 yEnc C New  took  11775 ms
 yEnc C New  took  11720 ms
 yEnc C New  took  11695 ms

1 times via "pip: having the .pyd in site-packages"
 yEnc C New  took  12338 ms
 yEnc C New  took  12281 ms
 yEnc C New  took  12345 ms

Difference ~500 ms

1 times via imp.load_dynamic:
 yEnc C New  took  23431 ms
 yEnc C New  took  23406 ms
 yEnc C New  took  23283 ms

1 times via "pip: having the .pyd in site-packages"
 yEnc C New  took  24401 ms
 yEnc C New  took  24177 ms
 yEnc C New  took  24482 ms

Difference ~1100 ms

So not very linearly scaling but still increasing. Odd.

--

___
Python tracker 

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



[issue31646] bug in time.mktime

2017-09-30 Thread R. David Murray

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



[issue28280] Always return a list from PyMapping_Keys/PyMapping_Values/PyMapping_Items

2017-09-30 Thread Oren Milman

Oren Milman  added the comment:

(for knowledge preservation's sake)
Resolving this issue would also resolve #31486.

--

___
Python tracker 

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



[issue31555] Windows pyd slower when not loaded via load_dynamic

2017-09-30 Thread Stefan Krah

Stefan Krah  added the comment:

Does the difference stay at 10-15% if you run it 5 times or is it
a one time cost of around 100 ms?

--
nosy: +skrah

___
Python tracker 

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



[issue31627] test_mailbox fails if the hostname is empty

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset f4ea642cb60556231e714089a79d3c59c202661e by Serhiy Storchaka in 
branch 'master':
bpo-31627: Make test_mailbox be lenient to empty hostname. (#3821)
https://github.com/python/cpython/commit/f4ea642cb60556231e714089a79d3c59c202661e


--

___
Python tracker 

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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed
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



[issue31285] a SystemError and an assertion failure in warnings.warn_explicit()

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 40d736bcf40c10aa5fc7d6cc305a6641afd3cd0e by Serhiy Storchaka 
(Oren Milman) in branch '2.7':
[2.7] bpo-31285: Don't raise a SystemError in warnings.warn_explicit() in case 
__loader__.get_source() has a bad splitlines() method. (GH-3219) (#3823)
https://github.com/python/cpython/commit/40d736bcf40c10aa5fc7d6cc305a6641afd3cd0e


--

___
Python tracker 

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



[issue31475] Bug in argparse - not supporting utf8

2017-09-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
resolution:  -> rejected
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue31648] Improve ElementPath

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Thank you for your contribution Stefan! Good improvement.

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



[issue31648] Improve ElementPath

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:


New changeset 101a5e84acbab9d880e150195f23185dfb5449a9 by Serhiy Storchaka 
(scoder) in branch 'master':
bpo-31648: Improve ElementPath (#3835)
https://github.com/python/cpython/commit/101a5e84acbab9d880e150195f23185dfb5449a9


--

___
Python tracker 

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



[issue31475] Bug in argparse - not supporting utf8

2017-09-30 Thread INADA Naoki

INADA Naoki  added the comment:

We already accept PEP 529 and PEP 538.
And there are #15216 (PR 2343).
So I don't think we need more solutions.

--

___
Python tracker 

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



[issue11063] Rework uuid module: lazy initialization and add a new C extension

2017-09-30 Thread Antoine Pitrou

Antoine Pitrou  added the comment:

It's expected if uuid_generate_time_safe() isn't available on your platform.  
But test_uuid still passes?

--

___
Python tracker 

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



[issue31648] Improve ElementPath

2017-09-30 Thread Stefan Behnel

Stefan Behnel  added the comment:

Thanks for noticing. I added a test and fixed it.

--

___
Python tracker 

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



[issue31648] Improve ElementPath

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

I think the break in the loop for [.='text'] is not correct.

>>> from xml.etree import ElementTree as ET
>>> e = 
>>> ET.XML('texttext')
>>> list(e.findall('.//a[b="text"]'))
[, ]
>>> list(e.findall('.//a[.="text"]'))
[]

I expect that findall() finds all matched elements, not just the first one. 
Both above requests should return the same result.

--

___
Python tracker 

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



[issue31648] Improve ElementPath

2017-09-30 Thread Stefan Behnel

Stefan Behnel  added the comment:

Well, there's XPath for a standard:
https://www.w3.org/TR/xpath/

ElementPath deviates from it in its namespace syntax (it allows "{ns}tag" where 
XPath requires "p:tag" prefixes), but that's about it. All other differences 
are basically needless limitations of ElementPath.

In fact, I had noticed these two limitations in lxml, so I implemented them for 
the next release. And since ElementPath in ElementTree is still mostly the same 
as ElementPath in lxml, here's the same thing for ET.

--

___
Python tracker 

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



[issue31648] Improve ElementPath

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

Is this feature already implemented in lxml? Is it a part of some wider 
standard?

--

___
Python tracker 

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



[issue31590] CSV module incorrectly treats escaped newlines as new records if unquoted

2017-09-30 Thread Vaibhav Mallya

Vaibhav Mallya  added the comment:

Hello R. David & Terry!

Appreciate your prompt responses. While experimenting with different test cases 
I realized that escaped slashes and newlines are intrinsically annoying to 
reason about as stringy-one-liners, so I threw together a small tarball test 
case - attached - to make sure we're on the same page. 

To be clear, I was referring *solely* to reading with csv.DictReader (we're not 
using the writing part).

The assertion for the multi_line_csv_unquoted fails, and I believe it should 
succeed.

I hadn't considered the design-bug vs code-bug angle. I also think that 
documenting this somehow - explicitly - would help others, since there's no 
mention of the interaction here, with what should be a fairly common use-case. 
It might even make sense to make a "strong recommendation" that everything is 
quoted + escaped (much as redshift makes a strong recommendation to escape).

Our data pipeline is doing fine after the right parameters on both sides, this 
is more about improving Python for the rest of the community. Thanks for your 
help, I will of course respect any decision you make.

--
Added file: https://bugs.python.org/file47181/csv_test.tar

___
Python tracker 

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



[issue31648] Improve ElementPath

2017-09-30 Thread Stefan Behnel

Change by Stefan Behnel :


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

___
Python tracker 

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



[issue31648] Improve ElementPath

2017-09-30 Thread Stefan Behnel

New submission from Stefan Behnel :

* Allow whitespace around predicate parts, i.e. "[a = 'text']" instead of 
requiring the less readable "[a='text']".

* Add support for text comparison of the current node, like "[.='text']".

Both currently raise "invalid path" exceptions. PR coming.

--
components: Library (Lib), XML
messages: 303400
nosy: eli.bendersky, scoder, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Improve ElementPath
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



[issue31581] Reduce the number of imports for functools

2017-09-30 Thread INADA Naoki

Change by INADA Naoki :


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



[issue31581] Reduce the number of imports for functools

2017-09-30 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset 9811e80fd0ed9d74c76a66f1dd4e4b8afa9e8f53 by INADA Naoki in branch 
'master':
bpo-31581: Reduce the number of imports for functools (GH-3757)
https://github.com/python/cpython/commit/9811e80fd0ed9d74c76a66f1dd4e4b8afa9e8f53


--

___
Python tracker 

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



[issue30806] netrc.__repr__() is broken for writing to file

2017-09-30 Thread INADA Naoki

INADA Naoki  added the comment:


New changeset b24cd055ecb3eea9a15405a6ca72dafc739e6531 by INADA Naoki (James 
Sexton) in branch 'master':
bpo-30806 netrc.__repr__() is broken for writing to file (GH-2491)
https://github.com/python/cpython/commit/b24cd055ecb3eea9a15405a6ca72dafc739e6531


--
nosy: +inada.naoki

___
Python tracker 

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



[issue31158] test_pty: test_basic() fails randomly on Travis CI

2017-09-30 Thread Martin Panter

Martin Panter  added the comment:

I prefer Cornelius’s current proposal (rev 4f8137b) because it fixes both 
sites, rather than just patching the immediate problem site.

I don’t think read(1) is a big problem, just less efficient. But if you prefer 
to do larger reads, that should be fine too. You could even use 
os.fdopen(...).readline(), which would use BufferedReader. It is not 
documented, but BufferedReader should do large reads and return the line 
without waiting to fill its internal buffer.

FWIW I think it would be okay to remove the “chunked output” test. It isn’t 
exercising the “pty” module any more than the “Writing to slave_fd” test above 
it. All we need to do is verify that the “master_open” function returns a PTY 
master and that “slave_open” returns the corresponding slave terminal file 
descriptor. Checking “isatty” and sending one line of data through seems 
sufficient.

--

___
Python tracker 

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



[issue31557] tarfile: incorrectly treats regular file as directory

2017-09-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


--
components: +Library (Lib)
nosy: +serhiy.storchaka
stage:  -> needs patch
type:  -> behavior
versions: +Python 2.7, Python 3.6, Python 3.7

___
Python tracker 

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



[issue31642] None value in sys.modules no longer blocks import

2017-09-30 Thread Serhiy Storchaka

Serhiy Storchaka  added the comment:

PR 3834 provide possible solution of this issue.

Initially import errors were silenced for solving issue15715. An import error 
raised when import was blocked by setting None in sys.modules was not silenced 
because it has different error message. I don't know whether this was 
intentional. In issue15767 (5fdb8c897023) the error message test was replaced 
by the type test, and that exception become silenced (I suppose it was not 
intentional).

--

___
Python tracker 

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



[issue31642] None value in sys.modules no longer blocks import

2017-09-30 Thread Serhiy Storchaka

Change by Serhiy Storchaka :


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



[issue31646] bug in time.mktime

2017-09-30 Thread Eryk Sun

Eryk Sun  added the comment:

This depends on the way the platform mktime implements folding when the clock 
is advanced for daylight saving time. It appears the timezone on your systems 
is set to US/Canada Central Time, for which on March 9th the clocks were 
advanced forward at 02:00:00 [1]. Windows mktime folds back at 02:00:00, 
repeating the 01:00:00-01:59:59 timestamps. Linux mktime has a fold at 
03:00:00, repeating the 02:00:00-02:59:59 timestamps. What matters is that both 
are correct on the boundaries for observed local times, i.e. they both give the 
same values for 01:59:59 and 03:00:00, which are respectively 1394351999 and 
1394352000.

[1]: https://www.timeanddate.com/time/dst/2014a.html

--

___
Python tracker 

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