[issue28344] Python 3.5.2 hangs when running in session 0

2016-10-02 Thread SilentGhost

Changes by SilentGhost :


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



[issue28345] 8/3 is calculated incorrectly

2016-10-02 Thread SilentGhost

Changes by SilentGhost :


--
stage:  -> resolved

___
Python tracker 

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



[issue26617] Assertion failed in gc with __del__ and weakref

2016-10-02 Thread Paulus Schoutsen

Changes by Paulus Schoutsen :


--
nosy: +balloob

___
Python tracker 

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



[issue28345] 8/3 is calculated incorrectly

2016-10-02 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Please see https://docs.python.org/3/tutorial/floatingpoint.html

Python 3.5.2 (default, Sep 10 2016, 08:21:44) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> 2.6667 == 2.6665
True

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



[issue28345] 8/3 is calculated incorrectly

2016-10-02 Thread Jonas Wegelius

New submission from Jonas Wegelius:

When you type 8/3, the interpreter return incorrect value:
2.6665

it should be 
2.6667

--
components: Interpreter Core
messages: 277931
nosy: Jonas Wegelius
priority: normal
severity: normal
status: open
title: 8/3 is calculated incorrectly
type: behavior
versions: Python 3.6

___
Python tracker 

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



[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-02 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen :


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



[issue28344] Python 3.5.2 hangs when running in session 0

2016-10-02 Thread spooja

New submission from spooja:

Started the python 3.5.2 exe in session 0 using the task scheduler,
2 instances of python are running in task manager and the process gets hanged, 
killing the process did not create any logs in %temp% folder.

--
messages: 277930
nosy: spooja
priority: normal
severity: normal
status: open
title: Python 3.5.2 hangs when running in session 0
type: behavior
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



[issue25435] Wrong function calls and referring to not removed concepts in descriptor HowTo (documentation)

2016-10-02 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

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



[issue28264] Turtle.onclick events blocked by Turtle.stamp

2016-10-02 Thread George Fagin

George Fagin added the comment:

When you say "left click always moves the turtle" I fear my explanation was not 
clear enough. A left click always moves the turtle in my version as well. What 
changes when stamp is activated is that OnClick events are not issued when you 
click on the turtle.

--

___
Python tracker 

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



[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-02 Thread Guido van Rossum

Guido van Rossum added the comment:

Offline, Ivan and I have discussed a solution. We can make a small incision in 
typing.py that will fix this, at the cost of still allowing 
isinstance()/issubclass()). We also have a slightly better quick fix in mind. 
Ultimately we will have a more complex and complete fix, and if that's not 
ready by b2, one of the quicker fixes will definitely be.

--

___
Python tracker 

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



[issue26806] IDLE not displaying RecursionError tracebacks and hangs

2016-10-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I ran into this again.  Raising priority.

--
priority: normal -> high
title: IDLE not displaying RecursionError tracebacks -> IDLE not displaying 
RecursionError tracebacks and hangs
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



[issue24036] GB2312 codec is using a wrong covert table

2016-10-02 Thread Mingye Wang

Mingye Wang added the comment:

> Advice for final user:

This seems something worthy of adding to the codecs doc as a footnote. Perhaps 
something like "(deprecated) ... gb2312 is an obsolete encoding from the 1980s. 
Use gbk or gb18030 instead." will do.

> libiconv-1.14 is also using the wrong version.

Just a side note on the right/wrongfulness of libiconv: I have reported the 
GB18030 incompatibility as a libiconv bug.[1] From the replies, I learnt that 
1) what libiconv is using currently is a then-official mapping published on 
ftp.unicode.org; 2) vendor implementations of gb2312 differed historically. I 
have updated the corresponding section[2] on Wikipedia to include these old 
references.
  [1]: https://lists.gnu.org/archive/html/bug-gnu-libiconv/2016-09/msg4.html
  [2]: https://en.wikipedia.org/wiki/GB_2312#Two_implementations_of_GB2312

Still, being old and common does not necessarily mean being correct, as Ma Lin 
have demonstrated by showing the character semantics. To reflect this in a 
better-supported manner, I have added names for the glyphs in question from 
GB2312-80 to [2].

--
nosy: +Artoria2e5

___
Python tracker 

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



[issue28343] Bad encoding alias cp936 -> gbk: euro sign

2016-10-02 Thread Mingye Wang (Arthur2e5)

New submission from Mingye Wang (Arthur2e5):

Microsoft's cp936 defines a euro sign at 0x80, but Python would kick the bucket 
when asked to do something like `u'\u20ac'.encode('cp936')`. This may break 
things for zh-hans-cn windows users who wants to put a euro sign in their file 
name (if they insist on using a non-unicode str for open() in py2, well.)

By looking at the codecs documentation, 'cp936' appears to be an alias for the 
GBK encoder, which by itself has been a very ambiguous name and subject to 
confusion --

The name "GBK" might refer to any of the four commonly-known members of the 
family of EUC-CN (gb2312) extensions that has full coverage of Unicode 1.1 CJK 
Unified Ideographs block:
  1) The original GBK. Rust-Encoding says that it's in a normative annex of 
GB13000.1-1993, but the closest thing I can find in my archive.org copy of that 
standard is an annex on an EUC (GB/T 2311) UCS.
  2) IANA GBK, or Microsoft cp936. This is the one with the euro sign I am 
looking for.
  3) GBK 1.0, a recommendation from the official standardization committees 
based on cp936. It's roughly cp936 without the euro sign but with some 
additional 95 PUA code points. 
  4) W3C TR GBK. This GBK is basically gb18030-2005 without four-byte UTF, and 
