[issue27365] Allow non-ascii chars in IDLE NEWS.txt (for contributor names)

2016-06-21 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Removed file: http://bugs.python.org/file43502/idle-news.diff

___
Python tracker 

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



[issue27365] Allow non-ascii chars in IDLE NEWS.txt (for contributor names)

2016-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Larry, there is a slight reversion in 3.5.2rc that I think should be fixed: 
idlelib/NEWS.txt will not display from About IDLE dialog because it had a 
couple of non-ascii chars.  idle_news-35.diff has the full patch.  A minimal 
fix for 3.5.2 final would consist of changing 'ascii' to 'utf-8' in 
idlelib/aboutDialog.py and the recoding the 2 characters in NEWS.  Testing 
changes in the other 2 files could wait. 

Since I don't know how you want to do this now, I have not pushed anything yet.

--
nosy: +benjamin.peterson, larry
priority: normal -> release blocker
Added file: http://bugs.python.org/file43505/idle-news-35.diff

___
Python tracker 

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



[issue27365] Allow non-ascii chars in IDLE NEWS.txt (for contributor names)

2016-06-21 Thread Terry J. Reedy

Changes by Terry J. Reedy :


Added file: http://bugs.python.org/file43503/idle-news-27.diff

___
Python tracker 

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



[issue22228] Adapt bash readline operate-and-get-next function

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

For the record, this “operate-and-get-next” function is documented in Bash at 
.
 It is supposed to finish entering the current line, and it was taken from the 
history, bring up the following history item for editing. It hasn’t been added 
to Readline directly because it relies on how the application uses history 
(e.g. it is flawed in Bash for me because I use HISTCONTROL=erasedups).

Python’s “readline” module currently has runtime detection of Editline vs Gnu 
Readline. I am not sure if it is strictly needed, or just that it was easier 
than build-time detection, as hinted in 
. It is confusing, because we have 
other build-time detection of particular Readline features.

Perhaps you may be able to try out Editline using my patch for Issue 13501, but 
in my experience, the non-Apple patched Editline is too buggy to be useful in 
Python for much more than experimentation.

I left a couple comments on Git Hub.

I would prefer to expose more of this at the Python level, but that seems hard 
to do. See Issue 1690201 and Issue 1175004 for other attempts to add a custom 
function at the Python level. It is hard to do in a general way because 
rl_add_defun() only accepts a function pointer, and no opaque object to pass to 
the callback. I wonder how the ctypes library handles this when creating 
general function pointer objects.

--

___
Python tracker 

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



[issue22463] Warnings when building on AIX

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

FWIW on the current AIX buildbot 
 I don’t see any 
cPickle.c warnings. (Nor on the earliest build available on that buildbot, from 
Nov 2015.)

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



[issue27365] Allow non-ascii chars in IDLE NEWS.txt (for contributor names)

2016-06-21 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
keywords: +patch
Added file: http://bugs.python.org/file43502/idle-news.diff

___
Python tracker 

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



[issue27365] Allow non-ascii chars in IDLE NEWS.txt (for contributor names)

2016-06-21 Thread Terry J. Reedy

New submission from Terry J. Reedy:

A month ago, for 3.5 and 3.6, I added a test file by Westley Martínez (note 
accent on i) and then his name into Misc/NEWS and idlelib/NEWS.txt.  As a 
result, the latter will not display when the button on About IDLE is clicked.  
Instead, a UnicodeDecodeError is sent to stderr.  I will add a test for the 
About box.

--
assignee: terry.reedy
messages: 269042
nosy: terry.reedy
priority: normal
severity: normal
stage: test needed
status: open
title: Allow non-ascii chars in IDLE NEWS.txt (for contributor names)
type: behavior
versions: Python 2.7, Python 3.5, Python 3.6

___
Python tracker 

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



[issue27344] zipfile *does* support utf-8 filenames

2016-06-21 Thread Daniel Holth

Daniel Holth added the comment:

This is a simple documentation bug about the ZIP file format supporting utf-8 
and 'no encoding' filenames depending on whether two bits are set in a flag 
inside the archive member. Bug 10614 appears to be a different issue about 
out-of-band encoding information that you could pass to Python's zipfile 
implementation.

--

___
Python tracker 

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



[issue22463] Warnings when building on AIX

2016-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ffe866aa86a8 by Martin Panter in branch '2.7':
Issue #22463: Cure unused function warnings on AIX
https://hg.python.org/cpython/rev/ffe866aa86a8

--

___
Python tracker 

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



[issue22463] Warnings when building on AIX

2016-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b1c1c297bead by Martin Panter in branch '2.7':
Issue #22463: Correct #endif placement; patch by Senthil Kumaran
https://hg.python.org/cpython/rev/b1c1c297bead

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-21 Thread Nick Coghlan

Nick Coghlan added the comment:

pip_gui.pip_tkinter.utils.runpip has indeed switched to using subprocess (and 
yes, the PyPA crew are significantly more careful with backwards compatibility 
there), but there are still a couple of other API imports in that module: 
https://github.com/upendra-k14/pip_gui/blob/dump_code/pip_tkinter/utils.py#L7 
(I didn't check other code to see if the affected APIs are used anywhere)

I do like the idea of *bundling* pip_gui in a variant of the ensurepip style, 
rather than having it as a conventional standard library component, though - it 
means we can simplify the backwards compatibility guarantee by noting that, if 
you're using the provided GUI, doing "pip install --upgrade pip" may also 
require doing "pip install --upgrade pip-tkinter".

--

___
Python tracker 

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



[issue22463] Warnings when building on AIX

2016-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 0b63465a1796 by Martin Panter in branch '2.7':
Issue #22463: Backport compiler warning fixes and workarounds
https://hg.python.org/cpython/rev/0b63465a1796

--
nosy: +python-dev

___
Python tracker 

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



[issue27198] Adding an assertClose() method to unittest.TestCase

2016-06-21 Thread Robert Collins

Robert Collins added the comment:

Chris, I suggested altering assertAlmostEqual in 
http://bugs.python.org/issue27198#msg267187 :) - I took your agreement with 
that as a good thing and didn't reply because I had nothing more to add.

IMO the status of this issue is as you indicated: you needed time to code up 
the changes, so that its an extension to assertAlmostEquals, rather than a new 
assertion.

When thats done I'll happily review it and commit it.

--

___
Python tracker 

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



[issue27344] zipfile *does* support utf-8 filenames

2016-06-21 Thread R. David Murray

R. David Murray added the comment:

See issue 10614 for the current state of play.  This issue should probably be 
closed in favor of that one.

--
nosy: +r.david.murray

___
Python tracker 

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




[issue27198] Adding an assertClose() method to unittest.TestCase

2016-06-21 Thread Chris Barker

Chris Barker added the comment:

Did my comments not get posted, or are they not being read? Anyway:

Could we keep the issues separate here?

1) If you don't like the name, propose another name -- no none has defended 
this name since an objection was first raised. I"m sure we can find one that 
would work, if we want to add it.

2) regardless of the original intent, the current API:
 - requires fairly substantial effort to write a new assertion, whether as a 
method or a function. Thus it's a good idea to provide generally useful ones
 - has a bunch of assert methods, many of which are no more commonly useful 
than the proposed method.

So adding this is very much in keeping with the current API.

However, it seems there is much resistance to adding new asserts to the base 
TestCase. Fine. I have trouble defending that as I don't like the API anyway 
(and yes, of course, it comes from Java -- that's actually the source of the 
problem :-) )

But: this is a generally useful and non-trivial assert (indeed, as way too many 
people are confused about floating point, I think it's pretty critical to 
provide appropriate tools -- and assertAlmostEqual is NOT the appropriate tool 
in many cases.

So how to provide this? Options:

1) Robert suggested a stand alone function -- sure, but where to put it?

2) Apparently there is a movement afoot to add a mixin with extra stuff -- 
sure, that would be fine, but only if there actually is such a mixin.

3) add the functionality to assertAlmostEqual, with a new optional parameter -- 
I suggested this a few comments back, and have had no feedback. (that at least 
avoids bike shedding the name...)

My key points:

1) This is generally useful and non-trivial -- so would be good to add to the 
stdlib.

2) it should be discoverable -- as pointed out, folks have not been clamoring 
for it -- which means they won't know to go digging for it -- they should find 
it easily (as many folks will use assertAlmostEqual, when they would be better 
served by this)

which leaves us with adding to a library of functions or a mixin, only if such 
a thing will actually be build and documented, with more than one function it 
it :-)

or adding to assertAlmostEqual.

Feedback on this?

(note: adding assertClose as is now off the table, no more need to argue about 
that)

--

___
Python tracker 

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



[issue24137] Force not using _default_root in IDLE

2016-06-21 Thread Terry J. Reedy

Changes by Terry J. Reedy :


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



[issue24137] Force not using _default_root in IDLE

2016-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 064b29dde096 by Terry Jan Reedy in branch 'default':
Issue #24137: Run IDLE, test_idle, and htest with tkinter default root disabled.
https://hg.python.org/cpython/rev/064b29dde096

--
nosy: +python-dev

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I rechecked #23351 and in msg249924 Donald did disclaim any guarantee that 
using main() would work forever.  He suggested instead using subprocess and the 
command line interface as presumably more stable.

In tem_pip_v3.py Upendra switched to using subprocess and I presume he stuck 
with that in spite of any suggestion otherwise from me.  If the pip command 
line interface is changed, *every* program that uses it could be broken.

I agree with Ned that pip_gui should ideally be part of the pip package, I 
would be happy if Donald were to review what Upendra has and will produce, 
pronounce it good, and ask to have it for pip.

--

___
Python tracker 

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



[issue26974] Crash in Decimal.from_float

2016-06-21 Thread Stefan Krah

Stefan Krah added the comment:

I'll look at it soon -- I just don't have much time right now.

--
assignee:  -> skrah

___
Python tracker 

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



[issue26556] Update expat to 2.1.1

2016-06-21 Thread Carson Lam

Changes by Carson Lam :


--
title: Update expat to 2.2.1 -> Update expat to 2.1.1

___
Python tracker 

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



[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-06-21 Thread Stefan Krah

Stefan Krah added the comment:

Let's close it then.

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



[issue26975] Decimal.from_float works incorrectly for non-binary floats

2016-06-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I vote for ignoring this and calling it not-a-bug.  In a way, it is no more 
interesting than a dict like object defining __hash__ to return a random number.

The intention for from_float() is to convert binary floats.  It was not meant 
to be generalized to handle arbitrary fractions.  I concur with Mark's comment, 
"Note that by overriding as_integer_ratio, you're breaking its "contract"".

--

___
Python tracker 

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



[issue24137] Force not using _default_root in IDLE

2016-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

Conditioned NoDefaultRoot() on use_subprocess.  Ran through menu.  Will push 
soon after rechecking patches with Rietveld. 

Thanks for the additional review.  I don't know that this caught any real bugs 
in IDLE itself.  But many of the htests needed upgrading to consistently use a 
Toplevel with the exiting root as parent (and never start a second mainloop). 
Not worth backporting en masse though.

--
Added file: http://bugs.python.org/file43500/nodefaultroot4.diff

___
Python tracker 

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



[issue27033] Change the decode_data default in smtpd to False

2016-06-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Can this issue be closed?

--

___
Python tracker 

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



[issue27007] Alternate constructors bytes.fromhex() and bytearray.fromhex() return an instance of base type

2016-06-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue26974] Crash in Decimal.from_float

