[issue27364] Deprecate invalid unicode escape sequences

2016-08-23 Thread John Mark Vandenberg

Changes by John Mark Vandenberg :


--
nosy: +jayvdb

___
Python tracker 

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



[issue27683] ipaddress subnet slicing iterator malfunction

2016-08-23 Thread Xiang Zhang

Xiang Zhang added the comment:

issue27683.patch tries to fix this. It alters the doc and refactors the 
constructor, so there is no difference between different arguments

As for IPv6Network, it has the same problem.

--
nosy: +xiang.zhang
Added file: http://bugs.python.org/file44193/issue27683.patch

___
Python tracker 

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



[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3310ea7dbe30 by Vinay Sajip in branch 'default':
Issue #12713: reverted fix pending further discussion.
https://hg.python.org/cpython/rev/3310ea7dbe30

--

___
Python tracker 

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



[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-23 Thread Vinay Sajip

Changes by Vinay Sajip :


--
priority: release blocker -> normal

___
Python tracker 

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



[issue12713] argparse: allow abbreviation of sub commands by users

2016-08-23 Thread Vinay Sajip

Changes by Vinay Sajip :


--
assignee: vinay.sajip -> 

___
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-08-23 Thread INADA Naoki

Changes by INADA Naoki :


Added file: http://bugs.python.org/file44194/compact-dict.patch

___
Python tracker 

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



[issue27363] Complex numbers with negative zero parts do not roundtrip properly

2016-08-23 Thread Vedran Čačić

Vedran Čačić added the comment:

Unfortunately, as http://bugs.python.org/issue23229#msg233965 shows, Guido is 
against changing complex.__repr__. Is there any chance someone  could show this 
discussion to him, to show how it would help and try to change his mind?

--

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Vedran Čačić

New submission from Vedran Čačić:

During the discussion about http://bugs.python.org/issue27539, we found the 
following weird behavior:

>>> from fractions import Fraction as F
>>> F(2, 3, 4)
Fraction(2, 3)

It looks like the third argument is simply disregarded, but it's not so: if 
it's false, the fraction is not normalized, and it breaks a lot of arithmetic 
assumptions.

>>> F(4, 2, 0)
Fraction(4, 2)
>>> _ == 2
False

The secret is additional argument "_normalize" to Fraction.__new__, which was 
added for optimization in various cases (where we know that numerator and 
denominator are relatively prime, so the gcd needn't be computed). That 
argument was obviously meant for internal use only (its name starts with '_'), 
so accepting the above forms can be viewed as a bug. Although cases can be made 
for being able to set that argument from the outside, surely in most cases 
people passing 3 arguments are doing it by accident, not on purpose.

That bug is easily fixed, by declaring the argument as keyword only. The line 
84 in lib/fractions.py should be changed from

- def __new__(cls, numerator=0, denominator=None, _normalize=True):

to

+ def __new__(cls, numerator=0, denominator=None, *, _normalize=True):

That way, those who know what they are doing, can still pass the _normalize 
argument, but it's much harder to accidentally pass it for people who don't 
know nor care about it.

Of course, all the code from that file already passes _normalize by keyword, so 
no other code should be changed.

--
messages: 273422
nosy: veky
priority: normal
severity: normal
status: open
title: fractions.Fraction with 3 arguments: error passes silently

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Josh Rosenberg

Josh Rosenberg added the comment:

+1; obviously, this could only be changed on Python 3.

Given the third argument is underscore prefixed, I think it can be safely 
changed without a deprecation period, it's not a public part of the interface, 
right?

--
nosy: +josh.r

___
Python tracker 

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



[issue27126] Apple-supplied libsqlite3 on OS X is not fork safe; can cause crashes

2016-08-23 Thread Chris Jerdonek

Chris Jerdonek added the comment:

> We can't solve that problem; only Apple can;

> So, if we don't change _scproxy or urllib*'s use of it, only Apple can fix 
> the problem.

In the Django ticket I mentioned in my comment above, one of the commenters 
said, "Just ran the tests at the mentioned commit on my macOS Sierra public 
beta with a fresh 3.5.2 python environment. No problems there."

(https://code.djangoproject.com/ticket/27086#comment:4 )

In other words, the issue that affected me on Mac OS X El Capitan (whose root 
cause is this issue I believe) wasn't present in Sierra.

Do you think this means Apple has addressed the issue in the next version of 
its OS?

--

___
Python tracker 

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



[issue25825] AIX shared library extension modules installation broken

2016-08-23 Thread Martin Panter

Martin Panter added the comment:

Patch 1 does not apply to 2.7. The offending commit 88a532a31eb3 was not made 
in that branch.

Patch 2 may apply to 2.7, but I am not sure if it is needed or worthwhile. 
Again, the offending commit r86731 not made to 2.7. There is also a 
$(BINLIBDEST)/config reference for Be OS; surely if one is updated the other 
should too.

David: I don’t understand “Patch2 makes test_distutils worse because LDSHARED 
refers to a file that only exists when Python is installed.” At the moment, 
doesn’t LDSHARED refer to a file that never exists? So at least the test will 
be improved when Python is installed, right?

I looked into the test_distutils failures and here’s what I found:

* Revision c958678720fd assigns BLDSHARED → LDSHARED in distutils if the source 
tree is detected. This survived in the 3.5 branch, so may explain why the 3.5 
buildbot failure mentions “./Modules/ld_so_aix”.

* In 2.7, revision fa69e891edf4 moved the assignment into sysconfig.py.

* Then be3b4aa2ad28 loads LDSHARED from _sysconfigdata.py, which is created by 
sysconfig.py with the alternative BLDSHARED → LDSHARED value. This explains 
“./Modules/ld_so_aix” in 2.7.

* In 3.6, c554194240fc (Issue 18235) reversed the assignment in sysconfig.py, 
which now assigns LDSHARED → BLDSHARED, and creates _sysconfigdata.py with this 
alternative value.

* Then 3fa8aebed636 loads LDSHARED directly from _sysconfigdata.py. In this 
case it is the original LDSHARED value, so the 3.6 buildbot failure refers to 
/usr/local/lib/python3.6/config/ld_so_aix.

--

___
Python tracker 

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



[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-23 Thread Guni

New submission from Guni:

Hello,

When I try to put a long string (I mean longer then 65523 chars) in a queue if 
the put is inside in Process it's block the process and Process.Join() never 
execute.

Let's me give an example:
---
from multiprocessing import Queue, Process

def getLongString():
s = ""
for i in range(1, 65524):
s += "1"
return s

def p1(q):
print('START')
q.put(getLongString())
print('END')

q = Queue()

prs1 = Process(target=p1, args=(q,))
prs1.start()
prs1.join()

print('FINISH')


##
The result of it 65524 chars will be:
START
END
##

##
The result of it 65523 chars will be:
START
END
FINISH
##

--
messages: 273426
nosy: Guni
priority: normal
severity: normal
status: open
title: Process is locked when try to execute Queue.put() inside
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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Vedran Čačić

Vedran Čačić added the comment:

Yes, although it can be viewed as a bugfix, it's impossible on Python 2. We 
_can_ do it on Python 2 too, with

def __new__(cls, numerator=0, denominator=None, *empty, _normalize=True):
if empty:
raise TypeError('too many positional arguments')
...

but I'm not interested in it [and honestly, I'm sick of uglifying my code just 
to be able to run it on Py2]. Also, Mark Dickinson said 
(http://bugs.python.org/issue27539#msg273282) it shouldn't even be changed on 
Py3.5, so surely then it shouldn't be changed on Py2.7. :-)

I think no deprecation is needed: it isn't 
(https://docs.python.org/3.5/library/fractions.html?highlight=fraction#fractions.Fraction),
 and as far as I know has never been, documented.

--
components: +Library (Lib)
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



[issue27834] test_datetime fails on "x86 Gentoo Non-Debug with X 3.x" buildbot

2016-08-23 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/x86%20Gentoo%20Non-Debug%20with%20X%203.x/builds/1286/steps/test/logs/stdio

==
ERROR: test_gaps (test.datetimetester.ZoneInfoTest[Asia/Qyzylorda])
--
Traceback (most recent call last):
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/datetimetester.py",
 line 4700, in setUp
self.tz = ZoneInfo.fromname(self.zonename)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/datetimetester.py",
 line 4531, in fromname
return cls.fromfile(f)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/datetimetester.py",
 line 4523, in fromfile
self = cls(ut, ti)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/datetimetester.py",
 line 4476, in __init__
self.lt = self.invert(ut, ti)
  File 
"/buildbot/buildarea/3.x.ware-gentoo-x86.nondebug/build/Lib/test/datetimetester.py",
 line 4486, in invert
lt[0][i] += ti[i-1][0] // SEC
OverflowError: Python int too large to convert to C long

--
components: Tests
keywords: buildbot
messages: 273428
nosy: belopolsky, haypo
priority: normal
severity: normal
status: open
title: test_datetime fails on "x86 Gentoo Non-Debug with X 3.x" buildbot
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



[issue27833] Process is locked when try to execute Queue.put() inside

2016-08-23 Thread Xiang Zhang

Changes by Xiang Zhang :


--
components: +Library (Lib)
nosy: +davin
type:  -> behavior

___
Python tracker 

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



[issue21085] compile error Python3.3 on Cygwin

2016-08-23 Thread Erik Bray

Erik Bray added the comment:

I've run into this recently.  Is there anything I can do to shepherd this issue 
toward a resolution status?

--
nosy: +erik.bray

___
Python tracker 

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



[issue27835] SystemExit in setUpClass etc. terminates test run

2016-08-23 Thread alexander.sturm

New submission from alexander.sturm:

In the following example code, a SystemExit is raised in setUpClass of a 
unittest.TestCase, which causes the python instance to terminate. This behavior 
is inconsistent with how SystemExit is handled in other places (e.g. in 
setUp/tearDown methods, or in actual test methods), where it is caught by 
unittest to prevent termination. See also issue #10611.

import unittest
class Test(unittest.TestCase):
@classmethod
def setUpClass(cls):
raise SystemExit()

def test_something(self):
pass

result = unittest.TestResult()
suite = unittest.TestSuite()
suite.addTest(unittest.defaultTestLoader.loadTestsFromTestCase(Test))
suite.run(result)
print result

--
components: Library (Lib)
messages: 273430
nosy: alexander.sturm
priority: normal
severity: normal
status: open
title: SystemExit in setUpClass etc. terminates test run
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



[issue27835] SystemExit in setUpClass etc. terminates test run

2016-08-23 Thread alexander.sturm

Changes by alexander.sturm :


--
keywords: +patch
Added file: http://bugs.python.org/file44195/issue_27835.diff

___
Python tracker 

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



[issue27835] SystemExit in setUpClass etc. terminates test run

2016-08-23 Thread alexander.sturm

Changes by alexander.sturm :


Added file: http://bugs.python.org/file44196/issue_27835_py3k.diff

___
Python tracker 

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



[issue27836] VCRUNTIME140.DLL not found

2016-08-23 Thread Chris Wood

New submission from Chris Wood:

Windows 7 / 64-bit / 4 Gb Ram / Intel i5 processor.

This seems to have been discussed intermittently in the past, but none of the 
previous answers fixed my problem.

I installed 3.5, and when I tried running it (both from the Windows cmd line 
and from the python cmd line) I received the error

"The prodecure entry point strncmp could not be located in the dynamic link 
library VCRRUNTIME140.dll"

I installed 2.7.12 and received the same error.

I then uninstalled 2.7.12 and installed 2.7.11 and found that running this 
worked from the python cmd line but not from the windows cmd line.

I then tried installing 3.5.11 and found vcruntime140.dll in the python 
directory. I copied this to the python 2.7 folder, uninstalled 3.5.11 (and 
3.5.12 – after realising that the original installation didn’t seem to have 
completed successfully anyway, despite saying it had!), and now when I run 
python from both the windows cmd line and python cmd line it seems to work.

--
components: Installation
messages: 273431
nosy: Chris Wood
priority: normal
severity: normal
status: open
title: VCRUNTIME140.DLL not found
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



[issue27836] VCRUNTIME140.DLL not found

2016-08-23 Thread SilentGhost

Changes by SilentGhost :


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

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Wouldn't be better to get rid of private parameter (it is visible in the docs) 
at all?

Proposed patch removes the _normalize parameter and adds very simple private 
module level function instead (hidden from the docs).

--
keywords: +patch
nosy: +mark.dickinson, rhettinger, serhiy.storchaka
stage:  -> patch review
type:  -> enhancement
Added file: http://bugs.python.org/file44197/fraction_from_normalized.patch

___
Python tracker 

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



[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1f73355afebb by Martin Panter in branch 'default':
Issue #27787: Remove test_main() and hard-coded list of test classes
https://hg.python.org/cpython/rev/1f73355afebb

--

___
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-08-23 Thread alexander.sturm

Changes by alexander.sturm :


--
nosy: +alexander.sturm

___
Python tracker 

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



[issue27814] contextlib.suppress: Add whitelist argument

2016-08-23 Thread Nick Coghlan

Nick Coghlan added the comment:

Thanks for being understanding of the decision. Regarding my comment above 
about __subclasscheck__ potentially letting you implement this without changing 
the signature of suppress, here's an example of how you might be able to do 
that.

First, define a metaclass that delegates type checks to the type itself 
(similar to abc.ABCMeta):

class FilteredExceptionMeta(type):
def __subclasscheck__(cls, other):
return cls.__subclasshook__(other)
def __instancecheck__(cls, other):
return cls.__subclasshook__(type(other))

Then, define a factory function to create custom classes based on that 
metaclass:

def filtered_exc(exc_type, *, unless=()):
class _FilteredException(metaclass=FilteredExceptionMeta):
@classmethod
def __subclasshook__(cls, other):
return (issubclass(other, exc_type)
and not issubclass(other, unless))
return _FilteredException


>>> from contextlib import suppress
>>> selective_filter = suppress(filtered_exc(OSError, unless=FileNotFoundError))
>>> with selective_filter:
... raise OSError("Suppressed")
... 
>>> with selective_filter:
... raise FileNotFoundError("Not suppressed")
... 
Traceback (most recent call last):
  File "", line 2, in 
FileNotFoundError: Not suppressed

This works because suppress() calls issubclass() explicitly, unlike the current 
implementation of except clause processing.

--

___
Python tracker 

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



[issue13756] Python3.2.2 make fail on cygwin

2016-08-23 Thread Erik Bray

Erik Bray added the comment:

I can confirm that the last attached patch on this issue fixes this particular 
issue with building on Cygwin.  There are other issues but this is definitely 
one of them.

--
nosy: +erik.bray

___
Python tracker 

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



[issue12029] Catching virtual subclasses in except clauses

2016-08-23 Thread Nick Coghlan

Nick Coghlan added the comment:

This question came up again recently over in #27814, in the context of a 
proposal to add an "unless" parameter to contextlib.suppress(). I declined the 
RFE mainly on the basis of API complexity, but I also noted you can get 
something comparable in the current API by using virtual subclassing to say "If 
a subclass of these, but not of these": 
http://bugs.python.org/issue27814#msg273434

So the status quo is currently giving us a slightly odd discrepancy between 
normal except clauses and code that emulates them via issubclass()

--

___
Python tracker 

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



[issue27837] Logging Cookbook Improvement

2016-08-23 Thread Niko Yasui

New submission from Niko Yasui:

Removed the unnecessary listener function and changed the worker loggers from 
root to children. Also replaced print statements with logging statements and a 
stdout handler to illustrate the usefulness of handler levels. This version 
also doesn't require a manual listener process or thread, since it's all 
handled by the interpreter in the background. 

As far as I know, it's just a one-line change from multiprocessing to 
threading, so it should be easy to adapt this example to improve the threading 
example as well.

The previous example was hard for me to understand, and when I integrated it to 
my code, printed duplicates of every log item to all my handlers (including 
stdout) even though I hadn't added a stdout handler. Evidently this was my 
fault, since the original example code doesn't do that, but this updated code 
should be cleaner and easier to understand to avoid such integration problems 
in the first place. I hope it is a worthy contribution the docs. Feel free to 
provide any tips to improve it.

--
assignee: docs@python
components: Documentation
files: multi_log_cookbook.py
messages: 273437
nosy: Niko Yasui, docs@python
priority: normal
severity: normal
status: open
title: Logging Cookbook Improvement
type: enhancement
versions: Python 3.5
Added file: http://bugs.python.org/file44198/multi_log_cookbook.py

___
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-08-23 Thread Mark Dickinson

Changes by Mark Dickinson :


--
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 numbers with negative zero parts do not roundtrip properly

2016-08-23 Thread Mark Dickinson

Mark Dickinson added the comment:

> Unfortunately, as http://bugs.python.org/issue23229#msg233965 shows, Guido is 
> against changing complex.__repr__.

Good catch! I think that means we should close this issue. The current 
behaviour isn't actually wrong; it's just a compromise between lots of 
different concerns.

--
resolution:  -> wont fix
status: open -> closed

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Mark Dickinson

Mark Dickinson added the comment:

Sorry, but to be honest, I think this is a non-issue. Writing `Fraction(2, 3, 
4)` doesn't seem like a very likely cause of real bugs. I'd rather see the code 
left as it is.

--

___
Python tracker 

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



[issue27787] Avoid test_main() in test_httplib; gc.collect() dangling threads

2016-08-23 Thread Martin Panter

Changes by Martin Panter :


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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Vedran Čačić

Vedran Čačić added the comment:

Argh. This is not the first time my proposal was blown way out of proportion, 
and then killed. :-(

What exactly is wrong with making _normalized keyword-only? All the serious 
usage (including all the usage already in fractions.py) remain the same, and we 
avoid an obvious "error passes silently" issue.

I know Serhiy's proposal is scary, it scares me too. super call inside a 
non-method is something only wizards use, probably. :-) But that doesn't mean 
we should give up on a trivial enhancement that correctly counts the given 
arguments.

Would you really be fine with, e.g. a builtin chr function, that is documented 
exactly as it is now documented, but in fact can be called with two arguments, 
and if the second argument is false, it works exactly the same, but if it is 
true, it returns an object that looks like a string of length one, but in fact 
is surrogate-represented (of length two) if the first argument is greater than 
65535? I'm sure it would be pronounced a bug almost immediately. And I don't 
see how it's different from this.

Python callables _do_ count their arguments. Python is not JavaScript. Calling 
a function with a different number of arguments than it receives _is_ an error. 
Errors shouldn't pass silently. _Especially_ if they happen rarely.

--

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-23 Thread Erik Bray

Erik Bray added the comment:

I agree--this has the same problem on Cygwin, where pthread_key_t is not just a 
typedef'd integer (in fact it's a pointer to an instance of a class).

Anyways as Ed wrote above POSIX says this is supposed to be an opaque type and 
there's no reason to assume it's an integer. Linux could change its definition 
tomorrow and we'd have no one to blame but ourselves if it breaks Python.

If it's too hard to change the Python API, at the very least the change in 
#22206 should be reverted or reworked somehow, because there's no reason to 
assume that pthread_key_t can even be compared safely to an integer, much less 
that it would be less than INT_MAX.

--
nosy: +erik.bray

___
Python tracker 

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



[issue27831] Python 3.4.5 leaks memory when attempting to load non-existent file

2016-08-23 Thread R. David Murray

R. David Murray added the comment:

How are you defining "leak"?  It isn't a leak if Python allocates memory that 
it doesn't free when doing a new operation.  If you do that operation 
repeatedly and memory use continues to increase, that would be a leak.

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-23 Thread STINNER Victor

STINNER Victor added the comment:

What do you suggest? Python C code bases uses "long" everywhere.

--
nosy: +haypo

___
Python tracker 

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



[issue21085] compile error Python3.3 on Cygwin

2016-08-23 Thread R. David Murray

R. David Murray added the comment:

Review the patch, confirm that it works for you (please indicate what cygwin 
and OS version, etc you test on).  Also review this issue and make sure all 
open concerns have been addressed by the current patch.

--

___
Python tracker 

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



[issue27838] test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" buildbot

2016-08-23 Thread STINNER Victor

New submission from STINNER Victor:

http://buildbot.python.org/all/builders/AMD64%20FreeBSD%20CURRENT%20Debug%203.x/builds/940/steps/test/logs/stdio

==
ERROR: test_chown (test.test_os.ChownFileTests)
--
Traceback (most recent call last):
  File 
"/usr/home/buildbot/python/3.x.koobs-freebsd-current/build/Lib/test/test_os.py",
 line 1138, in test_chown
os.chown(support.TESTFN, uid, gid_1)
PermissionError: [Errno 1] Operation not permitted: '@test_12983_tmp'

--

--
components: Tests
keywords: buildbot
messages: 273444
nosy: haypo, koobs
priority: normal
severity: normal
status: open
title: test_os.test_chown() random failure on "AMD64 FreeBSD CURRENT Debug 3.x" 
buildbot
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



[issue27837] Logging Cookbook Improvement

2016-08-23 Thread R. David Murray

R. David Murray added the comment:

Can you provide this change as a diff, please? (See docs.python.org/devguide 
for information on generating reviewable patches).

--
nosy: +r.david.murray, vinay.sajip

___
Python tracker 

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



[issue27839] "Python [...] calls sys.displayhook() on unhandled exceptions"

2016-08-23 Thread Jakub Wilk

New submission from Jakub Wilk:


 reads:
"Python usually calls sys.displayhook() on unhandled exceptions. If 
Future.set_exception() is called, but the exception is never consumed, 
sys.displayhook() is not called."

I believe this should be s/displayhook/excepthook/g.

--
assignee: docs@python
components: Documentation
messages: 273446
nosy: docs@python, jwilk
priority: normal
severity: normal
status: open
title: "Python [...] calls sys.displayhook() on unhandled exceptions"

___
Python tracker 

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



[issue25825] AIX shared library extension modules installation broken

2016-08-23 Thread David Edelsohn

David Edelsohn added the comment:

$(BINLIBDEST)/config is equivalent to $(LIBPL) in Python 2.7, so Python 2.7 
should be okay.

Patch2 will not make test_distutils results worse, but the test results may not 
represent the true status of distutils on AIX if the matching Python version is 
not installed so that the test can find the files in the installed location.

--

___
Python tracker 

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



[issue27795] Cygwin compile errors

2016-08-23 Thread Kaeptm Blaubaer

Kaeptm Blaubaer added the comment:

I can configure only after I have run autoconf and autoheader, then I can 
configure it without args, then when you run make you can see specific errors.

--
resolution: duplicate -> 
status: closed -> open

___
Python tracker 

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



[issue27795] Cygwin compile errors

2016-08-23 Thread Kaeptm Blaubaer

Kaeptm Blaubaer added the comment:

If I run cygwin 32 bit and self-compiled 32 bit python or _freeze_importlib on 
a 64 bit computer, I'm getting a Fatal Python error.

--

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-23 Thread Erik Bray

Erik Bray added the comment:

I'm not really sure what "long" has to do with it...

The problem is that the PyThread API uses ints to represent TLS keys, and has 
for about as long as it's existed (maybe what you meant by "long").  But when 
support for native TLS was added (#9786 for pthread, sometime earlier for 
Windows) , the faulty assumption as made in several places that this API (i.e. 
the type of key is "int") should always map perfectly onto native APIs, and it 
doesn't.

There are several places for example where an int key is passed to 
pthread_getspecific and pthread_setspecific 
(http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_getspecific.html).
  On Linux the compiler happens to allow this because pthread_key_t is defined 
as "unsigned int"  So yeah there's an implicit cast, but since it counts up 
from zero it usually works.  Likewise TlsAlloc on Windows expects the key to be 
a DWORD but the compiler will accept an int.

This is really an unsafe assumption though, especially when PyThread_create_key 
casts the key to an int, and later reuses the (possibly not safely cast) key 
with PyThread_delete_key/get_key_value/set_key_value).  This was brought up at 
the time, where MvL wrote:

> In principle, this is really difficult to get right. AFAICT,
pthread_key_t doesn't even have to be an integral type, and even
if it is, it may well become -1. However, we can probably worry
about this when a system comes along where this implementation
breaks.

One possible workaround without changing the existing API would be this:  Each 
native support wrapper should also provide a *safe* mapping between its native 
key types and ints, to support the PyThread API.

For example, the pthread interface could maintain a linked list or an even an 
array of pthread_key_t pointers, and use the int "key" as the index into that 
list.  If I understand correctly this should be basically harmless since the 
same key (and hence key -> native-key mapping) can be shared across threads.

--

___
Python tracker 

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



[issue27809] _PyObject_FastCall(): add support for keyword arguments

2016-08-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c1a698edfa1b by Victor Stinner in branch 'default':
Issue #27809: partial_call() uses fast call for positional args
https://hg.python.org/cpython/rev/c1a698edfa1b

--

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-23 Thread Erik Bray

Erik Bray added the comment:

(Of course, maintaining such a list might take some care, but only when 
creating and deleting keys--it wouldn't add any overhead to using them to 
get/set values.)

--

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Steven D'Aprano

Steven D'Aprano added the comment:

At the risk of muddying the waters even further, I'd like to make _normalize a 
public parameter in Python 3.7. There's an interesting operation you can do 
with fractions, the mediant:

https://en.wikipedia.org/wiki/Mediant_%28mathematics%29

http://www.mathteacherctk.com/blog/2011/02/06/mediant-fractions-and-simpsons-paradox/

It's easy to work with mediants provided you have a way to prevent fractions 
from being normalised automatically.

So I'm +1 on making _normalize a keyword-only argument for 3.6 as a first step.

--
nosy: +steven.daprano

___
Python tracker 

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



[issue27837] Logging Cookbook Improvement

2016-08-23 Thread Vinay Sajip

Vinay Sajip added the comment:

I specifically wanted to illustrate a separate listener process - the purpose 
here is not to show what might be the most efficient code, but to show 
communication via a queue between listener process and worker processes. You've 
removed this, which defeats the object of this example (for example, there's no 
QueueListener in your version). So I wouldn't want to implement your proposed 
change in its current form.

Just to clarify, a diff of the cookbook ought to be a diff of the .rst file 
rather than just a changed code example within it - a direct comparison needs 
to be possible in order to see the changes easily in a side-by-side view.

--

___
Python tracker 

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



[issue27840] functools.partial: don't copy keywoard arguments in partial_call()?

2016-08-23 Thread STINNER Victor

New submission from STINNER Victor:

I justed optimized partial_call() for positional arguments in the change 
c1a698edfa1b to avoid the creation of a temporary tuple when possible.

I noticed that keyword parameters from partial() constructor are always copied. 
Is it mandatory? Can't we avoid copying them?

Example:
---
import functools
hello = functools.partial(print, "Hello World", end='!\n')
hello()
---

hello keyword arguments are {'end'; '!\n'}.

Attached patch avoids copying keyword arguments when the partial objects is not 
called with new keyword arguments.

Tests pass, but I don't know if there is a risk that some strange function 
modify keyword arguments in-place?

--
files: partial_call_kwargs.patch
keywords: patch
messages: 273456
nosy: haypo, rhettinger, serhiy.storchaka
priority: normal
severity: normal
status: open
title: functools.partial: don't copy keywoard arguments in partial_call()?
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file44199/partial_call_kwargs.patch

___
Python tracker 

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



[issue27825] Make the documentation for statistics' data argument clearer.

2016-08-23 Thread Steven D'Aprano

Changes by Steven D'Aprano :


--
assignee: docs@python -> steven.daprano
nosy: +steven.daprano

___
Python tracker 

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



[issue27795] Cygwin compile errors

2016-08-23 Thread R. David Murray

R. David Murray added the comment:

Please deal with specific errors.  As I said there are a number of specific 
reports already, so a generic "it doesn't work" issue is not useful.  If you 
identify a specific issue for which there is not already an open bug report, 
please open a new issue for it with specifics.  Even better if you can suggest 
a solution.

--
resolution:  -> duplicate
status: open -> closed

___
Python tracker 

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



[issue27435] ctypes library loading and AIX - also for 2.7.X (and later)

2016-08-23 Thread Michael Felt

Michael Felt added the comment:

On 23-Aug-16 02:01, Martin Panter wrote:
> Martin Panter added the comment:
Thank you for your reply!
>
> I had understood that changing find_library() would only be useful in 
> combination with the automatic RTDL_MEMBER detection.
Adding the RTLD_MEMBER to the mode would be necessary for support of 
native archives. Without it, dlopen() will not work.
If I understand your comments correctly a python programmer could change 
all blocks such as: (please forgive syntax errors, if I make one, I may 
miss a : or the indent might not be straight)

Now:
xxxdl = cdll.LoadLibrary(find_library("xxx"))

Patched:
if sys.platform.startswith("aix"):
 dlname = find_library("xxx")
 if dlname and dlname.endswith(")") and dlname.rfind(".a(") > 0:
 from _ctypes import RTLD_LOCAL, RTLD_GLOBAL
 mode = RTLD_LOCAL | 0x0004
 xxxdl = cdll.LoadLibrary(dlname, mode)
 else if dlname:
 xxxld = cdll.LoadLibrary(dlname)
 else:
 xxxdl = cdll.LoadLibrary(find_library("xxx"))

> If you want to mention lack of support for AIX in the documentation, that is 
> okay by me. If you want to propose an alternative find_library() 
> implementation _without_ affecting the CDLL behaviour, that may be okay too.
I certainly do not want to document lack of support - I would prefer to 
see belated support for AIX. If the code above is all that is acceptable 
for 2.7 then I am still not as happy as I could be - I would rather not 
require all programmers that are still active in Python2 to add a new 
function to replace the default find_library() - as I think rewriting it 
as a private function is more secure than finding and changing every 
call to ctypes.find_library currently in "my" code.
And, of course, the other change would be everywhere where I now import 
ctypes.util would be to import my own function (that would be the only 
place I imports ctypes.
In short, what I hope for is that the "Now:" codeblock above will work asis.
>
> For the libuuid problem, for 2.7 I would suggest adding an explicit call to 
> load libc.a(. . .) or whatever is appropriate.
Again, without also adding the constant 0x0004 adding an explicit 
call to "libc.a(shr.o)" (32-bit mode) or "libc.a(shr_64.o)" is pointless.
And, if you would permit the constant 0x0004 in Lib/uuid.py to make 
those calls work, then why not let it be in Lib/ctypes/__init__.py ?

>
> Personally I don’t have a specific interest in AIX, but I am happy to commit 
> patches for AIX if I think they are sensible. I think I mentioned before in 
> the other bug that your changes seemed okay for the next Python version.
If I recall, I submitted patches but not processed via Mercurial - not 
had the time to learn that.

I see (now) that you have processed them, and set them for review - many 
thanks.

I do not have any specific interest in python. My interest is supporting 
people who want to use python on AIX. And as PEP 373 says Python is 
supported into/until 2020 - it seems reasonable to correct an omission. 
A computer does not care whether the block is "Now:" or "Patched:". But 
I think most python developers would prefer not having to patch all 
their code. Rather, I fear they will say "we cannot/do not support AIX" 
because ... (some politically correct answer to not say AIX support is 
broken).

> The beta deadline for 3.6 is in a few weeks (PEP 494), although after that 
> there is still 3.7.
Again, I submitted something. It probably needs changes. I'll check the 
review. What else is needed for that to be accepted?

If it misses 3.6, then I will have some soul searching to do.
>
> --
>
> ___
> Python tracker 
> 
> ___

--

___
Python tracker 

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



[issue27573] code.interact() should print an exit message

2016-08-23 Thread Steven D'Aprano

Steven D'Aprano added the comment:

On Thu, Aug 18, 2016 at 12:26:56PM +, Armin Rigo wrote:
> ...ah, upon closer inspection, we don't use the ``interact()`` method 
> anyway.  We already copied and tweaked this method: one problem was 
> that it gives no way to run without printing at least one '\n' of 
> banner at the beginning.  Then a more important tweak was made when we 
> added multiline input with `pyrepl` by default.  So feel free to 
> ignore my request.

I think making the exit message configurable is a good idea even if PyPy 
doesn't do it, and it should be an easy few lines, so I'll do it even if 
you don't need it for PyPy.

--

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-23 Thread R. David Murray

R. David Murray added the comment:

I'd say that sounds reasonable, but most likely it will only be someone working 
with one of the impacted platforms who will have the motivation to come up with 
a patch.  Especially since neither of the impacted platforms is current 
formally supported (meaning, we don't yet have anyone on the core team working 
with those platforms).

We have, it seems, arrived at the time that MvL foresaw :)

--
hgrepos: +352
nosy: +r.david.murray
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



[issue27841] Use fast call in method_call() and slot_tp_new()

2016-08-23 Thread STINNER Victor

New submission from STINNER Victor:

Attached patch avoids the creation of a temporary tuple in method_call() and 
slot_tp_new() by using the new fast call calling convention.

It uses a small buffer allocated on the stack C if the function is called with 
4 arguments or less, or it allocates a buffer in the heap memory.

The function also avoids INCREF/DECREF: references are borrowed, not strong 
references.

The patch adds a private _PyObject_Call_Preprend() helper function written to 
optimize such way of packing positional arguments, it's like:

   args = (obj,) + args
   func(*args, **kw)

--
files: call_prepend.patch
keywords: patch
messages: 273461
nosy: haypo, scoder, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Use fast call in method_call() and slot_tp_new()
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file44200/call_prepend.patch

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Vedran Čačić

Vedran Čačić added the comment:

As much as Steven's proposal would give me what I want in Py3.6, I must say I'm 
-1 on it. The assumption of every Fraction being reduced to lowest terms is 
really an important invariant that provides numerous opportunities for 
optimization (look at __eq__ for example, second if). I think it would be very 
wrong to have to generalize all the algorithms of Fraction to work correctly 
with non-normalized Fractions.

Furthermore, current (normalized) fractions are Rationals, thus belonging to 
the Python numeric tower. non-normalized fractions are not. Even if we _would_ 
someday have non-normalized fractions in stdlib, they would probably need to be 
named differently. (Currently Decimals are having an opposite problem: the main 
reason why adding decimal literals to Python is hard is because they would 
obviously have to be Reals, thus belonging to numeric tower, while current 
decimal.Decimals do not belong there.:)

[And mediants can be usefully researched if you stay within |Q, too; some of my 
students have done that. Even Wikipedia says (though it doesn't go into 
details):

A way around this, where required, is to specify that both rationals are to 
be represented as fractions in their lowest terms (with c > 0, d > 0). With 
such a restriction, mediant becomes a well-defined binary operation on 
rationals.

from fractions import Fraction
def mediant(p:Fraction, q:Fraction):
return Fraction(p.numerator + q.numerator,
  p.denominator + q.denominator)
]

Now, can we go back to a tiny three-character addition with no disadvantages at 
all (if I'm wrong, please inform me), making Python stdlib a bit better in 
catching accidental mistakes?

--

___
Python tracker 

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



[issue27841] Use fast call in method_call() and slot_tp_new()

2016-08-23 Thread STINNER Victor

STINNER Victor added the comment:

> It uses a small buffer allocated on the stack C if the function is called 
> with 4 arguments or less, or it allocates a buffer in the heap memory.

Maybe 4 is too small. On 64 bit, it's just 5*8=40 bytes. Maybe we can use a 
buffer of 10 pointers: 80 bytes? It would optimize calls with up to 9 arguments 
(1 pointer is used for "obj" argument, the "prepended" argument).

--

___
Python tracker 

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



[issue26040] Improve coverage and rigour of test.test_math

2016-08-23 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> mark.dickinson

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-23 Thread Erik Bray

Erik Bray added the comment:

The good news about this (in the pthread case) is that it does not need to be 
seen as some workaround for unusual platforms, but rather making the existing 
code more POSIX-compliant (and hence correct).

The Win32 side I'm a little less worried about because the TLS key is 
documented to be a DWORD, and so the existing casting to int should still work 
fine most of the time.  However, the docs for TlsAlloc() 
(https://msdn.microsoft.com/en-us/library/windows/desktop/ms686801(v=vs.85).aspx)
 do state:

> The value of the TLS index should be treated as an opaque value; do not 
> assume that it is an index into a zero-based array.

which again makes #22206 suspect :(

--

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Mark Dickinson

Changes by Mark Dickinson :


--
assignee:  -> mark.dickinson

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ea495a5ded9b by Mark Dickinson in branch 'default':
Issue #27832: Make _normalize parameter to Fraction.__init__ keyword-only.
https://hg.python.org/cpython/rev/ea495a5ded9b

--
nosy: +python-dev

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Mark Dickinson

Mark Dickinson added the comment:

Fixed.

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



[issue23229] add inf, nan, infj, nanj to cmath module

2016-08-23 Thread Mark Dickinson

Changes by Mark Dickinson :


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



[issue27598] Add SizedIterable to collections.abc and typing

2016-08-23 Thread Bar Harel

Bar Harel added the comment:

I still believe "Reiterable" better demonstrates the concept.

When you request a Reiterable as a function parameter or assert if something is 
a Reiterable the other side knows exactly what you mean.

A "Collection" is way more ambiguous - if you create an object that acts like 
range() but you can cycle over it more than once I wouldn't exactly call it a 
collection. I would though call it a Reiterable and it would be clear for any 
Python programmer familiar with the concept of iterators.

I believe this is a funny case in which the naming is more important than the 
implementation as it will turn into a term or concept that will be further used 
in many places to come.

--
nosy: +bar.harel

___
Python tracker 

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



[issue2613] inconsistency with bare * in parameter list

2016-08-23 Thread vitorg

vitorg added the comment:

Here is example where it's necessary, but still raising an error:
>>> def my_method(self, *, **kwargs):
... pass
... 
  File "", line 1
SyntaxError: named arguments must follow bare *

--
nosy: +vitorg

___
Python tracker 

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



[issue27836] VCRUNTIME140.DLL not found

2016-08-23 Thread Steve Dower

Steve Dower added the comment:

Where did you install Python from?

--

___
Python tracker 

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



[issue27836] VCRUNTIME140.DLL not found

2016-08-23 Thread Chris Wood

Chris Wood added the comment:

https://www.python.org/downloads/

--

___
Python tracker 

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



[issue27832] fractions.Fraction with 3 arguments: error passes silently

2016-08-23 Thread Vedran Čačić

Vedran Čačić added the comment:

Thank you very much! Not only for this fix, but also for restoring my faith in 
Python community. :-)

--

___
Python tracker 

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



[issue26040] Improve coverage and rigour of test.test_math

2016-08-23 Thread Mark Dickinson

Mark Dickinson added the comment:

I finally have some time to look at this. I've double-checked all the new cmath 
testcases against MPFR (via bigfloat), and they all look good. I plan to apply 
this in two stages: (1) apply the new cmath testcases, (2) apply the test_math 
changes, and (1.5) watch for buildbot failures in-between.

--

___
Python tracker 

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



[issue27363] Complex numbers with negative zero parts do not roundtrip properly

2016-08-23 Thread Vedran Čačić

Vedran Čačić added the comment:

Since I'm so happy with Fraction being fixed, I'll agree here. :-)

--

___
Python tracker 

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



[issue27837] Logging Cookbook Improvement

2016-08-23 Thread Niko Yasui

Niko Yasui added the comment:

Thank you both for the helpful comments.

Vinay, since you want to illustrate a listener process in the multiprocessing 
example, why not include a shorter, simpler example beforehand? This is my 
first time using logging, and it took me multiple hours to figure out what your 
example was doing and which parts were extra. Since a queue isn't necessary for 
logging with multiprocessing, I did my best to write a shorter example to 
introduce the concept before exploring your code with the listener.

What do you think about this addition?

--
keywords: +patch
Added file: http://bugs.python.org/file44201/mp_log_cookbook.patch

___
Python tracker 

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



[issue27836] VCRUNTIME140.DLL not found

2016-08-23 Thread Chris Wood

Chris Wood added the comment:

Apologies, there are typos in my final paragraph - 3.5.11 should just be 3.5, 
and 3.5.12 should be 3.5.2

--

___
Python tracker 

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



[issue27836] VCRUNTIME140.DLL not found

2016-08-23 Thread Steve Dower

Steve Dower added the comment:

Nothing in Python 2.7 depends on vcruntime140.dll, so you shouldn't be seeing 
that error from there.

My guess is that you have an extension module that requires it, or possibly 
your PATH or PYTHONPATH variables were mixed up.

It sounds like everything is working now? There's nothing actionable in this 
report unfortunately, unless you can reproduce the issue and help us diagnose 
it some more.

--

___
Python tracker 

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



[issue2613] inconsistency with bare * in parameter list

2016-08-23 Thread Guido van Rossum

Guido van Rossum added the comment:

I promise you it's not necessary in that example. Leaving out the '*' has the 
same effect as what you intend there.

--

___
Python tracker 

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



[issue27598] Add SizedIterable to collections.abc and typing

2016-08-23 Thread Guido van Rossum

Guido van Rossum added the comment:

ReIterable and Collection are different concepts.
- ReIterable just implements __iter__ but promises certain semantics.
- Collection implements __iter__, __contains__ and __len__.

If we had ReIterable I would probably decree that Collection inherits from it 
(practicality beats purity).

But I don't think ReIterable by itself would do much good; apart from a few 
"show-off" hacks, any reasonable ReIterable would also be able to implement 
__contains__ and __len__ easily.

And I would certainly call range() a Collection.

--

___
Python tracker 

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



[issue27836] VCRUNTIME140.DLL not found

2016-08-23 Thread Chris Wood

Chris Wood added the comment:

Ah, in that case:

 - I guess the issue would have been that the python 3.5 installation I tried 
(which was 3.5.0a1) had the vcruntime140.dll issue 
 - I've realised that the 3.5* installation puts Python on the beginning of the 
PATH - whereas I was putting the 2.7 directory at the end of the PATH (so when 
I was testing 2.7 my PATH variable was being ignored by the 3.5 one.
 - I assume that the missing vcruntime140.dll was a known bug in 3.5.0a1 and 
was fixed in a subsequent release

I should have probably realised all of this earlier!

--

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-23 Thread Erik Bray

Erik Bray added the comment:

FWIW I've created an initial patch for this.  Seems to work fine, but it's a 
bit of a mess and I have a few small implementation concerns.  I'll try to get 
it cleaned up sometime in the next few days and I'll post it.

--

___
Python tracker 

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



[issue27598] Add Collection to collections.abc and typing

2016-08-23 Thread Guido van Rossum

Changes by Guido van Rossum :


--
title: Add SizedIterable to collections.abc and typing -> Add Collection to 
collections.abc and typing

___
Python tracker 

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



[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 75111791110b by R David Murray in branch '2.7':
# 2466: ismount now recognizes mount points user can't access.
https://hg.python.org/cpython/rev/75111791110b

--

___
Python tracker 

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



[issue25658] PyThread assumes pthread_key_t is an integer, which is against POSIX

2016-08-23 Thread R. David Murray

Changes by R. David Murray :


--
hgrepos:  -352

___
Python tracker 

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



[issue27837] Logging Cookbook Improvement

2016-08-23 Thread Vinay Sajip

Vinay Sajip added the comment:

> Since a queue isn't necessary for logging with multiprocessing

IMO a queue with QueueHandler/QueueListener is best practice when working with 
multiprocessing and logging. If you don't use them, things may seem to work 
some of the time but could fail in certain scenarios. For example, 
multiprocessing works differently on different platforms such as POSIX and 
Windows, which can lead to problems with simpler approaches.

There are plenty of simpler examples in the logging tutorial and cookbook, 
which might be worth reviewing first if you are new to logging in Python.

See this post for a discussion on using logging with multiprocessing:

https://plumberjack.blogspot.co.uk/2010/09/using-logging-with-multiprocessing.html

This was the original source of the example in the cookbook.

--

___
Python tracker 

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



[issue2466] os.path.ismount doesn't work for mounts the user doesn't have permission to see

2016-08-23 Thread R. David Murray

R. David Murray added the comment:

Thanks, Xiang.

--
resolution:  -> fixed
stage: needs patch -> resolved
status: open -> closed
versions: +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



[issue26040] Improve coverage and rigour of test.test_math

2016-08-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 1017215f5492 by Mark Dickinson in branch 'default':
Issue #26040 (part 1): add new testcases to cmath_testcases.txt. Thanks Jeff 
Allen.
https://hg.python.org/cpython/rev/1017215f5492

--
nosy: +python-dev

___
Python tracker 

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



[issue27573] code.interact() should print an exit message

2016-08-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c4863530cfd6 by Steven D'Aprano in branch 'default':
Issue #27573 make the exit message configurable.
https://hg.python.org/cpython/rev/c4863530cfd6

--

___
Python tracker 

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



[issue27842] Order CSV header fields

2016-08-23 Thread Steve Holden

New submission from Steve Holden:

It's sometimes annoying that a csv.DictReader doesn't retain the field ordering 
given in the first line of the file. Sometimes it matters.

This patch converts the reader so that it returns an OrderedDict rather than a 
plain dict, thereby retaining the ordering.

All tests still pass (though I haven't yet added a test to verify that the 
field ordering *is* retained - didn't think it was worth it if the patch won't 
be added, but will happily add that test otherwise).

I have updated the documentation, but was unable in the time available to find 
out how to correctly reference the OrderedDict class so that it was correctly 
hyperlinked.

--
components: Library (Lib)
files: csv.patch
hgrepos: 353
keywords: needs review, patch
messages: 273486
nosy: holdenweb
priority: normal
severity: normal
stage: patch review
status: open
title: Order CSV header fields
versions: Python 3.6
Added file: http://bugs.python.org/file44202/csv.patch

___
Python tracker 

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



[issue27842] Order CSV header fields

2016-08-23 Thread Steve Holden

Changes by Steve Holden :


Removed file: http://bugs.python.org/file44202/csv.patch

___
Python tracker 

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



[issue27842] Order CSV header fields

2016-08-23 Thread Steve Holden

Steve Holden added the comment:

Sorry, deleted the originally submitted (incorrect) patch file.

--
Added file: http://bugs.python.org/file44203/csv.patch

___
Python tracker 

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



[issue27842] Order CSV header fields

2016-08-23 Thread R. David Murray

Changes by R. David Murray :


--
hgrepos:  -353

___
Python tracker 

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



[issue21085] compile error Python3.3 on Cygwin

2016-08-23 Thread Masayuki Yamamoto

Masayuki Yamamoto added the comment:

Hello, I'm writer for past patch.
3.4-issue21085-struct_siginfo.patch removes si_band field from struct_siginfo 
if the C siginfo_t doesn't have si_band field.
This modification raises a incompatibility between platforms having 
struct_siginfo.
Now, I wrote another patch that doesn't change fields of struct_siginfo to 
avoid its incompatibility. 
And I built cpython 3.5.2+ on vista cygwin-x86 using this patch.
Murray, would you be able to tell me your idea?
Many thanks.

New patch changes:
If platform has the C siginfo_t structure, but it doesn't have si_band field, 
the struct_siginfo.si_band field is always assigned zero at function return 
value.

--
Added file: http://bugs.python.org/file44204/3.5-issue21085-struct_siginfo.patch

___
Python tracker 

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



[issue12029] Catching virtual subclasses in except clauses

2016-08-23 Thread Berker Peksag

Changes by Berker Peksag :


--
nosy: +berker.peksag

___
Python tracker 

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



[issue27842] Order CSV header fields

2016-08-23 Thread R. David Murray

R. David Murray added the comment:

I think this seems reasonable, now that OrderedDict is in C.

--
nosy: +r.david.murray
type:  -> enhancement

___
Python tracker 

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



[issue27843] Spaces in filenames in setuptools

2016-08-23 Thread Michael Felt

New submission from Michael Felt:

p.s. - guessing on the component - this is after make install

+ make install DESTDIR=/var/aixtools/aixtools/python/3.6.0.164 > 
.buildaix/install.out
+ mkinstallp.ksh /var/aixtools/aixtools/python/3.6.0.164 > 
.buildaix/mkinstallp.out

+
renamed:./opt/lib/python3.6/site-packages/setuptools/script 
(dev).tmpl:./opt/lib/python3.6/site-packages/setuptools/script_dev_.tmpl
renamed:./opt/lib/python3.6/site-packages/setuptools/command/launcher 
manifest.xml:./opt/lib/python3.6/site-packages/setuptools/command/launcher_manifest.xml
+

My script scans for files with "hard to package" filenames, and I see two in 
site-packages/setuptools

No idea if this is new to Python-3.6, or if it has been around for a long time, 
but it does not seem "handy" to distribute files with " " in the filename.

--
components: Installation
messages: 273490
nosy: Michael.Felt
priority: normal
severity: normal
status: open
title: Spaces in filenames in setuptools
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



[issue27844] Python-3.6a4 build messages to stderr (on AIX and xlc compiler)

2016-08-23 Thread Michael Felt

New submission from Michael Felt:

FYI: Compiler warnings that appear on stderr (skipping any messages sent to 
stdout) - xlc V11 as the reporting compiler.

Two that may need attention are the redefines of _POSIX_C_SOURCE and 
_XOPEN_SOURCE in pyconfig.h

Also surprised by the message:
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]

I do not recall seeing that message in other builds.

Note also: no messages (to stderr) from configure

Details:

+ CPPFLAGS="-I/opt/include -I/opt/buildaix/include" CFLAGS="-I/opt/include 
-qmaxmem=-1 -qarch=pwr4 -O2 -I/opt/buildaix/includes"\
./configure\
--prefix=/opt \
--sysconfdir=/var/python/etc\
--sharedstatedir=/var/python/com\
--localstatedir=/var/python\
--mandir=/usr/share/man\
--infodir=/opt/share/info/python --without-computed-gotos\
> .buildaix/configure.out
+ make > .buildaix/make.out
"Objects/moduleobject.c", line 241.20: 1506-068 (W) Operation between types 
"struct _object*(*)(struct _object*,struct PyModuleDef*)" and "void*" is not 
allowed.
"./pyconfig.h", line 1472.9: 1506-236 (W) Macro name _POSIX_C_SOURCE has been 
redefined.
"./pyconfig.h", line 1472.9: 1506-358 (I) "_POSIX_C_SOURCE" is defined on line 
147 of /usr/include/standards.h.
"./pyconfig.h", line 1494.9: 1506-236 (W) Macro name _XOPEN_SOURCE has been 
redefined.
"./pyconfig.h", line 1494.9: 1506-358 (I) "_XOPEN_SOURCE" is defined on line 
143 of /usr/include/standards.h.
"./Modules/posixmodule.c", line 5532.11: 1506-131 (W) Explicit dimension 
specification or initializer required for an auto or static array.
"./Modules/xxsubtype.c", line 293.19: 1506-196 (W) Initialization between types 
"void*" and "int(*)(struct _object*)" is not allowed.
nm: libpython3.6m.a: 0654-200 Cannot open the specified file.
nm: A file or directory in the path name does not exist.
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_ctypes/_ctypes_test.c", 
line 392.5: 1506-159 (E) Bit field type specified for M is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_ctypes/_ctypes_test.c", 
line 392.5: 1506-159 (E) Bit field type specified for N is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_ctypes/_ctypes_test.c", 
line 392.5: 1506-159 (E) Bit field type specified for O is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_ctypes/_ctypes_test.c", 
line 392.5: 1506-159 (E) Bit field type specified for P is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_ctypes/_ctypes_test.c", 
line 392.5: 1506-159 (E) Bit field type specified for Q is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_ctypes/_ctypes_test.c", 
line 392.5: 1506-159 (E) Bit field type specified for R is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_ctypes/_ctypes_test.c", 
line 392.5: 1506-159 (E) Bit field type specified for S is not valid. Type 
unsigned assumed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/arraymodule.c", line 
2996.19: 1506-196 (W) Initialization between types "void*" and "int(*)(struct 
_object*)" is not allowed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_testmultiphase.c", line 
84.22: 1506-196 (W) Initialization between types "void*" and "int(*)(struct 
{...}*)" is not allowed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_testmultiphase.c", line 
85.22: 1506-196 (W) Initialization between types "void*" and "int(*)(struct 
{...}*,int(*)(struct _object*,void*),void*)" is not allowed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_testmultiphase.c", line 
86.22: 1506-196 (W) Initialization between types "void*" and "struct 
_object*(*)(struct {...}*,struct _object*)" is not allowed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_testmultiphase.c", line 
87.21: 1506-196 (W) Initialization between types "void*" and "int(*)(struct 
{...}*,const char*,struct _object*)" is not allowed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_testmultiphase.c", line 
235.19: 1506-196 (W) Initialization between types "void*" and "int(*)(struct 
_object*)" is not allowed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_testmultiphase.c", line 
281.21: 1506-196 (W) Initialization between types "void*" and "struct 
_object*(*)(struct _object*,struct PyModuleDef*)" is not allowed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_testmultiphase.c", line 
454.21: 1506-196 (W) Initialization between types "void*" and "struct 
_object*(*)(struct _object*,struct PyModuleDef*)" is not allowed.
"/data/prj/aixtools/python/python-3.6.0.164/Modules/_testmulti

[issue27843] Spaces in filenames in setuptools

2016-08-23 Thread R. David Murray

R. David Murray added the comment:

setuptools is not part of CPython or the standard library, though it is 
currently distributed with CPython via ensurepip.  You should report this issue 
to the setuptools and/or pip bug tracker.

--
nosy: +dstufft, r.david.murray

___
Python tracker 

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



[issue27843] Spaces in filenames in setuptools

2016-08-23 Thread Eric N. Vander Weele

Changes by Eric N. Vander Weele :


--
nosy: +ericvw

___
Python tracker 

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



[issue26040] Improve coverage and rigour of test.test_math

2016-08-23 Thread koobs

Changes by koobs :


--
nosy: +koobs

___
Python tracker 

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



[issue26040] Improve coverage and rigour of test.test_math

2016-08-23 Thread Ned Deily

Ned Deily added the comment:

Mark, many buildbots are unhappy.  For example:

==
FAIL: test_testfile (test.test_math.MathTests)
--
Traceback (most recent call last):
  File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_math.py", 
line 1106, in test_testfile
self.ftest("%s:%s(%r)" % (id, fn, ar), result, er)
  File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_math.py", 
line 194, in ftest
(name, value, expected))
AssertionError: cosh0063:cosh(709.7827) returned 8.988349783319008e+307, 
expected 8.988349783319007e+307

