[issue23704] Make deques a full MutableSequence by adding index(), insert(), and copy()

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Then the patch LGTM except few nitpicks.

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-03-21 Thread Serhiy Storchaka

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


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

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



[issue23529] Limit decompressed data when reading from LZMAFile and BZ2File

2015-03-21 Thread Martin Panter

Martin Panter added the comment:

I am posting v6, which basically drops the buffer_size parameters. The change 
is also pushed as a series of revisions to a Bit Bucket repository, see 
https://bitbucket.org/vadmium/cpython/branches/compare/compression%0D@. I 
thought that might help eliminate the giant blocks of changes in gzip.py, but 
it did not.

The previous changes for the buffer_size parameters are in the “buffer_size” 
bookmark in that repository.

--
hgrepos: +301
Added file: http://bugs.python.org/file38619/LZMAFile-etc.v6.patch

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



[issue22619] Possible implementation of negative limit for traceback functions

2015-03-21 Thread Dmitry Kazakov

Dmitry Kazakov added the comment:

Again, I'm honestly sorry if I'm being annoying, but is there anything else 
that needs to be done in order to make this issue resolved? The stage is set 
to patch review, although there were no messages posted since the latest 
patch was submitted and there're no comments to the Patch set 6 in Rietveld.

 If your patch has not received any notice from reviewers (i.e., no comment 
 made) after one month, first “ping” the issue on the issue tracker to remind 
 the nosy list that the patch needs a review. 

Is this true for the patch review stage? I pinged this issue about a month 
ago, but haven't got any response; should I have emailed python-...@python.org 
even if the patch is not mine?

--

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



[issue20132] Many incremental codecs don’t handle fragmented data

2015-03-21 Thread Serhiy Storchaka

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


--
nosy: +serhiy.storchaka
stage:  - patch review
versions: +Python 3.5 -Python 3.3

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



[issue23704] Make deques a full MutableSequence by adding index(), insert(), and copy()

2015-03-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 3d33be07c5a2 by Raymond Hettinger in branch 'default':
Issue 23704:  Add index(), copy(), and insert() to deques.  Register deques as 
a MutableSequence.
https://hg.python.org/cpython/rev/3d33be07c5a2

--
nosy: +python-dev

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



[issue23704] Make deques a full MutableSequence by adding index(), insert(), and copy()

2015-03-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Thank you for looking it over.

--
resolution:  - fixed
status: open - closed

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



[issue23704] Make deques a full MutableSequence by adding index(), insert(), and copy()

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Did you noticed my comments on Rietveld? You can found Rietveld messages in the 
Spam folder.

--

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



[issue23391] Documentation of EnvironmentError (OSError) arguments disappeared

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Current behavior is more complicated.

 OSError(1, 2, 3, 4).args
(1, 2)
 OSError(1, 2, 3, 4, 5).args
(1, 2)
 OSError(1, 2, 3, 4, 5, 6).args
(1, 2, 3, 4, 5, 6)

If I remember correctly:

1 -- errno
2 -- strerror
3 -- filename
4 -- winerror (?)
5 -- filename2

Isn't it documented anywhere?

--
nosy: +serhiy.storchaka

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



[issue23411] Update urllib.parse.__all__

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

These classes were introduced by Fred in issue624325. Is it intentional that 
they were not added to __all__ Fred?

--
nosy: +fdrake

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



[issue23730] Document return value for ZipFile.extract()

2015-03-21 Thread Martijn Pieters

New submission from Martijn Pieters:

The documentation for zipfile.ZipFile.extract() doesn't mention at all that it 
returns the local path created, either for the directory that the member 
represents, or the new file created from the zipped data.

*Returns the full local path created (a directory or new file)* or similar.

--
assignee: docs@python
components: Documentation
messages: 238778
nosy: docs@python, mjpieters
priority: normal
severity: normal
status: open
title: Document return value for ZipFile.extract()
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23730
___
___
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-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Looks as there is yet one difference in the behavior of Python and C 
implementations. In Python implementation either self.target.doctype or 
self.doctype are called. But in C implementation both are called.

--
nosy: +serhiy.storchaka
stage:  - patch review
versions:  -Python 3.3

___
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



[issue23042] ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol ffi_call_win32

2015-03-21 Thread koobs

koobs added the comment:

See also: 

Issue: https://github.com/atgreen/libffi/issues/180
Title: OSX/i386 build is broken in v3.2.1

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thanks Martin. The patch LGTM.

--
stage: test needed - commit review

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



[issue23704] Make deques a full MutableSequence by adding index(), insert(), and copy()

2015-03-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

For now, I prefer to continue using rotate() as a primitive and am saving 
circular shifts for another day (likely when I start working on slices).

FWIW, the only way for append() to fail is a memory error; in which case, I 
would ilke to stop doing any work at alll and return a soon as possible, even 
if it means leaving the deque in a reordered state.

--

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



[issue22351] NNTP constructor exception leaves socket for garbage collector

2015-03-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e8878579eb68 by Serhiy Storchaka in branch '3.4':
Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
https://hg.python.org/cpython/rev/e8878579eb68

New changeset 6622f68b064b by Serhiy Storchaka in branch 'default':
Issue #22351: The nntplib.NNTP constructor no longer leaves the connection
https://hg.python.org/cpython/rev/6622f68b064b

