[issue22945] Ctypes inconsistent between Linux and OS X

2014-11-26 Thread eryksun

eryksun added the comment:

c_void_p's getfunc returns the address as an integer. In turn, an integer 
argument gets converted to a C int. This mean you need to a create a new 
c_void_p from the address for _as_parameter_, e.g.

self._as_parameter_ = c_void_p(self.g)

Or set restype to a subclass of c_void_p. ctypes won't call the getfunc in this 
case, e.g. 

class my_void_p(c_void_p):
pass

mylib.my_gizmo_create.restype = my_void_p

ConvParam
https://hg.python.org/cpython/file/ee879c0ffa11/Modules/_ctypes/callproc.c#l613

GetResult
https://hg.python.org/cpython/file/ee879c0ffa11/Modules/_ctypes/callproc.c#l903

--
nosy: +eryksun

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



[issue22943] bsddb: test_queue fails on Windows

2014-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

This test is locale-depending. string.letters is the collection of 8-bit 
characters for which islower() or isupper() is true. On most Unixes the locale 
is either UTF-8 or ASCII and string.letters contains only ASCII letters. On 
most Windows it contains characters from extended ASCII, and the length of 
string.letters can be larger than 75 (minimal non-replacement index used in 
tests).

There is two simple way to fix this issue.
1) increase test indices to be larger than 255.
2) use string.ascii_letters instead of string.letters.

Here is the patch which uses the second approach (because string.letters is 
used in other tests).

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

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



[issue22685] memory leak: no transport for pipes by create_subprocess_exec/shell

2014-11-26 Thread STINNER Victor

STINNER Victor added the comment:

 Buildbot failures observed on koobs-freebsd9 and koobs-freebsd10 for 3.x and 
 3.4, respectively.

I'm unable to reproduce the failure with ./python -m test -F test_asyncio or 
./python -m test -F -m test_pause_reading test_asyncio on my FreeBSD 9.1 VM.

--

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



[issue19676] Add the namereplace error handler

2014-11-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset 21d1571c0533 by Serhiy Storchaka in branch 'default':
Issue #19676: Fixed integer overflow issue in namereplace error handler.
https://hg.python.org/cpython/rev/21d1571c0533

--

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



[issue19676] Add the namereplace error handler

2014-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Thank you Berker.

--

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



[issue22946] urllib gives incorrect url after open when using HTTPS

2014-11-26 Thread John McKay

New submission from John McKay:

After getting a sucessfull response, _open_generic_http will overwrite the the 
start of the url to be http: regardless of if it was called from open_http() or 
open_https(). This causes it to appear as if you were redirected to a 
non-secure site if you check the url properly after an open request. This is 
especially problematic after being redirected; it appears you were redirected 
to an insecure version of the site.

Attached is a patch to resolve this. It uses the type, which should be 
correctly set to http or https based on the calling context.

--
components: Library (Lib)
files: urllib.patch
keywords: patch
messages: 231702
nosy: John.McKay
priority: normal
severity: normal
status: open
title: urllib gives incorrect url after open when using HTTPS
type: behavior
versions: Python 3.4, Python 3.5
Added file: http://bugs.python.org/file37283/urllib.patch

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