2016-06-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Stefan?

--

___
Python tracker 

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



[issue18726] json functions have too many positional parameters

2016-06-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset db5fe5c4d09d by Serhiy Storchaka in branch 'default':
Issue #18726: All optional parameters of the dump(), dumps(),
https://hg.python.org/cpython/rev/db5fe5c4d09d

--
nosy: +python-dev

___
Python tracker 

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



[issue23591] Add IntFlags

2016-06-21 Thread Ethan Furman

Ethan Furman added the comment:

Just look briefly through your patches, and they look pretty good.  I'll take a 
more in-depth look in the next couple weeks.  (Feel free to ping again if you 
don't see any activity from me, and thanks for your patience.)

--

___
Python tracker 

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



[issue27364] Deprecate invalid unicode escape sequences

2016-06-21 Thread Emanuel Barry

New submission from Emanuel Barry:

Attached patch deprecates invalid escape sequences in unicode strings. The 
point of this is to prevent issues such as #27356 (and possibly other similar 
ones) in the future.

Without the patch:

>>> "hello \world"
'hello \\world'

With the patch:

>>> "hello \world"
DeprecationWarning: invalid escape sequence 'w'

I'll need some help (patch isn't mergeable yet):

test_doctest fails on my machine with the patch (and -W), and I don't know how 
to fix it. test_ast fails an assertion (!PyErr_Occurred() in PyObject_Call in 
abstract.c) when -W is on, and I also don't know how to fix it (I don't even 
know what causes it).

Of course, I went ahead and fixed all instances of invalid escape sequences in 
the stdlib (that I could find) so that no DeprecationWarning is encountered.

Lastly, I thought about also doing this to bytes, but I ran into some issues 
with some invalid escapes such as \u, and _codecs.escape_decode would trigger 
the warning when passed br"\8" (for example). Ultimately, I decided to leave 
bytes alone for now, since it's mostly on the lower-level side of things. If 
there's interest I can add it back.

--
components: Interpreter Core, Library (Lib), Unicode
files: deprecate_invalid_unicode_escapes.patch
keywords: patch
messages: 269022
nosy: ebarry, ezio.melotti, haypo
priority: normal
severity: normal
stage: patch review
status: open
title: Deprecate invalid unicode escape sequences
type: behavior
versions: Python 3.6
Added file: 
http://bugs.python.org/file43499/deprecate_invalid_unicode_escapes.patch

___
Python tracker 

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



[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2016-06-21 Thread Berker Peksag

Berker Peksag added the comment:

This was discussed on python-ideas before:

* https://groups.google.com/forum/#!msg/python-ideas/MbvpK21nUNA/DwYpOFOVuYMJ
* https://groups.google.com/forum/#!msg/python-ideas/JVLuo-L0reU/zLNnBa9THqgJ

I don't think there was an agreement on the idea so I suggest to send your 
proposal to python-ideas first.

--
nosy: +berker.peksag
stage: needs patch -> 

___
Python tracker 

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



[issue23545] Turn on extra warnings on GCC

2016-06-21 Thread STINNER Victor

Changes by STINNER Victor :


--
nosy: +haypo

___
Python tracker 

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



[issue24821] The optimization of string search can cause pessimization

2016-06-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Ping.

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Unfortunately, Ned's right in highlighting a potential pip integration problem 
here: pip DOES NOT expose a supported Python API, but pip_tkinter currently 
imports APIs from within the pip package.

This means that somebody doing "pip install --upgrade pip" may break a version 
of the GUI that is implemented this way, contradicting our promise that a 
post-install "pip install --upgrade pip" is a fully supported operation that 
won't break anything else in CPython.

That's 100% fine for a proof of concept that demonstrates the general principle 
of a Tkinter based package management GUI and it's integration into IDLE (and 
Upendra's work on that front looks excellent to me), but isn't reasonable for a 
version that actually lands in CPython as a supported component.

Where this work could really help move the "Stable Python API for package 
management" discussion forward is by providing a clear set of use cases, as 
well as spelling out the internal pip APIs used to implement that feature in 
the proof-of-concept,

The reason I believe that will be helpful is that one of the big problems in 
this area to date has been the lack of a clear statement of the problem that a 
stable Python API would be aimed at solving - "provide a stable API that meets 
the needs of the default package management GUI shipped with IDLE" is a far 
more tractable problem than "provide a stable API for pip".

--
nosy: +dstufft

___
Python tracker 

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



[issue23591] Add IntFlags

2016-06-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

What should be done for landing this in 3.6?

--

___
Python tracker 

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



[issue23839] Clear caches after every test

2016-06-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
versions: +Python 3.6 -Python 3.4

___
Python tracker 

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



[issue23034] Dynamically control debugging output

2016-06-21 Thread Serhiy Storchaka

Changes by Serhiy Storchaka :


--
assignee:  -> serhiy.storchaka
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue23545] Turn on extra warnings on GCC

2016-06-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Could anyone please make a review?

--
versions: +Python 3.6 -Python 3.5

___
Python tracker 

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



[issue27172] Add skip_bound_arg argument to inspect.Signature.from_callable()

2016-06-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Hi Ryan, sorry for the delayed response.