--
nosy: +ned.deily

___
Python tracker 

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



[issue27598] Add Collection to collections.abc and typing

2016-08-23 Thread Roundup Robot

Roundup Robot added the comment:

New changeset acd9a465b373 by Guido van Rossum in branch 'default':
Issue 27598: Add Collections to collections.abc.
https://hg.python.org/cpython/rev/acd9a465b373

--
nosy: +python-dev

___
Python tracker 

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



[issue27598] Add Collection to collections.abc and typing

2016-08-23 Thread Guido van Rossum

Guido van Rossum added the comment:

I'll keep this open until I've also merged typing.py.

--

___
Python tracker 

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



[issue27841] Use fast call in method_call() and slot_tp_new()

2016-08-23 Thread Stefan Behnel

Stefan Behnel added the comment:

If you care so much about C stack space, you could also try to create two or 
three entry point functions that keep (say) a 4, 8 and 16 items array on the 
stack respectively, and then pass the pointer (and the overall length if you 
need it) of that array on into a single function that copies the argument 
pointers into it and calls the Python function. As long as they are all really 
simple static functions that end with tail calls (i.e. with "return 
other_function()"), the C compiler should always be able to inline the entry 
points into their caller and not waste any additional C stack space for calling 
them.

--

___
Python tracker 

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



  1   2   >