[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-11-26 Thread Akira Li

Akira Li added the comment:

 STINNER Victor added the comment:

 scandir is slower on my machine:

 Please share more information about your config: OS, disk type (hard
 drive, SSD, something else), filesystem, etc.

Ubuntu 14.04, SSD, ext4 filesystem. Results for different python
versions are the same (scandir on pypy is even slower due to ctype
usage).

What other information could be useful?

 Ben Hoyt added the comment:

 Akira, note the Using slower ctypes version of scandir -- this is
 the older, ctypes implementation of scandir. On Linux, depending on
 file system etc, that can often be slower. You need to at least be
 using the fast C version in _scandir.c, which is then half C, half
 Python. But ideally you'd use the all-C version that I've provided as
 a CPython 3.5 patch.

Yes. I've noticed it, that is why I asked :) *What commands should I
run to benchmark the attached patch (scandir-2.patch)?*

I've read benchmark.py's source; It happens that it already supports
benchmarking of os.scandir. In my python checkout:

  cpython$ hg import --no-commit 
https://bugs.python.org/file36963/scandir-2.patch
  cpython$ make  cd ../scandir/
  scandir$ ../cpython/python benchmark.py -s /usr/
  Using Python 3.5's builtin os.scandir()
  Comparing against builtin version of os.walk()
  Priming the system's cache...
  Benchmarking walks on /usr/, repeat 1/3...
  Benchmarking walks on /usr/, repeat 2/3...
  Benchmarking walks on /usr/, repeat 3/3...
  os.walk size 7925376343, scandir.walk size 5534939617 -- NOT EQUAL!
  os.walk took 13.552s, scandir.walk took 6.032s -- 2.2x as fast

It seems os.walk and scandir.walk do a different work here.

I've written get_tree_size_listdir_fd() that mimics get_tree_size() 
(see get_tree_size_listdir.diff patch) to get the same size:

  scandir$ ../cpython/python benchmark.py -s /usr
  Using Python 3.5's builtin os.scandir()
  Comparing against builtin version of os.walk()
  Comparing against get_tree_size_listdir_fd
  Priming the system's cache...
  Benchmarking walks on /usr, repeat 1/3...
  Benchmarking walks on /usr, repeat 2/3...
  Benchmarking walks on /usr, repeat 3/3...
  os.walk size 5534939617, scandir.walk size 5534939617 -- equal
  os.walk took 5.697s, scandir.walk took 5.621s -- 1.0x as fast

scandir is not noticeably faster but scandir-based code is much nicer here.

--
Added file: http://bugs.python.org/file37284/get_tree_size_listdir.diff

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



[issue22518] integer overflow in encoding unicode

2014-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Integer overflow errors were fixed in 4 error handlers: surrogatepass, 
backslashreplace, namereplace, and xmlcharrefreplace. Is is hard to write 
general robust tests. In worst cases they requires more than sys.maxsize or 
even sys.maxsize*2 memory and for sure fail with MemoryError. It is possible to 
write a test for xmlcharrefreplace, but it will not robust, after changes of 
implementation details it could raise MemoryError instead of OverflowError 
after consuming all address space.

So I suggest close this issue without tests. Such tests are useless.

--
keywords: +patch
Added file: 
http://bugs.python.org/file37285/codecs_error_handlers_overflow_tests.patch

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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

 +/* during Python finalization, warnings may be emited after 
 interp-sysdict
 +   is cleared: see issue #22898 */

 I would prefer to see this comment in the else block.

Indeed.
New updated patch attached.

--
Added file: http://bugs.python.org/file37286/warn_3.patch

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



[issue20899] Nested namespace imports do not work inside zip archives

2014-11-26 Thread Thomas Heller

Changes by Thomas Heller thel...@ctypes.org:


--
nosy: +theller

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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

Why recursion limit is restored? Couldn't the test be simpler without it?

%a should be used instead of '%s' (file path can contain backslashes).

And it would be more robust to open file in binary mode (may be even in 
non-buffered). It can contain non-ascii characters.

May be the test should be marked as CPython only.

To check that script is executed at all we should print something from it and 
than test the out. Otherwise syntax error in script will make all test passed.

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

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



[issue22947] Enable 'imageop' - Multimedia Srvices Feature module for 64-bit platform

2014-11-26 Thread pankaj.s01

New submission from pankaj.s01:

Hi,
'imageop' is default disable in Python-2.7.8 for 64-bit platform.
i have enable and test on x_86 64-bit architecture. it's working fine.and it's 
unit test is also ok.

The respective patch has been attached and test log as shown 
below . 

output: for test_imageop.py

$]./python2.7  ../lib/python2.7/test/test_imageop.py
test_input_validation (__main__.InputValidationTests) ... ok

--
Ran 1 test in 0.047s

OK

--
Thanks  Regards,

 Pankaj Sharma
(pankaj@samsung.com)

--
components: Library (Lib)
files: Python-2.7.8-imageop.patch
keywords: patch
messages: 231707
nosy: pankaj.s01
priority: normal
severity: normal
status: open
title: Enable 'imageop' - Multimedia Srvices Feature module for 64-bit 
platform
type: enhancement
versions: Python 2.7
Added file: http://bugs.python.org/file37287/Python-2.7.8-imageop.patch

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



[issue22901] test.test_uuid.test_find_mac fails because of `ifconfig` deprecation

2014-11-26 Thread bru

bru added the comment:

Closed the issue since it's already been fixed.

--
resolution:  - out of date
status: open - closed

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



[issue4887] environment inspection and manipulation API is buggy, inconsistent with Python philosophy for wrapping native APIs

2014-11-26 Thread Amaury Forgeot d'Arc

Amaury Forgeot d'Arc added the comment:

Agreed. environ.pop() was fixed a long time ago with issue1287.
It seems that all mutable methods of the environ pseudo-dict are now correctly 
reflected to the platform environ.

The other direction (updates from C code should be reflected in os.environ) is 
tracked by issue1159.

--
nosy: +amaury.forgeotdarc
resolution:  - duplicate
status: open - closed
superseder:  - os.getenv() not updated after external module uses C putenv()

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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

 Why recursion limit is restored? Couldn't the test be simpler without it?