--
nosy: +python-dev

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



[issue2786] Names in traceback should have class names, if they're methods

2015-03-21 Thread Daniil Bondarev

Daniil Bondarev added the comment:

issue17911 was submitted. I pulled latest updates and rechecked that ./python 
-m test -uall passing with the same patch.

--

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



[issue23411] Update urllib.parse.__all__

2015-03-21 Thread Berker Peksag

Berker Peksag added the comment:

*Result and *ResultBytes classes are documented at 
https://docs.python.org/3/library/urllib.parse.html#urllib.parse.DefragResult

+1 for adding them to __all__.

--
nosy: +berker.peksag

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



[issue22977] Unformatted “Windows Error 0x%X” exception message on Wine

2015-03-21 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-21 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy Storchaka added the comment:
 Why this assert is needed? Why not always raise SystemError?

A SystemError exception may be ignored by a generic except Exception:
pass or logged at debug level at then ignored.

I consider that the bug is important, and that you must fix it. The
debug mode is to detect bugs earlier, right?

--

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Paul Moore

Paul Moore added the comment:

Regarding the poor relation argument, I'd see that as the other way round. We 
don't have the resources to deal with major breakages, so we should be 
relatively cautious.

--

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

I'm concerned about being overcautious so that nothing ever happens.  Do 
something, break it, fix it.  If you delay all you do is put off the fix.  Plus 
I've every confidence in our Windows developers to just do the right thing.

--

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



[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I'm +0.5 for the variant suggested by Berker and Ezio.

Do you have time to look at the patch Michael? I could commit modified patch 
(there is one defect in tests).

--
nosy: +serhiy.storchaka

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15836
___
___
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-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 from fractions import Fraction as F
 format(F(4, 27), 'f')
'0.1481481'
 format(F(4, 27), '.1f')
'0.2'

--

___
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



[issue17232] Improve -O docs

2015-03-21 Thread Serhiy Storchaka

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


--
stage: patch review - needs patch
versions: +Python 3.5 -Python 3.3

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



[issue23729] Import ElementTree documentation for namespaces and XPath

2015-03-21 Thread Raymond Hettinger

New submission from Raymond Hettinger:

Show examples of how to search XML that contains namespaces.

Also indicate the ElementTree subset of XPath supports filters in the form 
[tag=text].

--
assignee: rhettinger
components: Documentation
files: elementtree_doc.diff
keywords: patch
messages: 238774
nosy: rhettinger
priority: normal
severity: normal
status: open
title: Import ElementTree documentation for namespaces and XPath
versions: Python 3.5
Added file: http://bugs.python.org/file38620/elementtree_doc.diff

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 970f33dff5ca by Victor Stinner in branch 'default':
Issue #23571: Fix test_capi
https://hg.python.org/cpython/rev/970f33dff5ca

--

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This exception or assertion is triggered by the bug in CPython or in an 
extension. CPython developer uses release and debug builds of CPython and can 
get both exception or assertion. An extension developer usually uses release 
build of CPython with release and debug builds of an extension and can't get an 
assertion in CPython. Common Python user uses release builds of CPython and 
extensions and can only report about an exception. So this assertion can be 
used only in CPython developing and doesn't help to catch a bug in extensions. 
But an assertion itself provides less information than an exception. Debug 
build is less informative than release build.

May be add a runtime flag to control the reaction on system errors? If it set, 
all raised SystemError will be converted to fatal errors.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23571
___
___
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-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The documentation looks contradictory. The *data* argument must be, but The 
*data* argument may also be. must be a bytes object, but If *data* is a 
buffer.

Why not write just The data argument must be a bytes-like object, an iterable 
of bytes-like objects, or None? It doesn't depend if url is a string or a 
Request object.

AFAIK the data argument of Request can be an iterable of bytes-like objects in 
additional to a bytes-like object or None.

The note about the application/x-www-form-urlencoded format is applied not only 
to a bytes object, but to an iterable of bytes-like objects too. I.e. to any 
acceptable value except None.

--

___
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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Steve Dower

Steve Dower added the comment:

Paul has basically summed up the pragmatism beats purity side of the argument. 
Whether we like it or not, users are mostly coming to python.org for their 
installer, and we need to support that.

That said, we can do some things to support all three cases once we acknowledge 
that they exist and identify who they're for. For example, an all users install 
could become an advanced option, which will move most users into per-user 
installs. We could also release a plain zip file of the installed layout and 
clearly mark it as being for app bundles and not a portable install for users. 
There are changes to getpath and the registry lookup that will better serve 
non-system installs, though we really need PEP 432 for that to be feasible.

Some bigger changes I wouldn't mind would be renaming python.exe to 
python35.exe and then py.exe to python.exe, which would let users have a system 
Python that interacts well with registered per-user versions and shebang lines. 
These largely depend on whether we've got the stomach to be so dramatic :) With 
3.5 beta coming up so soon, we may be better to avoid rocking the boat now and 
look towards 3.6, but maybe this is more urgent than that?

--

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

python35.exe follows things like pip so +1.  py.exe to python.exe -1 from me, 
how about pylaunch.exe as it's explicit?  As for urgency in the Python world 
Windows is and always has been the poor relation compared to *nix, so I say 
let's bite the bullet and get on with it.

--
nosy: +BreamoreBoy

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



[issue23657] Don't do isinstance checks in zipapp

2015-03-21 Thread Paul Moore

Paul Moore added the comment:

Updated patch with fixes for review comments. I did remove the tests for the 
exact error messages, as testing for a non-zero exit code was actually what I 
was trying to do, and I found a better way of doing that.

--
Added file: http://bugs.python.org/file38623/duck_typed_zipapp.v4.patch

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Paul Moore

Paul Moore added the comment:

Personally, I'd like to have 3.5 be the release that changes to using Program 
Files as the default install, and offers a per-user install to Appdata. I 
suspect there will be enough fallout from that change to keep us busy. Let's 
look to 3.6 for major renamings of the executables (if ever).

It should be noted that making python.exe be the launcher could potentially 
break a lot of things pretty horribly - virtualenv and the launcher itself are 
the ones that immediately come to mind.

Having said that, I have no objection to having both python35.exe and 
python.exe, but for 3.5 they should both be the same actual executable. In 
practice I doubt Windows users will use python35.exe, as there's no tradition 
of versioned executables there.

--

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



[issue17840] base64_codec uses assert for runtime validity checks

2015-03-21 Thread Serhiy Storchaka

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


--
stage: patch review - needs patch

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-21 Thread STINNER Victor

STINNER Victor added the comment:

Serhiy was right: we should mention the name of the function in the
exception. In the Django traceback, it's not easy to guess what raised the
SystemError.

Ok to mention the change in What's New in Python 3.5.

--

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Instead of an assert(), you could use Py_FatalError() at the end of 
_Py_CheckFunctionResult().

--
nosy: +pitrou

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Alexey, you're right that in this case (bug2.py) the cyclic GC is a bit less 
friendly than it was. It's not obvious there's a way to change that without 
introduce a lot of complexity. I'll try to take a look some day, although 
others may help too :-)