with the euro sign. Roughly a union of 2) and 3) with some PUA code points 
moved into the right place.
 
Looking at Modules/cjkcodecs/_codecs_cn.c @ 104259:36b052adf5a7, Python seems 
to be doing either 1) or 3). For a quick fix you can just make an additional 
cp936 encoding around the gbk encoding that handles U+20AC; for some excitement 
(of potentially breaking stuff) you can join the web people and use either 2) 
or 4).

--
components: Unicode
messages: 277925
nosy: Mingye Wang (Arthur2e5), ezio.melotti, haypo
priority: normal
severity: normal
status: open
title: Bad encoding alias cp936 -> gbk: euro sign
type: behavior
versions: Python 2.7, Python 3.3, 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



[issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0

2016-10-02 Thread Ned Deily

Ned Deily added the comment:

There are various reports about Xcode 8.0 providing a 10.12 SDK which will 
include refs to symbols not available yet on 10.11.  Try installing the command 
line tools via:

$ xcode-select --install

and doing a "make distclean" and then a complete configure and rebuild.

--
nosy: +ned.deily

___
Python tracker 

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



[issue25356] Idle (Python 3.4 on Ubuntu) does not allow typing accents

2016-10-02 Thread Rogério Nunes Wolff

Rogério Nunes Wolff added the comment:

I find this bug recently in my IDLE. Ubuntu 14.04, Python 3.4.3, Tk 8.6.1. How 
can I fix this?

--
nosy: +rogeriowolff

___
Python tracker 

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



[issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf

2016-10-02 Thread Ned Deily

Ned Deily added the comment:

This is likely a duplicate of issues like #27126 and #13829.  In #24273 there 
is a suggested workaround: set environment variable "no_proxy" to "*".

http://bugs.python.org/issue24273#msg243963

--
nosy: +ned.deily
resolution:  -> duplicate
superseder:  -> exception error in _scproxy.so when called after fork

___
Python tracker 

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



[issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf

2016-10-02 Thread Ned Deily

Changes by Ned Deily :


--
status: open -> pending

___
Python tracker 

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



[issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf

2016-10-02 Thread Alexander Mohr

Alexander Mohr added the comment:

interestingly I haven't been able to get this to crash in a separate test app.  
There must be either timing related to some interaction with another module.  
let me know how you guys would like to proceed.  I can definitely reproduce it 
consistently in our application.

--

___
Python tracker 

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



[issue11702] dir on return value of msilib.OpenDatabase() crashes python

2016-10-02 Thread Terry J. Reedy

Terry J. Reedy added the comment:

This is a generic issue as there are multiple unready types that can raise (or 
in this case crash) with code that should work.  #26906 gives other examples 
and discussion of possible generic solutions that would make this issue 
obsolete.

--
nosy: +serhiy.storchaka, terry.reedy
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.2

___
Python tracker 

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



[issue16399] argparse: append action with default list adds to list instead of overriding

2016-10-02 Thread paul j3

paul j3 added the comment:

One thing that this default behavior does is allow us to append values to any 
object, just so long as it has the `append` method.  The default does not have 
to be a standard list.

For example, in another bug/issue someone asked for an `extend` action.  I 
could provide that with `append` and a custom list class

class MyList(list):
def append(self,arg):
if isinstance(arg,list):
self.extend(arg)
else:
super(MyList, self).append(arg)

This just modifies `append` so that it behaves like `extend` when given a list 
argument.

 parser = argparse.ArgumentParser()
 a = parser.add_argument('-f', action='append', nargs='*',default=[])
 args = parser.parse_args('-f 1 2 3 -f 4 5'.split())

produces a nested list:

 In [155]: args
 Out[155]: Namespace(f=[['1', '2', '3'], ['4', '5']])

but if I change the `default`: 

 a.default = MyList([])
 args = parser.parse_args('-f 1 2 3 -f 4 5'.split())

produces a flat list:

 In [159]: args
 Out[159]: Namespace(f=['1', '2', '3', '4', '5'])

I've tested this idea with an `array.array` and `set` subclass.

--

___
Python tracker 

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



[issue25699] Easier way to specify reduced globals for doctest

2016-10-02 Thread John Mark Vandenberg

John Mark Vandenberg added the comment:

pyflakes does assume doctest run with a copy of the module scope.


However when there is an __all__, the module scope as seen by other modules 
'should' be only items in __all__.  If a doctest is included in documentation, 
it 'should' only use names that are in __all__.

In addition, pyflakes has an outstanding feature request 
(https://bugs.launchpad.net/pyflakes/+bug/1178807/comments/8) that doctest run 
as if they are an independent module, and need to import everything that they 
use, so that each doctest is self-contained.

pyflakes can build support for both of those needs within the package.  No 
worries.  If you cant see a broader need for these, please close.

--

___
Python tracker 

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



[issue28342] OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and proxy_bypass_macosx_sysconf

2016-10-02 Thread Alexander Mohr

New submission from Alexander Mohr:

I have a unittest which spawns several processes repeatedly.  One of these 
subprocesses uses botocore, which itself uses the above two methods through the 
calls proxy_bypass and getproxies.  It seems after re-spawning the methods a 
few times the titled calls eventually repeatedly cause python to crash on 
10.12.  I have a core file if that would help, zip'd it's ~242MB.

I've attached a file that shows the lldb callstack and python callstack.

--
components: Library (Lib)
files: python_urllib_crash.txt
messages: 277917
nosy: thehesiod
priority: normal
severity: normal
status: open
title: OSX 10.12 crash in urllib.request getproxies_macosx_sysconf and 
proxy_bypass_macosx_sysconf
versions: Python 3.5
Added file: http://bugs.python.org/file44940/python_urllib_crash.txt

___
Python tracker 

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



[issue28128] Improve the warning message for invalid escape sequences

2016-10-02 Thread Emanuel Barry

Emanuel Barry added the comment:

Ping. I'd like for this to get merged in beta 2; should I (or Eric if he wants 
to) get to work on this? Is the DeprecatedSyntaxWarning subclass route still 
desired?

--

___
Python tracker 

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



[issue16399] argparse: append action with default list adds to list instead of overriding

2016-10-02 Thread paul j3

paul j3 added the comment:

It may help to know something about how defaults are handled - in general.

`add_argument` and `set_defaults` set the `default` attribute of the Action 
(the object created by `add_argument` to hold all of its information).  The 
default `default` is `None`.

At the start of `parse_args`, a fresh Namespace is created, and all defaults 
are loaded into it (I'm ignoring some details).

The argument strings are then parsed, and individual Actions update the 
Namespace with their values, via their `__call__` method.

At the end of parsing it reviews the Namespace.  Any remaining defaults that 
are strings are evaluated (passed through `type` function that converts a 
commandline string).  The handling of defaults threads a fine line between 
giving you maximum power, and keeping things simple and predictable.

The important thing for this issue is that the defaults are loaded into the 
Namespace at the start of parsing.

The `append` call fetches the value from the Namespace, replaces it with `[]` 
if it is None, appends the new value(s), and puts it back on the Namespace.  
The first `--foo` append is handled in just the same way as the 2nd and third 
(fetch, append, and put back).  The first can't tell that the list it fetches 
from the namespace came from the `default` as opposed to a previous `append`.  

The `__call__` for `append` was intentionally kept simple, and predictable.  As 
I demonstrated earlier it is possible to write an `append` that checks the 
namespace value against some default, and does something different.  But that 
is more complicated.

The simplest alternative to this behavior is to leave the default as None.  If 
after parsing the value is still None, put the desired list (or any other 
object) there.  

The primary purpose of the parser is to parse the commandline - to figure out 
what the user wants to tell you.  There's nothing wrong with tweaking (and 
checking) the `args` Namespace after parsing.

--

___
Python tracker 

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



[issue28341] cpython tip fails to build on Mac OS X 10.11.6 w/ XCode 8.0

2016-10-02 Thread Skip Montanaro

Changes by Skip Montanaro :


--
title: cpython tip fails to build on Mac OS X -> cpython tip fails to build on 
Mac OS X 10.11.6 w/ XCode 8.0

___
Python tracker 

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



[issue10716] Modernize pydoc to use better HTML and separate CSS

2016-10-02 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

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



[issue28341] cpython tip fails to build on Mac OS X

2016-10-02 Thread Skip Montanaro

New submission from Skip Montanaro:

Just trying an infrequent update of tip (last time seems to have been early 
July), I get a link error on my Mac:

% make
./Programs/_freeze_importlib \
./Lib/importlib/_bootstrap.py Python/importlib.h
dyld: lazy symbol binding failed: Symbol not found: _getentropy
  Referenced from: /Users/skip/src/hgpython/cpython/./Programs/_freeze_importlib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _getentropy
  Referenced from: /Users/skip/src/hgpython/cpython/./Programs/_freeze_importlib
  Expected in: /usr/lib/libSystem.B.dylib

make: *** [Python/importlib.h] Trace/BPT trap: 5

I'm running Mac OS X 10.11.6, and upgraded to XCode 8.0 a few days ago. 
Searching for the error, I saw some suggestions elsewhere on the web that this 
might be a known problem, though I saw nothing here (just searched for 
_getentropy).

--
components: Build
messages: 277914
nosy: skip.montanaro
priority: normal
severity: normal
status: open
title: cpython tip fails to build on Mac OS X
type: compile error
versions: Python 3.7

___
Python tracker 

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



[issue8145] Documentation about sqlite3 isolation_level

2016-10-02 Thread Mariatta Wijaya

Changes by Mariatta Wijaya :


--
nosy: +Mariatta

___
Python tracker 

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



[issue26906] format(object.__reduce__) fails intermittently

2016-10-02 Thread Guido van Rossum

Guido van Rossum added the comment:

Serhiy -- please do what do you think we should do. At this point I'm open to 
just about anything, but I don't feel comfortable creating or reviewing patches 
any more.

--
assignee: gvanrossum -> serhiy.storchaka

___
Python tracker 

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



[issue26906] format(object.__reduce__) fails intermittently

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yet one similar bug: issue11702.

--

___
Python tracker 

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



[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Good catch! Thanks Xiang.

--

___
Python tracker 

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



[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Xiang Zhang

Xiang Zhang added the comment:

Serhiy, in 05788a9a0b88, test_invalid_sequences seems don't have to stay in 
CAPITest.

--

___
Python tracker 

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



[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


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



[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Additional tests are always nice.

Thank you for your report and your patch Xiang.

--

___
Python tracker 

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



[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ac838bf5499d by Serhiy Storchaka in branch '3.5':
Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().
https://hg.python.org/cpython/rev/ac838bf5499d

New changeset 3efeafc6517a by Serhiy Storchaka in branch '3.6':
Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().
https://hg.python.org/cpython/rev/3efeafc6517a

New changeset 94fb4c4f58dd by Serhiy Storchaka in branch 'default':
Issue #28295: Fixed the documentation and added tests for PyUnicode_AsUCS4().
https://hg.python.org/cpython/rev/94fb4c4f58dd

--
nosy: +python-dev

___
Python tracker 

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



[issue28286] gzip guessing of mode is ambiguilous

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Or maybe FutureWarning is better than DeprecationWarning.

--
Added file: 
http://bugs.python.org/file44939/gzip_deprecate_implicit_write2.patch

___
Python tracker 

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



[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Xiang Zhang

Xiang Zhang added the comment:

Yes. Changing the implementation or the doc is still in question so in the 
title I just use conflicts. Scanning unicodeobject.c there seems no general 
rules about which to use. But actually I'm in favour of ValueError. From the 
description in https://docs.python.org/3/library/exceptions.html, SystemError 
is raised when the interpreter finds an internal error. I actually don't think 
this error is an interpreter internal error.

But no matter what the resolution is, we can add a test for ucs4. :-)

--

___
Python tracker 

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



[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The remaining question is what should be the type of the exception. ValueError 
is documented exception, but SystemError is actually raised exception (and it 
always was raised). PyUnicode_AsUCS4() is used 6 times in 3 files in CPython 
code, and it should never raise this exception. PyUnicode_AsUCS4() is in public 
API an can be used in third party code. Seems raising this exception can be 
caused only by programming error in C extension. SystemError is right exception 
in this case.

It looks to me that the code is correct and the documentation should be fixed 
to match the code.

--

___
Python tracker 

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



[issue28229] lzma does not support pathlib

2016-10-02 Thread Berker Peksag

New submission from Berker Peksag:

Here's an updated patch that adds more tests and documentation changes.

--
components: +Library (Lib)
nosy: +berker.peksag
Added file: http://bugs.python.org/file44938/issue28229_v2.diff

___
Python tracker 

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



[issue28225] bz2 does not support pathlib

2016-10-02 Thread Berker Peksag

Changes by Berker Peksag :


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



[issue28225] bz2 does not support pathlib

2016-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset fc0c244c6e79 by Berker Peksag in branch '3.6':
Issue #28225: bz2 module now supports pathlib
https://hg.python.org/cpython/rev/fc0c244c6e79

New changeset 0e9b77424d10 by Berker Peksag in branch 'default':
Issue #28225: Merge from 3.6
https://hg.python.org/cpython/rev/0e9b77424d10

--
nosy: +python-dev

___
Python tracker 

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



[issue28225] bz2 does not support pathlib

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM.

--
nosy: +serhiy.storchaka
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



[issue28225] bz2 does not support pathlib

2016-10-02 Thread Berker Peksag

Berker Peksag added the comment:

Here's an updated patch.

--
Added file: http://bugs.python.org/file44937/issue28225_v2.diff

___
Python tracker 

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



[issue20766] reference leaks in pdb

2016-10-02 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Uploaded refleak_5.patch with a simpler test case.
With the patch applied, './python -m test -R 3:3 test_pdb' runs with success.

The '_previous_sigint_handler' is reset at the Pdb prompt - instead of when the 
signal is triggered - to handle the case where pdb stops at a new set_trace() 
hard breakpoint after it has been run with 'continue'.  As a side effect, this 
also fixes issue 22502.

--
assignee:  -> xdegaye
stage:  -> patch review
versions: +Python 3.6, Python 3.7 -Python 3.4
Added file: http://bugs.python.org/file44936/refleak_5.patch

___
Python tracker 

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



[issue28335] Exception reporting in `logging.config`

2016-10-02 Thread Ram Rachum

Ram Rachum added the comment:

Thanks for the patch sreyas! Maybe we should also take this opportunity to 
remove the string formatting from the exception that shows the name of the 
original exception? Because when you think about it, it's just a poor man's 
`raise from`.

--

___
Python tracker 

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



[issue28340] TextIOWrapper.tell extremely slow

2016-10-02 Thread Rob Malouf

New submission from Rob Malouf:

io.TextIOWrapper.tell() is unusably slow in Python 2.7.  This same problem was 
introduced in Python 3 and fixed in Python 3.3 (see Issue # 4).  Any chance 
of getting the fix backported into the Python 2.7 library? It would make it 
much easier to modernize Unicode handling in libraries that have to support 
both 2 and 3 using the same codebase.

--
components: IO
messages: 277898
nosy: rmalouf
priority: normal
severity: normal
status: open
title: TextIOWrapper.tell extremely slow
type: performance
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



[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-02 Thread Guido van Rossum

Guido van Rossum added the comment:

Sorry about that. I haven't looked into this but I suspect this is due to some 
manipulation of the ABC registry by typing.py that exceed their intended scope. 
I'll ask Ivan to fix it; if he's not available before b2 goes out I'll roll 
this back.

--
keywords: +3.5regression
nosy: +larry, levkivskyi, ned.deily
priority: normal -> release blocker

___
Python tracker 

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



[issue28335] Exception reporting in `logging.config`

2016-10-02 Thread sreyas

Changes by sreyas :


--
keywords: +patch
Added file: http://bugs.python.org/file44935/raisefrom.patch

___
Python tracker 

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



[issue28339] "TypeError: Parameterized generics cannot be used with class or instance checks" in test_functools after importing typing module

2016-10-02 Thread Arfrever Frehtes Taifersar Arahesis

New submission from Arfrever Frehtes Taifersar Arahesis:

Commits 09cc43df4509 (3.5), 81f27d3ab214 (3.6), 8f0df4db2b06 (3.7) cause 
"TypeError: Parameterized generics cannot be used with class or instance 
checks" errors in 4 tests in Lib/test/test_functools.py file in situation when 
typing module is already imported.

Examples of steps to reproduce:
$ LD_LIBRARY_PATH="$(pwd)" ./python -m test -v test_typing test_functools
$ LD_LIBRARY_PATH="$(pwd)" ./python -m test -v test___all__ test_functools
$ LD_LIBRARY_PATH="$(pwd)" ./python -c 'import runpy, typing; 
runpy.run_module("test")' -v test_functools

Errors in test_functools:

==
ERROR: test_cache_invalidation (test.test_functools.TestSingleDispatch)
--
Traceback (most recent call last):
  File "/tmp/cpython/Lib/functools.py", line 776, in dispatch
impl = dispatch_cache[cls]
  File "/tmp/cpython/Lib/test/test_functools.py", line 1896, in __getitem__
result = self.data[key]
KeyError: 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/cpython/Lib/functools.py", line 779, in dispatch
impl = registry[cls]
KeyError: 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/cpython/Lib/test/test_functools.py", line 1955, in 
test_cache_invalidation
self.assertEqual(g(d), "sized")
  File "/tmp/cpython/Lib/functools.py", line 801, in wrapper
return dispatch(args[0].__class__)(*args, **kw)
  File "/tmp/cpython/Lib/functools.py", line 781, in dispatch
impl = _find_impl(cls, registry)
  File "/tmp/cpython/Lib/functools.py", line 732, in _find_impl
mro = _compose_mro(cls, registry.keys())
  File "/tmp/cpython/Lib/functools.py", line 709, in _compose_mro
if sub not in bases and issubclass(cls, sub):
  File "/tmp/cpython/Lib/typing.py", line 1043, in __subclasscheck__
raise TypeError("Parameterized generics cannot be used with class "
TypeError: Parameterized generics cannot be used with class or instance checks

==
ERROR: test_compose_mro (test.test_functools.TestSingleDispatch)
--
Traceback (most recent call last):
  File "/tmp/cpython/Lib/test/test_functools.py", line 1594, in test_compose_mro
m = mro(c.defaultdict, [c.Sized, c.Container, str])
  File "/tmp/cpython/Lib/functools.py", line 709, in _compose_mro
if sub not in bases and issubclass(cls, sub):
  File "/tmp/cpython/Lib/typing.py", line 1043, in __subclasscheck__
raise TypeError("Parameterized generics cannot be used with class "
TypeError: Parameterized generics cannot be used with class or instance checks

==
ERROR: test_mro_conflicts (test.test_functools.TestSingleDispatch)
--
Traceback (most recent call last):
  File "/tmp/cpython/Lib/functools.py", line 776, in dispatch
impl = dispatch_cache[cls]
  File "/tmp/cpython/Lib/test/test_functools.py", line 1896, in __getitem__
result = self.data[key]
KeyError: 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/cpython/Lib/functools.py", line 779, in dispatch
impl = registry[cls]
KeyError: 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/cpython/Lib/test/test_functools.py", line 1822, in 
test_mro_conflicts
h(c.defaultdict(lambda: 0))
  File "/tmp/cpython/Lib/functools.py", line 801, in wrapper
return dispatch(args[0].__class__)(*args, **kw)
  File "/tmp/cpython/Lib/functools.py", line 781, in dispatch
impl = _find_impl(cls, registry)
  File "/tmp/cpython/Lib/functools.py", line 732, in _find_impl
mro = _compose_mro(cls, registry.keys())
  File "/tmp/cpython/Lib/functools.py", line 709, in _compose_mro
if sub not in bases and issubclass(cls, sub):
  File "/tmp/cpython/Lib/typing.py", line 1043, in __subclasscheck__
raise TypeError("Parameterized generics cannot be used with class "
TypeError: Parameterized generics cannot be used with class or instance checks

==
ERROR: test_register_abc (test.test_functools.TestSingleDispatch)
--
Traceback (most recent call last):
  File "/tmp/cpython/Lib/functools.py", line 776, in dispatch
impl = dispatch_cache[cls]
  File "/tmp/cpython/Lib/test/test_functools.py", line 1896, in __getitem__
result = self.data[key]
KeyError: 

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File

[issue16399] argparse: append action with default list adds to list instead of overriding

2016-10-02 Thread Michał Klich

Michał Klich added the comment:

The documentation for argparse still does not mention this behaviour.
I decided to make a patch based no the optparse issue.
Hopefully it is good enough to be merged.

--
keywords: +patch
nosy: +michal.klich
Added file: http://bugs.python.org/file44934/append_to_default.patch

___
Python tracker 

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



[issue28334] netrc does not work if $HOME is not set

2016-10-02 Thread Dimitri Merejkowsky

Dimitri Merejkowsky added the comment:

> However, since we are changing the behavior of the netrc() class, I'm not 
> sure this can be considered as a bug fix.

I was not sure either. The patch does change behavior in subtle ways...

I've added a new patch, and sent the CLA form.

Thanks for your time!

--
Added file: 
http://bugs.python.org/file44933/netrc-use-expanduser-with-test.patch

___
Python tracker 

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



[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-02 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Oops forgot to commit deleted files in the 3.7 patch.

--
Added file: http://bugs.python.org/file44932/3.7-remove-macpath_ver2.patch

___
Python tracker 

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



[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-02 Thread Chi Hsuan Yen

Chi Hsuan Yen added the comment:

Here are my tries. There are more MacOS-specific module names in 
Tools/freeze/freeze.py. They are unrelated to macpath so I leave them to the 
next bug.

--
Added file: http://bugs.python.org/file44931/3.7-remove-macpath.patch

___
Python tracker 

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



[issue9850] obsolete macpath module dangerously broken and should be removed

2016-10-02 Thread Chi Hsuan Yen

Changes by Chi Hsuan Yen :


Added file: http://bugs.python.org/file44930/3.6-deprecate-macpath.patch

___
Python tracker 

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



[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2016-10-02 Thread Zachary Ware

Zachary Ware added the comment:

Do we not have a unit test for that?

--

___
Python tracker 

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



[issue28335] Exception reporting in `logging.config`

2016-10-02 Thread Ram Rachum

Ram Rachum added the comment:

You're right Vinay: I missed that first traceback because I wasn't running code 
in the console, I was running it with a debugger. (I'll ask my debugger vendor 
to maybe include these extra tracebacks.)

But in any case, I think that the correct way to raise would be with `from`, 
don't you think? (It's also more likely that debugger vendor would include 
these tracebacks rather than the "During handling" traceback.

--

___
Python tracker 

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



[issue28335] Exception reporting in `logging.config`

2016-10-02 Thread Vinay Sajip

Vinay Sajip added the comment:

This is marked as relevant to Python 3.7, so I ran a test script using the 
latest Python sources:

import logging
import logging.config
import sys

def main():
config = {
'version': 1,
'formatters': {
'default': {
'()': 'foo',
},
}
}
logging.config.dictConfig(config)


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

The exception printouts with/without "raise ... from" are shown in this Gist: 

https://gist.github.com/vsajip/a17b51695bbe16bd3c9e156405388e57

I can't see much difference in terms of figuring out where the exception came 
from. The only substantial difference is one line "During handling of the above 
exception, another exception occurred:" with another "The above exception was 
the direct cause of the following exception:".

--

___
Python tracker 

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



[issue28294] HTTPServer server.py assumes sys.stderr != None

2016-10-02 Thread Jaap van der Velde

Jaap van der Velde added the comment:

Breaking the API isn't good, but it will only break if log_message doesn't 
*receive* all messages, because that's what people who override it count on.

If there's some way of detecting who called log_message, you could use the 
appropriate log level on logging without compromising the API. But the only way 
I see without changing the signature of log_message is through inspect 
functions like getouterframes and that seems way nastier than these functions 
merit...

--

___
Python tracker 

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



[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2016-10-02 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

I wrote a patch to add the unpackiter_type initialization into PyInit__struct 
function. I has confirmed solve #28337 on ubuntu x86 16.04.

--
nosy: +masamoto
Added file: http://bugs.python.org/file44929/PyType_Ready-unpackiter_type.patch

___
Python tracker 

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



[issue28295] PyUnicode_AsUCS4 doc and impl conflict on exception

2016-10-02 Thread Xiang Zhang

Xiang Zhang added the comment:

v3 resolves comments on v2.

--
Added file: http://bugs.python.org/file44928/PyUnicode_AsUCS4_v3.patch

___
Python tracker 

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



[issue28227] gzip does not support pathlib

2016-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3f71d1a93053 by Berker Peksag in branch '3.6':
Issue #28227: gzip now supports pathlib
https://hg.python.org/cpython/rev/3f71d1a93053

New changeset b244bf74b638 by Berker Peksag in branch 'default':
Issue #28227: Merge from 3.6
https://hg.python.org/cpython/rev/b244bf74b638

--
nosy: +python-dev

___
Python tracker 

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



[issue28227] gzip does not support pathlib

2016-10-02 Thread Berker Peksag

Berker Peksag added the comment:

Thanks Ethan and Serhiy.

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



[issue28227] gzip does not support pathlib

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch LGTM.

--
assignee:  -> berker.peksag
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



[issue18287] PyType_Ready() should sanity-check the tp_name field

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch LGTM, but I think SystemError is more appropriate.

--
assignee:  -> serhiy.storchaka

___
Python tracker 

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



[issue18287] PyType_Ready() should sanity-check the tp_name field

2016-10-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
nosy: +serhiy.storchaka
versions: +Python 3.7 -Python 3.4

___
Python tracker 

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



[issue15727] PyType_FromSpecWithBases tp_new bugfix

2016-10-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
type: behavior -> crash
versions: +Python 3.5, Python 3.6, Python 3.7 -Python 3.2, 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



[issue15727] PyType_FromSpecWithBases tp_new bugfix

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Affected modules were tkinter and curses (see issue23815). This was fixed by 
explicit nullifying tp_new after calling PyType_FromSpec(). Issue26979 was open 
for documenting this danger effect.

--
nosy: +serhiy.storchaka

___
Python tracker 

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



[issue28227] gzip does not support pathlib

2016-10-02 Thread Berker Peksag

Berker Peksag added the comment:

By the way, for some reason it doesn't show up at 
https://bugs.python.org/review/28227/patch/18629/74286

--

___
Python tracker 

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



[issue28227] gzip does not support pathlib

2016-10-02 Thread Berker Peksag

Berker Peksag added the comment:

You're right. I definitely missed that one. Here is an updated patch. Thanks 
again!

--
Added file: http://bugs.python.org/file44927/issue28227_v3.diff

___
Python tracker 

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



[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Berker!

This was temporary change for debugging. I forgot to remove it.

--

___
Python tracker 

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



[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e2d4e077cfb2 by Berker Peksag in branch '3.6':
Issue #27358: Fix typo in error message
https://hg.python.org/cpython/rev/e2d4e077cfb2

New changeset 9abb316f1593 by Berker Peksag in branch 'default':
Issue #27358: Merge from 3.6
https://hg.python.org/cpython/rev/9abb316f1593

--

___
Python tracker 

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



[issue28227] gzip does not support pathlib

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

You missed one my comment. GzipFile.name is not converted in write mode.

--

___
Python tracker 

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



[issue26906] format(object.__reduce__) fails intermittently

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Similar bug just was introduced in issue21124.

--
priority: normal -> high
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



[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

PyType_Ready() should be called for unpackiter_type.

See also issue26906.

--
nosy: +serhiy.storchaka
resolution: fixed -> 
stage: resolved -> 
status: closed -> open

___
Python tracker 

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



[issue28338] test_pdb doctests have been removed from its test suite

2016-10-02 Thread Xavier de Gaye

Changes by Xavier de Gaye :


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



[issue28338] test_pdb doctests have been removed from its test suite

2016-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7fe1f23ec60a by Xavier de Gaye in branch '3.6':
Issue #28338: Restore test_pdb doctests.
https://hg.python.org/cpython/rev/7fe1f23ec60a

New changeset d23ac799fe83 by Xavier de Gaye in branch 'default':
Issue #28338: Merge from 3.6.
https://hg.python.org/cpython/rev/d23ac799fe83

--

___
Python tracker 

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



[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you for you contribution Oren.

Rules for promotion unsinged integers to signed integers are not simple. I 
changed PyLong_FromLong() to PyLong_FromUnsignedLong() for the clarity.

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



[issue28332] silent truncations in socket.htons and socket.ntohs

2016-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3da460ca854b by Serhiy Storchaka in branch 'default':
Issue #28332: Deprecated silent truncations in socket.htons and socket.ntohs.
https://hg.python.org/cpython/rev/3da460ca854b

--
nosy: +python-dev

___
Python tracker 

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



[issue20766] reference leaks in pdb

2016-10-02 Thread Xavier de Gaye

Xavier de Gaye added the comment:

> And indeed, this changeset has removed entirely the doctests from the test 
> suite :(

Entered new issue 28338.

--

___
Python tracker 

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



[issue28337] Segfault in _struct.unpack_iterator

2016-10-02 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

I made a mistake that is issue number. The correct issue number is #21124.

--

___
Python tracker 

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



[issue28338] test_pdb doctests have been removed from its test suite

2016-10-02 Thread Xavier de Gaye

New submission from Xavier de Gaye:

Changeset ee0bbfd972de in issue 18401 has removed the doctests from the pdb 
test suite as can be seen by running test_pdb in verbose mode. See also 
msg277864 that triggered the creation of this issue.

Nosying members of the issue 18401 nosy list.

--
assignee: xdegaye
components: Tests
messages: 277868
nosy: lukasz.langa, ncoghlan, numerodix, python-dev, r.david.murray, 
ronaldoussoren, sam.kimbrel, sptonkin, terry.reedy, xdegaye
priority: normal
severity: normal
status: open
title: test_pdb doctests have been removed from its test suite
type: behavior
versions: Python 3.6, Python 3.7

___
Python tracker 

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



[issue28337] Segfault in _struct.unpack_iterator

2016-10-02 Thread Masayuki Yamamoto

New submission from Masayuki Yamamoto:

After #21224 was applied into default branch, the _struct.unpack_iterator has 
crashed by segfault.

reproduce segfault:
$ uname -a
Linux masayuki-P35-DS3 4.4.0-38-generic #57-Ubuntu SMP Tue Sep 6 15:41:41 UTC 
2016 i686 i686 i686 GNU/Linux
$ hg update -C -r "branch(default)"
$ ./configure --prefix=/opt/py35 --without-threads --with-system-ffi 
--with-system-expat
$ make
(build succeed)
$ ./python 
Python 3.7.0a0 (default:6f299f7d6643, Oct  2 2016, 17:50:08) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import struct
>>> it = struct.iter_unpack('b', b'123')
>>> type(it)
(segfault happens)

--
components: Extension Modules
messages: 277867
nosy: mark.dickinson, masamoto, meador.inge, zach.ware
priority: normal
severity: normal
status: open
title: Segfault in _struct.unpack_iterator
type: crash
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



[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Berker Peksag

Berker Peksag added the comment:

test_unpack_ex fails on several buildbots:

http://buildbot.python.org/all/builders/x86-64%20Ubuntu%2015.10%20Skylake%20CPU%203.6/builds/120/steps/test/logs/stdio

test test_unpack_ex failed
**
File 
"/home/buildbot/buildarea/3.6.intel-ubuntu-skylake/build/Lib/test/test_unpack_ex.py",
 line ?, in test.test_unpack_ex.__test__.doctests
Failed example:
{**1}
Expected:
Traceback (most recent call last):
...
TypeError: 'int' object is not a mapping
Got:
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.6.intel-ubuntu-skylake/build/Lib/doctest.py", line 
1330, in __run
compileflags, 1), test.globs)
  File "", line 1, in 

{**1}
TypeError: 'int' object is not a mapping1
**
File 
"/home/buildbot/buildarea/3.6.intel-ubuntu-skylake/build/Lib/test/test_unpack_ex.py",
 line ?, in test.test_unpack_ex.__test__.doctests
Failed example:
{**[]}
Expected:
Traceback (most recent call last):
...
TypeError: 'list' object is not a mapping
Got:
Traceback (most recent call last):
  File 
"/home/buildbot/buildarea/3.6.intel-ubuntu-skylake/build/Lib/doctest.py", line 
1330, in __run
compileflags, 1), test.globs)
  File "", line 1, in 

{**[]}
TypeError: 'list' object is not a mapping1
**
1 items had failures:
   2 of  85 in test.test_unpack_ex.__test__.doctests
***Test Failed*** 2 failures.

--
nosy: +berker.peksag

___
Python tracker 

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



[issue28227] gzip does not support pathlib

2016-10-02 Thread Berker Peksag

Berker Peksag added the comment:

I've addressed all of Serhiy's review comments. Thanks!

--
Added file: http://bugs.python.org/file44926/issue28227_v2.diff

___
Python tracker 

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



[issue20766] reference leaks in pdb

2016-10-02 Thread Xavier de Gaye

Xavier de Gaye added the comment:

Oh, test_pdb does not fail anymore in refleak mode as expected (see msg212510 
for the change to apply to test_pdb.py in order to reproduce that). 'hg bisect' 
says that this is happening since:

  The first bad revision is:
  changeset:   103552:ee0bbfd972de
  user:Łukasz Langa 
  date:Fri Sep 09 22:21:17 2016 -0700
  summary: Issue #18401: pdb tests don't read ~/.pdbrc anymore

And indeed, this changeset has removed entirely the doctests from the test 
suite :(

--

___
Python tracker 

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



[issue20766] reference leaks in pdb

2016-10-02 Thread Xavier de Gaye

Xavier de Gaye added the comment:

The problem may still be reproduced by running the attached pdb_refleak.py 
script. Enter three times 'c' (short for the pdb 'continue' command) and the 
following line is printed:

pdb 3 -> pdb 2 -> pdb 1

This shows that the third pdb instance 'pdb 3', owns indirectly a reference to 
the second and first pdb instances. As the _signal extension module owns a 
reference to 'pdb 3' through its sigint_handler() method, then it also owns 
indirectly a reference to 'pdb 1'.

--
Added file: http://bugs.python.org/file44925/pdb_refleak.py

___
Python tracker 

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



[issue20254] Duplicate bytearray test on test_socket.py

2016-10-02 Thread Berker Peksag

Berker Peksag added the comment:

Thanks!

--
nosy: +berker.peksag
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
versions: +Python 3.6, Python 3.7 -Python 3.4

___
Python tracker 

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



[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 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



[issue20254] Duplicate bytearray test on test_socket.py

2016-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6406322f4749 by Berker Peksag in branch '3.5':
Issue #20254: Fix duplicate tests in test_socket
https://hg.python.org/cpython/rev/6406322f4749

New changeset ac9734540eb7 by Berker Peksag in branch '3.6':
Issue #20254: Merge from 3.5
https://hg.python.org/cpython/rev/ac9734540eb7

New changeset 7dab3c6ac42f by Berker Peksag in branch 'default':
Issue #20254: Merge from 3.6
https://hg.python.org/cpython/rev/7dab3c6ac42f

--
nosy: +python-dev

___
Python tracker 

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



[issue28257] Regression for star argument parameter error messages

2016-10-02 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch with smaller (in comparison with issue27358) change for 3.5 
that improves error message when pass a non-mapping as second var-keyword 
argument.

Unpatched:

>>> f(**{'a': 1}, **[])
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'list' object is not a mapping
>>> f(**{'a': 1}, **0)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: 'int' object is not iterable

Patched:

>>> f(**{'a': 1}, **[])
Traceback (most recent call last):
  File "", line 1, in 
TypeError: f() argument after ** must be a mapping, not list
>>> f(**{'a': 1}, **0)
Traceback (most recent call last):
  File "", line 1, in 
TypeError: f() argument after ** must be a mapping, not int

--
assignee:  -> serhiy.storchaka
priority: deferred blocker -> normal
versions: +Python 3.5 -Python 3.6, Python 3.7
Added file: 
http://bugs.python.org/file44924/build-map-unpack-with-call-error-messages-3.5.patch

___
Python tracker 

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



[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 148172f75d43 by Serhiy Storchaka in branch '3.6':
Issue #27358: Optimized merging var-keyword arguments and improved error
https://hg.python.org/cpython/rev/148172f75d43

New changeset 489ad68b35c0 by Serhiy Storchaka in branch 'default':
Issue #27358: Optimized merging var-keyword arguments and improved error
https://hg.python.org/cpython/rev/489ad68b35c0

New changeset ec84d815e90f by Serhiy Storchaka in branch '3.5':
Issue #27358: Backported tests.
https://hg.python.org/cpython/rev/ec84d815e90f

New changeset 29a658d47ae8 by Serhiy Storchaka in branch '2.7':
Issue #27358: Backported tests.
https://hg.python.org/cpython/rev/29a658d47ae8

--
nosy: +python-dev

___
Python tracker 

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



[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-10-02 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
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



[issue28257] Regression for star argument parameter error messages

2016-10-02 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 88b319dfc909 by Serhiy Storchaka in branch '3.6':
Issue #28257: Improved error message when pass a non-iterable as
https://hg.python.org/cpython/rev/88b319dfc909

New changeset bde594cd8369 by Serhiy Storchaka in branch 'default':
Issue #28257: Improved error message when pass a non-iterable as
https://hg.python.org/cpython/rev/bde594cd8369

New changeset 40d7ce58ebd0 by Serhiy Storchaka in branch '3.5':
Issue #28257: Backported a test.
https://hg.python.org/cpython/rev/40d7ce58ebd0

New changeset a8168a52a56f by Serhiy Storchaka in branch '2.7':
Issue #28257: Backported a test.
https://hg.python.org/cpython/rev/a8168a52a56f

--
nosy: +python-dev

___
Python tracker 

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