[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Evan

Evan added the comment:

I tried compiling the version of the launcher from 
https://github.com/python/cpython/tree/3.3, and the bug is still present there.

Previously when I was testing older versions with the launcher I had to 
uninstall pyreadline from several of them to confirm the bug was present. In 
retrospect it's obvious that this means the bug would have been hidden from me 
until now; I just happened to notice it after installing 3.6 because I hadn't 
installed pyreadline.

I now believe this affects *all* versions of the launcher, and that this has 
nothing to do with 3.6.0 in particular.

Associated issue: https://github.com/git-for-windows/git/issues/1013

--
versions: +Python 3.3

___
Python tracker 

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



[issue29103] Make enum.py pep8 compliant

2016-12-28 Thread Jean-Sebastien Bevilacqua

New submission from Jean-Sebastien Bevilacqua:

Hello,
This is my first patch on CPython, so please tell me if I do something wrong.

When executing flake8 on Lib/enum.py, there are lot of warning. This patch 
remove all these warnings.

--
components: Library (Lib)
files: enum_format.patch
keywords: patch
messages: 284234
nosy: barry, eli.bendersky, ethan.furman, realitix
priority: normal
severity: normal
status: open
title: Make enum.py pep8 compliant
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file46071/enum_format.patch

___
Python tracker 

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



[issue29102] Add an id field to PyInterpreterState.

2016-12-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What is the use case of keeping the uniqueness after deleting an interpreter?

--

___
Python tracker 

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



[issue29102] Add an id field to PyInterpreterState.

2016-12-28 Thread Eric Snow

Eric Snow added the comment:

Pointers can get re-used, so they aren't temporally unique.

--

___
Python tracker 

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



[issue29099] sqlite3 timestamp converter cannot handle timezone

2016-12-28 Thread Xiang Zhang

Xiang Zhang added the comment:

Thanks for your report Bozo.

I think this is due to timestamp converter doesn't handle timezone now. Besides 
this ValueError, if I understand correctly, even if you pass a datetime object 
with tzinfo, with microsecond set, the returned datetime object is a wrong one 
since the tzinfo is discarded.

--
nosy: +xiang.zhang
title: sqlite3 timestamp converter ValueError -> sqlite3 timestamp converter 
cannot handle timezone
type: crash -> behavior

___
Python tracker 

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



[issue29102] Add an id field to PyInterpreterState.

2016-12-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why not use just the pointer to PyInterpreterState itself?

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29102] Add an id field to PyInterpreterState.

2016-12-28 Thread Eric Snow

New submission from Eric Snow:

Currently there isn't any way to uniquely identify an interpreter.  This patch 
adds a new "id" field to the PyInterpreterState struct.  The ID for every new 
interpreter is set to the value of an increasing global counter.  That means 
that the ID is unique within the process.

IIRC, the availability of unique ID would help tools that make use of 
subinterpreters, like mod_wsgi.  It is also necessary for any effort to expose 
interpreters in Python-level code (which is the subject of other ongoing work).

The patch also adds:

unsigned long PyInterpreterState_GetID(PyInterpreterState *interp)

Note that, without a Python-level interpreters module, testing this change is 
limited to extending the existing test code in test_capi.

--
assignee: eric.snow
components: Interpreter Core
files: interpreter-id.diff
keywords: patch
messages: 284229
nosy: brett.cannon, eric.snow, grahamd, ncoghlan, steve.dower
priority: normal
severity: normal
stage: patch review
status: open
title: Add an id field to PyInterpreterState.
type: enhancement
versions: Python 3.7
Added file: http://bugs.python.org/file46070/interpreter-id.diff

___
Python tracker 

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



[issue29100] Core dump / OverflowError for datetime.fromtimestamp with overly large timestamp in Ubuntu 12.04

2016-12-28 Thread Xiang Zhang

Changes by Xiang Zhang :


--
nosy: +belopolsky

___
Python tracker 

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



[issue29101] Nested lambdas in setattr() lose context in Python 2.7

2016-12-28 Thread Benjamin Peterson

Benjamin Peterson added the comment:

https://docs.python.org/2/faq/programming.html#why-do-lambdas-defined-in-a-loop-with-different-values-all-return-the-same-result

--
nosy: +benjamin.peterson
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue29091] Python 3.5+ socket.socketpair fallback incorrectly implemented

2016-12-28 Thread Seth Michael Larson

Seth Michael Larson added the comment:

Sorry for making noise, yes I was using the implementation in Python 2.x. I 
will do better investigation in the future.

--

___
Python tracker 

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



[issue29091] Python 3.5+ socket.socketpair fallback incorrectly implemented

2016-12-28 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Are you using that implementation on Python 2? Python 3's socket.listen has one 
optional backlog argument.

--
nosy: +benjamin.peterson
resolution:  -> not a bug
status: open -> closed

___
Python tracker 

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



[issue29094] Regression in zipfile writing in 2.7.13

2016-12-28 Thread Benjamin Peterson

Changes by Benjamin Peterson :