That said, my advice in msg238680 still holds. When you're writing a Python 
wrapper around a C or C++ library with well-defined ownership relationships, I 
think you should enforce those in the Python wrapper as well (that's my 
experience with llvmlite, anyway).

--

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
nosy: +tim.peters

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

 There is a cycle involving the class object, but I don’t think there is a 
 cycle involving the instance objects this time.

It is.

 a = A()
 a.__class__.__del__.__globals__['a']
__main__.A object at 0xb702230c

And all objects referenced from user class or module level instance of user 
class are in a cycle. This problem can cause issues such as issue17852.

--

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



[issue23733] Update porting HOWTO for bytes interpolation

2015-03-21 Thread Brett Cannon

New submission from Brett Cannon:

The porting HOWTO for Python 3.5 doesn't mention that bytes interpolation will 
exist.

--
assignee: brett.cannon
components: Documentation
messages: 238804
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Update porting HOWTO for bytes interpolation
versions: Python 3.5

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



[issue23732] Update porting HOWTO about new -b semantics

2015-03-21 Thread Brett Cannon

New submission from Brett Cannon:

Thanks to http://bugs.python.org/issue23681 we now have a better story about 
helping people find int/bytes comparison issues. The docs for Python 3.5 -- but 
not Python 3.4! -- should get updated to point out this change.

--
assignee: brett.cannon
components: Documentation
messages: 238803
nosy: brett.cannon
priority: normal
severity: normal
status: open
title: Update porting HOWTO about new -b semantics
versions: Python 3.5

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



[issue23723] Provide a way to disable bytecode staleness checks

2015-03-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

Can you please provide timing numbers?

--

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Non-Linux buildbots failed.

http://buildbot.python.org/all/builders/AMD64%20Snow%20Leop%203.x/builds/2798/steps/test/logs/stdio
==
FAIL: test_return_result_with_error (test.test_capi.CAPITest)
--
Traceback (most recent call last):
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_capi.py, 
line 206, in test_return_result_with_error
self.assertIn(b'_Py_CheckFunctionResult: Assertion', err)
AssertionError: b'_Py_CheckFunctionResult: Assertion' not found in b'2015-03-21 
10:28:29.114 defaults[68384:903] \nThe domain/default pair of 
(com.apple.CrashReporter, DialogType) does not exist\nAssertion failed: 
(!err_occurred), function _Py_CheckFunctionResult, file Objects/abstract.c, 
line 2088.\nFatal Python error: Aborted\n\nCurrent thread 0x7fff71296cc0 
(most recent call first):\n  File string, line 6 in module'

--
http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5906/steps/test/logs/stdio
==
FAIL: test_return_result_with_error (test.test_capi.CAPITest)
--
Traceback (most recent call last):
  File 
/Users/buildbot/buildarea/3.x.murray-snowleopard/build/Lib/test/test_capi.py, 
line 206, in test_return_result_with_error
self.assertIn(b'_Py_CheckFunctionResult: Assertion', err)
AssertionError: b'_Py_CheckFunctionResult: Assertion' not found in b'2015-03-21 
10:28:29.114 defaults[68384:903] \nThe domain/default pair of 
(com.apple.CrashReporter, DialogType) does not exist\nAssertion failed: 
(!err_occurred), function _Py_CheckFunctionResult, file Objects/abstract.c, 
line 2088.\nFatal Python error: Aborted\n\nCurrent thread 0x7fff71296cc0 
(most recent call first):\n  File string, line 6 in module'

