[issue2211] Cookie.Morsel interface needs update

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you David, all LGTM.

I noted that the :func: role sometimes is used for methods in the whatsnew file 
(and perhaps in other rst files). Perhaps it should be changed to :meth:. But 
this is other issue.

--

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-03-31 Thread Martin Panter

Martin Panter added the comment:

The difference of calling XMLParser.doctype() between the implementations is 
another argument for removing it completely. With all these bugs, and no 
opposition that I know of, I think it should be okay to remove the deprecated 
doctype() method in 3.5.

doctype-remove.v2.patch adds a tweaked version of the original test for no 
DeprecationWarning from the other patch.

--
Added file: http://bugs.python.org/file38755/doctype-remove.v2.patch

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-03-31 Thread Martin Panter

Martin Panter added the comment:

inherit-doctype.v2.patch inverts the logic in the C module. This patch may 
still be useful if people want to apply it to 3.4, or do not want to remove the 
deprecated method from 3.5.

--
Added file: http://bugs.python.org/file38756/inherit-doctype.v2.patch

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



[issue19176] DeprecationWarning for doctype() method when subclassing _elementtree.XMLParser

2015-03-31 Thread Martin Panter

Martin Panter added the comment:

doctype-remove.v3.patch includes an entry on the What’s New page.

--
Added file: http://bugs.python.org/file38757/doctype-remove.v3.patch

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



[issue23466] PEP 461: Inconsistency between str and bytes formatting of integers

2015-03-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee:  - serhiy.storchaka
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue22035] Fatal error in dbm.gdbm

2015-03-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
nosy: +haypo

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



[issue23793] Support __add__, __mul__, and __imul__ for deques.

2015-03-31 Thread Josh Rosenberg

Josh Rosenberg added the comment:

I agree that popping old inputs is the normal way. What I'm trying to say is 
that it doesn't feel like old or inputs when you multiply. In that case 
(and maybe this is just me), it feels like a reasonable outcome could be to 
get an outcome similar to multiplying a list and then slicing the result to 
maxlen. I don't think it *should* do that, but either behavior feels weird, 
solely because sequence multiplication has never been applied to a bounded 
sequence before (to my knowledge), so the expectations aren't set.

You end up with weird behaviors like len(seq) * 3 != len(seq * 3), which is a 
normal and expected outcome with every other sequence. If you know you're 
dealing with a bounded deque, it's less unexpected, but this is trying to make 
a deque a drop-in replacement for any other sequence when it doesn't behave 
like one.

--

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



[issue23360] Content-Type when sending data with urlopen()

2015-03-31 Thread Martin Panter

Martin Panter added the comment:

I think we should avoid mentioning bytes-like objects until Issue 23740 
(http.client support), Issue 23756 (clarify definition), and/or 
SSLSocket.sendall() support are sorted out.

Changes in non-urlencoded.3.patch:
* Removed iterable object as direct urlopen() argument, since that would 
require a custom Content-Length and therefore a custom Request object
* Removed Content-Type discussion from urlopen() for similar reasons
* Added iterable object to Request constructor (already tested)
* Clarified default Content-Type whenever data is not None
* Added a test for default Content-Type with iterable object

--
stage:  - patch review
versions: +Python 3.5
Added file: http://bugs.python.org/file38758/non-urlencoded.3.patch

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



[issue23611] Pickle nested names with protocols 4

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ca12465418bd by Serhiy Storchaka in branch 'default':
Issue #23611: Serializing more lookupable objects (such as unbound methods
https://hg.python.org/cpython/rev/ca12465418bd

--
nosy: +python-dev

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



[issue11344] Add os.path.splitpath(path) function

2015-03-31 Thread Paul Moore

Paul Moore added the comment:

Assuming new code should be using pathlib, I agree this should probably be 
closed now as obsolete.

One proviso - pathlib objects don't take a bytestring path in the constructor. 
If there's a need for a low-level splitpath taking bytes objects, there may 
still be a benefit to this patch. Otherwise pathlib.Path(p).parts is a direct 
replacement AFAICT.

--
nosy: +paul.moore

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



[issue23485] PEP 475: handle EINTR in the select and selectors module

2015-03-31 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue13583] sqlite3.Row doesn't support slice indexes

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e47f520eb756 by Serhiy Storchaka in branch 'default':
Issue #13583: sqlite3.Row now supports slice indexing.
https://hg.python.org/cpython/rev/e47f520eb756

--
nosy: +python-dev

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Removed file: http://bugs.python.org/file38743/test_selectors.patch

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