--
assignee:  -> serhiy.storchaka
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0a55e039d25f by Benjamin Peterson in branch '3.6':
fix error check, so that Random.seed actually uses OS randomness (closes #29085)
https://hg.python.org/cpython/rev/0a55e039d25f

New changeset fc3eab44765f by Benjamin Peterson in branch 'default':
merge 3.6 (#29085)
https://hg.python.org/cpython/rev/fc3eab44765f

--
nosy: +python-dev
resolution:  -> fixed
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



[issue29101] Nested lambdas in setattr() lose context in Python 2.7

2016-12-28 Thread Victor Liu

New submission from Victor Liu:

I would expect bug.py to output:
foo
bar
baz

but instead we observe:
baz
baz
baz

Replicated on Windows 10 Home Edition, Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 
17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)]

--
files: bug.py
messages: 284224
nosy: Victor Liu
priority: normal
severity: normal
status: open
title: Nested lambdas in setattr() lose context in Python 2.7
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file46069/bug.py

___
Python tracker 

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



[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-28 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Did you set CFLAGS and LDFLAGS?

--
nosy: +Chi Hsuan Yen

___
Python tracker 

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



[issue26382] List object memory allocator

2016-12-28 Thread INADA Naoki

INADA Naoki added the comment:

Maybe, PyObject_MALLOC remains only for backward compatibility?

--

___
Python tracker 

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



[issue26382] List object memory allocator

2016-12-28 Thread INADA Naoki

INADA Naoki added the comment:

I know PyMem and PyObject allocator is same by default. But it's configurable.
How should I choose right allocator?

--

___
Python tracker 

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



[issue29059] Windows: Python not using ANSI compatible console

2016-12-28 Thread Eryk Sun

Eryk Sun added the comment:

> As there is no good interface in core Python to the kernel32 console
> operations (and there probably shouldn't be, it would be better to be 
> consistent), I suggest just flipping the bit at startup on Windows.

I don't follow your statement about consistency. Python could adopt a built-in 
wincon module to partially support the console API, just like winreg partially 
supports the registry API. 

When _WindowsConsoleIO was being developed, I mentioned the idea of enabling VT 
mode a couple of times, but there was no interest that I could see. I don't 
think Windows devs really care much about this feature, especially since it's 
only available in Windows 10. colorama has been the popular way to get 
cross-platform support for supporting text color in terminals and the Windows 
console. There's also pyreadline, which supports VT escapes and much more. 
Enabling the console's VT mode won't simplify the implementation of colorama or 
pyreadline so long as Windows 7 and 8 are supported, which will be for several 
more years. 

One problem with enabling VT mode at startup is that it could cause 
compatibility problems with child processes. cmd faced this problem and has 
since resolved it [1] by reverting to the original console mode before 
executing a program. If Python enables VT mode at startup, there should be a 
sys variable (based on a C global) that has the original mode value. 
Applications would be able to restore the original mode to either opt out 
entirely or before executing a child process. Py_FinalizeEx would also have to 
be modified to restore the original mode before shutting down the interpreter.

[1]: http://preview.tinyurl.com/jgtcgfs

--
nosy: +eryksun

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Evan

Evan added the comment:

No, it doesn't provide a version of readline that works with Windows binaries. 
Trying to import readline fails no matter how I start Python.

--

___
Python tracker 

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



[issue29100] Core dump / OverflowError for datetime.fromtimestamp with overly large timestamp in Ubuntu 12.04

2016-12-28 Thread Donald Stufft

Changes by Donald Stufft :


--
nosy: +dstufft

___
Python tracker 

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



[issue29100] Core dump / OverflowError for datetime.fromtimestamp with overly large timestamp in Ubuntu 12.04

2016-12-28 Thread Jordon Phillips

New submission from Jordon Phillips:

In Python 3.6.0 if you give datetime.fromtimestamp a very bad value you either 
get a core dump or an OverflowError. The core dump occurs when no tzinfo is 
provided, the OverflowError occurs when a tzinfo is provided (such as tzlocal 
from dateutil). Attached is a minimal script to reproduce the error. Note that 
this behavior only occurs on certain systems. It does not happen on OSX 
10.11.6, but it does happen on Ubuntu 12.04. I imagine it happens on other 
systems as well, but I haven't tested beyond those two.

Here are the specific errors I get on Ubuntu 12.04. When no tzinfo is provided:

python: 
/tmp/python-build.20161228223921.28011/Python-3.6.0/Modules/_datetimemodule.c:251:
 days_before_year: Assertion `year >= 1' failed.
Aborted (core dumped)

When a tzinfo is provided:

Traceback (most recent call last):
  File "test1.py", line 11, in 
datetime.fromtimestamp(bad_st_mtime, local_time_zone)
  File 
"~/.pyenv/versions/venv36d/lib/python3.6/site-packages/dateutil/tz/_common.py", 
line 210, in fromutc
dt_wall = self._fromutc(dt)
  File 
"~/.pyenv/versions/venv36d/lib/python3.6/site-packages/dateutil/tz/_common.py", 
line 195, in _fromutc
return dt + dtdst
OverflowError: date value out of range


I imagine this is related to the fold changes.

--
components: Library (Lib)
files: test.py
messages: 284218
nosy: Jordon Phillips
priority: normal
severity: normal
status: open
title: Core dump / OverflowError for datetime.fromtimestamp with overly large 
timestamp in Ubuntu 12.04
type: behavior
versions: Python 3.6
Added file: http://bugs.python.org/file46068/test.py

___
Python tracker 

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



[issue29079] pathlib.resolve() causes infinite loop on Windows

2016-12-28 Thread Steve Dower

Changes by Steve Dower :


--
assignee:  -> steve.dower
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



[issue29079] pathlib.resolve() causes infinite loop on Windows

2016-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset af8c8551ea45 by Steve Dower in branch '3.6':
Issue #29079: Prevent infinite loop in pathlib.resolve() on Windows
https://hg.python.org/cpython/rev/af8c8551ea45

New changeset 9de7bf6c60d2 by Steve Dower in branch 'default':
Issue #29079: Prevent infinite loop in pathlib.resolve() on Windows
https://hg.python.org/cpython/rev/9de7bf6c60d2

--
nosy: +python-dev

___
Python tracker 

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



[issue28989] .dll files missing

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

Gabriel - did that solution work for you? If not, can you install and provide 
all the Python logs from %TEMP%?

--

___
Python tracker 

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



[issue26631] Unable to install Python 3.5.1 on Windows 10 - Error 0x80070643: Failed to install MSI package.

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

oselljr - are you still having this trouble with 3.5.2?

--

___
Python tracker 

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



[issue28902] 3.6.0rc1 installer fails to install / uninstall.

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

I believe this is out of date now, but if you have similar issues with the 
final release, feel free to respond to this thread again.

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> third party
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



[issue28983] Python 3.5.2 won't install on my computer

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

Apologies for the delayed response - I haven't been going through bugs recently.

If you're still having trouble, please try uninstalling and then running the 
commands above. After that, try reinstalling. (Those are uninstall commands 
that should fix the problem of it not-quite-uninstalling. If you run them after 
installing, you will definitely corrupt your installation.)

--

___
Python tracker 

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



[issue29080] unnecessary hg required for build version 3.6 on Windows

2016-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 84beb5cba826 by Steve Dower in branch '3.5':
Issue #29080: Fixes Misc/NEWS entry
https://hg.python.org/cpython/rev/84beb5cba826

New changeset 048d1942b325 by Steve Dower in branch '3.6':
Issue #29080: Fixes Misc/NEWS entry
https://hg.python.org/cpython/rev/048d1942b325

New changeset 38e44a23ea66 by Steve Dower in branch 'default':
Issue #29080: Fixes Misc/NEWS entry
https://hg.python.org/cpython/rev/38e44a23ea66

--

___
Python tracker 

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



[issue28768] Warning: implicit declaration of function '_setmode'

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

I applied to 3.6 and default. If anyone is motivated enough to apply to 2.7, 
feel free.

--
stage: patch review -> commit review

___
Python tracker 

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



[issue28768] Warning: implicit declaration of function '_setmode'

2016-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5027780d456b by Steve Dower in branch '3.6':
Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki 
Yamamoto
https://hg.python.org/cpython/rev/5027780d456b

New changeset 276d1bae92be by Steve Dower in branch 'default':
Issue #28768: Fix implicit declaration of function _setmode. Patch by Masayuki 
Yamamoto
https://hg.python.org/cpython/rev/276d1bae92be

--
nosy: +python-dev

___
Python tracker 

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



[issue28675] about PEP 528 / PEP 529

2016-12-28 Thread Steve Dower

Changes by Steve Dower :


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



[issue29077] build failure when enabling dtrace on FreeBSD

2016-12-28 Thread Łukasz Langa

Łukasz Langa added the comment:

I cannot repro as I don't have a FreeBSD environment handy. I will gladly 
accept a patch that makes it work with FreeBSD 11.0!

I admit I tested my implementation with OS X 10.11 and Linux (SystemTap with 
Ubuntu).

--

___
Python tracker 

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



[issue28909] Adding LTTng-UST tracing support

2016-12-28 Thread Łukasz Langa

Łukasz Langa added the comment:

This looks promising but I don't know how to test it. Tests would be welcome, 
as well as some explanation what OS and kernel I need to use to test it out.

Why does your patch rename the DTrace provider from "python" to "cpython"? At 
this point, with release of Python 3.6, it's an incompatible change we can't 
really accept easily.

--

___
Python tracker 

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



[issue28909] Adding LTTng-UST tracing support

2016-12-28 Thread Łukasz Langa

Changes by Łukasz Langa :


--
assignee:  -> lukasz.langa

___
Python tracker 

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



[issue29060] Changing the installation location still adds AppData filepaths that do not exist to the path variable on Windows 10

2016-12-28 Thread Steve Dower

Changes by Steve Dower :


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



[issue28747] Expose SSL_CTX_set_cert_verify_callback

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

Any comment from the SSL experts?

--

___
Python tracker 

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



[issue29033] Windows Python installer rolls back when run under SYSTEM account (SCCM)

2016-12-28 Thread Steve Dower

Changes by Steve Dower :


--
assignee:  -> steve.dower

___
Python tracker 

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



[issue25778] winreg.EnumValue does not truncate strings correctly

2016-12-28 Thread Steve Dower

Changes by Steve Dower :


--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed
versions:  -Python 2.7, Python 3.5

___
Python tracker 

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



[issue28710] Sphinx incompatible markup in the standard library

2016-12-28 Thread Łukasz Langa

Łukasz Langa added the comment:

Marking as a stdlib-wide issue since it's not configparser-specific.

FYI, as you probably noticed, the `term' syntax predates Sphinx and is used in 
lots of places. While I think it would be nice to fix it, it's a big diff.

--
title: Sphinx incompatible markup in configparser.ConfigParser. -> Sphinx 
incompatible markup in the standard library

___
Python tracker 

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



[issue29099] sqlite3 timestamp converter ValueError

2016-12-28 Thread Bozo Kopic

New submission from Bozo Kopic:

Current convert_timestamp function raises exception when parsing timestamps 
that contain timezone information and have microsecond set to zero.

Patch for this behavior is included.

Example script that demonstrates this problem:

import sys
import datetime
import sqlite3
import traceback
import contextlib


def main():
db = sqlite3.connect('test.db', detect_types=sqlite3.PARSE_DECLTYPES)
db.executescript("""
CREATE TABLE IF NOT EXISTS test (
timestamp TIMESTAMP)
""")

t = datetime.datetime.now(tz=datetime.timezone.utc)
t = t.replace(microsecond=0)
db.executemany("INSERT INTO test VALUES (:timestamp)", [{'timestamp': t}])
db.commit()

with contextlib.closing(db.cursor()) as c:
try:
c.execute('SELECT * FROM test')
c.fetchall()
print('original implementation success')
except Exception as e:
print('original implementation failed')
traceback.print_exc()
c.close()

sqlite3.register_converter("timestamp", _sqlite_convert_timestamp)

with contextlib.closing(db.cursor()) as c:
try:
c.execute('SELECT * FROM test')
c.fetchall()
print('patched implementation success')
except Exception as e:
print('patched implementation failed')
traceback.print_exc()
c.close()


def _sqlite_convert_timestamp(val):
datepart, timepart = val.split(b" ")

# this is the patch
timepart = timepart.split(b'+', 1)[0].split(b'-', 1)[0]

year, month, day = map(int, datepart.split(b"-"))
timepart_full = timepart.split(b".")
hours, minutes, seconds = map(int, timepart_full[0].split(b":"))
if len(timepart_full) == 2:
microseconds = int('{:0<6.6}'.format(timepart_full[1].decode()))
else:
microseconds = 0
val = datetime.datetime(year, month, day, hours, minutes, seconds,
microseconds)
return val


if __name__ == '__main__':
sys.exit(main())

--
components: Library (Lib)
files: sqlite3.patch
keywords: patch
messages: 284205
nosy: bozo.kopic
priority: normal
severity: normal
status: open
title: sqlite3 timestamp converter ValueError
type: crash
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46067/sqlite3.patch

___
Python tracker 

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



[issue29080] unnecessary hg required for build version 3.6 on Windows

2016-12-28 Thread Steve Dower

Changes by Steve Dower :


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



[issue29080] unnecessary hg required for build version 3.6 on Windows

2016-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset bc71c144e6f0 by Steve Dower in branch '3.5':
Issue #29080: Removes hard dependency on hg.exe from PC/build.bat
https://hg.python.org/cpython/rev/bc71c144e6f0

New changeset f98d8c9f3cde by Steve Dower in branch '3.6':
Issue #29080: Removes hard dependency on hg.exe from PC/build.bat
https://hg.python.org/cpython/rev/f98d8c9f3cde

New changeset 57c2fc60c989 by Steve Dower in branch 'default':
Issue #29080: Removes hard dependency on hg.exe from PC/build.bat
https://hg.python.org/cpython/rev/57c2fc60c989

--
nosy: +python-dev

___
Python tracker 

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



[issue28871] Destructor of ElementTree.Element is recursive

2016-12-28 Thread STINNER Victor

STINNER Victor added the comment:

This issue seems theorical to me, whereas the breakage of benchmarks is
very concrete for me. So I suggest to revert the change in Python 2.7.

(2) looks like the right design and it was implemented in Python 3 (no?).

I don't think that it's worth it to backport the change to Python 2. You
are the first one to report the issue and the backport is risky.

--

___
Python tracker 

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



[issue29098] document minimum sqlite version

2016-12-28 Thread Carl George

New submission from Carl George:

While attempting to build a Python 3.6 RPM for RHEL/CentOS 6, I noticed the 
following warning.

*** WARNING: renaming "_sqlite3" since importing it failed: 
build/lib.linux-i686-3.6-pydebug/_sqlite3.cpython-36dm-i386-linux-gnu.so: 
undefined symbol: sqlite3_stmt_readonly

I was able to locate changeset 284676cf2ac8 (#10740) which introduced the usage 
of the sqlite3_stmt_readonly interface.  That interface wasn't added to sqlite 
until 3.7.4 (http://www.sqlite.org/releaselog/3_7_4.html).  My RPM build failed 
because RHEL/CentOS 6 only has sqlite 3.6.20.  I understand that Python can't 
support old libraries forever, but can this minimum sqlite version be noted 
somewhere in the documentation?

--
assignee: docs@python
components: Documentation
messages: 284202
nosy: carlwgeorge, docs@python
priority: normal
severity: normal
status: open
title: document minimum sqlite version
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



[issue26382] List object memory allocator

2016-12-28 Thread STINNER Victor

STINNER Victor added the comment:

See https://bugs.python.org/issue26249

--

___
Python tracker 

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



[issue26382] List object memory allocator

2016-12-28 Thread STINNER Victor

STINNER Victor added the comment:

Il don't understand your change: in Python 3.6, PyMem now uses exactly the
same allocator than PyObject.

--

___
Python tracker 

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



[issue29097] datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6

2016-12-28 Thread Pekka Klärck

New submission from Pekka Klärck:

For example:

E:\>py -3.6 -c "import datetime; datetime.datetime.fromtimestamp(42)"
Traceback (most recent call last):
  File "", line 1, in 
OSError: [Errno 22] Invalid argument

Works fine at least with Python 2.6-2.7 and 3.3-3.5. Only tested on Windows 
(missing deadsnakes for easy Linux testing).

I was also surprised to get OSError in general, but apparently fromtimestamp 
uses that instead of ValueError nowadays in some error situations.

--
messages: 284199
nosy: pekka.klarck
priority: normal
severity: normal
status: open
title: datetime.fromtimestamp(t) when 0 <= t <= 86399 fails on Python 3.6
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



[issue29096] Signal Handlers reliably cause UnboundLocalErrors

2016-12-28 Thread Joe Jevnik

Joe Jevnik added the comment:

The issue appears to be in ceval.c:unicode_concatenate (or the py2 equivalent)

The code sets the local variable on the lhs to NULL before doing a potentially 
inplace append to the string. This means that if a signal is raised during the 
concat, we never hit the STORE_FAST instruction following the INPLACE_ADD so 
the local or cell still holds NULL, triggering an error.

I am not really sure what can be done to prevent the failure while still 
allowing the optimization.

--
components: +Interpreter Core
nosy: +ll
type: crash -> 

___
Python tracker 

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



[issue29096] Signal Handlers reliably cause UnboundLocalErrors

2016-12-28 Thread Ted Meyer

Ted Meyer added the comment:

Sorry everyone, it appears I made a mistake pasting the code in here.
There was a type where I was trying to print local_val instead of local_var. 
the code should be this:

import signal

def sig_hdlr(signum, frame):
raise ValueError()

def faulty():
local_var = ""
signal.signal(signal.SIGALRM, sig_hdlr)
signal.alarm(1)
try:
while True:
local_var += "!"
except ValueError:
print (local_var)

faulty()


and the crash should be this:
Traceback (most recent call last):
  File "pybug.py", line 12, in faulty
local_var += "!"
  File "pybug.py", line 4, in sig_hdlr
raise ValueError()
ValueError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pybug.py", line 16, in 
faulty()
  File "pybug.py", line 14, in faulty
print (local_var)
UnboundLocalError: local variable 'local_var' referenced before assignment

--

___
Python tracker 

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



[issue29096] Signal Handlers reliably cause UnboundLocalErrors

2016-12-28 Thread Ted Meyer

Changes by Ted Meyer :


--
type:  -> crash

___
Python tracker 

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



[issue29096] Signal Handlers reliably cause UnboundLocalErrors

2016-12-28 Thread Ted Meyer

New submission from Ted Meyer:

Using this simple snippit of code:
import signal



import signal

def sig_hdlr(signum, frame):
raise ValueError()

def faulty():
local_var = ""
signal.signal(signal.SIGALRM, sig_hdlr)
signal.alarm(1)
try:
while True:
local_var += "!"
except ValueError:
print (local_val)

faulty()



I can reliably get a crash:
tmathmeyer@tmathmeyer-linuxstation:~$ python --version
Python 2.7.6
tmathmeyer@tmathmeyer-linuxstation:~$ python pybug.py 
Traceback (most recent call last):
  File "pybug.py", line 16, in 
faulty()
  File "pybug.py", line 14, in faulty
print local_val
NameError: global name 'local_val' is not defined

tmathmeyer@tmathmeyer-linuxstation:~$ python3.4 pybug.py 
Traceback (most recent call last):
  File "pybug.py", line 12, in faulty
local_var += "!"
  File "pybug.py", line 4, in sig_hdlr
raise ValueError()
ValueError

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "pybug.py", line 16, in 
faulty()
  File "pybug.py", line 14, in faulty
print (local_val)
NameError: name 'local_val' is not defined


I can repro this on 2.7.6 and 3.4, but do not have other versions to test on.

--
messages: 284196
nosy: Ted Meyer
priority: normal
severity: normal
status: open
title: Signal Handlers reliably cause UnboundLocalErrors
versions: Python 2.7, Python 3.3, Python 3.4

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Paul Moore

Paul Moore added the comment:

Does the git bash shell leave a readline DLL on the user's PATH? If so, 
Python's readline support will kick in, and as a result Python will behave 
differently.

--

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-28 Thread Eryk Sun

Eryk Sun added the comment:

The secrets module uses SystemRandom, which overrides random() and 
getrandbits() to use os.urandom, so it's not affected.

--

___
Python tracker 

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



[issue26382] List object memory allocator

2016-12-28 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file46066/listobject_CPython3-2.patch

___
Python tracker 

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



[issue29095] Compiling Python 3.6 from source on MacOS X Sierra

2016-12-28 Thread Walter Dörwald

New submission from Walter Dörwald:

I'm trying to compile Python 3.6 from source on MacOS X Sierra. However it 
seems that the _ssl module doesn't get built. Attached is the complete output.

Note that I have openssl installed via homebrew:

~/ ▸ brew list openssl
/usr/local/Cellar/openssl/1.0.2j/bin/c_rehash
/usr/local/Cellar/openssl/1.0.2j/bin/openssl
/usr/local/Cellar/openssl/1.0.2j/include/openssl/ (75 files)
/usr/local/Cellar/openssl/1.0.2j/lib/libcrypto.1.0.0.dylib
/usr/local/Cellar/openssl/1.0.2j/lib/libssl.1.0.0.dylib
/usr/local/Cellar/openssl/1.0.2j/lib/engines/ (12 files)
/usr/local/Cellar/openssl/1.0.2j/lib/pkgconfig/ (3 files)
/usr/local/Cellar/openssl/1.0.2j/lib/ (4 other files)
/usr/local/Cellar/openssl/1.0.2j/share/man/ (1592 files)

but if I understood Mac/BuildScript/resources/ReadMe.rtf correctly, this should 
be irrelevant.

Anyway the resulting pip seems to be unusable:

~/ ▸ python -mpip install cx_Oracle
pip is configured with locations that require TLS/SSL, however the ssl module 
in Python is not available.
Collecting cx_Oracle
  Could not fetch URL https://pypi.python.org/simple/cx-oracle/: There was a 
problem confirming the ssl certificate: Can't connect to HTTPS URL because the 
SSL module is not available. - skipping

--
components: Build
files: Python3.6-build.log
messages: 284193
nosy: doerwalter
priority: normal
severity: normal
status: open
title: Compiling Python 3.6 from source on MacOS X Sierra
versions: Python 3.6
Added file: http://bugs.python.org/file46065/Python3.6-build.log

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-28 Thread Brett Cannon

Changes by Brett Cannon :


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

___
Python tracker 

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



[issue29085] Python 3.6 on Windows doesn't seed Random() well enough

2016-12-28 Thread Brett Cannon

Brett Cannon added the comment:

Does this affect the secrets module at all?

--
nosy: +brett.cannon

___
Python tracker 

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



[issue16396] Importing ctypes.wintypes on Linux gives a traceback

2016-12-28 Thread Mike Place

Mike Place added the comment:

+1 to getting this patch in. The fact that this raises a ValueError and not an 
ImportError is really annoying and we definitely see it as a bug.

--
nosy: +Mike Place

___
Python tracker 

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



[issue29033] Windows Python installer rolls back when run under SYSTEM account (SCCM)

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

Thanks. I finally got a chance to look at these logs - apologies for taking 
some time.

It looks like some of the installs succeeded and others were then trying to 
modify the existing installation (I *think* this is why the unattend.xml file 
had no effect).

This has hit a particular known problem where a quiet per-machine install when 
one already exists will uninstall packages, rather than quickly exiting because 
it's already up to date. I haven't been able to figure out the cause before, 
but your logs have given me some more information to work with, so thank you :)

I don't see any problem here with the first installation, so provided you do 
not try to run it a second time, I think it should be fine. Perhaps you can add 
your own pre-check to the batch file or SCCM to skip it? Meanwhile, I'll try 
and figure out a good solution to the underlying issue.

--

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread Eryk Sun

Changes by Eryk Sun :


--
Removed message: http://bugs.python.org/msg284186

___
Python tracker 

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



[issue29090] python34.dll crash

2016-12-28 Thread Zachary Ware

Zachary Ware added the comment:

Unfortunately, this is unlikely to be fixed.  Python 3.4 is in security-fix 
only mode, so this will only be fixed in 3.4 if it can be shown to be a 
security issue.  Even so, a binary installer will not be produced for the next 
3.4 release, so you'd have to build it yourself.  Also, it's not clear that 
this is a bug in Python itself, we'd need a reproducer that doesn't require 
PySerial.

Are you certain that you're using the same versions of Python and PySerial that 
were previously working?

--

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread A.B., Khalid

A.B., Khalid added the comment:

OK. I updated pyreadline to version 2.1 from version 2.0 and now the buggy 
behavior is gone.

"""
E:\>python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit 
(AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
"""

--

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread Rüdiger Jungbeck

Rüdiger Jungbeck added the comment:

Replacing pyreadline 2.0 with pyreadline 2.1 solved my problems

--

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

pyreadline is probably the problem. Try uninstalling or updating it.

--

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread Eryk Sun

Eryk Sun added the comment:

You have pyreadline installed, a 3rd party module that takes over reading from 
the console. Try disabling it temporarily by deleting 
"E:\Python27\lib\site-packages\readline.pyc" and renaming 
"E:\Python27\lib\site-packages\readline.py" to "readline.py.bak".

--

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Evan

Evan added the comment:

Yes, the history within the current Python session. It's worth noting that the 
history usually behaves like in cmd.exe, not bash. (I don't have a py.exe 
without the bug at the moment to confirm that is the same.)

Testing now, it seems all the history shortcuts (F1-F9) function correctly when 
running Python directly, but when run with the launcher all behave as though 
the history buffer were empty. Somehow the combination of the shell and the 
launcher are stopping it from keeping history.

I'll open an issue on their bug tracker and report back.

--

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread A.B., Khalid

A.B., Khalid added the comment:

Output of SET PY is as follows:

E:\>SET PY
PYSDL2_DLL_PATH=E:\Python27\Lib\site-packages
PYTHON3_HOME=E:\Python35
PYTHON_HOME=E:\Python27

--

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread Tim Golden

Tim Golden added the comment:

Do you have any Python environment variables set?

If you're not sure, try at a command prompt:

SET PY

--

___
Python tracker 

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



[issue29074] repr doesn't give full result for this re math result

2016-12-28 Thread Matthew Barnett

Matthew Barnett added the comment:

Probably "...", although we also have to consider that the matched portion 
could in fact not be truncated but just happen to end with "...", although that 
would be a rare occurrence.

--

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread A.B., Khalid

A.B., Khalid added the comment:

I enclose the output of "python -v". Where Python exits is of course indicated 
by the end of the file. However, there is no obvious error that is printed out.

Also it might be worthwhile to note that I cleared all compiled files left over 
from the previous Python (2.7.12) so as to make sure none of them was the cause 
of the problem. That unfortunately did not affect the buggy behavior.

--
Added file: http://bugs.python.org/file46064/python-v.txt

___
Python tracker 

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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

You mean the history within Python? That's extremely strange.

Have you reported this to the git bash folks? We'll probably need someone who 
understands what their shell is actually doing to make any progress here.

--

___
Python tracker 

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



[issue29059] Windows: Python not using ANSI compatible console

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

Sounds good. Don't focus on ease of implementation, BTW. The post and eventual 
PEP need to cover the benefits, risks and alternatives more than anything else.

--

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread Steve Dower

Steve Dower added the comment:

Running "python -v" might show what the last thing it tried to do before 
exiting was.

--

___
Python tracker 

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



[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-28 Thread Nick Coghlan

Nick Coghlan added the comment:

If nothing is configured (i.e. none of LC_ALL, LC_CTYPE or LANG are set in the 
environment), then C reports the locale as "C". It's probably worthwhile for me 
to add a Background section to the PEP that explains the behaviour of 
``setlocale`` at the C level, as that's the source of the majority of the 
problems, as well as the key mechanism used to implement the locale coercion.

--

___
Python tracker 

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



[issue29084] C API of OrderedDict

2016-12-28 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 for privatizing

--

___
Python tracker 

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



[issue29089] dictionary keys described incorrectly in tutorial

2016-12-28 Thread R. David Murray

R. David Murray added the comment:

You know, it might actually not be a bad idea to use a slightly different color 
scheme for the tutorial.  We'll see if that idea generates any interest :)

--

___
Python tracker 

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



[issue26382] List object memory allocator

2016-12-28 Thread INADA Naoki

INADA Naoki added the comment:

Update patch for Python 2.7

--
nosy: +inada.naoki
versions: +Python 3.7 -Python 3.6
Added file: http://bugs.python.org/file46063/listobject_CPython2-2.patch

___
Python tracker 

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



[issue29094] Regression in zipfile writing in 2.7.13

2016-12-28 Thread Peter Ebden

New submission from Peter Ebden:

In Python 2.7.13, using zipfile.ZipFile to write into a file with some initial 
preamble produces a zip file that cannot be read again by some zip 
implementations.
Our use case is using pex (https://github.com/pantsbuild/pex) which writes a 
zip that begins with a shebang, and later attempting to manipulate that using 
Go's standard archive/zip package. In 2.7.12 that works OK, but in 2.7.13 the 
.pex file is rejected on reading. Linux's command-line unzip tool will read the 
archive, but issues a warning ("4 extra bytes at beginning or within zipfile") 
which wasn't present previously. 
zipfile.ZipFile does read the files OK.

I assume this is related to https://bugs.python.org/issue26293 since that's the 
most obvious zipfile change in 2.7.13. It's pretty easy to reproduce using the 
example in that issue:

from zipfile import ZipFile
with open('a.zip', 'wb') as base:
base.write(b'old\n')
with ZipFile(base, 'a') as myzip:
myzip.write('eggs.txt')

unzip -t a.zip
Archive:  a.zip
warning [a.zip]:  4 extra bytes at beginning or within zipfile
  (attempting to process anyway)
...

--
components: Library (Lib)
messages: 284172
nosy: Peter Ebden
priority: normal
severity: normal
status: open
title: Regression in zipfile writing in 2.7.13
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



[issue29093] Windows launcher breaks history in Git Bash

2016-12-28 Thread Evan

New submission from Evan:

When I launch *any* version of Python using py.exe from Git Bash, the up and 
down arrows clear the line buffer instead of navigating history.

The following things all work as intended:

* py.exe in cmd.exe
* py.exe in Git Bash using winpty
* Python 2.7, 3.5, 3.6 when run directly

The only thing that appears to trigger this bug is using the launcher in Git 
Bash without winpty.

Tested with the following versions of Git Bash:

* GNU bash, version 4.3.42(2)-release (x86_64-pc-msys)
* GNU bash, version 4.3.46(2)-release (x86_64-pc-msys)

Unfortunately I can't point to exactly which version of the launcher introduced 
this bug. Initially I was certain this only happened when I upgraded from 3.5.2 
to 3.6.0, but now I've checked another machine with 3.5.2 and 3.4.4, and the 
bug appears there too.

--
components: Windows
messages: 284171
nosy: evan_, paul.moore, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
title: Windows launcher breaks history in Git Bash
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



[issue28180] sys.getfilesystemencoding() should default to utf-8

2016-12-28 Thread Jan Niklas Hasse

Jan Niklas Hasse added the comment:

Only important case for me: What when LANG is unset?

--

___
Python tracker 

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



[issue28969] lru_cache is not threadsafe

2016-12-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Antoine noticed that the first patch doesn't need special sentinel object. Thus 
it can be simplified.

--
Added file: http://bugs.python.org/file46062/lru_cache-dict-pop-3.5-2.patch

___
Python tracker 

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



[issue16121] shlex.shlex.error_leader() reports incorrect line number

2016-12-28 Thread Petri Lehtinen

Changes by Petri Lehtinen :


--
nosy:  -petri.lehtinen

___
Python tracker 

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



[issue28969] lru_cache is not threadsafe

2016-12-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What solution do you prefer Raymond?

--
assignee: serhiy.storchaka -> rhettinger

___
Python tracker 

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



[issue29092] Sync os.stat's doc and doc string

2016-12-28 Thread Xiang Zhang

New submission from Xiang Zhang:

The accepted types of parameter *path* are different between os.stat's doc and 
doc string.

In doc, it mentions Pathlike, string and file descriptor. In doc string, it 
mentions string, bytes and file descriptor. (3.5 only lack bytes in doc).

--
assignee: docs@python
components: Documentation
files: doc-os-stat.patch
keywords: patch
messages: 284167
nosy: docs@python, xiang.zhang
priority: normal
severity: normal
stage: patch review
status: open
title: Sync os.stat's doc and doc string
versions: Python 3.5, Python 3.6, Python 3.7
Added file: http://bugs.python.org/file46061/doc-os-stat.patch

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread A.B., Khalid

A.B., Khalid added the comment:

Running "where python" shows that the updated python (the one with the bug 
mentioned above) is the one being run.

Running python -c "import sys; print sys.stdin.isatty()" prints out "True".

--

___
Python tracker 

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



[issue24288] Include/opcode.h is modified during building

2016-12-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Please open new issue Tres. If it is not opened.

--

___
Python tracker 

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



[issue13051] Infinite recursion in curses.textpad.Textbox

2016-12-28 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for your contribution Tycho.

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



[issue13051] Infinite recursion in curses.textpad.Textbox

2016-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b446a4aab9cf by Serhiy Storchaka in branch '3.5':
Issue #13051: Fixed recursion errors in large or resized curses.textpad.Textbox.
https://hg.python.org/cpython/rev/b446a4aab9cf

New changeset d87771d1c1e6 by Serhiy Storchaka in branch '2.7':
Issue #13051: Fixed recursion errors in large or resized curses.textpad.Textbox.
https://hg.python.org/cpython/rev/d87771d1c1e6

New changeset ea87e00a3e89 by Serhiy Storchaka in branch '3.6':
Issue #13051: Fixed recursion errors in large or resized curses.textpad.Textbox.
https://hg.python.org/cpython/rev/ea87e00a3e89

New changeset ea7f22cf9c8c by Serhiy Storchaka in branch 'default':
Issue #13051: Fixed recursion errors in large or resized curses.textpad.Textbox.
https://hg.python.org/cpython/rev/ea7f22cf9c8c

--
nosy: +python-dev

___
Python tracker 

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



[issue29037] Python 2.7.13 prints version header and exits immediately on Windows 10 x64

2016-12-28 Thread Eryk Sun

Eryk Sun added the comment:

In the cmd shell, run `where python` to confirm that "python" runs 2.7 
python.exe, and not a python.bat or python.lnk file. Also, check whether stdin 
is an interactive terminal by running `python -c "import sys; print 
sys.stdin.isatty()"`.

--
nosy: +eryksun

___
Python tracker 

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



[issue13051] Infinite recursion in curses.textpad.Textbox

2016-12-28 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue9770] curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09)

2016-12-28 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



[issue9770] curses.ascii.isblank() function is broken. It confuses backspace (BS 0x08) with tab (0x09)

2016-12-28 Thread Roundup Robot

Roundup Robot added the comment:

New changeset cba619a7bf6a by Serhiy Storchaka in branch '3.5':
Issue #9770: curses.ascii predicates now work correctly with negative integers.
https://hg.python.org/cpython/rev/cba619a7bf6a

New changeset 84ca252ac346 by Serhiy Storchaka in branch '2.7':
Issue #9770: curses.ascii predicates now work correctly with negative integers.
https://hg.python.org/cpython/rev/84ca252ac346

New changeset eb81f2d2a42b by Serhiy Storchaka in branch '3.6':
Issue #9770: curses.ascii predicates now work correctly with negative integers.
https://hg.python.org/cpython/rev/eb81f2d2a42b

New changeset 1c0b72996e60 by Serhiy Storchaka in branch 'default':
Issue #9770: curses.ascii predicates now work correctly with negative integers.
https://hg.python.org/cpython/rev/1c0b72996e60

--
nosy: +python-dev

___
Python tracker 

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



[issue29073] bytearray.__mod__() truncates on first \x00

2016-12-28 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