--

Why this assert is needed? Why not always raise SystemError?

--

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Alexey Kazantsev

Alexey Kazantsev added the comment:

Ok, even assuming that all module globals are in circular reference starting 
with python 3.4, here is another example without using the globals:

Brief description:
v holds reference to d
a.v = v
b.d = d
Now when we form a circular reference a - b, the destructor order becomes 
wrong for v and d.

--
resolution: rejected - 
status: closed - open
Added file: http://bugs.python.org/file38621/bug2.py

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



[issue23524] Use _set_thread_local_invalid_parameter_handler in posixmodule

2015-03-21 Thread STINNER Victor

STINNER Victor added the comment:

I will try to take a look next week. If not, ping me.

--

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Yes, in bug2.py we have different cycle.

a ↔ b
↓   ↓
v → d

a and b are in a cycle, and therefore v and d are in cycle. I think that in 
such case v always should be destroyed before d, independently of a cycle that 
refers them. And this is the same situation, as for io classes. A TextIOWrapper 
object refers a BufferedWriter object, a BufferedWriter object refers a FileIO 
object. and some cycle refers a TextIOWrapper object. As a result a FileIO 
object can be closed before a TextIOWrapper object or a BufferedWriter object 
flush its buffer.

--

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-21 Thread STINNER Victor

STINNER Victor added the comment:

 I believe that this patch exposes some subtle bugs in Django (see 
 https://gist.github.com/berkerpeksag/8b8dbe594eb1a1c51275) and it would be 
 great to add a note for third party libraries.

Berker, can you please rerun your test with my new commit to check if you see 
the function error in the error?

(I didn't update the doc yet, not investigated Antoine's suggestion, I will do 
that later.)

--

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Paul Moore

Paul Moore added the comment:

One implication of Nick's (and Steve's) position seems to me that we don't view 
per-user installs as a key aspect of the python.org installers. And yet the 
impression I get of the direction that the 3.5 installers is taking seems to 
contradict that - there's a definite feel that we're expecting per-user 
installs to be more the norm.

I think that until viable distribution channels exist, we have to accept that 
almost all Windows users *need* the python.org installers, regardless of their 
intended usage.

On Windows, at the moment, conda/enthought are entirely viable distributions, 
but focused on data analysis. This does have downsides for other types of user 
- the conda package manager largely only covers data analysis tools, and while 
mixing pip and conda works, it's not a core use case for the distribution and 
there are rough edges. I've tried using Anaconda briefly for non-data science 
uses, and it's a somewhat frustrating experience - not one I'd be comfortable 
directing new non-scientific users at.

From checking the website, ActiveState free edition is for non-commercial use 
only, which likely precludes use by most of the people who want to use the 
python.org installer in their locked-down environments (if they can't get 
admin rights, they almost certainly won't be able to get an ActivePython 
license).

So, like it or not, until more generic free-for-commercual-use distributions of 
Python exist, I think we need to consider Windows users without admin rights as 
part of the core audience for the python.org installers.

Steve's changes to the 3.5 installer make this an entirely reasonable position. 
I see no need to provide backported solutions - it *is* reasonable for 
python.org to say if you want improvements like this, you should choose the 
latest release.

Regarding the OP's issue, I think fixed in Python 3.5 remains a fair answer. 
It's not a case of closing the issue without addressing the basic problem. It's 
more that it's fixed in the only version we'd ever fix it in (3.5). AIUI, the 
only thing that may still need admin rights is installing the required C 
runtime, which as a system component *has* to be done by an admin. That's a 
Windows issue, though, not a Python one.

--

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Martin Panter

Martin Panter added the comment:

But in the case of bug2.py, “a” is a variable inside main(), not a global 
variable.

BTW I take back my second paragraph questioning the whole order thing; I 
clearly didn’t think that one through.

--

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



[issue23042] ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol ffi_call_win32

2015-03-21 Thread Marc-Andre Lemburg

Marc-Andre Lemburg added the comment:

@koobs: I was just looking at the 3.2.1 code where it still looks like 
ffi_call_win32() gets called even on non-Win32 platforms.

That said, it's possible that ffi_call_win32() is indeed defined on other 
platforms than Win32 as well in 3.2.1 - after all, it just implements a 
particular calling method. I haven't checked that or actually tried compiling 
_ctypes with 3.2.1.

Perhaps we could try switch to 3.2.1 and then check the buildbots for possible 
issues ?!

--

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Nick Coghlan

Nick Coghlan added the comment:

From a general philosophical perspective, I share Steve's view - the vast 
majority of potential CPython users don't want to be consuming upstream Python 
themselves, they want to be getting it from a redistributor.

This has nothing to do with the quality of the software itself, and everything 
to do with the fact that the open source meta-experience is tailored towards 
DIY co-collaboration, rather than producing a streamlined and completely hassle 
free customer experience for a given problem domain. For education, the 
Raspberry Pi foundation will be a better supplier than us, for data analysis, 
Enthought or Continuum Analytics, for Linux system management, the relevant 
Linux distributor.

For Windows at the moment the default supported redistribution choice is going 
to be ActiveState (that's certainly the one we used when I used to do 
professional Windows based Python development), but our upstream relationship 
there isn't as good as the ones we have the Linux distributors or the data 
analysis focused redistributors.