[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-03-31 Thread Gustavo J. A. M. Carneiro

Gustavo J. A. M. Carneiro added the comment:

So I uploaded a new patch version fixing a similar problem in put().

--

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



[issue10395] new os.path function to extract common prefix based on path components

2015-03-31 Thread Paul Moore

Paul Moore added the comment:

The patch looks good to me.

rhettinger: I'm not sure I see a problem with the doc changes in the latest 
patch - noting that commonprefix may return an invalid path is fine, and what 
the current docs say. Directing people to commonpath if they don't want invalid 
paths also seems fine.

Paddy McCarthy: I don't think that the backward compatibility cost of moving 
os.path.commonprefix is worth it.

--
nosy: +paul.moore

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



[issue23485] PEP 475: handle EINTR in the select and selectors module

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b017ca5d28bc by Victor Stinner in branch 'default':
Issue #23485: select.kqueue.control() is now retried when interrupted by a 
signal
https://hg.python.org/cpython/rev/b017ca5d28bc

New changeset f54bc2c52dfd by Victor Stinner in branch 'default':
Issue #23485: select.devpoll.poll() is now retried when interrupted by a signal
https://hg.python.org/cpython/rev/f54bc2c52dfd

New changeset 76d297869859 by Victor Stinner in branch 'default':
Issue #23485: Enhance and update selectors doc and test_selectors
https://hg.python.org/cpython/rev/76d297869859

--

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 8d86dfe53b97 by Serhiy Storchaka in branch '3.4':
Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.
https://hg.python.org/cpython/rev/8d86dfe53b97

New changeset 5980e81219ed by Serhiy Storchaka in branch 'default':
Issue #18473: Fixed 2to3 and 3to2 compatible pickle mappings.
https://hg.python.org/cpython/rev/5980e81219ed

--
nosy: +python-dev

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



[issue13583] sqlite3.Row doesn't support slice indexes

2015-03-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
assignee: ghaering - serhiy.storchaka

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



[issue13583] sqlite3.Row doesn't support slice indexes

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The implementation can be much simpler, but in any case thank you for your 
patches Lucas and Jessica.

--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

 https://hg.python.org/cpython/file/47b2d1ff9743/configure.ac#l963

This command was added by the changeset 6fc10306bf31.

--
nosy: +haypo, koobs

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



[issue19660] decorator syntax: allow testlist instead of just dotted_name

2015-03-31 Thread Ximin Luo

Ximin Luo added the comment:

Yes, please get rid of this restriction. It's trivial to get around - you don't 
even need to define your own pass-through, one already exists in the standard 
library:

 @(lambda: [lambda x: x][0])()
  File stdin, line 1
@(lambda: [lambda x: x][0])()
 ^
SyntaxError: invalid syntax

 from functools import partial as _
 @_( (lambda: [lambda x: x][0])() )
... def f(x): return x*x
... 
 f(3)
9

I don't know the rational behind disallowing bar().foo(), but it is the 
use-case I have in mind - something like:

@MainDecoratorFactory(params).tweakedDecorator(tweak_params)
def f(x):
  pass

or even

@MainDecoratorFactory(params).\
 tweakedDecorator(tweak_params)
def f(x):
  pass

It should be no more controversial than chaining decorators.

The alternative with the current restrictions would be 
tweakedDecorator(MainDecorator(params), tweak_params) which is more ugly and 
visually separates the tweak concepts.

It's not appropriate to merge MainDecoratorFactory and the tweaks together: 
there are several MainDecoratorFactories taking care of one main concern; they 
don't care about the tweaks. And vice versa; the tweaks shouldn't care about 
the main decorators.

--
nosy: +xl269

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



[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-03-31 Thread bapt

bapt added the comment:

Adding a patch on configure.ac (I bet configure should not be patched but 
regenerated)

Considering the comment here: http://bugs.python.org/issue1044395#msg47064 
about ldconfig(1) the output of ldconfig(1) is buggy in that regard, and the 
ports tree does not depends on that anymore so it will perfectly accept the 2 
digit name.

There are no known other things depending on that buggy output

--
keywords: +patch
Added file: http://bugs.python.org/file38759/configure_ac.patch

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



[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-03-31 Thread koobs

koobs added the comment:

+1

--
stage:  - needs patch
type:  - enhancement
versions: +Python 2.7, Python 3.4, Python 3.5

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



[issue23818] test_enum failing test_class_nested_enum_and_pickle_protocol_four

2015-03-31 Thread Brett Cannon

New submission from Brett Cannon:

test test_enum failed -- Traceback (most recent call last):
  File /Users/bcannon/Repositories/cpython/default/Lib/test/test_enum.py, 
line 580, in test_class_nested_enum_and_pickle_protocol_four
protocol=(0, 3))
  File /Users/bcannon/Repositories/cpython/default/Lib/test/test_enum.py, 
line 82, in test_pickle_exception
dumps(obj, protocol=protocol)
AssertionError: PicklingError not raised

--
components: Library (Lib)
messages: 239700
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: test_enum failing test_class_nested_enum_and_pickle_protocol_four
type: behavior
versions: Python 3.5

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



[issue23779] imaplib authenticate raises TypeError if authenticator tries to abort

2015-03-31 Thread R. David Murray

R. David Murray added the comment:

The patch looks good to me, except that I think it would be better if the test 
verified that the '*' response is received by the server (perhaps return OK if 
we don't get it?)

--
components: +email
nosy: +barry, r.david.murray
stage: test needed - patch review

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

Buildbots are unhappy. Example:

http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/11437/steps/test/logs/stdio


==
ERROR: test_name_mapping (test.test_pickle.CompatPickleTests) 
[(('tkinter.filedialog', 'FileDialog'), ('FileDialog', 'FileDialog'))]
--
Traceback (most recent call last):
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_pickle.py, line 
241, in getmodule
return sys.modules[module]
KeyError: 'tkinter.filedialog'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_pickle.py, line 
286, in test_name_mapping
attr = getattribute(module3, name3)
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_pickle.py, line 
247, in getattribute
obj = getmodule(module)
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_pickle.py, line 
243, in getmodule
__import__(module)
  File 
/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/tkinter/__init__.py, line 
38, in module
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named '_tkinter'

--
nosy: +haypo

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

A different error:

http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/2880/steps/test/logs/stdio

==
FAIL: test_class_nested_enum_and_pickle_protocol_four (test.test_enum.TestEnum)
--
Traceback (most recent call last):
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_enum.py, 
line 580, in test_class_nested_enum_and_pickle_protocol_four
protocol=(0, 3))
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_enum.py, 
line 82, in test_pickle_exception
dumps(obj, protocol=protocol)
AssertionError: PicklingError not raised

--

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



[issue22035] Fatal error in dbm.gdbm

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

I would prefer to avoid setgmp/longjmp, it's kind of a hack. It's maybe more a 
design issue in the gdbm library to report errors.

I proposed a generic signal handler using setjmp/longjmp to convert SIGSEGV to 
regular Python exceptions, but it was rejected: issue #3999.

--

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



[issue22035] Fatal error in dbm.gdbm

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

 Oh, Mark, please stop shaking up bug tracker.

I agree: please stop posting useless messages, and review patches instead.

--

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e8246baad0f6 by Victor Stinner in branch 'default':
Issue #23618: Refactor the _socket module
https://hg.python.org/cpython/rev/e8246baad0f6

New changeset fa5542660b17 by Victor Stinner in branch 'default':
Issue #23618: Refactor internal_select() to prepare socket.connect() for EINTR
https://hg.python.org/cpython/rev/fa5542660b17

New changeset c027d6468667 by Victor Stinner in branch 'default':
Issue #23618: internal_connect_select() now waits also for error events
https://hg.python.org/cpython/rev/c027d6468667

--

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 47b2d1ff9743 by Victor Stinner in branch 'default':
Issue #23618: Fix internal_connect_select()
https://hg.python.org/cpython/rev/47b2d1ff9743

--

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



[issue10395] new os.path function to extract common prefix based on path components

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ec6c812fbc1f by Serhiy Storchaka in branch 'default':
Issue #10395: Added os.path.commonpath().  Implemented in posixpath and ntpath.
https://hg.python.org/cpython/rev/ec6c812fbc1f

--
nosy: +python-dev

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

A third kind of error:

http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5992/steps/test/logs/stdio

==
ERROR: test_import (test.test_pickle.CompatPickleTests)
--
Traceback (most recent call last):
  File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pickle.py, 
line 241, in getmodule
return sys.modules[module]
KeyError: 'multiprocessing.popen_fork'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pickle.py, 
line 266, in test_import
getmodule(module)
  File C:\buildbot.python.org\3.x.kloth-win64\build\lib\test\test_pickle.py, 
line 243, in getmodule
__import__(module)
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\multiprocessing\popen_fork.py,
 line 13, in module
class Popen(object):
  File 
C:\buildbot.python.org\3.x.kloth-win64\build\lib\multiprocessing\popen_fork.py,
 line 25, in Popen
def poll(self, flag=os.WNOHANG):
AttributeError: module 'os' has no attribute 'WNOHANG'

--

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



[issue10395] new os.path function to extract common prefix based on path components

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The patch only adds a reference to commonpath() in commonprefix() 
documentation. The note about invalid paths already was here.

--

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




[issue19100] Use backslashreplace in pprint

2015-03-31 Thread Walter Dörwald

Walter Dörwald added the comment:

The linked code at https://github.com/vadmium/python-iview/commit/68b0559 seems 
strange to me:

try:
text.encode(encoding, textio.errors or strict)
except UnicodeEncodeError:
text = text.encode(encoding, errors).decode(encoding)
return text

is the same as:

return text.encode(encoding, errors).decode(encoding)

because when there are no unencodable characters in text, the error handler 
will never be invoked.

--

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



[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-03-31 Thread bapt

New submission from bapt:

In the configuration script:
https://hg.python.org/cpython/file/47b2d1ff9743/configure.ac#l963

There is a special treatment done for FreeBSD, which is not needed, FreeBSD is 
perfectly fine with multiple digit in soversion.

--
components: Build
messages: 239695
nosy: bapt
priority: normal
severity: normal
status: open
title: Consider FreeBSD like any other OS in SOVERSION

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



[issue12855] linebreak sequences should be better documented

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 6244a5dbaf84 by Benjamin Peterson in branch '3.4':
document what exactly str.splitlines() splits on (closes #12855)
https://hg.python.org/cpython/rev/6244a5dbaf84

New changeset 87af6deb5d26 by Benjamin Peterson in branch 'default':
merge 3.4 (#12855)
https://hg.python.org/cpython/rev/87af6deb5d26

--
nosy: +python-dev
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23484] SemLock acquire() keyword arg 'blocking' is invalid

2015-03-31 Thread Davin Potts

Davin Potts added the comment:

@berker: I would have said this should not be marked an enhancement as the 
proposed solution (in the patch) is to correct the errors in the documentation 
to accurately describe the current implemented behavior.  Does that make sense?

Whatever label we give it, do you think my logic (described in my comments on 
this issue) for why it is best to fix it this way makes sense to you?

--

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



[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data

2015-03-31 Thread Martin Panter

Martin Panter added the comment:

Perhaps you should make a table of some potential body object types, and figure 
out what the behaviour should be for request() with and without relevant 
headers, and endheaders() and send() with and without encode_chunked=True:

* Add/don’t add Content-Length/Transfer-Encoding
* Send with/without chunked encoding
* Raise exception
* Not supported or undefined behaviour

Potential body types:

* None with GET/POST request
* bytes()
* Latin-1/non Latin-1 str()
* BytesIO/StringIO
* Ordinary binary/Latin-1/other file object
* File object reading a special file like a pipe (st_size == 0)
* File object wrapping a pipe or similar that does not support fileno() (ESPIPE)
* Custom file object not supporting fileno() nor seeking
* File object at non-zero offset
* GzipFile object, where fileno() corresponds to the compressed size
* GzipFile not supporting fileno(), where seeking is possible but expensive
* Iterator yielding bytes() and/or strings
* Generator
* File object considered as an iterable of lines
* List/tuple of bytes/text
* Other sequences of bytes/text
* Other iterables of bytes/text, e.g. set(), OrderedDict.values()

This list could go on and on. I would rather have a couple of simple rules, or 
explicit APIs for the various modes so you don’t have to guess which mode your 
particular body type will trigger.

--

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



[issue23835] configparser does not convert defaults to strings

2015-03-31 Thread James Tocknell

New submission from James Tocknell:

ConfigParser(defaults={1:2.4}) and ConfigParser(defaults={a:5.2}) cause an 
exception when configparser tries to perform string operations on 1 and 5.2. I 
didn't see it documented that defaults must only contain strings, and using 
ConfigParser['DEFAULT'] = {1:2.4} does the necessary string conversion, so it 
looks like there should be some conversion done to the defaults.

--
components: Library (Lib)
messages: 239768
nosy: aragilar
priority: normal
severity: normal
status: open
title: configparser does not convert defaults to strings
type: crash
versions: Python 2.7, Python 3.4

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



[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread Jethro

New submission from Jethro:

Look at this simple code:

class A:
tot = 0
def __init__(self, a):
self.tot += a

x = A(3)
print(x.tot, A.tot)

Result from print: 

3 0

What the interpreter did was that it first resolved self.tot to be the class 
field tot, which resolves to 0, then it created an instance field tot to hold 
the result 3.

This is not correct, as one single self.tot meant two different things. Two 
ways to fix this: 

1. report a name undefined error (interpret self.tot as instance field)

2. increase A.tot (interpret self.tot as class field)

Clearly 1 seems more naturally to Python, even though I wished python could 
disallow a class field to be shadowed by instance field, which seems quite a 
reasonable thing to do.

--
components: Interpreter Core
messages: 239714
nosy: jethro
priority: normal
severity: normal
status: open
title: in-place addition of a shadowed class field
type: behavior
versions: Python 3.4

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



[issue23611] Pickle nested names with protocols 4

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f78b9f700d45 by Serhiy Storchaka in branch 'default':
Issue #23611: Fixed enums pickling tests.  Now all picklings work with all
https://hg.python.org/cpython/rev/f78b9f700d45

--

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 5c5eb374e296 by Serhiy Storchaka in branch '3.4':
Issue #18473: Fixed pickle compatibility tests for optional modules.
https://hg.python.org/cpython/rev/5c5eb374e296

New changeset 29b2b2d8e36f by Serhiy Storchaka in branch 'default':
Issue #18473: Fixed pickle compatibility tests for optional modules.
https://hg.python.org/cpython/rev/29b2b2d8e36f

--

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



[issue23793] Support __add__, __mul__, and __imul__ for deques.

2015-03-31 Thread Raymond Hettinger

Changes by Raymond Hettinger raymond.hettin...@gmail.com:


--
resolution:  - fixed
status: open - closed

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



[issue23820] test_importlib fails under -O

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: needs patch - patch review
Added file: http://bugs.python.org/file38761/issue23820.patch

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



[issue23793] Support __add__, __mul__, and __imul__ for deques.

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset b75160d24b7b by Raymond Hettinger in branch 'default':
Issue 23793:  Add deque support for __add__(), __mul__(), and __imul__().
https://hg.python.org/cpython/rev/b75160d24b7b

--
nosy: +python-dev

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



[issue23823] Generalization misused in deque docs

2015-03-31 Thread rschwieb

New submission from rschwieb:

This sentence in the deque docs 
(https://docs.python.org/2/library/collections.html#collections.deque) is not 
accurate: 

Deques are a generalization of stacks and queues ...

Deques are a _specialization_ of stacks and queues. Every deque is-a stack and 
is-a queue, but saying that deques generalize stacks and queues reverses this 
relationship.

On the surface it might seem minor, but I think it's worth correcting in this 
case since the is-a relationship is so fundamental in computer science. 
Besides, I'd like to think Python's awesome documentation is above using words 
to mean the opposite of what they mean :)

--
assignee: docs@python
components: Documentation
messages: 239710
nosy: docs@python, rschwieb
priority: normal
severity: normal
status: open
title: Generalization misused in deque docs
type: enhancement
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5, Python 3.6

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



[issue23822] test_py_compile fails under -O

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: needs patch - patch review
Added file: http://bugs.python.org/file38760/issue23822.patch

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Fixed import errors. A second kind of errors was related to issue23611.

--

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



[issue23825] test_idle fails under -OO

2015-03-31 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
components: IDLE
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: test_idle fails under -OO
versions: Python 3.5

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



[issue23823] Generalization misused in deque docs

2015-03-31 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Sorry, I disagree.

--
nosy: +rhettinger
resolution:  - not a bug
status: open - closed

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



[issue23793] Support __add__, __mul__, and __imul__ for deques.

2015-03-31 Thread Raymond Hettinger

Raymond Hettinger added the comment:

I don't see any technical reason not to proceed.  Just because an unusual 
combination of parameters feels odd to you doesn't make it wrong.  It is no 
different than (somelist * n)[-maxlen:].

--

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



[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread R. David Murray

R. David Murray added the comment:

Yep, this is the way it works.  When a class attribute name is referenced on an 
instance object, you are referencing the object pointed to by the class name.  
What happens next depends on what kind of object you have, and what kind of 
operation you perform.  In this case, you have an immutable object, and the 
addition operation returns a new immutable object, which gets assigned (as 
always happens) to the instance attribute name.  If tot was, say, [0] and the 
operation was self.tot += [1], your print would print [0, 1] [0, 1], because 
the in-place addition operation on lists *mutatates* the list, and what gets 
assigned to the instance attribute name is a pointer to the *same* object that 
the class attribute points to.

In short, this is a more subtle instance of the confusion discussed here: 
https://docs.python.org/3/faq/programming.html#why-did-changing-list-y-also-change-list-x
 (and also the FAQ that follows that one).

--
nosy: +r.david.murray
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue23825] test_idle fails under -OO

2015-03-31 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Here is a patch.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: needs patch - patch review
Added file: http://bugs.python.org/file38762/issue23825.patch

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



[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread Jethro

Changes by Jethro y...@pku.edu.cn:


--
resolution: not a bug - 
status: closed - open

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



[issue23818] test_enum failing test_class_nested_enum_and_pickle_protocol_four

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is related to issue23611 and fixed by f78b9f700d45.

--
nosy: +serhiy.storchaka
resolution:  - out of date
stage: needs patch - resolved
status: open - closed

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



[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread R. David Murray

R. David Murray added the comment:

Ah, now I understand your confusion.  Class variables are special.  The first 
time you reference a name on an instance that is not currently defined on that 
instance but is defined on the class, the interpreter gets the object pointer 
from the class reference.  It then performs the operation, and assigns the 
result to the *instance* attribute.  This is how class attributes work, and is 
an integral part of Python.  This is documented in the 'class instances' 
section of 
https://docs.python.org/3/reference/datamodel.html#objects-values-and-types.

--

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



[issue12319] [http.client] HTTPConnection.putrequest not support chunked Transfer-Encodings to send data

2015-03-31 Thread Demian Brecht

Demian Brecht added the comment:

Agreed. However, I'm wondering if that should belong in a new issue geared 
towards further clarifying behaviour of request body types. The patch 
introduces the behaviour this specific issue was looking, with the largest 
change being that iterators may now result in chunked transfer encoding with 
the data currently handled by the library. I'd rather move forward with 
incremental improvements rather than keep building on each issue before the 
work's merged (there's still a /good/ amount of work to be done in this module).

--

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



[issue23826] test_enum fails under -OO

2015-03-31 Thread Brett Cannon

New submission from Brett Cannon:

==
FAIL: test_pydoc (__main__.TestStdLib)
--
Traceback (most recent call last):
  File /Users/bcannon/Repositories/cpython/default/Lib/test/test_enum.py, 
line 1609, in test_pydoc
self.assertEqual(result, expected_text)
AssertionError: 'Help[450 chars]n |  \n |  value\n |  \n |  
--[123 chars]rs__' != 'Help[450 chars]n |  The name of the 
Enum member.\n |  \n [394 chars]ing.'
Diff is 969 characters long. Set self.maxDiff to None to see it.

--
components: Tests
messages: 239728
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: test_enum fails under -OO
versions: Python 3.5

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23611] Pickle nested names with protocols 4

2015-03-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - fixed
stage: patch review - resolved
status: open - closed

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



[issue23829] test_warnings fails under -Werror

2015-03-31 Thread Brett Cannon

New submission from Brett Cannon:

==
ERROR: test_warning_classes (__main__.CWarnTests)
--
Traceback (most recent call last):
  File /Users/bcannon/Repositories/cpython/pep-488/Lib/test/test_warnings.py, 
line 460, in test_warning_classes
self.module.warn('good warning category', MyWarningClass)
WarnTests.test_warning_classes.locals.MyWarningClass: good warning category

--
components: Tests
messages: 239734
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: test_warnings fails under -Werror
versions: Python 3.5

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



[issue23821] test_pdb fails under -O

2015-03-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
stage: needs patch - patch review

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



[issue23821] test_pdb fails under -O

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch.

--
keywords: +patch
Added file: http://bugs.python.org/file38763/issue23821.patch

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



[issue23360] Content-Type when sending data with urlopen()

2015-03-31 Thread Demian Brecht

Changes by Demian Brecht demianbre...@gmail.com:


--
nosy: +demian.brecht

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



[issue23826] test_enum fails under -OO

2015-03-31 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
nosy: +ethan.furman

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



[issue23821] test_pdb fails under -O

2015-03-31 Thread Serhiy Storchaka

New submission from Serhiy Storchaka:

Tests were added in issue16596.

--
nosy: +asvetlov, gvanrossum, serhiy.storchaka, xdegaye

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

Le mardi 31 mars 2015, Roundup Robot rep...@bugs.python.org a écrit :


 Roundup Robot added the comment:

 New changeset 5c5eb374e296 by Serhiy Storchaka in branch '3.4':
 Issue #18473: Fixed pickle compatibility tests for optional modules.
 https://hg.python.org/cpython/rev/5c5eb374e296

 New changeset 29b2b2d8e36f by Serhiy Storchaka in branch 'default':
 Issue #18473: Fixed pickle compatibility tests for optional modules.
 https://hg.python.org/cpython/rev/29b2b2d8e36f


Why do you catch AttributeError on import?

--

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



[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread Serhiy Storchaka

Changes by Serhiy Storchaka storch...@gmail.com:


--
resolution:  - not a bug
status: open - closed

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



[issue23826] test_enum fails under -OO

2015-03-31 Thread Ethan Furman

Changes by Ethan Furman et...@stoneleaf.us:


--
assignee:  - ethan.furman

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



[issue23826] test_enum fails under -OO

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Here is a patch.

--
keywords: +patch
nosy: +serhiy.storchaka
stage: needs patch - patch review
Added file: http://bugs.python.org/file38764/issue23826.patch

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



[issue23827] test.test_multiprocessing_spawn fails under -Werror

2015-03-31 Thread Brett Cannon

New submission from Brett Cannon:

==
FAIL: test_sys_exit (__main__.WithProcessesTestSubclassingProcess)
--
Traceback (most recent call last):
  File 
/Users/bcannon/Repositories/cpython/pep-488/Lib/test/_test_multiprocessing.py,
 line 483, in test_sys_exit
self.assertEqual(f.read().rstrip(), str(reason))
AssertionError: [1, 2, 3]\nException ignored in: _io.Fi[136 chars]-8' != 
'[1, 2, 3]'
- [1, 2, 3]
?  -
+ [1, 2, 3]- Exception ignored in: _io.FileIO name='/dev/null' mode='rb' 
closefd=True
- ResourceWarning: unclosed file _io.TextIOWrapper name='/dev/null' mode='r' 
encoding='UTF-8'

--
components: Tests
messages: 239731
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: test.test_multiprocessing_spawn fails under -Werror
versions: Python 3.5

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



[issue23602] Implement __format__ for Fraction

2015-03-31 Thread Stefan Krah

Stefan Krah added the comment:

 It wouldn't be too bad if Py and C version of Decimal.__format__ had
 same interface. What do you think?

Let's discuss that in a separate issue.


[DefaultContext]
 I don't understand what do you mean with this. Is this something that
 I'm doing wrong in my patch or just another (related?) issue?

Decimal.DefaultContext has global scope and currently affects
Context() creation, unless you specify all parameters.

--

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



[issue23828] test_socket fails under -Werror

2015-03-31 Thread Brett Cannon

New submission from Brett Cannon:

==
ERROR: testCmsgTruncLen0 (__main__.RecvmsgSCMRightsStreamTest)
--
Traceback (most recent call last):
  File /Users/bcannon/Repositories/cpython/pep-488/Lib/test/test_socket.py, 
line 2956, in testCmsgTruncLen0
self.checkTruncatedArray(ancbuf=socket.CMSG_LEN(0), maxdata=0)
  File /Users/bcannon/Repositories/cpython/pep-488/Lib/test/test_socket.py, 
line 2937, in checkTruncatedArray
len(MSG), ancbuf)
  File /Users/bcannon/Repositories/cpython/pep-488/Lib/test/test_socket.py, 
line 1921, in doRecvmsg
result = sock.recvmsg(bufsize, *args)
RuntimeWarning: received malformed or improperly-truncated ancillary data

--
components: Tests
messages: 239732
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: test_socket fails under -Werror
versions: Python 3.5

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



[issue23824] in-place addition of a shadowed class field

2015-03-31 Thread Jethro

Jethro added the comment:

I believe Mr. Murray somehow missed the point. My point is that the very same 
self.tot is interpreted as two different things: instance field and class 
field. In another analogous case, the interpreter would be more consistent:

 tot = 0
 def addtot(x): tot+=x
 addtot(3)

If this tot is allowed to be resolved to different things, there should be no 
problem. Instead you get an error:

Traceback (most recent call last):
  File pyshell#106, line 1, in module
addtot(3)
  File pyshell#105, line 1, in addtot
def addtot(x): tot += x
UnboundLocalError: local variable 'tot' referenced before assignment

--

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset daf3d2a717e5 by Victor Stinner in branch 'default':
Issue #23618: Refactor internal_connect()
https://hg.python.org/cpython/rev/daf3d2a717e5

New changeset c59d81b802f8 by Victor Stinner in branch 'default':
Issue #23618: Refactor internal_connect()
https://hg.python.org/cpython/rev/c59d81b802f8

--

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d9374864d4a9 by Victor Stinner in branch 'default':
Issue #23618: Cleanup internal_connect() in socketmodule.c
https://hg.python.org/cpython/rev/d9374864d4a9

New changeset 4fad2b9fc4e6 by Victor Stinner in branch 'default':
Issue #23618: Fix EINTR handling in socket.connect()
https://hg.python.org/cpython/rev/4fad2b9fc4e6

--

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



[issue23830] Add AF_IUCV support to sockets

2015-03-31 Thread Neale Ferguson

New submission from Neale Ferguson:

IUCV is a hypervisor mediated communications method for z/VM guest virtual 
machines. Linux on z Systems (aka s390x) has supported this via the use of 
AF_IUCV sockets for many years (added to kernel Feb 2007). This suggested patch 
adds support to Python 2.7.9 for this socket type. I have built Python on both 
s390x and x86_64: both build cleanly and the test added to test_socket.py runs 
cleanly on s390x and is skipped on other platforms.

--
components: Library (Lib)
files: af_iucv.patch
keywords: patch
messages: 239743
nosy: neale
priority: normal
severity: normal
status: open
title: Add AF_IUCV support to sockets
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file38765/af_iucv.patch

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



[issue19100] Use backslashreplace in pprint

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 What is the reasoning behind the DecodeWriter case, where the original stream 
 has an interesting encoding, but “buffer” is None? Are there any real-world 
 cases like that?

sys.stdout and sys.stderr in IDLE.

--

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

Le mardi 31 mars 2015, Roundup Robot rep...@bugs.python.org a écrit :

 New changeset c59d81b802f8 by Victor Stinner in branch 'default':
 Issue #23618: Refactor internal_connect()
 https://hg.python.org/cpython/rev/c59d81b802f8


Oh I forgot to add an #ifdef for socklen_t. I didn't get a warning, so
socklen_t is probably an int. Getsockopt() uses a int* for the value length.

I also forgot to drop the comment before SetLastError(), it's no more
revelant.

--

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



[issue18473] some objects pickled by Python 3.x are not unpicklable in Python 2.x because of incorrect REVERSE_IMPORT_MAPPING

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 Why do you catch AttributeError on import?

Because importing multiprocessing.popen_fork raises AttributeError on Windows.

--

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



[issue23827] test.test_multiprocessing_spawn fails under -Werror

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue21779.

--
nosy: +serhiy.storchaka
resolution:  - duplicate
stage: needs patch - resolved
status: open - closed
superseder:  - test_multiprocessing_spawn fails when ran with -Werror

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



[issue23812] asyncio.Queue.put_nowait(), followed get() task cancellation leads to item being lost

2015-03-31 Thread Guido van Rossum

Guido van Rossum added the comment:

I'm sorry, I don't have time to review this (and it's subtle enough that I 
don't want to approve it without understanding).

Maybe Victor understands?

--

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



[issue16991] Add OrderedDict written in C

2015-03-31 Thread Stefan Behnel

Stefan Behnel added the comment:

 do not add a C-API

what speaks against it?

--
nosy: +scoder

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



[issue23555] behavioural change in argparse set_defaults in python 2.7.9

2015-03-31 Thread Berker Peksag

Changes by Berker Peksag berker.pek...@gmail.com:


--
resolution:  - duplicate
stage:  - resolved
superseder:  - argparse silently ignores arguments

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



[issue23829] test_warnings fails under -Werror

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This is a duplicate of issue23027.

--
nosy: +serhiy.storchaka
resolution:  - duplicate
stage: needs patch - resolved
status: open - closed
superseder:  - test_warnings fails with -Werror

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



[issue23831] tkinter canvas lacks of moveto method.

2015-03-31 Thread mps

New submission from mps:

I apologize if it has already been reported but I was unable to find similar 
issue reported using search.

Maybe just add:
def moveto(self, tagOrId, xPos, yPos):
Move the items given by tagOrId in the canvas coordinate  
space so that the first coordinate pair of the bottommost 
item with tag tagOrId is located at position (xPos,yPos). 
xPos and yPos may be the empty string, in which case the
corresponding coordinate will be unchanged. All items matching
tagOrId remain in the same positions relative to each other.
This command returns an empty string. 

return self.tk.call(self._w, 'moveto', tagOrId, xPos, yPos)

--
components: Tkinter
messages: 239745
nosy: mps
priority: normal
severity: normal
status: open
title: tkinter canvas lacks of moveto method.
type: enhancement
versions: Python 3.4

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

connect_eintr-4.patch: Updated patch after all my changes to refactor 
socket.connect() (which is now almost a rewrite from scratch!).

--
Added file: http://bugs.python.org/file38766/connect_eintr-4.patch

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 7ed567ad8b4c by Victor Stinner in branch 'default':
Issue #23618: Enhance EINTR handling in socket.connect()
https://hg.python.org/cpython/rev/7ed567ad8b4c

--

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



[issue23618] PEP 475: handle EINTR in the socket module (connect)

2015-03-31 Thread STINNER Victor

Changes by STINNER Victor victor.stin...@gmail.com:


Added file: http://bugs.python.org/file38767/connect_eintr-4.patch

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



[issue23832] pdb's `longlist` shows only decorator if that one contains a lambda

2015-03-31 Thread Gerrit Holl

New submission from Gerrit Holl:

When a decorater contains a `lambda` declaration, using the pdb command 
`longlist` will show only the definition of the decorator.  The definition of 
the function itself is not shown:


cat mini.py

#!/usr/bin/python3.4

def foo(x, y=None):
return x

@foo(foo, lambda a:a)
def spam():
0+0
1+1
1/0

spam()
$ python3.4 -mpdb mini.py   


 /tmp/mini.py(3)module()
- def foo(x, y=None):
(Pdb) cont
Traceback (most recent call last):
  File /usr/lib64/python3.4/pdb.py, line 1661, in main
pdb._runscript(mainpyfile)
  File /usr/lib64/python3.4/pdb.py, line 1542, in _runscript
self.run(statement)
  File /usr/lib64/python3.4/bdb.py, line 431, in run
exec(cmd, globals, locals)
  File string, line 1, in module
  File /tmp/mini.py, line 3, in module
def foo(x, y=None):
  File /tmp/mini.py, line 10, in spam
1/0
ZeroDivisionError: division by zero
Uncaught exception. Entering post mortem debugging
Running 'cont' or 'step' will restart the program
 /tmp/mini.py(10)spam()
- 1/0
(Pdb) longlist
  6 @foo(foo, lambda a:a)
(Pdb) 


The last line illustrates the problem.  `longlist` should show the definition 
of `spam`, not just the decorator.

--
messages: 239749
nosy: Gerrit.Holl
priority: normal
severity: normal
status: open
title: pdb's `longlist` shows only decorator if that one contains a lambda
type: behavior
versions: Python 3.4

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



[issue23821] test_pdb fails under -O

2015-03-31 Thread Xavier de Gaye

Xavier de Gaye added the comment:

FWIW looks good to me.

--

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



[issue22117] Rewrite pytime.h to work on nanoseconds

2015-03-31 Thread Roundup Robot

Roundup Robot added the comment:

New changeset dbc92a254173 by Victor Stinner in branch 'default':
Issue #22117: Fix integer overflow check in socket_parse_timeout() on Windows
https://hg.python.org/cpython/rev/dbc92a254173

--

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



[issue21526] Support new booleans in Tkinter

2015-03-31 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The case (value-typePtr == NULL) is tested above for purpose, so it is not a 
bug when one of type pointers is NULL.

booleanString was added in 8.5, replacing boolean, but in 8.6 it is not 
used. All boolean values in 8.6 are just integers 0 and 1.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue21526
___
___
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

2015-03-31 Thread Ronald Oussoren

Ronald Oussoren added the comment:

1) I agree with Ned that the OSX behavior is not broken, it is different but 
within spec. Python makes assumption about the format of locale names that 
aren't universally valid.

2) We should be careful in using CFLocale. Those APIs are part of 
CoreFoundation and CoreFoundation APIs cannot be used in the child proces after 
calling os.fork. 

As an aside to 2), CoreFoundation and any other Apple Cocoa frameworks should 
be assumed to use threads and hence the comment about threads in the fork 
specification (link below) apply, and currently Apple doesn't appear to use 
pthread_atfork to make sure library state is valid in child processes after 
fork.

http://pubs.opengroup.org/onlinepubs/009695399/functions/fork.html

--

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



[issue23817] Consider FreeBSD like any other OS in SOVERSION

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

 koobs set versions: + Python 2.7, Python 3.4, Python 3.5

Do you seriously consider to modify Python 2.7 and 3.4? Can it break the 
backward compatibility?

I don't know how the SOVERSION thing is used.

--

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



[issue23819] test_asyncio fails when run under -O

2015-03-31 Thread Brett Cannon

New submission from Brett Cannon:

Ton of failures along the lines of:

==
ERROR: test_ctor (test.test_asyncio.test_unix_events.UnixReadPipeTransportTests)
--
Traceback (most recent call last):
  File 
/Users/bcannon/Repositories/cpython/default/Lib/test/test_asyncio/test_unix_events.py,
 line 329, in setUp
self.loop = self.new_test_loop()
  File /Users/bcannon/Repositories/cpython/default/Lib/asyncio/test_utils.py, 
line 413, in new_test_loop
self.set_event_loop(loop)
  File /Users/bcannon/Repositories/cpython/default/Lib/asyncio/test_utils.py, 
line 407, in set_event_loop
events.set_event_loop(None)
  File /Users/bcannon/Repositories/cpython/default/Lib/asyncio/events.py, 
line 581, in set_event_loop
get_event_loop_policy().set_event_loop(loop)
AttributeError: 'object' object has no attribute 'set_event_loop'

--
components: asyncio
messages: 239704
nosy: brett.cannon, gvanrossum, haypo, yselivanov
priority: normal
severity: normal
stage: needs patch
status: open
title: test_asyncio fails when run under -O
versions: Python 3.5

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



[issue23820] test_importlib fails under -O

2015-03-31 Thread Brett Cannon

New submission from Brett Cannon:

==
FAIL: test_cached_sourceless 
(test.test_importlib.test_spec.Frozen_ModuleSpecTests)
--
Traceback (most recent call last):
  File 
/Users/bcannon/Repositories/cpython/default/Lib/test/test_importlib/test_spec.py,
 line 224, in test_cached_sourceless
self.assertEqual(self.loc_spec.cached, 'spam.pyc')
AssertionError: None != 'spam.pyc'

--
assignee: brett.cannon
components: Tests
messages: 239705
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: test_importlib fails under -O
versions: Python 3.5

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



[issue23819] test_asyncio fails when run under -O

2015-03-31 Thread STINNER Victor

STINNER Victor added the comment:

-O disables assertions, and asyncio has a ton of assertions. Some tests maybe 
rely on them? I guess that they are real bugs (assert must be replaced with a 
regular if+raise) in the middle of the failures.

--

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



[issue23821] test_pdb fails under -O

2015-03-31 Thread Brett Cannon

Changes by Brett Cannon br...@python.org:


--
components: Tests
nosy: brett.cannon
priority: normal
severity: normal
stage: needs patch
status: open
title: test_pdb fails under -O
versions: Python 3.5

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



  1   2   >