For the sake of explicitness, so that the interpreter will not raise a 
RuntimeError during finalization when checking for the recursion limit after 
g.throw(MyException) has raised PyExc_RecursionErrorInst.


 %a should be used instead of '%s' (file path can contain backslashes).
 And it would be more robust to open file in binary mode (may be even in 
 non-buffered). It can contain non-ascii characters.
 May be the test should be marked as CPython only.
 To check that script is executed at all we should print something from it and 
 than test the out. Otherwise syntax error in script will make all test passed.

Thanks.
New patch attached.

The reason why the PyExc_RecursionErrorInst singleton keeps the frames alive 
longer than expected is that the reference count of the 
PyExc_RecursionErrorInst static variable never reaches zero until 
_PyExc_Fini().  So decrementing the reference count of this exception after the 
traceback has been printed in PyErr_PrintEx() does not decrement the reference 
count of its traceback attribute (as it is the case with the other exceptions) 
and the traceback is not freed. The following patch to PyErr_PrintEx() does 
that.  With this new patch and without the changes made by warn_4.patch, the 
interpreter does not crash with the runtimerror_singleton_2.py reproducer and 
the ResourceWarning is now printed instead of being ignored as with the 
warn_4.patch:

diff --git a/Python/pythonrun.c b/Python/pythonrun.c
--- a/Python/pythonrun.c
+++ b/Python/pythonrun.c
@@ -1876,6 +1876,8 @@
 PyErr_Display(exception, v, tb);
 }
 Py_XDECREF(exception);
+if (v == PyExc_RecursionErrorInst)
+Py_CLEAR(((PyBaseExceptionObject *)v)-traceback);
 Py_XDECREF(v);
 Py_XDECREF(tb);
 }

If both patches were to be included, the test case in warn_4.patch would test 
the above patch and not the changes made in Python/_warnings.c.

--
Added file: http://bugs.python.org/file37288/warn_4.patch

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



[issue22948] Integer type and __add__

2014-11-26 Thread Sascha Falk

New submission from Sascha Falk:

The following statement makes python report a syntactic error:
1.__add__(2)

The following works:
(1).__add__(2)

--
components: Interpreter Core
messages: 231711
nosy: sfalk
priority: normal
severity: normal
status: open
title: Integer type and __add__
versions: Python 3.4

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