As Steve says, that leaves the upstream Windows installers trying to fulfil two 
different roles - both being something which users can install purely for their 
own use *and* being suitable for a corporate IT department to incorporate into 
a Standard Operating Environment. At the moment it's more the latter, which is 
also fine for users with full administrative control over their own system, but 
no good for restricted corporate systems.

The immediate workaround is to use the Anaconda distribution from Continuum 
Analytics in such cases, even if you don't need the data analysis components.

In terms of consistency with what we do on the POSIX side, the case can 
definitely be made that System Python is the right default behaviour for 
upstream.

The Python-as-a-library use case is currently a problem on both POSIX and 
Windows, and PEP 432 goes into several of the reasons why. There are also a 
host of additional issues at least on POSIX related to building extension 
modules, and this is one of the big reasons Continuum Analytics don't use pip 
natively and use conda instead - getting extension module builds to work 
reliably cross-platform when running from a user directory is a genuinely hard 
problem even if you're just linking to C libraries, let alone if you might be 
linking to C++ and FORTRAN libraries as well. That's a large part of why conda 
is on my short list of possible language independent user level package 
management tools to consider proposing for use in Fedora: 
https://fedoraproject.org/wiki/Env_and_Stacks/Projects/UserLevelPackageManagement
 (and it's the *only* platform independent one, since Nix doesn't work on 
Windows)

--
nosy: +ncoghlan

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



[issue23731] Implement PEP 488

2015-03-21 Thread Brett Cannon

New submission from Brett Cannon:

https://www.python.org/dev/peps/pep-0488/

--
assignee: brett.cannon
components: Interpreter Core
messages: 238799
nosy: brett.cannon
priority: release blocker
severity: normal
stage: test needed
status: open
title: Implement PEP 488
type: enhancement
versions: Python 3.5

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



[issue22619] Possible implementation of negative limit for traceback functions

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Due to changes in issue17911 the patch no longer applied cleanly an should be 
rewritten. But changes in issue17911 are close to my patch. 
_tb_frame_lineno_iter matches walk_tb and _stack_frame_lineno_iter matches 
walk_stack. So new patch is simpler.

--
nosy: +rbcollins
Added file: http://bugs.python.org/file38622/traceback_negative_limit_3.patch

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



[issue23723] Provide a way to disable bytecode staleness checks

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Wouldn't zipimport provide better performance? If bytecode generation is 
thoroughly controlled, could you collect your .pyc files in a ZIP file?

--
nosy: +serhiy.storchaka

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



[issue22619] Possible implementation of negative limit for traceback functions

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I proposed changed patch. It needs a review.

--

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There is a cycle for every class with a method.

 class A:
... def __del__(self): pass
... 
 A.__del__.__globals__['A']
class '__main__.A'

--
nosy: +serhiy.storchaka

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Martin Panter

Martin Panter added the comment:

There is a cycle involving the class object, but I don’t think there is a cycle 
involving the instance objects this time.

However, I wonder if __del__() is meant to be called in any particular order 
anyway. What’s to stop the garbage collector itself from creating a temporary 
reference to the Device instance, destroying the Vector instance, which invokes 
Vector.__del__(), and finally destroying the temporary reference to the Device 
instance?

--
nosy: +vadmium

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



[issue23722] During metaclass.__init__, super() of the constructed class does not work

2015-03-21 Thread Nick Coghlan

Nick Coghlan added the comment:

I like the change, but even though the current behaviour is arguably buggy (and 
certainly undesirable) the fix does introduce a new class level attribute that 
is visible during execution of Python level code.

Perhaps it would be worth rolling this change into PEP 487 and documenting the 
new transient namespace entry as __classcell__?

--
nosy: +ncoghlan

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Short version of the above: I personally think we should be focusing on 
addressing the system Python and Python as a library cases upstream, as 
we're the only ones that can do that.

Solving the latter problem well then also sets the baseline for user focused 
installations, as those are then just a case of installing upstream CPython as 
if you were going to embed it in a larger application, and then just using it 
instead of embedding it.

For user focused cases, a good end user oriented solution will often bring in 
additional libraries targeted towards relevant problem domains. ActiveState 
does do that for Windows by bringing in additional modules like pywin32 and 
various others, but (as far as I am aware) we don't have anyone from there 
active on distutils-sig the way we do with Enthought, Continuum Analytics  the 
Linux distros. Assuming they have a booth at PyCon next month, I should 
probably swing by and ask the Komodo IDE folks about that...

--

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



[issue23042] ctypes module doesn't build on FreeBSD, RHEL (x86) - Undefined symbol ffi_call_win32

2015-03-21 Thread koobs

koobs added the comment:

@marc I took a look at the code upstream and it does indeed appear to be the 
same. It was introduced in 3.1 [1].

I cant explain however how or why our Python ports work with libffi 3.2.1.

See msg238767 for a link to another similar (same?) issue, with failure of OSX 
on 3.2.1 (building libffi, not python)

[1] 
https://github.com/atgreen/libffi/commit/e1911f78df113ca58738b66089a070d4cf747de7

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue23042
___
___
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-21 Thread Serhiy Storchaka

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


