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

2016-09-29 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

use the logging module instead of sys.stderr

--
keywords: +patch
Added file: http://bugs.python.org/file44890/issue28294.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-09-29 Thread Xiang Zhang

Xiang Zhang added the comment:

v2 now adds more tests and change the problematic variable name.

--
Added file: http://bugs.python.org/file44889/PyUnicode_AsUCS4_v2.patch

___
Python tracker 

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



[issue28199] Compact dict resizing is doing too much work

2016-09-29 Thread INADA Naoki

INADA Naoki added the comment:

As written in comment, reusing keys object breaks odict implementation.
I think we can't avoid copy for Python 3.6.

--
keywords: +patch
Added file: http://bugs.python.org/file44888/dictresize.patch

___
Python tracker 

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



[issue28226] compileall does not support pathlib

2016-09-29 Thread Berker Peksag

Changes by Berker Peksag :


Added file: http://bugs.python.org/file44887/issue28226_v3.diff

___
Python tracker 

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



[issue28226] compileall does not support pathlib

2016-09-29 Thread Berker Peksag

Berker Peksag added the comment:

> Is there a fix for compileall missing from the patch?

No, os.path.* functions have taken care of the conversion, but the output was 
in the following format:

Compiling PosixPath('/tmp/tmp_nfh98lw/_test.py')...

I fixed it, added a test for the ddir argument and simplified tests a bit.

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

___
Python tracker 

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



[issue27100] Attempting to use class with both __enter__ & __exit__ undefined yields __exit__ attribute error

2016-09-29 Thread Nick Coghlan

Nick Coghlan added the comment:

Due to the expected semantics of AttributeError being relatively precise, 
changing to a protocol check rather than just changing the order we look up the 
protocol attributes would also involving changing from AttributeError to 
TypeError.

Since that's a potentially more disruptive change and just changing the order 
of the checks is likely sufficient to reduce confusion, the latter approach is 
preferable, at least for now (if folks are still getting confused by the time 
3.7 rolls around, then that option would be worth reconsidering).

--

___
Python tracker 

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



[issue27854] Installed 2.7: IDLE Help disabled because help.html is missing

2016-09-29 Thread Ned Deily

Changes by Ned Deily :


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