[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread mstol

New submission from mstol:

I'm not sure if this is real bug, but the documentation of fnmatch.translate 
states:

fnmatch.translate(pattern)

Return the shell-style pattern converted to a regular expression.



My intuition about shell-style pattern is that for example, pattern:t3
should match only t3, and not ost3 or xt3, but what I receive from fnmatch 
is:
In [2]: fnmatch.translate(t3)
Out[2]: 't3\\Z(?ms)'

so using for example re.search will match not only on t3, but also on xxxt3 (in 
shell-like pattern is *t3). So... I  believe it should be changed or at least 
the documentation should be more specific about what shell-style pattern mean.

--
components: Regular Expressions
messages: 231712
nosy: ezio.melotti, mrabarnett, mstol
priority: normal
severity: normal
status: open
title: fnmatch.translate doesn't add ^ at the beginning
type: behavior
versions: Python 2.7

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



[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread mstol

mstol added the comment:

it can be changed easyly with changing the return statement in 
fnmatch.py function translate 

from:
return res + '\Z(?ms)'

to:
return '^' + res + '\Z(?ms)'

--

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



[issue22666] email.Header no encoding of unicode strings containing newlines

2014-11-26 Thread Flavio Grossi

Flavio Grossi added the comment:

any news?

--

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



[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

The result of fnmatch.translate() is used with re.match(). It could be even 
simplified if use it with re.fullmatch(), but I afraid such change can break 
user code.

--
nosy: +serhiy.storchaka

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



[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread mstol

mstol added the comment:

So you suggest that this output should not be used with re.search ? Why?

I think it should be documented, or maybe it is?

I know that this is not possible to introduce such a change to the currently 
used versions.

--

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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

out can be b'Done.\r\n'. Use self.assertIn.

 If both patches were to be included, the test case in warn_4.patch would test 
 the above patch and not the changes made in Python/_warnings.c.

You can test err for warning message.

The traceback should be cleared before decrementing the reference count. And 
only if Py_REFCNT(v) is 2.

--

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



[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

I think it should be documented.

--
assignee:  - docs@python
components: +Documentation
keywords: +easy
nosy: +docs@python
priority: normal - low
stage:  - needs patch
versions: +Python 3.4, Python 3.5

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



[issue22948] Integer type and __add__

2014-11-26 Thread Jordan

Jordan added the comment:

1. is lexed as a float constant 

 1.
1.0
 1.0.__add__(2)
3.0
 1 .__add__(2)
3

Not sure how to procede

--
nosy: +jordan

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



[issue22946] urllib gives incorrect url after open when using HTTPS

2014-11-26 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Thank you for the patch. It would be nice to have a test, too.

--
nosy: +benjamin.peterson
stage:  - test needed

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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-26 Thread A. Jesse Jiryu Davis

A. Jesse Jiryu Davis added the comment:

With warn_4.patch applied I can no longer reproduce my original segfault, looks 
like the fix works.

--

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



[issue22949] fnmatch.translate doesn't add ^ at the beginning

2014-11-26 Thread Matthew Barnett

Matthew Barnett added the comment:

I notice that it puts the inline flags at the end. It would be better to put 
them at the start.

--

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



[issue22950] ASLR and DEP protection

2014-11-26 Thread Friedrich Spee von Langenfeld

New submission from Friedrich Spee von Langenfeld:

Are all binary files of a Python installation protected with techniques like 
Adress Space Layout Randomization and Data Execution Prevention? How can 
someone check this with an PE Editor or something similar? I know that this 
seems not to be a matter of great interest, but it would set an example to 
other programmers: Security is not an optional feature, but a necessity. Many 
thanks in advance.

--
components: Build
messages: 231723
nosy: Friedrich.Spee.von.Langenfeld
priority: normal
severity: normal
status: open
title: ASLR and DEP protection
type: security

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



[issue22951] unexpected return from float.__repr__() for inf, -inf, nan

2014-11-26 Thread jaebae17

New submission from jaebae17:

The help page for the built-in repr() states ''' For many types, this function 
makes an attempt to return a string that would yield an object with the same 
value when passed to eval()...'''

This holds true for non-inf/nan values of float():
 eval(repr(float('0.0')))
0.0

But for inf, -inf, and nan it does not:
 eval(repr(float('inf')))
Traceback (most recent call last):
  File stdin, line 1, in module
  File string, line 1, in module
NameError: name 'inf' is not defined

Expected return from repr(float('inf')) was float('inf'), but perhaps 'inf' 
response has too much history at this point to be changed.

--
messages: 231724
nosy: jaebae17
priority: normal
severity: normal
status: open
title: unexpected return from float.__repr__() for inf, -inf, nan
type: behavior
versions: Python 2.7

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



[issue22950] ASLR and DEP protection

2014-11-26 Thread Ned Deily

Ned Deily added the comment:

Python is supported on many platforms and the techniques and support for 
address layout randomization and similar techniques vary greatly.  Also, in 
many cases, Python is being used from a distribution built by a third-party, 
such as an operating system vendor or a third-party package manager, using 
their own preferred tooling and configurations.  In the specific case of 
Windows builds downloadable from python.org, it appears that ASLR and DEP have 
been enabled as of Python 3.4 (see Issue16632).

--
nosy: +ned.deily
resolution:  - not a bug
stage:  - resolved
status: open - closed

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



[issue22940] readline does not offer partial saves

2014-11-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ff00588791be by Benjamin Peterson in branch 'default':
add readline.append_history_file (closes #22940)
https://hg.python.org/cpython/rev/ff00588791be

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

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



[issue19676] Add the namereplace error handler

2014-11-26 Thread Ned Deily

Ned Deily added the comment:

../../source/Python/codecs.c:1022:16: error: use of undeclared identifier 
'out'; did you
  mean 'outp'?
assert(out == start + ressize);
   ^~~
   outp

--
nosy: +ned.deily
status: closed - open

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



[issue22951] unexpected return from float.__repr__() for inf, -inf, nan

2014-11-26 Thread Ethan Furman

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


--
nosy: +ethan.furman

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



[issue19676] Add the namereplace error handler

2014-11-26 Thread Ned Deily

Ned Deily added the comment:

Fixed in ce8a8531d29a

--
status: open - closed

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



[issue22898] segfault during shutdown attempting to log ResourceWarning

2014-11-26 Thread Xavier de Gaye

Xavier de Gaye added the comment:

 out can be b'Done.\r\n'. Use self.assertIn.

Ok, new patch attached.


 If both patches were to be included, the test case in warn_4.patch would 
 test the above patch and not the changes made in Python/_warnings.c.
 You can test err for warning message.

In the case where PyExc_RecursionErrorInst would not leak frames, the code path 
followed by the test case would not run any of the changes made in _warnings.c.


 The traceback should be cleared before decrementing the reference count. And 
 only if Py_REFCNT(v) is 2.

I believe that attempting to fix the frames leak by clearing the traceback 
implies the following changes:
* The previous patch to PyErr_PrintEx()
* v-context and v-cause should also be tested against equality with 
PyExc_RecursionErrorInst.
* In PyErr_PrintEx() the variable v2 may also be PyExc_RecursionErrorInst.
* The sames change should also be done when freeing the exception value at 
least:
in PyErr_WriteUnraisable() called when an exception occurs during 
finalization
in PyErr_Restore()
[1] when sys.last_value is cleared in PyImport_Cleanup()
And that would miss the case [1] where sys.last_value is set to None by some 
python user code.

Note [1]:
Unless it is acceptable to clear the PyExc_RecursionErrorInst traceback even 
when sys.last_value has been set (then Py_REFCNT(v) is 3 instead of 2).

Not sure if this is worth the trouble.

--
Added file: http://bugs.python.org/file37289/warn_5.patch

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



[issue22940] readline does not offer partial saves

2014-11-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset c8bcede1b37a by Ned Deily in branch 'default':
Issue 22940: fixes to editline support
https://hg.python.org/cpython/rev/c8bcede1b37a

--

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



[issue22952] multiprocessing doc introduction not in affirmative tone

2014-11-26 Thread Davin Potts

New submission from Davin Potts:

The introduction section of the multiprocessing module's documentation does not 
adhere to the python dev guidelines for keeping things in the affirmative tone.

Problem description:
Specifically, the intro section contains a warning block that, while conveying 
something important, both 1) potentially creates worry/concern in the mind of 
the reader new to this module, and 2) ideally belongs somewhere more 
relevant/appropriate than the intro section.  Also, the intro section contains 
an example code block that does not attempt to provide a simple example to 
advance understanding and boost the reader's confidence through trying this 
example -- instead it demonstrates what not to do and the consequences of doing 
so in an attempt to drive home one key point with the reader.

Suggested changes:
* The warning text block can be moved to a section discussing synchronization 
without losing the important information being shared or sharing it too late to 
be useful.
* To make the key point to the reader in the intro about the 
availability/importability of functions, etc. to child processes, the 
affirmative tone can be used in describing the good pattern/practice being 
employed in a usable/valid/working example.


Further comment:  Similar issues could be raised with other parts of the 
multiprocessing docs but this issue is concerned only with the intro section.

--
assignee: docs@python
components: Documentation
messages: 231731
nosy: davin, docs@python
priority: normal
severity: normal
status: open
title: multiprocessing doc introduction not in affirmative tone
type: behavior
versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4

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



[issue22952] multiprocessing doc introduction not in affirmative tone

2014-11-26 Thread Davin Potts

Davin Potts added the comment:

Attached is a proposed patch for the 2.7 branch.

It provides 2 changes to the documentation:
1) Moves the warning text block regarding synchronization functionality not 
necessarily being available on all systems to the Synchronization between 
processes section (Section 16.6.1.3 in the 2.7 docs).
2) Adds a paragraph introducing (in the affirmative tone) a good/common 
practice as shown in a working example to drive home the key point about 
importability by subprocesses.  The original example of what not to do has been 
preserved by moving it to the Using a pool of workers section (Section 
16.6.1.5 in the 2.7 docs).

Note that this patch does not attempt to resolve the issue of :class:`Pool` not 
being resolved by Sphinx to properly point at the multiprocessing.pool.Pool 
class description.  This issue appears addressed in the 3.4 docs but not in 
some other branches.

--
keywords: +patch
Added file: http://bugs.python.org/file37290/multiprocessing_27.patch

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



[issue22948] Integer type and __add__

2014-11-26 Thread Josh Rosenberg

Josh Rosenberg added the comment:

This is a duplicate of #20692.

--
nosy: +josh.r

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



[issue22953] Windows installer configures system PATH also when installing only for current user

2014-11-26 Thread Pekka Klärck

New submission from Pekka Klärck:

To reproduce:
1) Download and run Python 2.7.9rc1 Windows installer.
2) Select Install just for me.
3) Enable Add python.exe to Path.
=
Expected: Current user PATH edited.
Actual: System PATH edited.