My own concern with this proposal is that I don't understand the use case for 
it. We changed the inspect.signature behaviour away from that of 
inspect.getfullargspec because we considered the latter behaviour to be 
*wrong*: it reported a parameter the already bound method didn't actually 
accept when called. The "skip_bound_arg" functionality then remains *within* 
the inspect module for the sake of providing backwards compatible 
implementations of getargspec and getfullargspec without duplicating a lot of 
other callable introspection logic.

If you can provide more information on the motivating use case, we can better 
determine if exposing this option directly is a suitable design response, or if 
there may be better alternatives available.

--

___
Python tracker 

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



[issue27363] Complex with negative zero imaginary part

2016-06-21 Thread Mark Dickinson

Mark Dickinson added the comment:

Related: #17336, #22548, #25839

--

___
Python tracker 

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



[issue27363] Complex with negative zero imaginary part

2016-06-21 Thread Mark Dickinson

Mark Dickinson added the comment:

This has been discussed in multiple issues before this one. Currently, 
`complex` from a string provides one of two ways to get a complex number with 
the correct signs for the real and imaginary parts; I'd hate to change that to 
give wrong results instead.

The other important property here is that `complex(repr(z))` recovers `z` for a 
complex number `z`. That would break with your suggested change.

Strong -1 from me.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue27363] Complex with negative zero imaginary part

2016-06-21 Thread Vedran Čačić

New submission from Vedran Čačić:

Look:

>>> complex('1-0j')
(1-0j)
>>> 1-0j
(1+0j)

Yes, I understand what's going on, and it's probably wrong / too much to expect 
1-0j to work properly, but I'd really like the complex from string constructor 
to be consistent with that. Even more because (of course):

>>> import ast
>>> ast.literal_eval('1-0j')
(1+0j)

--
messages: 269013
nosy: Vedran.Čačić
priority: normal
severity: normal
status: open
title: Complex with negative zero imaginary part
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



[issue27350] Compact and ordered dict

2016-06-21 Thread Mark Dickinson

Mark Dickinson added the comment:

> That doesn't sound right. It should be available always.

To elaborate: assuming not Windows, the configure script has two checks: if 
AC_CHECK_TYPE(int32_t, ...) succeeds (which should happen whenever int32_t is 
defined in either stdint.h or inttypes.h), it #defines HAVE_INT32_T. If 
AC_TYPE_INT32_T succeeds (which should happen whenever int32_t is *not* defined 
in either stdint.h or inttypes.h), it #defines int32_t to be a suitable type. 
Then the pyport check makes sure than in both circumstances, PY_INT32_T is 
#defined.

I don't believe there are any platforms out there that we care about for Python 
for which both checks fail.

--

___
Python tracker 

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



[issue27350] Compact and ordered dict

2016-06-21 Thread Mark Dickinson

Mark Dickinson added the comment:

> I found PY_INT32_T in pyport.h.  It seems only available when stdint.h is 
> available.

That doesn't sound right. It should be available always.

--
nosy: +mark.dickinson

___
Python tracker 

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



[issue27309] Visual Styles support to tk/tkinter file and message dialogs

2016-06-21 Thread Steve Dower

Steve Dower added the comment:

> Would it be possible to tie this to _tkinter.pyd instead of python{w}.exe?

Afraid not, Windows needs to load a different version of a particular DLL for 
the entire process. But at this stage it shouldn't negatively affect anyone. 
I'd even be okay adding it into 3.5.

--

___
Python tracker 

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



[issue27353] Add nroot function to math

2016-06-21 Thread Mark Dickinson

Mark Dickinson added the comment:

[Serhiy]
> ... nroot() wouldn't help too much to implement geometric mean