--
nosy: +serhiy.storchaka

___
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



[issue23723] Provide a way to disable bytecode staleness checks

2015-03-21 Thread Brett Cannon

Brett Cannon added the comment:

What Greg said. =) Basically it would allow those who know what they are doing 
to cut out a stat call per load. I suspect anyone deploying to a server is in a 
similar situation where they are not actively editing the code once deployed, 
and so saving on the startup of a new process (probably most beneficial in a CI 
situation).

I might also simply refactor the importlib loader code to make this at least 
possible for someone to implement without doing the work for them.

--

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset f30a5f6a665c by Victor Stinner in branch 'default':
Issue #23571: _Py_CheckFunctionResult() now gives the name of the function
https://hg.python.org/cpython/rev/f30a5f6a665c

--

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



[issue23731] Implement PEP 488

2015-03-21 Thread Barry A. Warsaw

Changes by Barry A. Warsaw ba...@python.org:


--
nosy: +barry

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



[issue23734] zipimport should not check pyc timestamps against zipped py files

2015-03-21 Thread Gregory P. Smith

New submission from Gregory P. Smith:

The zipimport module checks the timestamp of a pyc file loaded from the zip 
file against the timestamp of a corresponding py file in the zip if any.  This 
seems pointless.  By the time someone has created a zip file for zipimport they 
should have guaranteed that the pyc's are fresh or not have put them into the 
zip file at all (wasteful).

https://hg.python.org/cpython/file/e8878579eb68/Modules/zipimport.c#l1187

There is a comment in the code alluding to this, but the mtime check is still 
done right above.

--
components: Extension Modules
messages: 238824
nosy: gregory.p.smith
priority: low
severity: normal
status: open
title: zipimport should not check pyc timestamps against zipped py files
type: enhancement
versions: Python 3.5

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



[issue23720] __del__() order is broken since 3.4.0

2015-03-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Can this be closed as not-a-bug.

--
nosy: +rhettinger

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



[issue15836] unittest assertRaises should verify excClass is actually a BaseException class

2015-03-21 Thread Raymond Hettinger

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


--
versions:  -Python 2.7

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



[issue23126] Add Python hook function to replace NameError

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

See the thread starting here 
https://mail.python.org/pipermail/python-ideas/2014-December/030521.html

--
nosy: +BreamoreBoy
type:  - enhancement

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



[issue23075] Mock backport in 2.7 relies on implementation defined behavior

2015-03-21 Thread Roundup Robot

Roundup Robot added the comment:

New changeset d0b497c86c60 by Serhiy Storchaka in branch '2.7':
Issue #23075: Whether __builtins__ is a module or a dict is undefined in
https://hg.python.org/cpython/rev/d0b497c86c60

--
nosy: +python-dev

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



[issue23729] Import ElementTree documentation for namespaces and XPath

2015-03-21 Thread Serhiy Storchaka

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


--
nosy: +eli.bendersky, scoder

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



[issue23350] Content-length is incorrect when request body is a list or tuple

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

There are two issues. The one is that calculated Content-Length is not correct 
for lists, tuples, and other types (such as deque or array.array). The right 
solution is to calculate size using a technique used in urllib. Content-Length 
shouldn't be calculated for lists, tuples, and other non-bytes-compatible 
sequences. This is a bug, and the patch should be applied to all maintained 
releases.

The second issue is feature request. Allow calculating Content-Length for lists 
and tuples.

--
nosy: +serhiy.storchaka

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



[issue23097] unittest can unnecessarily modify sys.path (and with the wrong case)

2015-03-21 Thread Mark Lawrence

Changes by Mark Lawrence breamore...@yahoo.co.uk:


--
nosy: +michael.foord

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



[issue23729] Import ElementTree documentation for namespaces and XPath

2015-03-21 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Attaching a runnable version of the namespace demo to show that the code works.

--
versions: +Python 2.7, Python 3.4
Added file: http://bugs.python.org/file38625/xml_namespace_demo.py

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



[issue23075] Mock backport in 2.7 relies on implementation defined behavior

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

Can we have a commit review please as this is such a simple patch.

--
nosy: +BreamoreBoy

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



[issue23723] Provide a way to disable bytecode staleness checks

2015-03-21 Thread Gregory P. Smith

Gregory P. Smith added the comment:

We already use zipimport for most production deployments.  It works well.  
We've modified our own zipimport to ignore timestamps as keeping them in sync 
between pyc and py files in the zip files own timestamps is painful.  
Unfortunately the stdlib zipimport actually checks pyc timestamps against py 
files in the .zip file in 3.4 and 2.7 
(https://hg.python.org/cpython/file/e8878579eb68/Modules/zipimport.c#l1187 
mtime is checked, despite a comment in there in 3.4 suggesting it is probably 
pointless).  Changing that is a separate issue (I'll go open one).

Where this hurts us the most is in our build system when not building a final 
production zipped up binary (which would take as long as loading all of the py 
and pyc files would and would prevent iterative development).  Our py files and 
pyc files are located on a read only build artifact object store.  As a mounted 
filesystem it does not have a POSIX concept of file mtime at all (and never 
will).

When you're using a readonly filesystem of build time generated .py code 
without the concept of an mtime you really really want to tell Python to trust 
the build system and assume pyc files it finds match the corresponding py 
files.  Or your large application/test start up time really suffers.

In our use case, it is on the order of a 30% startup time improvement to use 
precompiled pyc files for our generated code py files (a ton of protobuf python 
modules) on a large application.

Most people are likely not in this situation because they are just lowly 
individuals operating on a simple writable posix filesystem in front of them. 
But when it matters, it really matters. People should be able to tell Python 
trust me, i know what I'm doing when it comes to compiled code loading.  It 
is easy enough to modify compile to write a never verify this magic timestamp 
into a pyc.  (I'd get more creative and use a value other than all 0s or 1s; 
pick the release date of the first version Python as your magic timestamp for 
example; nothing is likely to accidentally end up with that date in it)

That's all this issue is asking for.

--

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



[issue23723] Provide a way to disable bytecode staleness checks

2015-03-21 Thread Antoine Pitrou

Antoine Pitrou added the comment:

That sounds kind of reasonable, but how are we supposed to document this? Or is 
this only a secret backdoor for people in the know?

--

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



[issue23106] Remove smalltable from set objects

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

My feeling is that this is worth doing for the code clarity alone but what do 
others think about it?

--
nosy: +BreamoreBoy

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



[issue23021] Get rid of references to PyString in Modules/

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

The only PyString that I could find left is in unicodedata.c.  I'm assuming 
that there is little point is preparing a patch for a one word change, is this 
correct?

--
nosy: +BreamoreBoy

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



[issue23726] Don't enable GC for classes that don't add new fields

2015-03-21 Thread Eugene Toder

Changes by Eugene Toder elto...@gmail.com:


Added file: http://bugs.python.org/file38624/class_gc2.diff

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



[issue23571] Raise SystemError if a function returns a result with an exception set

2015-03-21 Thread STINNER Victor

STINNER Victor added the comment:

Le 21 mars 2015 18:05, Serhiy Storchaka rep...@bugs.python.org a écrit :
 But an assertion itself provides less information than an exception.
Debug build is less informative than release build.

I like Antoine's idea to replace the assertion with Py_FatalError() in
debug mode.

I'm more concerned by bugs in Python itself. A fatal error/assertion should
be noticed quickly on buildbots which compile python in debug mode.

It's just fine if other people use the release mode and get an exception.

 May be add a runtime flag to control the reaction on system errors? If it
set, all raised SystemError will be converted to fatal errors.

It's already what I do when running Python test suite with pyfailmalloc. I
modify manually SystemError constructor in the C code. A flag may help, but
you have to know that many tests expect SystemError (I don't remember which
ones).

Victor

--

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



[issue23075] Mock backport in 2.7 relies on implementation defined behavior

2015-03-21 Thread Serhiy Storchaka

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


--
assignee:  - serhiy.storchaka
nosy: +serhiy.storchaka

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



[issue23075] Mock backport in 2.7 relies on implementation defined behavior

2015-03-21 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Done. Thanks for raising it Mark.

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

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



[issue23729] Import ElementTree documentation for namespaces and XPath

2015-03-21 Thread Raymond Hettinger

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


Added file: http://bugs.python.org/file38626/elementtree_doc2.diff

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Steve Dower

Steve Dower added the comment:

Sorry, Standard Operating Environment. I intended it as shorthand for the as 
if it were shipped with the OS case.

--

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



[issue22246] add strptime(s, '%s')

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

It's a comprehensive patch so can we have a formal review please.

--
nosy: +BreamoreBoy

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



[issue22659] SyntaxError in the configure_ctypes

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

Without more detail I very much doubt that anybody can help.

--
nosy: +BreamoreBoy

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Nick Coghlan

Nick Coghlan added the comment:

I agree the migration to Program Files  a different installer build process is 
more than ambitious enough for 3.5.

For the embedding case, it's not that it *can't* be done, it's just a PITA.

Perhaps for the per-user no-admin-rights needed case, we could direct folks to 
the big http://portablepython.com/ bundle as a vendor neutral all inclusive 
bulk distribution?

To be completely clear, I'm talking invite Perica Zivkovic to become part of 
CPython release management and include Portable Python release timelines in the 
CPython release PEPs levels of engagement. Is Portable Python fully 
operational yet? could become one of the key gating criteria for leaving the 
beta phase and entering the release candidate phase.

--

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



[issue22608] test_socket fails with sem_init: Too many open files

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

It's a simple patch so can we have a formal review please.

--
nosy: +BreamoreBoy

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



[issue22610] test_ftplib fails with sem_init: Too many open files

2015-03-21 Thread Mark Lawrence

Mark Lawrence added the comment:

It's a simple patch so can we have a formal review please.

--
nosy: +BreamoreBoy

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Along those lines, another option to consider would be offering to publish 
Portable Python from the python.org release pages in addition to publishing the 
less comprehensive CPython-only installers.

--

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Nick Coghlan

Nick Coghlan added the comment:

Larry,

Bringing you into this discussion as CPython 3.5 release manager - we're trying 
to figure out what role we'd like the CPython Windows installers to play in the 
Windows distribution ecosystem, and I raised the question of whether or not 
typical Windows based end users might be better off with a larger, more 
comprehensive bundle like Portable Python (which they can also run from a USB 
stick if they want to).

There's no specific urgency here - I just wanted to give you a heads up that 
the discussion was happening. It's not clear to me yet if this will go anywhere 
(if nothing else, even if we decided it was a plausible idea, it would still be 
conditional on someone offering to contact Perica Zivkovic to see if they were 
amenable to the concept, as well as someone offering to write the suggestion up 
as a full PEP and work through the necessary changes to PEP 101 release 
management), but I figured you should at least be aware of the possibility as 
RM.

--
nosy: +larry

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Ned Deily

Ned Deily added the comment:

Bringing an umbrella distribution into the CPython release process seems to me 
like a very big leap and would that requires very careful consideration.  It 
would introduce a whole load of other dependencies into our release process, 
i.e. that the third-party packages (e.g. numpy, et al) included in Portable 
Python would become gating factors and dependencies for CPython releases.  
Frankly, I don't thing we want to go there.  I don't have an objection to 
referring to users to other distributions like Portable Python (or Anaconda or 
whatever) but actually bringing it into the release process would need a *lot* 
of careful thought and planning and co-ordination.  Sounds like an interesting 
discussion for the language summit.

--
nosy: +ned.deily

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Mark Mikofski

Mark Mikofski added the comment:

WinPython and miniconda are more current distros than portable python, and they 
come in both 32  64bit flavors.

Portable python hasn't been updated recently and only offers 32 bit which is 
IMO worthless except for the bundle as app case, eg meld installer.

I was going to suggest the same - if python.org can't support local installs 
(sans admin rights) b/c people will always look to it for direction,  
python.org should offer links to endorsed windows installer. I don't love it, 
but it will be familiar to windows users braving the open source world, similar 
to ruby which recommends winruby. Any endorsed distro **must** be built with 
msvc, so that all packages with extensions can be built. I don't care to 
support packages that depend on autotools.

Why can't msvcrt90.dll amd python27.dll be bundled into install directory? 
Seems to solve case #1 (for personal use) and #2 (bundled as app)? No admin 
rights required, just unzip. Why would you want to move python to program 
files? 

Case #3 would be swell, would windows ever do that? If we assume windows 
distros are akin to *nix them perhaps we need to push the --user or 
--home=~/.local options and virtualenv. That seems to be the way conda is 
going. Ruby rvm is more like that as well. Especially if we are going to force 
users to start using 3.5. What is Microsoft's official position on python. are 
they officially supporting python on windows? Seems like it with newest April's 
and vcforpython27.

BTW miniconda does not install all of the sci-data packages, only conda and 
python 2.7. works with pip and --home=~/.local scheme. Is this the future for 
windows users? We should reach a consensus I think

--

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Paul Moore

Paul Moore added the comment:

Sorry, SOE?

--

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



[issue23729] Import ElementTree documentation for namespaces and XPath

2015-03-21 Thread Martin Panter

Martin Panter added the comment:

Thanks for this improvement; documenting namespace behaviour is sorely needed.

--
nosy: +vadmium

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



[issue23350] Content-length is incorrect when request body is a list or tuple

2015-03-21 Thread Martin Panter

Martin Panter added the comment:

Technically I don’t think there is a bug. The documentation says [the] 
“Content-Length header should be explicitly provided”, so if you don’t set it 
you could argue that you’re using the library wrong.

For this issue I think Demian was trying to add support (i.e. new feature) for 
implicit Content-Length with tuples and lists of bytes (or strings). He has 
also added support for iterables of Latin-1 encodable text strings.

What you are suggesting Serhiy sounds like a separate new feature to support 
bodies of arbitrary bytes-like objects (or lists or tuples of them). According 
to the documentation, only byte and Latin-1 text strings, file objects 
supporting stat(), and iterables are currently supported. It does not say, but 
before this patch I think the iterables had to be of bytes-like objects.

--

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



[issue22608] test_socket fails with sem_init: Too many open files

2015-03-21 Thread Martin Panter

Martin Panter added the comment:

Maybe these patches work around the problem in these cases, but it sounds like 
the threading.Event class needs to grow a close() method or support the context 
manager protocol, rather than relying on the garbage collector to clean it up.

--
nosy: +vadmium

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Steve Dower

Steve Dower added the comment:

 (when does Windows switch to 3.6? Honestly, it can probably never happen...). 

On re-read, this isn't quite clear:

Hypothetically, if Windows 10 included Python 3.5, when would it be upgraded to 
Python 3.6? Probably never. Back-compat is problematic on Linux, but are 
significantly multiplied by the size of and the relative lack of technical 
competence/interest of the Windows user base.

--

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



[issue22516] Windows Installer won't - even when using just for meoption

2015-03-21 Thread Steve Dower

Steve Dower added the comment:

Yeah, some of those are fairly ambitious, but at the same time, for the SOE use 
case we probably don't want the Program Files install at all - it would be a 
mix between System32 and CommonFiles, with the same environment issues you'd 
see on Linux. Program Files is better than SystemRoot, but doesn't really make 
sense for any of the three use cases.

When we can describe exactly who our installer is meant for, we'll be able to 
figure out what changes are needed.

--

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



[issue13224] Change str(x) to return only the (qual)name for some types

2015-03-21 Thread Martin Panter

Changes by Martin Panter vadmium...@gmail.com:


--
nosy: +vadmium

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



  1   2   >