--
components: Installation
messages: 231734
nosy: pekka.klarck
priority: normal
severity: normal
status: open
title: Windows installer configures system PATH also when installing only for 
current user
versions: Python 2.7

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



[issue22937] unittest errors can't show locals

2014-11-26 Thread Guido van Rossum

Guido van Rossum added the comment:

Note that IIRC py.test (a 3rd party module) will show you additional 
information in the traceback. SO it is definitely possible.

--
nosy: +gvanrossum

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



[issue22948] Integer type and __add__

2014-11-26 Thread Berker Peksag

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


--
resolution:  - duplicate
stage:  - resolved
status: open - closed
superseder:  - Tutorial and  FAQ: how to call a method on an int

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



[issue21114] wsgiref.simple_server doesn't handle multi-line headers correctly

2014-11-26 Thread Tom Tanner

Tom Tanner added the comment:

I confirm this fixes a bug.
To reproduce it just add, e.g.

X-Multline-Header: foo
 bar

to your request.
 
It has been fixed in Python 3 with
https://github.com/python/cpython/commit/67dcb80f6e102622e4aa888930d3017fed9834de

--
nosy: +tanner

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



[issue22937] unittest errors can't show locals

2014-11-26 Thread Guido van Rossum

Guido van Rossum added the comment:

Sorry, I missed the part where you said we can't depend on PyPI.

There already is something in the stdlib that may be close enough to what 
you're looking for -- checkout cgitb.py.  The following might even work:

import cgitb
cgitb.enable(format='text')

That code is very old and primarily meant for CGI scripts (that shows how old 
it is!) but it still works.

--

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



[issue22936] traceback module has no way to show locals

2014-11-26 Thread Guido van Rossum

Guido van Rossum added the comment:

Check out the cgitb stdlib module.

--
nosy: +gvanrossum

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



[issue22953] Windows installer configures system PATH also when installing only for current user

2014-11-26 Thread Berker Peksag

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


--
nosy: +steve.dower

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



[issue22953] Windows installer configures system PATH also when installing only for current user

2014-11-26 Thread Steve Dower

Steve Dower added the comment:

The just for me option isn't actually a per-user install, it actually just 
restricts use of the core Python DLL to Python itself and not any other 
applications that may want to use it (by putting the DLL in the Python folder 
instead of the system folder). Basically everything else about this option is a 
bug that I consider it of scope for 2.7 at this point. If someone else figures 
out how to fix it, I can try and review the patch, but I'm not intending to 
figure out the install script well enough to fix it.

For what it's worth, the Python 3.5 installer will have a true per-user option 
(no admin privileges, no shared files with other users, per-user environment 
and file associations, etc.)

--

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



[issue21614] Case sensitivity problem in multiprocessing.

2014-11-26 Thread James Burke

James Burke added the comment:

I'm also getting this error.

It appears to me to be caused by the length of the module name rather than case.
mp_bug.py will run fine for me, but if I change it to mp_bug_longname.py then I 
will get this error.

import multiprocessing
import time

class MP_Bug(multiprocessing.Process):
def __init__(self):
multiprocessing.Process.__init__(self)
def run(test):
for x in range(1, 10):
print x
time.sleep(1)

if __name__ == '__main__':
p = MP_Bug()
p.start()

--
nosy: +James.Burke

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



[issue21614] Case sensitivity problem in multiprocessing.

2014-11-26 Thread Nick Coghlan

Nick Coghlan added the comment:

(Adding Richard as the multiprocessing maintainer, and Christian as the creator 
of the backport to 2.4/2.5)

Note that on a case-insensitive filesystem, the fopen() call is likely 
succeeding, and it's the subsequent case_ok() check that's failing. The 
assumption of case sensitivity is embedded fairly deeply in the import system, 
as otherwise it makes it pretty easy to accidentally import the same module 
multiple times under different names.

However, if importing the same module multiple times under different names 
isn't a concern, then setting PYTHONCASEOK should allow multiprocessing to 
import the module using the incorrect capitalisation.

More significant changes to the way the standard library's multiprocessing 
module starts subprocesses on Windows won't be implemented for Python 2.7 - 
actually fixing the subprocess spawning to work as intended in all cases (as 
was done in Python 3.4) relies on the import system changes defined in PEP 451. 

In theory, I expect a multiprocessing2 backport could be written that depends 
on importib2 (to enable Python 3.4+ import semantics in Python 2.7), but I'm 
not aware of anyone currently working on such a project.

James's comment sounds like a potentially different problem (e.g. there are 
some hardcoded platform dependent limits on absolute path lengths for module 
filenames - 255 in the case of Windows)

--
nosy: +christian.heimes, sbt

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



[issue22952] multiprocessing doc introduction not in affirmative tone

2014-11-26 Thread Davin Potts

Davin Potts added the comment:

Attached is a proposed patch for the 3.4 branch.

The same modifications are made in this patch as in the patch for the 2.7 
branch, with two minor tweaks:
1) The affirmative tone example uses Pool in a with statement as is supported 
since 3.3.
2) References in the added/moved text are properly resolving (in Sphinx) to the 
class definition for Pool.