[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2016-09-29 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Updated the documentation to use  instead of ?

I also went through other examples in the page and fixed those too.

--
keywords: +patch
Added file: http://bugs.python.org/file44885/issue28315.patch

___
Python tracker 

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



[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2016-09-29 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

Thanks for the report. I agree, it should be  instead of ?

I'll work on a patch for this :)

--

___
Python tracker 

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



[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2016-09-29 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



[issue28228] imghdr does not support pathlib

2016-09-29 Thread Berker Peksag

Berker Peksag added the comment:

Here's a new patch that addresses Serhiy's comments.

Let me know if you need a hand with review and commit these patches this 
weekend :)

--
nosy: +berker.peksag
Added file: http://bugs.python.org/file44884/issue28228_v2.diff

___
Python tracker 

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



[issue28315] incorrect "in ?" output in 'divide' example at "Defining Clean-up Actions" in tutorial

2016-09-29 Thread Viorel Tabara

New submission from Viorel Tabara:

At https://docs.python.org/3.5/tutorial/errors.html#defining-clean-up-actions 
when I'm running the "divide('2', '1')" example I get:

  File "", line 1, in 

instead of the documentation output of:

   File "", line 1, in ? 

The same message is included with the 2.7 tutorial.

To wit:

   $ python3
   Python 3.5.2 (default, Sep 14 2016, 11:28:32)
   [GCC 6.2.1 20160901 (Red Hat 6.2.1-1)] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> def divide(x, y):
   ... try:
   ... result = x / y
   ... except ZeroDivisionError:
   ... print('division by zero!')
   ... else:
   ... print('result is', result)
   ... finally:
   ... print('executing finally clause')
   ...
   >>> divide(2, 1)
   result is 2.0
   executing finally clause
   >>> divide(2, 0)
   division by zero!
   executing finally clause
   >>> divide('2', '1')
   executing finally clause
   Traceback (most recent call last):
   File "", line 1, in 
   File "", line 3, in divide
   TypeError: unsupported operand type(s) for /: 'str' and 'str'


   $ python2
   Python 2.7.12 (default, Sep  2 2016, 15:40:50)
   [GCC 6.2.1 20160901 (Red Hat 6.2.1-1)] on linux2
   Type "help", "copyright", "credits" or "license" for more information.
   >>> def divide(x, y):
   ... result = x / y
   KeyboardInterrupt
   >>> def divide(x, y):
   ... try:
   ... result = x / y
   ... except ZeroDivisionError:
   ... print('division by zero!')
   ... else:
   ... print('result is', result)
   ... finally:
   ... print('executing finally clause')
   ...
   >>> divide(2, 1)
   ('result is', 2)
   executing finally clause
   >>> divide(2, 0)
   division by zero!
   executing finally clause
   >>> divide('2', '1')
   executing finally clause
   Traceback (most recent call last):
   File "", line 1, in 
   File "", line 3, in divide
   TypeError: unsupported operand type(s) for /: 'str' and 'str'
  

Nice tutorial by the way ;) Thanks!

--
assignee: docs@python
components: Documentation
messages: 277731
nosy: docs@python, viorel
priority: normal
severity: normal
status: open
title: incorrect "in ?" output in 'divide' example at "Defining Clean-up 
Actions" in tutorial
type: behavior
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



[issue23740] http.client request and send method have some datatype issues

2016-09-29 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



[issue28313] ttk Style().configure() overwrites Tk().option_add() Button but not Label

2016-09-29 Thread qubodup

qubodup added the comment:

Thank you for clarifying, reported at 
http://core.tcl.tk/tk/tktview/1dde2144bdcc5a93f8724fc1b1b85b19114e42c0

--

___
Python tracker 

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



[issue21879] str.format() gives poor diagnostic on placeholder mismatch

2016-09-29 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



[issue28222] test_distutils fails

2016-09-29 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



[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Oren Milman

Oren Milman added the comment:

Ah, I should have read more about __int__ and __index__ before writing my last 
reply.
So IIUC, this is a somewhat painful issue, which could be resolved by:
* #20092
* replacing _PyLong_FromNbInt with PyNumber_Index in:
- Objects/longobject.c (as you suggested in 
https://bugs.python.org/issue12965#msg146252)
- Modules/zlibmodule.c in ssize_t_converter
I didn't find any issue for the second one. If there is really no such issue, 
why is that? (I am sorry if I am the thousandth one to ask)
The first paragraph of your comment in 
https://bugs.python.org/issue2#msg215660 suggests it might break a lot of 
code in the wild, but shouldn't we start with raising a deprecation warning?

With regard to my patch - should I make the following changes?
1. in Modules/arraymodule.c - add a call to PyNumber_Index before the call 
to _PyLong_FromNbInt (and move them into a helper function, as done in 
Modules/_struct.c)
2. in Lib/test/test_array.py:
* replace the name 'LikeInt' with 'IntCompatible' (I am not sure this 
is an appropriate name either. If you have a better name in mind, please share 
:) )
* add tests for LikeInt (this time, a class with a __index__ method)
3. In Doc/library/array.rst:
* add a note saying that setting int-like objects (i.e. objects with 
__index__) to items in an integers array is possible
* while we are here, remove the note about the availability of 'q' and 
'Q' only in certain platforms

--

___
Python tracker 

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



[issue28228] imghdr does not support pathlib

2016-09-29 Thread Brett Cannon

Brett Cannon added the comment:

According to https://www.python.org/dev/peps/pep-0494/#schedule, 2.6.0b2 is due 
on Sunday. Do you think you will be able to commit this and the other patches 
for PathLike support by then, Ethan?

--

___
Python tracker 

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



[issue28313] ttk Style().configure() overwrites Tk().option_add() Button but not Label

2016-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is not Tkinter issue. Pure Tcl/Tk script shows the same result. If this is 
a bug (I don't know), this is Tk bug.

--
nosy: +serhiy.storchaka
resolution:  -> third party
stage:  -> resolved
status: open -> closed
Added file: http://bugs.python.org/file44883/issue28313.tcl

___
Python tracker 

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



[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 17f2b6b2e24c by Victor Stinner in branch '3.5':
Issue #28258: Explain the LC_ALL change in a comment
https://hg.python.org/cpython/rev/17f2b6b2e24c

New changeset f256bd5b8418 by Victor Stinner in branch '2.7':
Issue #28258: Explain the LC_ALL change in a comment
https://hg.python.org/cpython/rev/f256bd5b8418

--

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a test.

--
Added file: http://bugs.python.org/file44882/test_getiterator.patch

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread STINNER Victor

STINNER Victor added the comment:

I pushed the first obvious fix to unblock the 3.6 beta 2 release scheduled for 
next monday.

--
priority: release blocker -> 

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Serhiy Storchaka

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1e29dca5dc4c by Victor Stinner in branch '3.6':
Fix xml.etree.ElementTree.Element.getiterator()
https://hg.python.org/cpython/rev/1e29dca5dc4c

--
nosy: +python-dev

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread STINNER Victor

Changes by STINNER Victor :


--
priority: critical -> release blocker

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread STINNER Victor

STINNER Victor added the comment:

Oh... Modules/_elementtree.c uses a function defined in 
Modules/clinic/_elementtree.c. It hardcodes flags, whereas flags changed.

Maybe the alias should be created differently to avoid such issue in the future?

Moreover, obviously, we lack unit tests on this getiterator() method.

--
keywords: +patch
Added file: http://bugs.python.org/file44881/etree.patch

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread STINNER Victor

STINNER Victor added the comment:

The bug seems related to the new FASTCALL calling convention introduced in 
Python 3.6b1. For an unknown reason, the METH_FASTCALL defined in 
Modules/clinic/_elementtree.c on _elementtree_Element_iter() seems to be 
ignored or lost somewhere?

--
nosy: +haypo

___
Python tracker 

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



[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

> Oh. I expected at least "export LANG" somewhere. IMHO it deserves a comment
> explaining the surprising ";".

I don't know if export is needed. I see the same behavior with and without 
export.

> Does it work if it's written on two lines?

No, it doesn't work.

--

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Ned Deily

Ned Deily added the comment:

Even better:

Python 3.6.0b1 (v3.6.0b1:5b0ca4ed5e2f, Sep 12 2016, 09:24:46)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from xml.etree.ElementTree import Element
>>> el = Element('foo')
>>> el.getiterator('bar')
Segmentation fault: 11

--
nosy: +ned.deily
priority: normal -> critical
stage:  -> needs patch
type: behavior -> 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



[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy Storchaka added the comment:
> It looks to me that the patch contain unneeded changes. Some changes don't 
> affect performance, others don't look well justified. Are there benchmarks 
> that confirm the benefit of these changes?

Hum, since I expect disagreements on the changes, I propose to split
the patch into two parts: minimum change to optimize, and a second
change (later, once the first one is merged) to cleanup further the
code.

"Some changes don't affect performance"

Well, a cleanup is supposed to not affect performances at all :-)

--

___
Python tracker 

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



[issue28314] ElementTree: Element.getiterator(tag) broken in 3.6

2016-09-29 Thread Dmitry Shachnev

New submission from Dmitry Shachnev:

The documentation says that getiterator() still accepts a tag argument, but it 
does not:

>>> from xml.etree.ElementTree import Element
>>> el = Element('foo')
>>> el.getiterator('bar')
Traceback (most recent call last):
  File "", line 1, in 
SystemError: ../Python/getargs.c:1508: bad argument to internal function
>>> el.getiterator(tag='bar')
Traceback (most recent call last):
  File "", line 1, in 
TypeError: iter() takes at most 1 argument (140172072006928 given)

This is with Python 3.6.0 beta 1 on Debian GNU/Linux amd64.

--
components: Library (Lib)
messages: 277717
nosy: mitya57
priority: normal
severity: normal
status: open
title: ElementTree: Element.getiterator(tag) broken in 3.6
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



[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread STINNER Victor

STINNER Victor added the comment:

"Expansion is performed here by shell (spawned by make) itself before arguments 
are passed to find. So LC_ALL=C must be set as a separate command."

Oh. I expected at least "export LANG" somewhere. IMHO it deserves a comment 
explaining the surprising ";".

Does it work if it's written on two lines?

--

___
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-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

In general the patch LGTM. I have small doubt about the name of one variable, 
and may be worth to add yet few tests.

--

___
Python tracker 

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



[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

It looks to me that the patch contain unneeded changes. Some changes don't 
affect performance, others don't look well justified. Are there benchmarks that 
confirm the benefit of these changes?

--

___
Python tracker 

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



[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is the question that I asked Arfrever.

--

___
Python tracker 

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



[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread STINNER Victor

STINNER Victor added the comment:

"LC_ALL=C; find" are you sure for ";"?

--

___
Python tracker 

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



[issue18378] locale.getdefaultlocale() fails on Mac OS X with default language set to English

2016-09-29 Thread Lawrence Velázquez

Changes by Lawrence Velázquez :


--
nosy: +larryv

___
Python tracker 

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



[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee: twouters -> serhiy.storchaka
resolution:  -> fixed
stage:  -> resolved
status: open -> closed
type:  -> compile error
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



[issue28258] Broken python-config generated with Estonian locale

2016-09-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6110997dd6e7 by Serhiy Storchaka in branch '3.5':
Issue #28258: Fixed build with Estonian locale (python-config and distclean
https://hg.python.org/cpython/rev/6110997dd6e7

New changeset 1b9e71f5de83 by Serhiy Storchaka in branch '3.6':
Issue #28258: Fixed build with Estonian locale (python-config and distclean
https://hg.python.org/cpython/rev/1b9e71f5de83

New changeset a2c5179bce01 by Serhiy Storchaka in branch 'default':
Issue #28258: Fixed build with Estonian locale (python-config and distclean
https://hg.python.org/cpython/rev/a2c5179bce01

New changeset f2247d1cb884 by Serhiy Storchaka in branch '2.7':
Issue #28258: Fixed build with Estonian locale (distclean target in
https://hg.python.org/cpython/rev/f2247d1cb884

--
nosy: +python-dev

___
Python tracker 

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



[issue28289] ImportError.__init__ doesn't reset not specified exception attributes

2016-09-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dcb39d3ba67a by Serhiy Storchaka in branch 'default':
Issue #28289: ImportError.__init__ now resets not specified attributes.
https://hg.python.org/cpython/rev/dcb39d3ba67a

--
nosy: +python-dev

___
Python tracker 

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



[issue28278] Make `weakref.WeakKeyDictionary.__repr__` meaningful

2016-09-29 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr. added the comment:

I don't recall that the issues discussed here were considered when these 
classes were added; functionality was the issue at the time.

I'm not particularly opposed to adding a more data-ful repr for the 
weakref-oriented mappings, but I'm not really convinced they'd be all that 
valuable, either.  Interesting mappings are often too well populated to deal 
with using repr.

--

___
Python tracker 

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



[issue28201] dict: perturb shift should be done when first conflict

2016-09-29 Thread INADA Naoki

INADA Naoki added the comment:

Could anyone review the patch?
I'm starting to #28199.  But it must conflict with this patch.

--
assignee:  -> inada.naoki

___
Python tracker 

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



[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Mark Dickinson

Mark Dickinson added the comment:

> and got a 'TypeError: an integer is required (got type LikeInt)'

Right, see #12974 for more on arrays, `__int__` and `__index__`.

--

___
Python tracker 

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



[issue28313] ttk Style().configure() overwrites Tk().option_add() Button but not Label

2016-09-29 Thread qubodup

New submission from qubodup:

The following code will result in a small label and a big button:

from tkinter import *
from tkinter.ttk import *

root = Tk()

root.option_add("*Font", "sans-serif 12")

s = Style()
s.configure('TButton', font=('courier', 40))
s.configure('TLabel', font=('courier', 40))

Label(root, text="lbl").pack()
Button(root, text="bttn").pack()

root.mainloop()


It seems to me that both should have the same style. Removing the 
root.option_add line fixes it of course but this is a stripped-down example and 
in other cases it might be needed.

--
components: Tkinter
files: 1475162805-.png
messages: 277706
nosy: qubodup
priority: normal
severity: normal
status: open
title: ttk Style().configure() overwrites Tk().option_add() Button but not Label
type: behavior
versions: Python 3.5
Added file: http://bugs.python.org/file44880/1475162805-.png

___
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-09-29 Thread Mariatta Wijaya

Mariatta Wijaya added the comment:

I'm interested to work on a patch for this, if no one started yet.

--

___
Python tracker 

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



[issue27942] Default value identity regression

2016-09-29 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



[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Oren Milman

Oren Milman added the comment:

You are right about the terminology of course. My bad.

Anyway, the bug is not related to __index__ (or nb_index), because the three 
aforementioned functions are using (in case '!PyLong_Check(v)') PyArg_Parse 
with the formats 'l' or 'L'.
Ultimately, convertsimple (in Python/getargs.c) would call PyLong_AsLong or 
PyLong_AsLongLong (respectively).
These two (in case '!PyLong_Check(v)') only try to use nb_int, as documented:
* 
https://docs.python.org/3.7/c-api/long.html?highlight=pylong_aslong#c.PyLong_AsLong
* 
https://docs.python.org/3.7/c-api/long.html?highlight=pylong_aslong#c.PyLong_AsLongLong

But just in case, I ran the following:
import array
class LikeInt:
def __init__(self, intVal):
self.intVal = intVal
def __index__(self):
return self.intVal
array.array('L').append(LikeInt(0))
and got a 'TypeError: an integer is required (got type LikeInt)'

--

___
Python tracker 

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



[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks for the correction Antti. Yes, this is what I initially meant. This 
optimization is applicable only if the left argument of % is a literal string 
and the right argument is a tuple expression. Saying about `'%s' % x` I meant a 
component of the tuple.

--

___
Python tracker 

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



[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Antti Haapala

Antti Haapala added the comment:

Serhiy, you actually did make a mistake above; `'%s' % x` cannot be rewritten 
as `f'{x!s}'`, only `'%s' % (x,)` can be optimized... 

(just try with `x = 1, 2`)

--
nosy: +ztane

___
Python tracker 

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



[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Please wait until I merge my changes.

--

___
Python tracker 

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



[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

'%s' % x should be translated to f'{x!s}', not to f'{x:s}'. Only %s, %r and %a 
can be supported. Formatting with %i should left untranslated. Or maybe 
translate '%r: %i' % (a, x) to f'{a!r}: {"%i" % x}'.

It is possible also to introduce special opcodes that converts argument to 
exact int or float. Then '%06i' % x could be translated to 
f'{__exact_int__(x):06}'.

--

___
Python tracker 

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



[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread STINNER Victor

STINNER Victor added the comment:

dict_iter7.patch LGTM, go ahead. Just dont forget to mention Serhiy Storchaka 
as the co-author ;-)

--

___
Python tracker 

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



[issue28310] Mixing yield and return with value is allowed

2016-09-29 Thread STINNER Victor

STINNER Victor added the comment:

> The return value is ignored and an empty generator is produced.

It's not ignored: it is passed in the argument of the StopIterator object.

> You can read https://www.python.org/dev/peps/pep-0380 for the entire story.

See also the PEP 479 (Change StopIteration handling inside generators) and PEP 
492 (Coroutines with async and await syntax).

In short, it's a nice Python 3 feature, not a bug ;-)

--
nosy: +haypo

___
Python tracker 

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



[issue28277] ./Modules/_io/_iomodule.c build failure on AIX (beta1) while (a2) was fine.

2016-09-29 Thread Michael Felt

Michael Felt added the comment:

yes. It is what I did manually. Thanks!

--

___
Python tracker 

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



[issue28310] Mixing yield and return with value is allowed

2016-09-29 Thread Xiang Zhang

Xiang Zhang added the comment:

`return value` is allowed in a generator to support `yield from'. You can read 
https://www.python.org/dev/peps/pep-0380 for the entire story.

--
nosy: +xiang.zhang
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



[issue28312] Minor change - more direct hint re: multiple machine sizes and LONG_BIT conflicts

2016-09-29 Thread Michael Felt

New submission from Michael Felt:

I have been trying to build (pip install) mercurial - for ages. I kept running 
into this message:

"/opt/include/python2.7/pyport.h", line 887.2: 1506-205 (S) #error 
"LONG_BIT definition appears wrong for platform (bad gcc/glibc config?)."

And - finally, I figured out what I -- WAS -- doing wrong.

I package python as 64-bit, but when I just install python and then try pip 
install mercurial the message shows up.

The problem goes away when I first export OBJECT_MODE

export OBJECT_MODE=64

The little enhancement would be to change the hint from

... (bad gcc/glibc config?) to something that hints at
machine size, e.g., (bad default bit-size for compiler?)

--
messages: 277695
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: Minor change - more direct hint re: multiple machine sizes and LONG_BIT 
conflicts
type: enhancement

___
Python tracker 

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



[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Eric V. Smith

Eric V. Smith added the comment:

There isn't a direct mapping between %-formatting and __format__ format 
specifiers. Off the top of my head, I can think of at least one difference:

>>> '%i' % 3
'3'
>>> '{:i}'.format(3)
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Unknown format code 'i' for object of type 'int'

So you'll need to be careful with edge cases like this.

Also, for all usages of %s, remember to call str() (or add !s):

>>> '%s' % 1
'1'
>>> f'{1:s}'
Traceback (most recent call last):
  File "", line 1, in 
ValueError: Unknown format code 's' for object of type 'int'
>>> f'{1!s:s}'
'1'

Although that also reminds me of this default alignment difference:
>>> x=0
>>> '%2s' % x
' 0'
>>> f'{x!s:2s}'
'0 '
>>> f'{x!s:>2s}'
' 0'

So, in general, the mapping will be difficult. On the other hand, if you can do 
it, and provide a function that maps between %-formatting codes and __format__ 
codes, then that might be a generally useful tool.

--

___
Python tracker 

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



[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file44879/dict_iter7.patch

___
Python tracker 

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



[issue28308] Accelerate 'string'.format(value, ...) by using formatted string literals

2016-09-29 Thread Eric V. Smith

Eric V. Smith added the comment:

One thing to be careful of here is that there's one slight difference between 
how str.format() and f-strings handle indexing of values. f-strings, of course, 
use normal Python semantics, but 
str.format() treats indexing by things that don't look like integers as string 
literals, not variables. It's an unfortunate left-over from the original 
PEP-3101 specification:

>>> d = {'a':'string', 0:'integer'}
>>> a = 0
>>> f'{d[0]}'
'integer'
>>> '{d[0]}'.format(d=d)
'integer'
>>> f'{d[a]}'
'integer'
>>> '{d[a]}'.format(d=d)
'string'

Note that the exact same expression {d[a]} is evaluated differently by the two 
ways to format.

There's a test for this in test_fstring.py.

Someday, I'd like to deprecate this syntax in str.format(). I don't think it 
could ever be added back in, because it requires either additional named 
parameters which aren't used as formatting parameters, or it requires 
global/local lookups (which isn't going to happen).

i.e., this:
'{d[a]}'.format(d=d, a=a)

--

___
Python tracker 

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



[issue28311] AIX shared library extension modules installation broken - Python2.7

2016-09-29 Thread Michael Felt

Changes by Michael Felt :


--
type: compile error -> behavior

___
Python tracker 

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



[issue28311] AIX shared library extension modules installation broken - Python2.7

2016-09-29 Thread Michael Felt

Changes by Michael Felt :


--
type:  -> compile error

___
Python tracker 

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



[issue28311] AIX shared library extension modules installation broken - Python2.7

2016-09-29 Thread Michael Felt

New submission from Michael Felt:

issue#25825 is closed - and had python2.7 removed - so, want to mention there 
is something broken - a long time it would seem on AIX - for building packages 
after python and ensurepip are installed.

Currently trying to pip install mercurial; later a regular "make build"

PIP INSTALL

running build_ext
building 'mercurial.base85' extension
creating build/temp.aix-5.3-2.7
creating build/temp.aix-5.3-2.7/mercurial
xlc_r -I/opt/include -I/opt/buildaix/include -O2 -DNDEBUG -O 
-I/opt/include/python2.7 -c mercurial/base85.c -o 
build/temp.aix-5.3-2.7/mercurial/base85.o
./Modules/ld_so_aix xlc_r -bI:./Modules/python.exp 
build/temp.aix-5.3-2.7/mercurial/base85.o -o 
build/lib.aix-5.3-2.7/mercurial/base85.so
unable to execute './Modules/ld_so_aix': No such file or directory
error: command './Modules/ld_so_aix' failed with exit status 1


Command "/opt/bin/python -c "import setuptools, 
tokenize;__file__='/tmp/pip-build-zmElG2/mercurial/setup.py';exec(compile(getattr(tokenize,
 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" 
install --record /tmp/pip-0lo0Bk-record/install-record.txt 
--single-version-externally-managed --compile" failed with error code 1 in 
/tmp/pip-build-zmElG2/mercurial

MAKE BUILD
root@x064:[/data/prj/python/mercurial/mercurial-3.9.1]/opt/bin/make 
PREFIX=/opt/ build
python setup.py  build
running build
running build_mo
running build_py
copying mercurial/__modulepolicy__.py -> build/lib.aix-5.3-2.7/mercurial
running build_ext
building 'mercurial.base85' extension
xlc_r -I/opt/include -I/opt/buildaix/include -O2 -DNDEBUG -O 
-I/opt/include/python2.7 -c mercurial/base85.c -o 
build/temp.aix-5.3-2.7/mercurial/base85.o
./Modules/ld_so_aix xlc_r -bI:./Modules/python.exp 
build/temp.aix-5.3-2.7/mercurial/base85.o -o 
build/lib.aix-5.3-2.7/mercurial/base85.so
unable to execute './Modules/ld_so_aix': No such file or directory
error: command './Modules/ld_so_aix' failed with exit status 1
Makefile:55: recipe for target 'build' failed
make: *** [build] Error 1


Problem seems to be in _sysconfigdata.py

root@x064:[/opt/lib/python2.7]grep ld_so_aix *.py
_sysconfigdata.py: 'BLDSHARED': './Modules/ld_so_aix xlc_r 
-bI:./Modules/python.exp',
_sysconfigdata.py: 'LDCXXSHARED': '/opt/lib/python2.7/config/ld_so_aix xlc_r 
-bI:/opt/lib/python2.7/config/python.exp',
_sysconfigdata.py: 'LDSHARED': './Modules/ld_so_aix xlc_r 
-bI:./Modules/python.exp',

SOLUTION:
set LDSHARED to same value as LDSHARED, i.e.,
'LDSHARED': '/opt/lib/python2.7/config/ld_so_aix xlc_r 
-bI:/opt/lib/python2.7/config/python.exp'

If this has already be done for Python2.7 - then perhaps issue#25825 should 
have Python2.7 restored - and this closed.

Otherwise - please repair.

--
messages: 277692
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: AIX shared library extension modules installation broken - Python2.7
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



[issue28310] Mixing yield and return with value is allowed

2016-09-29 Thread Markus Unterwaditzer

New submission from Markus Unterwaditzer:

The attached example code raises a SyntaxError in Python 2, but is 
syntactically valid in Python 3. The return value is ignored and an empty 
generator is produced. I see no reason for this behavioral change.

--
components: Interpreter Core
files: lol.py
messages: 277691
nosy: untitaker
priority: normal
severity: normal
status: open
title: Mixing yield and return with value is allowed
versions: Python 3.3, Python 3.4, Python 3.5, Python 3.6
Added file: http://bugs.python.org/file44877/lol.py

___
Python tracker 

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



[issue28309] Accelerate string.Template by using formatted string literals

2016-09-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
keywords: +patch
Added file: http://bugs.python.org/file44878/faster_template.patch

___
Python tracker 

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



[issue28309] Accelerate string.Template by using formatted string literals

2016-09-29 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Proposed patch makes string.Template compiling template to formatted string 
literal. Since for now using formatted string literals is the fastest way of 
formatting strings, this significantly speeds up Template substitution.

$ ./python -m perf timeit -s 'from string import Template; s = Template("$who 
likes $what")' -- 's.substitute(who="tim", what="ham")'

Unpatched:  Median +- std dev: 46.1 us +- 4.2 us
Patched:Median +- std dev: 11.1 us +- 0.5 us

The drawback is that compiling template adds high overhead.

$ ./python -m perf timeit -s 'from string import Template' -- 's = 
Template("$who likes $what"); s.substitute(who="tim", what="ham")'

Unpatched:  Median +- std dev: 51.7 us +- 1.5 us
Patched:Median +- std dev: 672 us +- 38 us

The benefit of using compiled templates is achieved only if make at least 20 
substitutions with the same template.

Third-party template engines can use the same approach in Python 3.6+.

--
components: Library (Lib)
messages: 277690
nosy: eric.smith, georg.brandl, serhiy.storchaka
priority: low
severity: normal
status: open
title: Accelerate string.Template by using formatted string literals
type: performance
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



[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Build-out an AST optimizer, moving some functionality out of the 
peephole optimizer

___
Python tracker 

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



[issue28308] Accelerate 'string'.format(value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
dependencies: +Build-out an AST optimizer, moving some functionality out of the 
peephole optimizer

___
Python tracker 

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



[issue28308] Accelerate 'string'.format(value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

For now using formatted string literals (PEP498) is the fastest way of 
formatting strings.

$ ./python -m perf timeit -s 'k = "foo"; v = "bar"' -- '"{!s} = {!r}".format(k, 
v)'
Median +- std dev: 3.96 us +- 0.17 us

$ ./python -m perf timeit -s 'k = "foo"; v = "bar"' -- 'f"{k!s} = {v!r}"'
Median +- std dev: 1.09 us +- 0.08 us

The compiler could translate new-style formatting with literal format string to 
the equivalent formatted string literal. The code '{!s} = {!r}'.format(k, v) 
could be translated to

t1 = k; t2 = v; f'{t1!r} = {t2!s}'; del t1, t2

or even simpler if k and v are initialized local variables.

$ ./python -m perf timeit -s 'k = "foo"; v = "bar"' -- 't1 = k; t2 = v; 
f"{t1!s} = {t2!r}"; del t1, t2'
Median +- std dev: 1.22 us +- 0.05 us

This is not easy issue and needs first implementing the AST optimizer.

--
components: Interpreter Core
messages: 277689
nosy: eric.smith, serhiy.storchaka
priority: low
severity: normal
status: open
title: Accelerate 'string'.format(value, ...) by using formatted string literals
type: performance
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



[issue28307] Accelerate 'string' % (value, ...) by using formatted string literals

2016-09-29 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

For now using formatted string literals (PEP498) is the fastest way of 
formatting strings.

$ ./python -m perf timeit -s 'k = "foo"; v = "bar"' -- '"%s = %r" % (k, v)'
Median +- std dev: 2.27 us +- 0.20 us

$ ./python -m perf timeit -s 'k = "foo"; v = "bar"' -- 'f"{k!s} = {v!r}"'
Median +- std dev: 1.09 us +- 0.08 us

The compiler could translate C-style formatting with literal format string to 
the equivalent formatted string literal. The code '%s = %r' % (k, v) could be 
translated to

t1 = k; t2 = v; f'{t1!r} = {t2!s}'; del t1, t2

or even simpler if k and v are initialized local variables.

$ ./python -m perf timeit -s 'k = "foo"; v = "bar"' -- 't1 = k; t2 = v; 
f"{t1!s} = {t2!r}"; del t1, t2'
Median +- std dev: 1.22 us +- 0.05 us

This is not easy issue and needs first implementing the AST optimizer.

--
components: Interpreter Core
messages: 277688
nosy: eric.smith, serhiy.storchaka
priority: low
severity: normal
status: open
title: Accelerate 'string' % (value, ...) by using formatted string literals
type: performance
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



[issue28183] Clean up and speed up dict iteration

2016-09-29 Thread INADA Naoki

INADA Naoki added the comment:

recreate patch with different option, since Rietveld doesn't accept 
dict_iter5.patch

--
Added file: http://bugs.python.org/file44876/dict_iter6.patch

___
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-09-29 Thread Senthil Kumaran

Senthil Kumaran added the comment:

Using logging, instead of sys.stderr would be a welcome change in this module.

--
keywords: +easy, needs review
nosy: +orsenthil

___
Python tracker 

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



[issue28298] can't set big int-like objects to items in array 'Q', 'L' and 'I'

2016-09-29 Thread Mark Dickinson

Mark Dickinson added the comment:

One comment here: it's not the presence of `__int__` that makes a type 
integer-like; it's the presence of `__index__`. (Decimal and float both supply 
`__int__`, but shouldn't be regarded as integer-like, for example.) I'm 
guessing that we're going to have the same issues with `__index__` in place of 
`__int__`, though.

--

___
Python tracker 

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



[issue24274] erroneous comments in dictobject.c

2016-09-29 Thread INADA Naoki

Changes by INADA Naoki :


--
keywords: +patch
Added file: http://bugs.python.org/file44875/lookdict_unicode_comment.patch

___
Python tracker 

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



[issue1703178] link_objects in setup.cfg crashes build

2016-09-29 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 520ca3652422 by Benjamin Peterson in branch '2.7':
build_ext: correctly parse the link_objects user option (closes #1703178)
https://hg.python.org/cpython/rev/520ca3652422

New changeset b2f0a31fa441 by Benjamin Peterson in branch '3.5':
build_ext: correctly parse the link_objects user option (closes #1703178)
https://hg.python.org/cpython/rev/b2f0a31fa441

New changeset eac20127d51e by Benjamin Peterson in branch '3.6':
merge 3.5 (#1703178)
https://hg.python.org/cpython/rev/eac20127d51e

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

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