[issue28245] Embeddable Python does not use PYTHONPATH.

2016-09-22 Thread Paul Moore

Paul Moore added the comment:

See https://docs.python.org/3/using/windows.html#embedded-distribution - "When 
extracted, the embedded distribution is (almost) fully isolated from the user’s 
system, including environment variables, system registry settings, and 
installed packages."

This is deliberate behaviour. The embedded distribution is intended for, as it 
says, embedded applications, and your C code that embeds the Python interpreter 
can set sys.path based on application-specific environment variables if needed. 
But it should not be affected by any "normal" Python configuration.

--

___
Python tracker 

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



[issue28243] Performance regression in functools.partial()

2016-09-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

If revert the issue27809 changes, the performance is returned to the level of 
3.5.

--

___
Python tracker 

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



[issue28243] Performance regression in functools.partial()

2016-09-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I meant just c1a698edfa1b.

Median +- std dev: 441 ns +- 26 ns

--

___
Python tracker 

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



[issue28239] Implement functools.lru_cache() using ordered dict

2016-09-22 Thread INADA Naoki

INADA Naoki added the comment:

FYI: Here is interesting article. doubly-linked list is more inefficient than 
most people think.
http://alex.dzyoba.com/programming/dynamic-arrays.html

--

___
Python tracker 

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



[issue28246] Unable to read simple text file

2016-09-22 Thread AndreyTomsk

New submission from AndreyTomsk:

File read operation fails when gets specific cyrillic symbol. Tested with 
script:

testFile = open('ResourceStrings.rc', 'r')
for line in testFile:
print(line)


Exception message:
Traceback (most recent call last):
  File "min_test.py", line 6, in 
for line in testFile:
  File 
"C:\Users\afi\AppData\Local\Programs\Python\Python36\lib\encodings\cp1251.py", 
line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x98 in position 24: 
character maps to 

--
components: IO, Unicode, Windows
files: ResourceStrings.rc
messages: 277206
nosy: AndreyTomsk, ezio.melotti, haypo, paul.moore, steve.dower, tim.golden, 
zach.ware
priority: normal
severity: normal
status: open
title: Unable to read simple text file
type: behavior
versions: Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44783/ResourceStrings.rc

___
Python tracker 

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



[issue28246] Unable to read simple text file

2016-09-22 Thread Eryk Sun

Eryk Sun added the comment:

The default encoding on your system is Windows codepage 1251. However, your 
file is encoded using UTF-8:

>>> lines = open('ResourceStrings.rc', 'rb').read().splitlines()
>>> print(*lines, sep='\n')
b'\xef\xbb\xbf\xd0\x90 (cyrillic A)'
b'\xd0\x98 (cyrillic I) <<< line read fails'
b'\xd0\x91 (cyrillic B)'

It even has a UTF-8 BOM (i.e. b'\xef\xbb\xbf'). You need to pass the encoding 
to built-in open():

>>> print(open('ResourceStrings.rc', encoding='utf-8').read())
А (cyrillic A)
И (cyrillic I) <<< line read fails
Б (cyrillic B)

--
nosy: +eryksun
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