This patch should also work against the 3.3 branch (though should not be 
applied to 3.2 as the context manager behavior had not yet been added to Pool 
in 3.2 -- the example in the intro would need changing for this to be applied 
to 3.2 is all).

--
Added file: http://bugs.python.org/file37291/multiprocessing_34.patch

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



[issue22952] multiprocessing doc introduction not in affirmative tone

2014-11-26 Thread Berker Peksag

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


--
nosy: +sbt
stage:  - patch review
type: behavior - enhancement
versions: +Python 3.5 -Python 3.2, Python 3.3

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



[issue21614] Case sensitivity problem in multiprocessing.

2014-11-26 Thread Nick Coghlan

Changes by Nick Coghlan ncogh...@gmail.com:


--
type: crash - behavior

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



[issue17911] traceback: add a new thin class storing a traceback without storing local variables

2014-11-26 Thread Nick Coghlan

Nick Coghlan added the comment:

Belatedly looking at this again: one thing I noticed is that the summary 
currently loses info if __cause__ is set.

It would be better to follow the PEP 409/415 model and report the 
__suppress_context__ flag as part of the summary, rather than dropping the 
context information.

That allows the decision on whether or not to show the context information to 
be deferred to display time, rather than discarding it eagerly.

--

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



[issue22952] multiprocessing doc introduction not in affirmative tone

2014-11-26 Thread Davin Potts

Changes by Davin Potts pyt...@discontinuity.net:


--
nosy: +rhettinger

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



[issue22952] multiprocessing doc introduction not in affirmative tone

2014-11-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

+1 It looks like the relevant information has been preserved while adding an 
example where the module is being used as designed.

--

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