It's fine, so long as it's only being called once or twice at the end of the 
calculation (it's even helpful to have the last operation be an nth root call, 
since that's a contracting operation that tends to reduce relative error). It's 
calling it on every single item in the input list and *then* multiplying that 
would be bad.

--

___
Python tracker 

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



[issue27353] Add nroot function to math

2016-06-21 Thread Mark Dickinson

Mark Dickinson added the comment:

[Raymond, quoting Matlab]

> in cases where both real and complex roots exist, power returns only the 
> complex roots.

Yes, this would be the main motivation for me, too, if only to be able to 
answer the many StackOverflow questions like this one: 
http://stackoverflow.com/questions/30923838/how-to-get-the-real-cube-root-of-a-negative-number-in-python3

+1 for a private function in the statistics module for now.

--

___
Python tracker 

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



[issue27309] Visual Styles support to tk/tkinter file and message dialogs

2016-06-21 Thread Zachary Ware

Zachary Ware added the comment:

I wonder whether this manifest change would affect other GUI toolkit packages 
(though frankly I'm having trouble finding any others that work with Python 3 
on Windows...), positively or negatively.  Would it be possible to tie this to 
_tkinter.pyd instead of python{w}.exe?

--

___
Python tracker 

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



[issue27309] Visual Styles support to tk/tkinter file and message dialogs

2016-06-21 Thread Steve Dower

Steve Dower added the comment:

If someone wants to make a patch, the manifest we embed is in PC/python.manifest

--

___
Python tracker 

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



[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-06-21 Thread Brett Cannon

Brett Cannon added the comment:

No one is working on it, Steve, so feel free to write a patch.

--

___
Python tracker 

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



[issue27350] Compact and ordered dict

2016-06-21 Thread INADA Naoki

INADA Naoki added the comment:

As I posted to python-dev ML, this compact ordered dict doesn't keep insertion 
order
for key-shared dict.

>>> class A:
...   ...
...
>>> a = A()
>>> b = A()
>>> a.a = 1
>>> a.b = 2
>>> b.b = 3
>>> b.a = 4
>>> a.__dict__.items()
dict_items([('a', 1), ('b', 2)])
>>> b.__dict__.items()
dict_items([('a', 4), ('b', 3)])

--

___
Python tracker 

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



[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2016-06-21 Thread Daniel Ward

Daniel Ward added the comment:

I don't think I explained the response very well, effectively the __json__ call 
would return an object which is JSON-serializable. This would include dict 
objects containing JSON-serializable objects albeit natively-supporting JSON 
serialisation or by means of subsequent obj.__json__ calls.

The reason I gave it __json__ is purely for easily-remembered implementation, 
separating it out from calls which may potentially clash with existing 
codebases, because let's face it, people don't often get to start again ;)

I'm not adverse to changing the method name at all, but I do believe this is a 
progressive way to go regarding JSON-serialization.

--

___
Python tracker 

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



[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2016-06-21 Thread Steven D'Aprano

Steven D'Aprano added the comment:

For starters, dunder names like __json__ are reserved for Python's own use, so 
you would have to get the core developers to officially bless this use.


But... I'm not really sure that "the responsibility of determining how an 
object should be represented in JSON objects firmly within the object itself" 
is a good idea. For a general purpose protocol, I don't think you can trust any 
object to return valid JSON. What if my object.__json__ returned "}key='c" or 
some other invalid string? Whose responsibility is it to check that __json__ 
returns valid JSON?

I don't think there is any need to make this an official protocol. You know 
your own objects, you know if you can trust them, and you can call any method 
you like. So your example becomes:

my_json_string = json.dumps(
{'success': True, 'counter': object_counter.to_json()})

which is okay because that's clearly *your* responsibility to make sure that 
your object's to_json method returns a valid string. If you make it an official 
language wide protocol, it's unclear whose responsibility it is: the object 
(dangerous!), the caller (difficult), the Python interpreter (unlikely), 
json.dumps (unlikely).

--
nosy: +steven.daprano

___
Python tracker 

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



[issue9156] socket._fileobject: read raises AttributeError when closed in another thread

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

IMO closing an OS-level file descriptor in one thread while it is in use by 
another thread is a bad idea, full of race conditions and undefined behaviour. 
An AttributeError sounds like a best-case scenario. It is like freeing a memory 
allocation in one thread while another thread is accessing the memory. What if 
the other thread was slow, or a syscall was interrupted, and hasn’t 
(re-)started the recv() call in time? What if a third thread opens a file and 
reuses the file descriptor you just closed?

I suggest to close this.

--
nosy: +martin.panter
resolution:  -> rejected
status: open -> closed

___
Python tracker 

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



[issue20631] python readline module crashing on NULL access

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

I think an answer to Benjamin’s question is necessary to move this forward. The 
code already checks the index before calling history_get(). How do you manage 
to get null pointers returned for every history item?

In the LLVM bug thread, I noticed “libedit” a.k.a. Editline mentioned a few 
times. Are you sure Python is using Gnu Readline, or is it somehow hooking into 
Editline? Python only really supports Editline on Apple, not Linux (see Issue 
13501 for expanding that support).

--
nosy: +martin.panter
status: open -> pending

___
Python tracker 

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



[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2016-06-21 Thread Emanuel Barry

Emanuel Barry added the comment:

So __json__ returns a string meant to be serializable. I'm not too keen on 
using a dunder name (although my word doesn't weigh anything ;) and I'd 
personally prefer something like as_json_string(). I think the idea in general 
is good, though. Mind submitting a patch?

--
stage: test needed -> needs patch

___
Python tracker 

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



[issue27213] Rework CALL_FUNCTION* opcodes

2016-06-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Issue27358 is too complex, more complex than this issue. But I think the simple 
fix the regression in case of the single **kw is checking wherever the sum dict 
is empty.

-if (with_call) {
+if (with_call && PyDict_Size(sum)) {

--

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2016-06-21 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

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



[issue10116] Sporadic failures in test_urllibnet

2016-06-21 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
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-06-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think this kills the optimization effect for non-dicts.

See on PyDict_Merge(). It takes the boolean parameter that controls the 
behavior in case of matching keys. I think the best would be to rename it to 
say _PyDict_MergeEx(), extend the boolean parameter to ternary parameter, and 
raise an exception if it is in the third state and matching keys are found. 
PyDict_Merge() would be implemented as a simple wrapper around 
_PyDict_MergeEx(). We should check wherever this affects the performance of 
dict.update().

--
nosy: +rhettinger

___
Python tracker 

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



[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2016-06-21 Thread Ollie Ford

Changes by Ollie Ford :


--
nosy: +Ollie Ford

___
Python tracker 

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



[issue22463] Warnings when building on AIX

2016-06-21 Thread David Edelsohn

David Edelsohn added the comment:

These look like false positives or noise to me as well.

--

___
Python tracker 

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



[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2016-06-21 Thread Daniel Ward

Daniel Ward added the comment:

Sure, so for example:


=
import json


class ObjectCounter:

def __init__(self, name, count):
self.name = name
self.count = count

def __json__(self):
   return '[{name}] {count}'.format(name=self.name, count=self.count)


object_counter = ObjectCounter('DC1', 3789)
my_json_string = json.dumps({'success': True, 'counter': object_counter})



In the above example, the value stored in my_json_string would be:

'{"success": true, "counter": "[DC1] 3789"}'

This is an untested and quick example, but I hope it explains what I'm aiming 
to achieve. Without the __json__ method, the json.dumps call would raise an 
exception along the lines of the below message, unless we create a new 
JSONEncoder object and call json.dumps(..., cls=MyJSONEncoder), which becomes 
difficult to manage and follow on larger projects.

TypeError:  is not JSON serializable

--

___
Python tracker 

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



[issue26990] file.tell affect decoding

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

See also the second part of Issue 25863, a similar symptom with the iso-2022-jp 
codec. I suspect many of the multibyte CJK type codecs don’t properly support 
saving and restoring their state.

--
nosy: +martin.panter

___
Python tracker 

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



[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2016-06-21 Thread Emanuel Barry

Emanuel Barry added the comment:

I'm not too familiar with the json package, but what should __json__ return 
when called?

--
nosy: +ebarry
stage:  -> test needed
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



[issue27358] BUILD_MAP_UNPACK_WITH_CALL is slow

2016-06-21 Thread Emanuel Barry

Emanuel Barry added the comment:

`dict` subclasses can be hashable - it's a very bad idea, but not guarded 
against. If you were to do this, I'd suggest going the exception way, à la 
StopIteration.

I wonder how feasible it would be for e.g. dict.__setitem__ to check if a key 
already exists; it would be a special path that's not taken normally, but 
filling the mapping on call enables it, and it raises if it sees a duplicate. I 
think that inserting the check in there would reduce complexity and probably 
have a negligible impact on performance. I don't know if that's a good idea, 
just throwing this out here.

--
nosy: +ebarry

___
Python tracker 

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



[issue27362] json.dumps to check for obj.__json__ before raising TypeError

2016-06-21 Thread Daniel Ward

New submission from Daniel Ward:

To help prevent retrospective JSONEncoder overrides when failing to serialize a 
given object, the intention of this issue is to propose that the JSON encoder 
checks if a given object has a __json__ attribute, using that rather than 
raising a TypeError.

This will help in maintaining easier-to-follow code and keeps the 
responsibility of determining how an object should be represented in JSON 
objects firmly within the object itself.

The obj.__json__ callable/attribute should behave in the same way as __repr__ 
or __str__, for example.

I'm happy to look in to contributing this enhancement myself if that's 
preferred. Any pointers as to how I go about contributing are greatly 
appreciated.

--
components: Library (Lib)
messages: 268991
nosy: Daniel Ward
priority: normal
severity: normal
status: open
title: json.dumps to check for obj.__json__ before raising TypeError
type: enhancement

___
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-06-21 Thread Demur Rumed

Demur Rumed added the comment:

(returning None wouldn't work because that may be the key, but something like 
returning the dict itself (ie an unhashable) or keeping this as a C API & 
returning NULL would work)

--

___
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-06-21 Thread Demur Rumed

Demur Rumed added the comment:

mapaca2 heavy handily deals with the must-work-with-all-mappings by converting 
any non dict mappings on the stack with dicts when with_call is true

I'm not sure if it'd be better to seek a less opcode centric fix-- ie introduce 
a method to dictobject which returns None if no collision occurs otherwise it 
returns the first key which collides and stops updating at that point. 
PyDict_DistinctUpdate

--
Added file: http://bugs.python.org/file43498/mapaca2.patch

___
Python tracker 

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



[issue26290] fileinput and 'for line in sys.stdin' do strange mockery of input buffering

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

Issue 15068 as been fixed in 3.5+ and 2.7, and it looks like it fixes the 
fileinput aspect of this bug. That leaves the sys.stdin aspect, which only 
affects Python 2, and I think is a duplicate of Issue 1633941.

--
nosy: +martin.panter
resolution:  -> duplicate
status: open -> closed
superseder:  -> for line in sys.stdin: doesn't notice EOF the first time
versions: +Python 3.5, Python 3.6 -Python 3.4

___
Python tracker 

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



[issue24364] Not all defects pass through email policy

2016-06-21 Thread R. David Murray

R. David Murray added the comment:

test_email/test_email tests the compat32 policy.  test_defect_handling tests 
the default policy.  Thus they are not redundant, except of course that they 
are...it would be better to run the same test with both policies in turn, but I 
never got as far as setting up that infrastructure.

That said, for defects it may not matter, and for the other "redudant" tests 
sometimes the result is different, which is the point of the new policy.  So, 
things are in a bit of a limbo currently and could use some sorting out.  
You'll note that in some cases in test_email I've noted where the corresponding 
test for the new policy is in the new test files.  There are a bunch more tests 
in test_email that need equivalents for the new policies (and I'm sure we'll 
find some bugs when that happens, unfortunately).

--

___
Python tracker 

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



[issue27201] expose the ABI name as a config variable

2016-06-21 Thread Petr Viktorin

Changes by Petr Viktorin :


--
nosy: +encukou

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-21 Thread Upendra Kumar

Upendra Kumar added the comment:

Sorry for trouble. I think I messed up with my Python installation. I 
reinstalled Python and pip. The "pip install command issue" is fixed.

--

___
Python tracker 

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



[issue14826] urlopen URL with unescaped space

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

I think this should be treated as a feature, not a bug, since as Christian 
said, the documentation currently does not support this case.

--
title: urllib2.urlopen fails to load URL -> urlopen URL with unescaped space
type:  -> enhancement
versions: +Python 3.6 -Python 2.7, Python 3.2, Python 3.3

___
Python tracker 

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



[issue22463] Warnings when building on AIX

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

Looking closer at cPickle.c (after upgrading my GCC), I think there are two 
warnings happening, when Pdata_clear() is inlined into each of noload_reduce() 
and noload_setitem(). I think both cases are false positives; there is no 
actual signed overflow possible. Ismail Donmez has provided patches that work 
around this warning in Issue 1621, but IMO, and maybe in the general consensus, 
we shouldn’t add these workarounds.

--

___
Python tracker 

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



[issue27051] Create PIP gui

2016-06-21 Thread Upendra Kumar

Upendra Kumar added the comment:

Hey, can anyone help me with this code :

###


Python 3.4.3 (default, Oct 14 2015, 20:33:09) 
[GCC 4.8.4] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import pip
>>> pip.main(["install","-U","wheel"])
Requirement already up-to-date: wheel in /usr/local/lib/python3.4/dist-packages
Cleaning up...
0
>>> pip.main(["install","-U","timingwheel"])
Downloading/unpacking timingwheel
Downloading/unpacking timingwheel
  Downloading timingwheel-0.4.tar.gz
  Downloading timingwheel-0.4.tar.gz
  Running setup.py (path:/tmp/pip_build_scorpio/timingwheel/setup.py) egg_info 
for package timingwheel
  Running setup.py (path:/tmp/pip_build_scorpio/timingwheel/setup.py) egg_info 
for package timingwheel
Traceback (most recent call last):
Traceback (most recent call last):
  File "", line 17, in 
  File "", line 17, in 
  File "/tmp/pip_build_scorpio/timingwheel/setup.py", line 3, in 
  File "/tmp/pip_build_scorpio/timingwheel/setup.py", line 3, in 
from timingwheel import version
from timingwheel import version
  File "/tmp/pip_build_scorpio/timingwheel/timingwheel/__init__.py", line 
1, in 
  File "/tmp/pip_build_scorpio/timingwheel/timingwheel/__init__.py", line 
1, in 
from timingwheel import BaseWheel, TimingWheel
from timingwheel import BaseWheel, TimingWheel
ImportError: cannot import name 'BaseWheel'
ImportError: cannot import name 'BaseWheel'
Complete output from command python setup.py egg_info:
Complete output from command python setup.py egg_info:
Traceback (most recent call last):

  File "", line 17, in 

  File "/tmp/pip_build_scorpio/timingwheel/setup.py", line 3, in 

from timingwheel import version

  File "/tmp/pip_build_scorpio/timingwheel/timingwheel/__init__.py", line 1, in 


from timingwheel import BaseWheel, TimingWheel

ImportError: cannot import name 'BaseWheel'


Traceback (most recent call last):

  File "", line 17, in 

  File "/tmp/pip_build_scorpio/timingwheel/setup.py", line 3, in 

from timingwheel import version

  File "/tmp/pip_build_scorpio/timingwheel/timingwheel/__init__.py", line 1, in 


from timingwheel import BaseWheel, TimingWheel

ImportError: cannot import name 'BaseWheel'


Cleaning up...
Cleaning up...
Command python setup.py egg_info failed with error code 1 in 
/tmp/pip_build_scorpio/timingwheel
Command python setup.py egg_info failed with error code 1 in 
/tmp/pip_build_scorpio/timingwheel
Storing debug log for failure in /home/scorpio/.pip/pip.log
Storing debug log for failure in /home/scorpio/.pip/pip.log
1


###
###


In the above failure, pip install functionality fails. I don't know why. Other 
functionalities like "search" and "list" works perfectly. But, when I tried to 
connect this pip install command with my GUI button, I got the above error.

--

___
Python tracker 

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



[issue22463] Warnings when building on AIX

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

The most serious of these IMO is the signed overflow warnings in 
Modules/cPickle.c. I get the same warnings if I disable the “gcc -fwrapv” mode:

/media/disk/home/proj/python/cpython/Modules/cPickle.c: In function 
‘Unpickler_noload’:
/media/disk/home/proj/python/cpython/Modules/cPickle.c:5462:1: warning: 
assuming signed overflow does not occur when assuming that (X - c) > X is 
always false [-Wstrict-overflow]
 Unpickler_noload(Unpicklerobject *self, PyObject *unused)
 ^
/media/disk/home/proj/python/cpython/Modules/cPickle.c:5462:1: warning: 
assuming signed overflow does not occur when assuming that (X - c) > X is 
always false [-Wstrict-overflow]
/media/disk/home/proj/python/cpython/Modules/cPickle.c:202:8: warning: assuming 
signed overflow does not occur when assuming that (X - c) > X is always false 
[-Wstrict-overflow]
 if (clearto >= self->length) return 0;
^
/media/disk/home/proj/python/cpython/Modules/cPickle.c:202:8: warning: assuming 
signed overflow does not occur when assuming that (X - c) > X is always false 
[-Wstrict-overflow]
 if (clearto >= self->length) return 0;
^

It is not clear to me where the overflows actually happen. See Issue 1608, 
Issue 1621, where some of these bugs were fixed, and the “gcc -fwrapv” 
workaround was enabled. Perhaps your compiler has a similar flag to use as a 
workaround, though IMO it would be good to fix the code as well.

Most of the other warnings have been fixed or worked around in Python 3. I 
propose to port the following revisions to Python 2. All but one are still in 
effect today:

83a55ca935f0: Parser/pgen.c
12e53abec5d0, 0c7fff783b32: Include/objimpl.h
ce9f5ce33ad2: Modules/readline.c
a7a9e0f46b8a: Modules/tkappinit.c (change present in 3.3, 3.4, but eliminated 
in 3.5)
e2f96bd29252 (partial): Modules/_ctypes/cfield.c
b04557ae099a (partial): Modules/expat/xmlparse.c (assuming this was the cause 
of the ./pyconfig.h warnings)

That leaves the two warnings about CTYPES_CAPSULE_WCHAR_T. If necessary, they 
could be worked around by adding an #if condition around the definitions:

#if defined(CTYPES_UNICODE) && !defined(HAVE_USABLE_WCHAR_T)
#define CTYPES_CAPSULE_WCHAR_T "_ctypes/[. . .].c wchar_t buffer from 
unicode"
CTYPES_CAPSULE_INSTANTIATE_DESTRUCTOR(CTYPES_CAPSULE_WCHAR_T)
#endif

--
nosy: +martin.panter

___
Python tracker 

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



[issue27285] Document the deprecation of pyvenv in favor of `python3 -m venv`

2016-06-21 Thread Steve Piercy

Steve Piercy added the comment:

I'd like to take on this issue and submit a patch for consideration by 
2016-06-26.  Please let me know if anyone is working on it.

--

___
Python tracker 

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



[issue27360] _deque and _islice are sometimes None

2016-06-21 Thread SilentGhost

SilentGhost added the comment:

This seems to have been reported on riak's tracker: 
https://github.com/basho/riak-python-client/issues/449

--
nosy: +SilentGhost
resolution:  -> third party
stage:  -> resolved
status: open -> closed
type: crash -> behavior

___
Python tracker 

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



[issue24137] Force not using _default_root in IDLE

2016-06-21 Thread Terry J. Reedy

Terry J. Reedy added the comment:

I made htest run without default root, just list test_idel, and found a few 
more.  I grepped for 'Toplevel()'.  Also for bad Tk() calls.

I still need to move the call in pyshell and check this over.  But I think it 
close.

--
Added file: http://bugs.python.org/file43497/nodefaultroot3.diff

___
Python tracker 

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



[issue27361] ValueError on eval after 'from pandas import *'

2016-06-21 Thread SilentGhost

SilentGhost added the comment:

Pandas is not part of the standard library. Their issue tracker is at 
https://github.com/pydata/pandas/issues

--
nosy: +SilentGhost
resolution:  -> third party
stage:  -> resolved
status: open -> closed

___
Python tracker 

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



[issue15730] Silence unused value warnings under Mac OS X 10.8/clang

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

Revisions 12e53abec5d0 and 0c7fff783b32 look like they do the same thing as 
Benno’s patch. Perhaps we can close this?

--
nosy: +martin.panter
resolution:  -> out of date

___
Python tracker 

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



[issue27361] ValueError on eval after 'from pandas import *'

2016-06-21 Thread Eric Sprigg

New submission from Eric Sprigg:

Using 'from pandas import *' leads to a ValueError exception being raised when 
eval tries to execute an expression like
  eval("df['Country'] == 'Brazil'")

When the alternative form 'import pandas' is used, the expression evaluates as 
expected.

The test program in the attached file demonstrates the problem.

I use anaconda with Python 3.4.4 on OS X 10.11.5

--
components: Interpreter Core
files: eval problem.ipynb
messages: 268975
nosy: espri
priority: normal
severity: normal
status: open
title: ValueError on eval after 'from pandas import *'
type: behavior
versions: Python 3.4
Added file: http://bugs.python.org/file43496/eval problem.ipynb

___
Python tracker 

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



[issue27360] _deque and _islice are sometimes None

2016-06-21 Thread David Delassus

New submission from David Delassus:

With Python 3.4.3-r1 (on Gentoo x86_64), I have encountered a strange behavior 
with the library "riak==2.5.3".

When closing the client connection, the library calls ``self._stop.set()`` 
where ``self._stop`` is a ``threading.Event``.

The following error is raised (sometimes):

```
Exception ignored in: >
Traceback (most recent call last):
  File 
"/home/linkdd/devel/projects/link-framework/venv3/lib/python3.4/site-packages/riak/client/multi.py",
 line 110, in __del__
  File 
"/home/linkdd/devel/projects/link-framework/venv3/lib/python3.4/site-packages/riak/client/multi.py",
 line 97, in stop
  File "/usr/lib64/python3.4/threading.py", line 518, in set
  File "/usr/lib64/python3.4/threading.py", line 360, in notify_all
  File "/usr/lib64/python3.4/threading.py", line 343, in notify
TypeError: 'NoneType' object is not callable
```

When going in the ``threading`` module, I have found the following line:

```
waiters_to_notify = _deque(_islice(all_waiters, n))
```

I added just before:

```
print(_deque, _islice, all_waiters, n)
```

Just to see that ``_deque`` and ``_islice`` are both **None**. They are 
imported from the modules ``collections`` and ``itertools`` correctly though.

--
components: Library (Lib)
messages: 268974
nosy: linkdd
priority: normal
severity: normal
status: open
title: _deque and _islice are sometimes None
type: crash
versions: Python 3.4

___
Python tracker 

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



[issue26090] More correct string truncating in PyUnicode_FromFormat()

2016-06-21 Thread Adam Bartoš

Changes by Adam Bartoš :


--
nosy: +Drekin

___
Python tracker 

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



[issue1690201] Added support for custom readline functions

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

See also Issue 1175004, proposing the same sort of custom function, but called 
“py_callback”.

--
nosy: +martin.panter

___
Python tracker 

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



[issue19613] test_nntplib: sporadic failures, test_article_head_body()

2016-06-21 Thread Martin Panter

Martin Panter added the comment:

I presume the original report was due to testing when the server happened to 
return an article with an empty body. The failing test is

# XXX this could exceptionally happen...
self.assertNotIn(article.lines[-1], (b".", b".\n", b".\r\n"))

The test code already admits that what it is testing cannot be guaranteed (an 
article body could end with a full stop). And we have found another case where 
the test is not valid (an article with zero lines). I say remove this part of 
the test, at least when testing the article() and body() methods.

--

___
Python tracker 

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