[issue30576] http.server should support HTTP compression (gzip)

2017-08-15 Thread Pierre Quentel

Pierre Quentel added the comment:

On Python-ideas someone asked if other compressions could be supported besides 
gzip.

The latest version of the PR adds a mechanism for that : 
SimpleHTTPRequestHandler has a new attribute "compressions", a dictionary that 
maps compression encodings (eg "gzip") to a "compressed data generator". The 
generator takes a file object as argument, yields non-empty chunks of 
compressed data and ends by yielding b'' for compliance with Chunked Transfer 
Encoding protocol.

To support other compression algorithms, "compressions" can be extended with 
another key (eg "brotli") mapped to the appropriate generator. A test has been 
added with the non-standard "bzip2" encoding, using the bz2 module in the 
standard distribution.

I also added support for "deflate" by default (it's very close to "gzip").

--

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols()

2017-08-15 Thread Christian Heimes

Changes by Christian Heimes :


--
pull_requests: +3133

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols()

2017-08-15 Thread Christian Heimes

Changes by Christian Heimes :


--
pull_requests: +3134

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols()

2017-08-15 Thread Christian Heimes

Christian Heimes added the comment:


New changeset 7b40cb7293cb14e5c7c8ed123efaf9acb33edae2 by Christian Heimes in 
branch 'master':
bpo-30714: ALPN changes for OpenSSL 1.1.0f (#2305)
https://github.com/python/cpython/commit/7b40cb7293cb14e5c7c8ed123efaf9acb33edae2


--

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols()

2017-08-15 Thread Christian Heimes

Christian Heimes added the comment:


New changeset 7f6a13bd562ff6a265fc63a991327feaecb07a77 by Christian Heimes in 
branch '3.6':
[3.6] bpo-30714: ALPN changes for OpenSSL 1.1.0f (#3093)
https://github.com/python/cpython/commit/7f6a13bd562ff6a265fc63a991327feaecb07a77


--

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols()

2017-08-15 Thread Christian Heimes

Christian Heimes added the comment:


New changeset 05b7d9c6675b71d17f5fcf379b3888fba431f14e by Christian Heimes in 
branch '2.7':
[2.7] bpo-30714: ALPN changes for OpenSSL 1.1.0f (#3094)
https://github.com/python/cpython/commit/05b7d9c6675b71d17f5fcf379b3888fba431f14e


--

___
Python tracker 

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



[issue30714] test_ssl fails with openssl 1.1.0f: test_alpn_protocols()

2017-08-15 Thread Christian Heimes

Christian Heimes added the comment:

2.7, 3.6 and master are fixed.

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



[issue25144] 3.5 Win install fails with "TARGETDIR"

2017-08-15 Thread Yu Zhigang

Yu Zhigang added the comment:

It's quite an issue... This is 2017 and it's still there. Anyway, I encountered 
the same problem by running the installer in Win7, and it was fixed by running 
it again in administrative mode.

--
nosy: +Yu Zhigang

___
Python tracker 

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



[issue31197] Namespace disassembly omits some compiled objects

2017-08-15 Thread Nick Coghlan

Nick Coghlan added the comment:

Another refactoring point that came up in the same discussion: it might be nice 
if the objects that expose code attributes all offered a read-only __code__ 
property, rather than requiring the dis module (and other consumers) to be 
aware of all the different object-specific property names.

--

___
Python tracker 

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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-15 Thread Cheryl Sabella

Cheryl Sabella added the comment:

I'll work on this today.

--

___
Python tracker 

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



[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread Cédric Krier

New submission from Cédric Krier:

If the path on which Python is installed contains the DELIM, the resulted 
sys.path is split.
I think maybe there should be a escape mechanism for the PYTHONPATH.

--
components: Interpreter Core
messages: 300293
nosy: ced
priority: normal
severity: normal
status: open
title: Can not import site from sys.prefix containing DELIM
type: crash

___
Python tracker 

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



[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray

R. David Murray added the comment:

By DELIM, you mean the shell ':'?  As far as I've been able to determine there 
is no way defined in posix to escape that character.  If you can find one, 
please let us know.  (I think the same is true for the Windows semicolon but 
I'm not sure.)

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



[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread Cédric Krier

Cédric Krier added the comment:

Yes I mean ':' for posix.
Indeed I do not known a posix way to escape the colon (it was discussed here: 
https://stackoverflow.com/questions/14661373/how-to-escape-colon-in-path-on-unix).
But it does not mean that the method makepathobject could not support one. I'm 
thinking about path single-quoted.

--

___
Python tracker 

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



[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray

R. David Murray added the comment:

I'm not sure there is anything we should do here, then, because we are 
conforming to the posix parsing for PATH in our PYTHONPATH implementation.

I think if you want to pursue this further you should take it to the 
python-ideas mailing list.  I'm going to close the issue, but you can reopen it 
if python-ideas thinks it is worth doing something (and there is something we 
can reasonably do :)

--
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue31194] Inconsistent __repr__s for _collections objects

2017-08-15 Thread Vedran Čačić

Vedran Čačić added the comment:

More and more, Python looks to me like a certain language that I thought I had 
left behind a long time ago.

   [...] Each  operator  decides  which sort of scalar it
   would be  most  appropriate  to  return.   
   [...] In  general, they do what you want,
   unless you want consistency.

Maybe it's just a sign of growing up. :-)

--
nosy: +veky

___
Python tracker 

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



[issue31194] Inconsistent __repr__s for _collections objects

2017-08-15 Thread R. David Murray

R. David Murray added the comment:

This is a duplicate of issue 27541.

--
nosy: +r.david.murray
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Repr of collection's subclasses

___
Python tracker 

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



[issue25144] 3.5 Win install fails with "TARGETDIR"

2017-08-15 Thread Steve Dower

Steve Dower added the comment:

Yu Zhigang - can you post your install logs from the failed install? You'll 
notice in my last message I said that I added some extra logging.

However, it sounds like you have a certain system option set that essentially 
breaks paths passed between non-admin and admin processes. There is very little 
we can do about that, and the fix applied for this issue is not intended to 
solve it.

--

___
Python tracker 

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



[issue31211] distutils/util.py get_platform() does not identify linux-i686 platforms

2017-08-15 Thread Siming Yuan

New submission from Siming Yuan:

in CentOS installations where both 32 and 64 bit libraries can co exist, and 
when python is compiled to run with 32-bit libraries (i686)

>>> from distutils.util import get_platform
>>> get_platform()
'linux-x86_64'

because the api only looks at OS flavor and not the actual binary architecture.

this string is used as part of PEP425 tags in the built wheel/egg file:
my_package-3.3.0-cp34-cp34m-linux-x86_64.whl

but this creates a mismatch with PIP - pip.pep425tags returns "linux-i686" 
instead on the same python instance, addressed by:

# snippet pip code
def _is_running_32bit():
return sys.maxsize == 2147483647

if result == "linux_x86_64" and _is_running_32bit():
# 32 bit Python program (running on a 64 bit Linux): pip should only
# install and run 32 bit compiled extensions in that case.
result = "linux_i686"

so the end result is any packages built with sdist_wheel (using 
setuptools/distutils) is not installable on the same instance.

Of course the workaround is to overwrite that and provide --plat-name 
linux_i686. 

but the question is - shouldn't the tags line up?

--
components: Distutils
messages: 300300
nosy: dstufft, merwok, siming85
priority: normal
severity: normal
status: open
title: distutils/util.py get_platform() does not identify linux-i686 platforms
versions: Python 3.4, Python 3.5, 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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-15 Thread Cheryl Sabella

Changes by Cheryl Sabella :


--
pull_requests: +3135

___
Python tracker 

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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-15 Thread Cheryl Sabella

Cheryl Sabella added the comment:

I ran into an issue with the three calls to functions in ConfigDialog 
(deactivate_current_config, activate_config_changes, and 
save_all_changed_extensions) from within the KeysPage class.  I tried to 
minimize the changes by just creating self.cd for the ConfigDialog instance.  
Besides that, the changes were the same as the FontPage and GenPage.

--

___
Python tracker 

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



[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread Cédric Krier

Cédric Krier added the comment:

A last comment, I do not think it is an issue to follow posix way to parse 
PATH. But for me, the problem is that Python adds without sanitation the 
sys.prefix to the PYTHONPATH. So I think internally Python should not use PATH 
notation to extend the PYTHONPATH because it is not a robust notation.

--

___
Python tracker 

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



[issue31212] min date can't be converted to timestamp

2017-08-15 Thread Dave Johansen

New submission from Dave Johansen:

This worked in Python 3.6.0 and before:
```
from datetime import datetime
d = datetime(1, 1, 1, 0, 0, 0)
d.timestamp()
```

The error output is:
```
ValueError: year 0 is out of range
```

But it used to return `-62135658000.0`.

Appears to be related to https://bugs.python.org/issue29921

--
messages: 300303
nosy: Dave Johansen
priority: normal
severity: normal
status: open
title: min date can't be converted to timestamp
type: behavior
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



[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray

R. David Murray added the comment:

You mean to create the entries on sys.path that do not come from the PYTHONPATH?

--

___
Python tracker 

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



[issue31213] __context__ reset to None in nested exception

2017-08-15 Thread Christopher Stelma

New submission from Christopher Stelma:

When I try to re-raise an exception with a __cause__ inside a nested exception, 
the __context__ of the outer __context__ appears to be reset to None.

e.g.

>>> try:
... try:
... raise Exception('foo')
... except Exception as foo:
... print(foo, foo.__context__, foo.__cause__)
... try:
... raise Exception('bar') from foo
... except Exception as bar:
... print(bar, bar.__context__, bar.__context__.__context__)
... raise foo from bar
... except Exception as foo:
... wat = foo
...
foo None None
bar foo None
>>> print(wat, wat.__context__, wat.__context__.__context__)
foo bar None
>>> print(wat, wat.__cause__, wat.__cause__.__context__)
foo bar None
>>> print(wat, wat.__cause__, wat.__cause__.__cause__)
foo bar foo

here, between "raise foo from bar" and the end, bar.__context__ goes from foo 
to None.  since bar is only raised once, clearly in the context of foo (twice 
over), I would expect bar.__context__ to stay foo.

--
messages: 300305
nosy: Christopher Stelma
priority: normal
severity: normal
status: open
title: __context__ reset to None in nested exception
type: behavior
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



[issue31213] __context__ reset to None in nested exception

2017-08-15 Thread Christopher Stelma

Christopher Stelma added the comment:

crosslink to related future lib issue that led me to this:

https://github.com/PythonCharmers/python-future/issues/141

--

___
Python tracker 

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



[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread Cédric Krier

Cédric Krier added the comment:

On 2017-08-15 17:32, R. David Murray wrote:
> You mean to create the entries on sys.path that do not come from the 
> PYTHONPATH?

Yes because such path could contain ':'.

--

___
Python tracker 

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



[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray

R. David Murray added the comment:

OK, that seems reasonable to me.  I'll reopen the issue.  Assuming other 
developers agree that this should be changed, I'm not sure if it will qualify 
as a bug or an enhancement, so I'm leaving versions unselected for now :)

--
resolution: not a bug -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue31210] Can not import site from sys.prefix containing DELIM

2017-08-15 Thread R. David Murray

Changes by R. David Murray :


--
nosy: +brett.cannon, eric.snow, ncoghlan

___
Python tracker 

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



[issue31170] expat: utf8_toUtf8 cannot properly handle exhausting buffer

2017-08-15 Thread sping

sping added the comment:

For the record, the upstream fix is commit 
https://github.com/libexpat/libexpat/commit/74a7090a6eb92c27b7010287a4082de6b357fa42
 and it will be part of Expat 2.2.4.

--
nosy: +sping
versions: +Python 2.7, Python 3.3, 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



[issue30747] _Py_atomic_* not actually atomic on Windows with MSVC

2017-08-15 Thread Steve Dower

Steve Dower added the comment:

This commit added *a lot* of warnings - 
http://buildbot.python.org/all/builders/AMD64%20Windows10%203.x/builds/1056

Most are of the form:
warning C4133: 'function': incompatible types - from 'volatile uintptr_t *' 
to 'volatile int *'

I can't obviously see where they are coming from, but someone please fix them.

--
resolution: fixed -> 
stage: backport needed -> 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



[issue31002] IDLE: Add tests for configdialog keys tab

2017-08-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Lines not yet covered in keys group, other than deactivate_current_config and 
activate_config_changes functions:

def save_new_key_set
if not idleConf.userCfg['keys'].has_section(keyset_name):
# never false - minor issue

def delete_custom_keys
if not item_list:
# never false hence following never executed
else: self.customlist.SetMenu(item_list, item_list[0])

--

___
Python tracker 

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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset e36d9f5568093b3885da62a0bf0fdfbe3771672b by Terry Jan Reedy 
(Cheryl Sabella) in branch 'master':
bpo-31205: IDLE: Factor KeysPage class from ConfigDialog (#3096)
https://github.com/python/cpython/commit/e36d9f5568093b3885da62a0bf0fdfbe3771672b


--

___
Python tracker 

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



[issue31214] os.walk has a bug on Windows

2017-08-15 Thread Chris Lovett

New submission from Chris Lovett:

When I walk a directory recursively, it is tacking on an additional 
non-existant file from one of the subdirectories.  Here's the code:

def copy_dir(self, src, dest):
result = sftp.mkdir(dest)
for dirname, dirnames, filenames in os.walk(src):
for subdirname in dirnames:
print("entering dir:" + subdirname)
self.copy_dir(os.path.join(src, subdirname), os.path.join(dest, 
subdirname))
for filename in filenames:
print("copying:" + filename)

Here's the output:

entering dir:include
copying:CallbackInterface.h
copying:ClockInterface.h
entering dir:tcc
copying:CallbackInterface.tcc
copying:CMakeLists.txt
copying:darknet.i
copying:darknet.i.h
copying:darknet.obj
copying:darknet.py
copying:darknetImageNetLabels.txt
copying:darknetPYTHON_wrap.cxx
copying:darknetPYTHON_wrap.h
copying:darknet_config.json
copying:demo.py
copying:demoHelper.py
copying:OpenBLASSetup.cmake
copying:runtest.sh
copying:schoolbus.png
copying:CallbackInterface.h
copying:ClockInterface.h
copying:CallbackInterface.tcc

The last 3 files listed here doesn't exist, they are a repeat of the files 
found in the subdirectories.

--
components: Windows
messages: 300313
nosy: clovett, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: os.walk has a bug on Windows
type: behavior
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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +3136

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-08-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +3137

___
Python tracker 

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



[issue31214] os.walk has a bug on Windows

2017-08-15 Thread Peter Otten

Peter Otten added the comment:

Read the documentation of os.walk() again. It already walks the complete 
directory tree starting with src. 

When you invoke it again by calling your copy_dir() method recursively you will 
of course see once more the files and directories in the respective 
subdirectory.

--
nosy: +peter.otten

___
Python tracker 

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



[issue31214] os.walk has a bug on Windows

2017-08-15 Thread R. David Murray

Changes 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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset ff4b222b029f9977a4509d8697ba2b82c09b477a by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-31205: IDLE: Factor KeysPage class from ConfigDialog (GH-3096) (#3097)
https://github.com/python/cpython/commit/ff4b222b029f9977a4509d8697ba2b82c09b477a


--

___
Python tracker 

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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The change to configdialog is basically a block move with a few edits.  The 
resulting diff is so complicated that git could not apply it cleanly to the 
identical code in 3.6.  We should do multiple PRs for the highlight group.

--

___
Python tracker 

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



[issue31205] IDLE, configdialog: Factor out KeysPage class from ConfigDialog

2017-08-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
resolution:  -> fixed
stage: test needed -> 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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-08-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset 7f066844a79ea201a28b9555baf4bceded90484f by Terry Jan Reedy in 
branch 'master':
bpo-30928: Update idlelib/NEWS.txt to 2017-08-15. (#3098)
https://github.com/python/cpython/commit/7f066844a79ea201a28b9555baf4bceded90484f


--

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-08-15 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
pull_requests: +3138

___
Python tracker 

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



[issue31211] distutils/util.py get_platform() does not identify linux-i686 platforms

2017-08-15 Thread Éric Araujo

Éric Araujo added the comment:

Hello!  Your analysis sounds right, but this is the wrong place.  distutils 
doesn’t know about wheels, it’s setuptools and/or the wheel module that 
generate them, and pip and others who consumes them.  Please report the issue 
to the setuptools and/or wheel bug trackers (see 
https://packaging.python.org/key_projects/ ) and I’ll close this one.

--
resolution:  -> third party
status: open -> pending
versions:  -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



[issue31206] IDLE, configdialog: Factor out HighPage class from ConfigDialog

2017-08-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:

The configdialog diff for #31205 was so jumbled that it did not apply correctly 
to 3.6.  Let's do this in 2 PRs.  First adds the class to how we think it 
should be.  The second deletes the old code, makes any edits needed for the new 
class, and redirects the tests.

--

___
Python tracker 

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



[issue31214] os.walk has a bug on Windows

2017-08-15 Thread Chris Lovett

Chris Lovett added the comment:

Oh, my bad then. Apologies for the noise in your system.

--

___
Python tracker 

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



[issue30928] Copy modified blurbs to idlelib/NEWS.txt

2017-08-15 Thread Terry J. Reedy

Terry J. Reedy added the comment:


New changeset de36ba065e933648f5687998021175cf21d4564b by Terry Jan Reedy in 
branch '3.6':
[3.6] bpo-30928: Update idlelib/NEWS.txt to 2017-08-15. (GH-3098) (#3099)
https://github.com/python/cpython/commit/de36ba065e933648f5687998021175cf21d4564b


--

___
Python tracker 

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



[issue31148] Can we get an MSI installer for something past 3.4.4?

2017-08-15 Thread D Gentry

D Gentry added the comment:

Thank you for the information. That will definitely be helpful.

Also, thank you for being so detailed with your explanation.

Even though it will be difficult and may take more time than I was
initially intending, I believe its within the realm of possibility.

Therefore, I will be trying my hand at crafting the MSI, though like you
said earlier, it's not nearly as easy as the msdn article made it appear.

The toolset you offered should help out a lot.

Thank you for all of your expert advice.

I have one last question before I begin on my journey.

You mentioned "burn bundles" at the end of the message. Are these something
I would have to build myself or is there a repository where I can download
the files?

On Mon, Aug 14, 2017 at 12:55 PM, Steve Dower 
wrote:

>
> Steve Dower added the comment:
>
> The general requirements of an installer are:
> * runs without any preinstalled prerequisites
> * does not install anything permanent until the user says so (Visual
> Studio breaks this rule :( )
> * installs all required prerequisites
> * install on all supported operating systems
> * allow users to [de]select optional components
> * correctly uninstall previous compatible versions
> * correctly do *not* uninstall previous identical versions
> * update user environment settings (registry, environment, etc.)
> * create Start Menu shortcuts
> * create file associations
> * create context menus
> * install files into customizable location with correct security settings
> * correctly roll back when installation fails, including restoring
> previously uninstalled components and attempting to execute installed tools
> that may not be installed correctly
> * attempt to execute just-installed components that may not be installed
> correctly (e.g. ensurepip, compileall, trigger environment variable reload)
> * detect and abort when installation is going to fail, and explain to the
> user how to solve the problem
> * provide live progress feedback and information about what operations are
> occurring
> * provide detailed log files to help offer user support post-installation,
> and help users find those logs
> * provide registration information so the operating system can help users
> modify or remove the installation
> * allow users to modify, repair and upgrade the installation without
> corrupting it (or any others) or forcing them to remove/reinstall
> * allow users to choose whether to install just for themselves or for the
> entire machine, and request correct permissions based on this choice
> * allow administrators to script an entire installation and have it run
> silently and/or with progress (and cancellation) only
> * allow users to minimize download size by deselecting optional components
> * allow users to obtain all optional components to allow full installation
> without public internet access
> * install without executing arbitrary third-party code that may have been
> maliciously placed in a user's download directory
> * automatically include new files added by developers who have not
> explicitly modified the installer
>
> These are all the features of our current installer, and nearly all of
> them work for basically every user. Many of these are literally not
> achievable with just an MSI, or require significantly more complicated
> commands to be run by the end user, rather than providing options in a user
> interface.
>
> If you're still interested in giving it a go, visit http://wixtoolset.org/
> and have a look at their tools. These are the gold-standard right now for
> building MSIs (and Burn bundles, which is what we currently have).
>
> --
>
> ___
> Python tracker 
> 
> ___
>

--

___
Python tracker 

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



[issue6090] zipfile: Bad error message when zipping a file with timestamp before 1980

2017-08-15 Thread Craig McQueen

Craig McQueen added the comment:

One ongoing weakness I see with this situation is that it's difficult to code a 
suitable work-around if a user wants to zip files that have a date < 1980 (e.g. 
to zip it with a datestamp of 1-Jan-1980).
https://stackoverflow.com/q/45703747/60075

I am trying to create a zip file with Python 3.5.2 zipfile, on Linux. Some of 
the files I'm trying to add have timestamps of 1-Jan-1970 (embedded system 
without a real-time clock module). So zipfile gives an exception:

ValueError: ZIP does not support timestamps before 1980

My goal then is to implement a work-around to add these files to the zip file 
with a timestamp of 1-Jan-1980. However, I am finding it difficult to find a 
suitable work-around.

At first I thought I can do this:

def zinfo_from_file(fullname, arcname):
st = os.stat(fullname)
mtime = time.localtime(st.st_mtime)
date_time = mtime[0:6]
if date_time[0] < 1980:
date_time = (1980, 1, 1, 0, 0, 0)
zinfo = zipfile.ZipInfo(arcname, date_time)
return zinfo

...
zinfo = zinfo_from_file(fullname, arcname)
chunksize=512
with open(fullname, 'rb') as src, myzipfile.open(zinfo, 'w') as dest:
while True:
data = src.read(chunksize)
if not data:
break
dest.write(data)
...

However, it turns out that myzipfile.open(zinfo, 'w') is not supported until 
Python 3.6. (I'm using Yocto to build embedded Linux, which currently only 
supports Python 3.5.x.)

I guess I could try doing myzipfile.writestr(...), although then it appears 
that I have to load the entire file data into memory.

--
nosy: +cmcqueen1975

___
Python tracker 

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



[issue31209] MappingProxyType can not be pickled

2017-08-15 Thread Raymond Hettinger

Raymond Hettinger added the comment:

What would be the point of pickling a MappingProxy?  Do you have use case or is 
it just a curiosity?

--
nosy: +rhettinger

___
Python tracker 

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



[issue31148] Can we get an MSI installer for something past 3.4.4?

2017-08-15 Thread Steve Dower

Steve Dower added the comment:

Burn bundles are part of Wix, but it's the part you don't like :)

If you just want a single MSI, you won't want a bundle. But you will have to 
leave out nearly half of the features I listed because they simply are not 
possible without it.

--

___
Python tracker 

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



[issue31212] min date can't be converted to timestamp

2017-08-15 Thread Raymond Hettinger

Changes by Raymond Hettinger :


--
assignee:  -> haypo
nosy: +haypo

___
Python tracker 

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



[issue31215] Add version changed notes for OpenSSL 1.1.0 compatibility

2017-08-15 Thread Nick Coghlan

New submission from Nick Coghlan:

https://bugs.python.org/issue26470 updated the ssl and hashlib modules in 2.7 
and 3.5+ to be compatible with OpenSSL 1.1.0.

However, it's currently unclear what the *minimum* versions actually are for 
platforms that want to drop support for OpenSSL 1.0.x, and it's particularly 
unclear in 2.7, as that lacks the deprecation warning for OpenSSL 0.9.8, 1.0.0 
and 1.0.1 that was introduced in Python 3.6.

This doesn't rise to the level of something to be documented as a new feature 
in the 2.7 What's New, but I think a version changed note in the opening 
section of the `ssl` module documentation would be appropriate:

2.7 branch:

.. versionchanged: 2.7.13
   Updated to support linking with OpenSSL 1.1.0

3.6 and master branches (immediately before the 3.6 deprecation notice):

.. versionchanged: 3.5.3
   Updated to support linking with OpenSSL 1.1.0

--
assignee: docs@python
components: Documentation
messages: 300326
nosy: christian.heimes, docs@python, ncoghlan
priority: normal
severity: normal
stage: needs patch
status: open
title: Add version changed notes for OpenSSL 1.1.0 compatibility
type: enhancement
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



[issue31216] Add ensure_ascii argument to json.tool

2017-08-15 Thread TaoQingyun

New submission from TaoQingyun:

Sometimes I want this
```
$ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool --no-escape  
   
"你好"
```

not just 
```
$ echo -e '"\xe4\xbd\xa0\xe5\xa5\xbd"' | ./python -m json.tool
"\u4f60\u597d" 
```

--
components: Library (Lib)
files: jsontool.patch
keywords: patch
messages: 300327
nosy: qingyunha
priority: normal
severity: normal
status: open
title: Add ensure_ascii argument to  json.tool
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file47083/jsontool.patch

___
Python tracker 

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



[issue25144] 3.5 Win install fails with "TARGETDIR"

2017-08-15 Thread Yu Zhigang

Yu Zhigang added the comment:

Hi, if everything goes well you shall see the log in the attachment or 
somewhere. I'm uploading it.

--
Added file: http://bugs.python.org/file47084/python install failure.zip

___
Python tracker 

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