[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

[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

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

[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

[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

[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

[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

[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

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

[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

[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

[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

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

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

[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

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

[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

[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

[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

[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

[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. -- ___

[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

[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

[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

[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

[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

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

[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

[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():

[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

[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

[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

[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

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

[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

[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

[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

[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

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

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

[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

[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

[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

[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')

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

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

[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).

[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

[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

[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

[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

[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

[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

[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

[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

[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

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

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

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

[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

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

[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

[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

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

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

[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