[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-22 Thread Martin Panter

Martin Panter added the comment:

Serhiy, what’s the relevance? In the built-in Element Tree package, it is a 
class: 
.

--

___
Python tracker 

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



[issue28235] In xml.etree.ElementTree docs there is no parser argument in fromstring()

2016-09-22 Thread Martin Panter

Martin Panter added the comment:

Added review comment

--
nosy: +martin.panter

___
Python tracker 

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



[issue28246] Unable to read simple text file

2016-09-22 Thread SilentGhost

SilentGhost added the comment:

It would be good to add a FAQ / HowTo entry for this question.

--
nosy: +SilentGhost

___
Python tracker 

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



[issue28202] Python 3.5.1 C API, the global variable is not destroyed when delete the module

2016-09-22 Thread Jack Liu

Changes by Jack Liu :


--
nosy: +pitrou

___
Python tracker 

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



[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The built-in ElementTree package is derived from lxml.etree. I suppose that the 
documentation is inherited from lxml.etree.

The built-in ElementTree package supports duck typing. The element object is 
not always an instance of the Element class. iselement() is not equal to 
isinstance(e, Element), it just tests the existence of the tag attribute. Many 
ElementTree functions have fast path for Element, but work with duck typed 
classes too. I believe that in particular you can mix Python and C 
implementations of Element and lxml.etree elements in one tree.

--

___
Python tracker 

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



[issue27815] Make SSL suppress_ragged_eofs default more secure

2016-09-22 Thread Martin Panter

Martin Panter added the comment:

I have been experimenting with a patch that changes the default to 
suppress_ragged_eofs=False.

One disadvantage of this change is it could make servers less robust. E.g. in 
the tests, I explicitly enabled suppress_ragged_eofs=True in a server, because 
otherwise I would have to add extra cleanup if an exception is raised on the 
server side. In another test server, based on socketserver, I added special 
code to silence logging an SSLEOFError exception (a side effect of a particular 
test case).

But ideally, real-world servers should already handle other exceptions that are 
triggered outside the server’s control like, ECONNRESET and 
TLSV1_ALERT_UNKNOWN_CA. Socketserver already logs all these kinds of errors. 
Plus I think SSLEOFError has always been possible in the handshake phase.

With HTTP I didn’t have to go further than Google to find a server that 
terminates the response with a non-SSL shutdown (although because truncated 
JSON is invalid, it is not a big deal). For the record, here is a stripped-down 
demo. The same problem also happens for a more complete request with valid 
parameters.

>>> import socket, ssl
>>> s = socket.create_connection(("accounts.google.com", 443))
>>> ss = ssl.wrap_socket(s, suppress_ragged_eofs=False)
>>> ss.sendall(b"POST /o/oauth2/token HTTP/1.1\r\n"
... b"Host: accounts.google.com\r\n"
... b"Content-Length: 0\r\n"
... b"Connection: close\r\n"
... b"\r\n")
>>> print("\n".join(map(repr, ss.recv(3000).splitlines(keepends=True
b'HTTP/1.1 400 Bad Request\r\n'
b'Content-Type: application/json; charset=utf-8\r\n'
b'Cache-Control: no-cache, no-store, max-age=0, must-revalidate\r\n'
b'Pragma: no-cache\r\n'
b'Expires: Mon, 01 Jan 1990 00:00:00 GMT\r\n'
b'Date: Thu, 22 Sep 2016 03:10:20 GMT\r\n'
b'X-Content-Type-Options: nosniff\r\n'
b'X-Frame-Options: SAMEORIGIN\r\n'
b'X-XSS-Protection: 1; mode=block\r\n'
b'Server: GSE\r\n'
b'Alt-Svc: quic=":443"; ma=2592000; v="36,35,34,33,32"\r\n'
b'Accept-Ranges: none\r\n'
b'Vary: Accept-Encoding\r\n'
b'Connection: close\r\n'
b'\r\n'
b'{\n'
b'  "error" : "invalid_request",\n'
b'  "error_description" : "Required parameter is missing: grant_type"\n'
b'}'
>>> ss.recv(3000)  # HTTP-level client does not know that this is the EOF yet
Traceback (most recent call last):
  File "", line 1, in 
  File "/home/proj/python/cpython/Lib/ssl.py", line 987, in recv
return self.read(buflen)
  File "/home/proj/python/cpython/Lib/ssl.py", line 865, in read
return self._sslobj.read(len, buffer)
  File "/home/proj/python/cpython/Lib/ssl.py", line 627, in read
v = self._sslobj.read(len)
ssl.SSLEOFError: EOF occurred in violation of protocol (_ssl.c:2176)

In this case, if the client does not send “Connection: close”, the server uses 
chunked encoding and there is no problem. So this is another instance of Issue 
12849 (Python’s unusual request triggering a server bug).

I wonder if a solution would be to use suppress_ragged_eofs=False by default, 
but add a way to let the user of the http.client module explicitly allow 
SSLEOFError to signal a proper EOF.

--
keywords: +patch
versions: +Python 3.7 -Python 3.6
Added file: http://bugs.python.org/file44784/ragged-eofs.patch

___
Python tracker 

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



[issue28086] test.test_getargs2.TupleSubclass test failure

2016-09-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The simplest way is just change PyTuple_Check to PyTuple_CheckExact in ceval.c. 
Maybe this is suboptimal for tuple subclasses (namedtuple?), but I think this 
is very rare case.

--
keywords: +patch
stage: needs patch -> patch review
versions: +Python 3.7
Added file: http://bugs.python.org/file44785/issue28086.patch

___
Python tracker 

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



[issue28246] Unable to read simple text file

2016-09-22 Thread AndreyTomsk

AndreyTomsk added the comment:

Thanks for quick reply. I'm new to python, just used tutorial docs and didn't 
read carefully enough to notice encoding info.

Still, IMHO behaviour not consistent. In three sequential symbols in russian 
alphabet - З, И, К, it crashes on И, and displays other in two-byte form.

--

___
Python tracker 

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



[issue17188] Document 'from None' in raise statement doc.

2016-09-22 Thread Robert Collins

Changes by Robert Collins :


--
nosy: +rbcollins

___
Python tracker 

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



[issue28246] Unable to read simple text file

2016-09-22 Thread Eryk Sun

Eryk Sun added the comment:

Codepage 1251 is a single-byte encoding and a superset of ASCII (i.e. ordinals 
0-127). UTF-8 is also a superset of ASCII, so there's no problem as long as the 
encoded text is strictly ASCII. But decoding non-ASCII UTF-8 as codepage 1251 
produces nonsense, otherwise known as mojibake. It happens that codepage 1251 
maps every one of the 256 possible byte values, except for 0x98 (152). The 
exception can't be made any clearer.

--

___
Python tracker 

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



[issue27950] Superfluous messages when running make

2016-09-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6911917f1f02 by Martin Panter in branch 'default':
Issue #27950: Silence long makefile commands and comments
https://hg.python.org/cpython/rev/6911917f1f02

--
nosy: +python-dev

___
Python tracker 

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



[issue27348] traceback (and threading) drops exception message

2016-09-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5859a9e8b214 by Martin Panter in branch '3.5':
Issue #27348: Restore “Exception: None” formatting in traceback module
https://hg.python.org/cpython/rev/5859a9e8b214

New changeset d1455d14accd by Martin Panter in branch '3.6':
Issue #27348: Merge exception formatting fix from 3.5 into 3.6
https://hg.python.org/cpython/rev/d1455d14accd

New changeset 4261ae29d3e2 by Martin Panter in branch 'default':
Issue #27348: Merge exception formatting fix from 3.6
https://hg.python.org/cpython/rev/4261ae29d3e2

--
nosy: +python-dev

___
Python tracker 

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



[issue28205] Add optional suffix to str.join

2016-09-22 Thread Steven D'Aprano

Steven D'Aprano added the comment:

> Looking again at the comments for the other respondents, I think this 
> should just be closed.  It doesn't make sense to disturb a long 
> standing API or the break the join/split symmetry.

For what it's worth, in hindsight I agree. I'm a little embarassed that 
I missed such a simple solution. Sorry for the noise!

--

___
Python tracker 

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



[issue28234] In xml.etree.ElementTree docs there are many absent Element class links

2016-09-22 Thread py.user

py.user added the comment:

Serhiy Storchaka wrote:
> I believe that in particular you can mix Python and
> C implementations of Element and lxml.etree elements in one tree.


The xml.etree.ElementTree.ElementTree() can accept lxml.etree.Element() as a 
node, but node in node is impossible.

>>> import xml.etree.ElementTree as etree_xml
>>> import lxml.etree as etree_lxml
>>> 
>>> elem1 = etree_xml.Element('a')
>>> elem2 = etree_lxml.Element('b')
>>> elem1.append(elem2)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: must be xml.etree.ElementTree.Element, not lxml.etree._Element
>>>

--

___
Python tracker 

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



[issue26351] Occasionally check for Ctrl-C in long-running operations like sum

2016-09-22 Thread STINNER Victor

STINNER Victor added the comment:

You should try https://github.com/python/performance to get reliable
benchmark results ;-)

--

___
Python tracker 

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



[issue28243] Performance regression in functools.partial()

2016-09-22 Thread STINNER Victor

STINNER Victor added the comment:

"If revert c1a698edfa1b, the performance is returned to the level of 3.5."

Oh, so using "fastcall" makes partial_call() slower? That's really something 
bad :-/ It would be nice if you can confirm using all optimizations enabled 
(PGO+LTO): ./configure --with-optimizations.

For faster compilation and best performances, you might also try to modify 
PROFILE_TASK in Makefile.pre.in to run your microbenchmark (but you need to run 
it long enough, so the compiler is able to detect hot code).

--

___
Python tracker 

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



[issue27348] traceback (and threading) drops exception message

2016-09-22 Thread Martin Panter

Changes by Martin Panter :


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



[issue27950] Superfluous messages when running make

2016-09-22 Thread Martin Panter

Martin Panter added the comment:

The version I committed has the space separating @ #

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



[issue27950] Superfluous messages when running make

2016-09-22 Thread Martin Panter

Changes by Martin Panter :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue28245] Embeddable Python does not use PYTHONPATH.

2016-09-22 Thread Steve Dower

Steve Dower added the comment:

Correct, and if you look ahead to 3.6 then you'll see I've already changed how 
this works. There is now support for a python._pth file that contains exactly 
the paths you want in sys.path, as well as suppressing all other sources.

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



[issue28247] Add an option to zipapp to produce a Windows executable

2016-09-22 Thread Paul Moore

New submission from Paul Moore:

The zipapp module allows users to bundle their application as a single file 
"executable". On Windows, the file is given a ".pyz" extension which is 
associated with the Python launcher. However, this approach is not always 
equivalent to a native executable (see 
http://paul-moores-notes.readthedocs.io/en/latest/wrappers.html for more 
details).

I suggest adding an option to zipapp that prepends a small executable to the 
zipapp that uses the Python C API to launch the application. A prototype 
implementation (zastub) is available at https://github.com/pfmoore/pylaunch.

If this seems reasonable, I'll work up a full patch.

--
assignee: paul.moore
components: Library (Lib), Windows
messages: 277224
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Add an option to zipapp to produce a Windows executable
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



[issue27374] Cygwin: Makefile does not install DLL import library

2016-09-22 Thread Erik Bray

Erik Bray added the comment:

Masayuki--concerning your above comments, I think this is similar to, if not 
the same as #13756

--

___
Python tracker 

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



[issue28248] Upgrade installers to OpenSSL 1.0.2i

2016-09-22 Thread Alex Gaynor

New submission from Alex Gaynor:

https://www.openssl.org/news/secadv/20160922.txt

--
assignee: christian.heimes
components: Library (Lib), SSL
keywords: security_issue
messages: 277226
nosy: alex, christian.heimes, dstufft, janssen, ned.deily, paul.moore, 
ronaldoussoren, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Upgrade installers to OpenSSL 1.0.2i
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7

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



[issue28086] test.test_getargs2.TupleSubclass test failure

2016-09-22 Thread Raymond Hettinger

Raymond Hettinger added the comment:

> The simplest way is just change PyTuple_Check to 
> PyTuple_CheckExact in ceval.c.

+1

--
nosy: +rhettinger

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2016-09-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why not just change the extension to cmd and add the following line at the 
start?

@python -x "%0" %*

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2016-09-22 Thread Paul Moore

Paul Moore added the comment:

(1) It starts an extra process (unless you're running the application from 
cmd.exe) and (2) in some cases, the system won't recognise a cmd file as an 
executable. For a simple example,

t.cmd:

@echo Hello from t

example.py:

from subprocess import run
run(["t")]

If you run example.py you get "FileNotFoundError: [WinError 2] The system 
cannot find the file specified".

--

___
Python tracker 

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



[issue28249] doctest.DocTestFinder reports incorrect line numbers with exclude_empty=False

2016-09-22 Thread Clément

New submission from Clément:

Line numbers reported by the doctest module are wrong when a function does not 
include a docstring.  With the attached example file, running

python -c "import doctest, example; 
print(doctest.DocTestFinder(exclude_empty=False).find(example))"

produces

[,
 ,
 ,
 ]

whereas if one uncomments the docstrings of a and c the output is

[,
 ,
 ,
 ]

This bug is due to this line in doctest:

lineno = self._find_lineno(obj, source_lines)

The documentation of _find_lineno says this:

def _find_lineno(self, obj, source_lines):
"""
Return a line number of the given object's docstring.  Note:
this method assumes that the object has a docstring.
"""

This assumption is violated by the call listed above, because of the 
exclude_empty=False parameter to DocTestFinder().

I guess lineno should just be None for all methods that do not have a docstring?

--
components: Library (Lib)
files: example.py
messages: 277230
nosy: cpitclaudel
priority: normal
severity: normal
status: open
title: doctest.DocTestFinder reports incorrect line numbers with 
exclude_empty=False
versions: Python 2.7, Python 3.5
Added file: http://bugs.python.org/file44786/example.py

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2016-09-22 Thread Eryk Sun

Eryk Sun added the comment:

Specifically, while CreateProcess does execute batch scripts via the %ComSpec% 
interpreter, the only extension it infers is ".exe". To run a ".cmd" or ".bat" 
file, you have to use the full name with the extension.

--
nosy: +eryksun

___
Python tracker 

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



[issue28086] test.test_getargs2.TupleSubclass test failure

2016-09-22 Thread Serhiy Storchaka

Changes 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



[issue28086] test.test_getargs2.TupleSubclass test failure

2016-09-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5324906ae307 by Serhiy Storchaka in branch '3.6':
Issue #28086: Single var-positional argument of tuple subtype was passed
https://hg.python.org/cpython/rev/5324906ae307

New changeset 858afd17e3ee by Serhiy Storchaka in branch 'default':
Issue #28086: Single var-positional argument of tuple subtype was passed
https://hg.python.org/cpython/rev/858afd17e3ee

--
nosy: +python-dev

___
Python tracker 

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



[issue28247] Add an option to zipapp to produce a Windows executable

2016-09-22 Thread Brett Cannon

Changes by Brett Cannon :


--
nosy: +brett.cannon

___
Python tracker 

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



[issue27213] Rework CALL_FUNCTION* opcodes

2016-09-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think that's all with this issue.

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

___
Python tracker 

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



[issue22848] Subparser help does not respect SUPPRESS argument

2016-09-22 Thread Drake Bridgewater

Changes by Drake Bridgewater :


--
nosy: +Drake Bridgewater

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-09-22 Thread Cherniavsky Beni

Changes by Cherniavsky Beni :


--
nosy: +cben

___
Python tracker 

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



[issue15873] datetime: add ability to parse RFC 3339 dates and times

2016-09-22 Thread Alexander Belopolsky

Changes by Alexander Belopolsky :


--
versions: +Python 3.7 -Python 3.6

___
Python tracker 

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



[issue28248] Upgrade installers to OpenSSL 1.0.2i

2016-09-22 Thread Christian Heimes

Christian Heimes added the comment:

1.0.2i passes all tests of 2.7, 3.5-7 on Linux

--
assignee: christian.heimes -> 
components: +Macintosh, Windows

___
Python tracker 

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



[issue28248] Upgrade installers to OpenSSL 1.0.2i

2016-09-22 Thread Christian Heimes

Changes by Christian Heimes :


--
nosy: +benjamin.peterson, larry
priority: normal -> release blocker
stage:  -> needs patch
type:  -> security

___
Python tracker 

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



[issue27850] Remove 3DES from cipher list (sweet32 CVE-2016-2183)

2016-09-22 Thread Christian Heimes

Christian Heimes added the comment:

Larry, the issue has nothing to do with the TLS/SSL library or implementation. 
It's about cipher suite selection. All (!) SSL libraries are affected because 
they had 3DES enabled as legacy fallback.

Fun fact: OpenSSL latest security fix has addressed the issue and disabled 3DES 
by default. But Python overrides the fix and enables 3DES again. LibreSSL 
hasn't announced a fix yet.

By the way I don't take LibreSSL serious. The developers are all cookie about 
best practice and security but they don't even offer HTTPS on their website or 
for downloads. Yes, the official download location for LibreSSL does not 
support secure file transfer.

--

___
Python tracker 

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



[issue28250] typing.NamedTuple instances are not picklable Two

2016-09-22 Thread Kurt Dally

New submission from Kurt Dally:

Creating a namedtuple and an instance of the namedtuple in a function then 
returning the instance to the global namespace made the instance unpickleable, 
as in Issue25665.

--
components: Library (Lib)
messages: 277236
nosy: Kurt
priority: normal
severity: normal
status: open
title: typing.NamedTuple instances are not picklable Two
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



[issue28243] Performance regression in functools.partial()

2016-09-22 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

With using all optimizations enabled the difference is much smaller if not 
disappeared.

Python 3.5:  Median +- std dev: 423 ns +- 9 ns
Python 3.7:  Median +- std dev: 427 ns +- 13 ns

--

___
Python tracker 

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



[issue28243] Performance regression in functools.partial()

2016-09-22 Thread STINNER Victor

STINNER Victor added the comment:

> Python 3.5:  Median +- std dev: 423 ns +- 9 ns
> Python 3.7:  Median +- std dev: 427 ns +- 13 ns

0.9% slower on a microbenchmark is not really what I would call significant :-)

But there is an underlying issue: when PGO+LTO is not used, Python 3.7 (and 
Python 3.6, no?) seems slower than Python 3.5. I recall that I moved some code 
from Python/ceval.c to Objects/abstract.c and made subtle changes on how 
functions are called. I guess that code locality has an impact on such 
microbenchmark (CPU-bound). Maybe we should move code, but I don't know where 
nor how. I understood that PGO puts "hot" code in a special section to make the 
hot code closer.

--

___
Python tracker 

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



[issue27213] Rework CALL_FUNCTION* opcodes

2016-09-22 Thread STINNER Victor

STINNER Victor added the comment:

> I think that's all with this issue.

Thanks Demur and Serhiy for your great work!

--

___
Python tracker 

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



[issue28251] Help manuals do not appear in Windows search

2016-09-22 Thread Steve Dower

New submission from Steve Dower:

On Windows 10, you can't search in the start menu for the HTML Help manuals.

This annoys me so much I'm going to figure out a way fix it :)

--
assignee: steve.dower
components: Windows
messages: 277240
nosy: paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: Help manuals do not appear in Windows search
type: enhancement
versions: 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



[issue28251] Help manuals do not appear in Windows search

2016-09-22 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 45ba976b7064 by Steve Dower in branch '3.5':
Issue #28251: Improvements to help manuals on Windows.
https://hg.python.org/cpython/rev/45ba976b7064

New changeset e703c3a390f7 by Steve Dower in branch '3.6':
Issue #28251: Improvements to help manuals on Windows.
https://hg.python.org/cpython/rev/e703c3a390f7

New changeset 15f82b64eee0 by Steve Dower in branch 'default':
Issue #28251: Improvements to help manuals on Windows.
https://hg.python.org/cpython/rev/15f82b64eee0

--
nosy: +python-dev

___
Python tracker 

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



[issue28251] Help manuals do not appear in Windows search

2016-09-22 Thread Steve Dower

Steve Dower added the comment:

Fixed both the installation link and the bad javascript in the chm files. I 
also changed the changelog link to an internal link for the latest version and 
external for older versions (otherwise we were going to the web version which 
has JS that the HTML Help Viewer can't handle).

Open to suggestions for other improvements, but this resolves all the issues 
I'm currently aware of.

--
nosy: +ned.deily
stage: needs patch -> commit review

___
Python tracker 

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



[issue28252] Tuples used before introduction to tuple in tutorial

2016-09-22 Thread Eswar Yaganti

New submission from Eswar Yaganti:

In the python tutorial, the tuples were used in an example before the 
introduction to tuples in section 5.1.4

--
assignee: docs@python
components: Documentation
messages: 277243
nosy: Eswar Yaganti, docs@python
priority: normal
severity: normal
status: open
title: Tuples used before introduction to tuple in tutorial
type: enhancement
versions: Python 2.7

___
Python tracker 

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



[issue28253] the reply's additional "Re:"

2016-09-22 Thread lijp

New submission from lijp:

hi
I`m a python newer.
when I use python3.4.3 to learn about package calendar,I found a problem, Could 
you help me to confirm it which is is a bug.

Below is my env:
--
os: win7 x86
python version:3.4.3
--
problem:
when I use calendar.prcal() method to print detail calendar information. the 
display December of year  `s localtion is wrong.
my python source:
--
import calendar
calendar.prcal()
--

partial output:

but,when I use [print (calendar.month(,12))] to confirm, it`s OK .

please help me to confirm.
thank you.

--
messages: 277244
nosy: xibeilijp
priority: normal
severity: normal
status: open
title: the reply's additional "Re:"

___
Python tracker 

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



[issue28254] Add C API for gc.enable, gc.disable, and gc.isenabled

2016-09-22 Thread Joe Jevnik

New submission from Joe Jevnik:

I was writing an extension module that was working with weakrefs and wanted to 
ensure that the GC would not run for a block of code. I noticed that 
gc.enable/gc.disable are not exposed to C and the state of the gc is in a 
static variable so it cannot be mutated from an extension.

This change adds an easier way to access this functionality in the C api 
without going through an import or PyObject_Call.

I am wondering where to document these functions as well as PyGC_Collect. I 
didn't see that function anywhere in the docs (and didn't know about it) so I 
would like to make them more visible. My first thought was 
Doc/c-api/gcsupport.rst but this is not in service of supporting the GC, it is 
about the state of the GC itself. If that seems like a decent place I could add 
a small section at the bottom about interacting with the GC and document these 
new functions and PyGC_Collect.

I'm sorry if this is exposed elsewhere. If it is I can try to add some links to 
i

--
components: Extension Modules
files: gc-capi.patch
keywords: patch
messages: 277245
nosy: ll
priority: normal
severity: normal
status: open
title: Add C API for gc.enable, gc.disable, and gc.isenabled
versions: Python 3.7
Added file: http://bugs.python.org/file44787/gc-capi.patch

___
Python tracker 

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



[issue28253] calendar.prcal(9999) output has a problem

2016-09-22 Thread lijp

Changes by lijp :


--
components: +Windows
nosy: +paul.moore, steve.dower, tim.golden, zach.ware
title: the reply's additional "Re:" -> calendar.prcal() output has a problem
type:  -> behavior
versions: +Python 3.4

___
Python tracker 

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



[issue28253] calendar.prcal(9999) output has a problem

2016-09-22 Thread lijp

Changes by lijp :


Added file: http://bugs.python.org/file44788/20160923154147.png

___
Python tracker 

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