[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-11-26 Thread Akira Li

Akira Li added the comment:

To see what happens at syscall level, I've run various implementations
of get_tree_size() functions (see get_tree_size_listdir.diff) with
strace:

get_tree_size_listdir_fd   -- os.listdir(fd) + os.lstat
get_tree_size  -- os.scandir(path) + entry.lstat
get_tree_size_listdir_stat -- os.listdir(path) + os.lstat
get_tree_size_listdir  -- os.listdir(path) + os.path.isdir + os.lstat

Summary: 

- os.listdir() and os.scandir()-based variants use the same number of 
getdents() syscalls
- and the number of openat, lstat (newfstatat) syscalls is also comparable
  (except for the variant that uses os.path.isdir)

Log:

scandir$ /usr/bin/time strace -fco py.strace ../cpython/python -c 'from 
benchmark import get_tree_size_listdir_fd as f; import os; 
print(f(os.open(/usr/, os.O_RDONLY)))'  head -7 py.strace
5535240217
11.29user 8.14system 0:17.78elapsed 109%CPU (0avgtext+0avgdata 
13460maxresident)k
0inputs+8outputs (0major+6781minor)pagefaults 0swaps
% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 46.510.075252   0264839   newfstatat
 16.880.027315   1 50460   getdents
 11.530.018660   0 75621   fcntl
  9.740.015758   0 50531   close
  6.870.06   0 25214   openat
scandir$ /usr/bin/time strace -fco py.strace ../cpython/python -c 'from 
benchmark import get_tree_size as f; print(f(/usr/))'  head -7 py.strace
5535240217
22.56user 8.47system 0:29.77elapsed 104%CPU (0avgtext+0avgdata 
13280maxresident)k
0inputs+8outputs (0major+6306minor)pagefaults 0swaps
% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 62.000.032822   0239644   lstat
 19.970.010570   0 50460   getdents
  8.520.004510   0 25215   openat
  6.090.003224   0 25326   close
  0.550.000292   395   mmap
scandir$ /usr/bin/time strace -fco py.strace ../cpython/python -c 'from 
benchmark import get_tree_size_listdir_stat as f; print(f(/usr/))'  head -7 
py.strace
5535240217
13.70user 6.30system 0:18.84elapsed 106%CPU (0avgtext+0avgdata 
13456maxresident)k
0inputs+8outputs (0major+6769minor)pagefaults 0swaps
% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 64.790.050217   0264849   lstat
 19.370.015011   0 50460   getdents
  8.220.006367   0 25215   openat
  5.760.004465   0 25326   close
  0.320.000247   2   114   mmap
scandir$ /usr/bin/time strace -fco py.strace ../cpython/python -c 'from 
benchmark import get_tree_size_listdir as f; print(f(/usr/))'  head -7 
py.strace
5535240217
19.53user 10.61system 0:28.16elapsed 107%CPU (0avgtext+0avgdata 
13452maxresident)k
0inputs+8outputs (0major+6733minor)pagefaults 0swaps
% time seconds  usecs/call callserrors syscall
-- --- --- - - 
 42.040.063050   0265195 37259 stat
 37.400.056086   0265381   lstat
 11.460.017187   0 50460   getdents
  4.820.007232   0 25215   openat
  3.430.005139   0 25326   close

--
Added file: http://bugs.python.org/file37292/get_tree_size_listdir.diff

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



[issue22524] PEP 471 implementation: os.scandir() directory scanning function

2014-11-26 Thread Akira Li

Changes by Akira Li 4kir4...@gmail.com:


Removed file: http://bugs.python.org/file37284/get_tree_size_listdir.diff

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



[issue22954] Logically Dead Code

2014-11-26 Thread pankaj.s01

New submission from pankaj.s01:

Hi,
In Python-3.4.2 (latest version), there is logically dead code in function 
static tp_new_wrapper().

The respective patch has been attached for 
Python-3.4.2/Objects/typeobject.c

Thanks $ Regards,
 Pankaj Sharma
(pankaj@samsung.com)

--
files: Python-3.4.2-typeobject.patch
keywords: patch
messages: 231746
nosy: pankaj.s01
priority: normal
severity: normal
status: open
title: Logically Dead Code
type: enhancement
versions: Python 3.4
Added file: http://bugs.python.org/file37293/Python-3.4.2-typeobject.patch

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



[issue22954] Logically Dead Code

2014-11-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset a498e599ce6a by Benjamin Peterson in branch '3.4':
remove tautological condition (closes #22954)
https://hg.python.org/cpython/rev/a498e599ce6a

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

New changeset ec21b41e588b by Benjamin Peterson in branch '2.7':
remove tautological condition (closes #22954)
https://hg.python.org/cpython/rev/ec21b41e588b

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

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



[issue22780] NotImplemented doc section needs update

2014-11-26 Thread Roundup Robot

Roundup Robot added the comment:

New changeset ebb8865dcf54 by Ethan Furman in branch '3.4':
(3.4) Issue22780: reword NotImplemented docs to emphasise should
https://hg.python.org/cpython/rev/ebb8865dcf54

New changeset b6ee02acaae9 by Ethan Furman in branch 'default':
Issue22780: reword NotImplemented docs to emphasise should
https://hg.python.org/cpython/rev/b6ee02acaae9

--

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



[issue22780] NotImplemented doc section needs update

2014-11-26 Thread Ethan Furman

Ethan Furman added the comment:

Thank you, Berker.

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

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



[issue22924] Use of deprecated cgi.escape

2014-11-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

If this looks right to you, please go ahead an apply.

--
assignee: rhettinger - serhiy.storchaka
keywords: +patch
Added file: http://bugs.python.org/file37294/cgi2html.diff

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



[issue21514] update json module docs in light of RFC 7159 ECMA-404

2014-11-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

Serhiy, can you take this one.  The patch passes both mine and Bob's review; 
however, it doesn't apply cleanly to 2.7 and 3.4.  I haven't had the time to do 
the needed backports.

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

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



[issue22955] Pickling of methodcaller and attrgetter

2014-11-26 Thread Antony Lee

New submission from Antony Lee:

methodcaller and attrgetter objects seem to be picklable, but in fact the 
pickling is erroneous:

 import operator, pickle
 pickle.loads(pickle.dumps(operator.methodcaller(foo)))
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: methodcaller needs at least one argument, the method name
 pickle.loads(pickle.dumps(operator.attrgetter(foo)))
Traceback (most recent call last):
  File stdin, line 1, in module
TypeError: attrgetter expected 1 arguments, got 0

When looking at the pickle disassembly, it seems that the argument to the 
constructor is indeed not pickled.

 import pickletools; 
 pickletools.dis(pickle.dumps(operator.methodcaller(foo)))
0: \x80 PROTO  3
2: cGLOBAL 'operator methodcaller'
   25: qBINPUT 0
   27: )EMPTY_TUPLE
   28: \x81 NEWOBJ
   29: qBINPUT 1
   31: .STOP
highest protocol among opcodes = 2

--
components: Library (Lib)
messages: 231752
nosy: Antony.Lee
priority: normal
severity: normal
status: open
title: Pickling of methodcaller and attrgetter
versions: Python 3.4

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



[issue22955] Pickling of methodcaller and attrgetter

2014-11-26 Thread Raymond Hettinger

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


--
stage:  - needs patch

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



[issue22609] Constructors of some mapping classes don't accept `self` keyword argument

2014-11-26 Thread Raymond Hettinger

Raymond Hettinger added the comment:

This looks good.  Go ahead and apply the first version of the patch.

--
assignee: rhettinger - serhiy.storchaka

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