[issue21116] Failure to create multiprocessing shared arrays larger than 50% of memory size under linux

2014-04-01 Thread Médéric Boquien
Médéric Boquien added the comment: I have now signed the contributor's agreement. As for the unit test I was looking at it. However, I was wondering how to write a test that would have triggered the problem. It only shows up for very large arrays and it depends on occupied memory and the

[issue21111] PyLong_AsUnsignedLongAndOverflow does not exist

2014-04-01 Thread Mark Dickinson
Mark Dickinson added the comment: Sounds reasonable to me. Were there particular uses you needed this for? And do you want to work on a patch? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2

[issue13824] argparse.FileType opens a file and never closes it

2014-04-01 Thread paul j3
paul j3 added the comment: From http://bugs.python.org/issue14156 argparse.FileType for '-' doesn't work for a mode of 'rb' I learned that 'stdin/out' can be embedded in an 'open' by using the 'fileno()' and 'closefd=False' (so it isn't closed at the end of open). With this, the dummy file

[issue14156] argparse.FileType for '-' doesn't work for a mode of 'rb'

2014-04-01 Thread paul j3
paul j3 added the comment: A related issue http://bugs.python.org/issue13824 argparse.FileType opens a file and never closes it I proposed a FileContext class that returns a `partial(open, filename,...)' context object. The issues of how to deal with stdin/out are similar. --

[issue21120] PyArena type is used in headers from the limited API

2014-04-01 Thread Andrey
New submission from Andrey: Hi all, The PyArena data type is defined in the pyarena.h under the #ifndef Py_LIMITED_API statement, so it's not included in the limited api. But this type is used in Python-ast.h, ast.h and asdl.h headers that included in the limited api, because they don't

[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)

2014-04-01 Thread STINNER Victor
STINNER Victor added the comment: str.translate() currently allocates a buffer of UCS4 characters. translate_writer.patch: - modify _PyUnicode_TranslateCharmap() to use the _PyUnicodeWriter API - drop optimizations for error handlers different than ignore because there is no unit tests for

[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)

2014-04-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21118 ___ ___

[issue21085] compile error Python3.3 on Cygwin

2014-04-01 Thread dellair jie
dellair jie added the comment: Martin, Here is the values presented on Python 3.4.0, in fact they are the same as 3.3.2, please note the key difference. /* #undef HAVE_SIGTIMEDWAIT */ #define HAVE_SIGWAIT 1 #define HAVE_SIGWAITINFO 1 The SIGTIMEDWAIT is undef while the SIGWAIT is defined. The

[issue21085] compile error Python3.3 on Cygwin

2014-04-01 Thread STINNER Victor
STINNER Victor added the comment: So shall we close this issue? Nope. Could you please try the test described in msg215249? We might integrate https://github.com/Alexpux/MSYS2-packages/blob/master/python3/3.3.2-cygwin-siginfo.patch but it would be better to fix sigwaitinfo() if it works

[issue21113] Error usage of class.__bases__

2014-04-01 Thread Lotus Qin
Lotus Qin added the comment: get the __doc__ in a wrong way, it works now. -- resolution: - invalid status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21113 ___

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-04-01 Thread nils
New submission from nils: I got an error while rebuilding a module for 3.4. This was a ISO C90 error but setup.py explicitely adds -std=c99 to the gcc parameters, and indeed it is used. fifo.h:114:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

[issue1298835] Add a vendor-packages directory for system-supplied modules

2014-04-01 Thread Robert Kuska
Robert Kuska added the comment: Ok, I have started a thread at pypa-devs google group. https://groups.google.com/forum/#!topic/pypa-dev/r6qsAmJl9t0 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1298835

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread Jonas Wagner
New submission from Jonas Wagner: CPython fails to build with LLVM's link-time optimization (LTO) in Mac OS. Very similar commands work on Linux. I'm currently configuring CPython as follows: on Linux: RANLIB=ar -s --plugin=/path/to/llvm/lib/LLVMgold.so CC=/path/to/llvm/bin/clang

[issue21085] compile error Python3.3 on Cygwin

2014-04-01 Thread dellair jie
dellair jie added the comment: Victor, Would you please be more specific on test_signal? Br, Dellair -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21085 ___

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21122 ___ ___ Python-bugs-list

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21122 ___ ___ Python-bugs-list

[issue21085] compile error Python3.3 on Cygwin

2014-04-01 Thread STINNER Victor
STINNER Victor added the comment: Would you please be more specific on test_signal? Please try to compile Python 3.4 with the attached cygwin_si_band.patch applied, and then run test_signal. I would like to know if all tests pass, and if not, which tests are failing. I also would like to

[issue20767] Some python extensions can't be compiled with clang 3.4

2014-04-01 Thread Dirkjan Ochtman
Changes by Dirkjan Ochtman dirk...@ochtman.nl: -- nosy: +djc ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20767 ___ ___ Python-bugs-list mailing

[issue20767] Some python extensions can't be compiled with clang 3.4

2014-04-01 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: Can we have some more feedback on this? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20767 ___ ___

[issue20767] Some python extensions can't be compiled with clang 3.4

2014-04-01 Thread STINNER Victor
STINNER Victor added the comment: See also issue #21122. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20767 ___ ___ Python-bugs-list mailing

[issue21120] PyArena type is used in headers from the limited API

2014-04-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +loewis ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21120 ___ ___ Python-bugs-list

[issue21111] PyLong_AsUnsignedLongAndOverflow does not exist

2014-04-01 Thread STINNER Victor
STINNER Victor added the comment: Sounds reasonable to me. Were there particular uses you needed this for? And do you want to work on a patch? I don't understand why PyArg_Parse*() functions have formats for integers checking overflow for signed integers, but not for unsigned integers.

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread Jonas Wagner
Jonas Wagner added the comment: I am indeed using Clang 3.4 (both the one that ships with Mac OS, and a version compiled from the sources). However, the errors I get are rather different than #20767. In particular, Clang finishes successfully and does produce shared object files; they just

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread STINNER Victor
STINNER Victor added the comment: What is your clang version? See also issue #20767. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21122 ___

[issue20767] Some python extensions can't be compiled with clang 3.4

2014-04-01 Thread Dirkjan Ochtman
Dirkjan Ochtman added the comment: That does look to be a different issue, though. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20767 ___ ___

[issue18644] Got ResourceWarning: unclosed file when using test function from formatter module

2014-04-01 Thread R. David Murray
R. David Murray added the comment: There were a bunch of changes to pydoc in 3.4, so I'm not surprised that it doesn't use DumbWriter any more (possibly as part of the formatter pending deprecation). I think I was answering why it wasn't deprecated as part of the htmllib deprecation.

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread R. David Murray
R. David Murray added the comment: OK, I didn't even realize that was possible with partial. Now I understand Yuri's original point. His example is wrong: def foo(a, b): ...print(a, b) x2 = partial(foo, 'x') str(inspect.signature(x2)) '(b)' This is the correct example: x =

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-04-01 Thread Stefan Krah
Changes by Stefan Krah stefan-use...@bytereef.org: -- nosy: +larry priority: normal - high ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21121 ___

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread R. David Murray
R. David Murray added the comment: By didn't know that was possible, I mean binding a positional argument as a keyword argument in the partial. If nobody else thought that was possible, maybe can just fix it :) -- ___ Python tracker

[issue21085] compile error Python3.3 on Cygwin

2014-04-01 Thread dellair jie
dellair jie added the comment: Victor, I suppose that Python needs to be built successfully before running test_signal. Three patches were applied in Python 3.4.0. However, the build failed to build _struct module. Should I open another Issue to track it? As long as the build goes through

[issue21123] Compilation error on _struct module on Python 3.4

2014-04-01 Thread dellair jie
New submission from dellair jie: Dear all, I am compiling Python 3.4 on Cygwin 1.7.17. The following has been done in order to reach the point where _struct module failed. A clean Python 3.4 Applied patches: cygwin_si_band.patch in Issue21085

[issue21124] Compilation error on _struct module on Python 3.4

2014-04-01 Thread dellair jie
New submission from dellair jie: Dear all, I am compiling Python 3.4 on Cygwin 1.7.17. The following has been done in order to reach the point where _struct module failed. A clean Python 3.4 Applied patches: cygwin_si_band.patch in Issue21085

[issue21124] Compilation error on _struct module on Python 3.4

2014-04-01 Thread dellair jie
dellair jie added the comment: The full build log -- Added file: http://bugs.python.org/file34696/Build.log ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21124 ___

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread Yury Selivanov
Yury Selivanov added the comment: @Nick: Ouch... I'm halfway through the implementation, and it seems like your idea isn't going to work. Example (from unittest): def foo(a=1, b=2, c=3): pass _foo = partial(foo, a=10, c=13) Now, the signature for _foo, with your logic applied, will

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread Yury Selivanov
Yury Selivanov added the comment: @R. David: Yes, thank you, David. Too bad I haven't seen your last messages before I started working on the patch... -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21117

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread R. David Murray
R. David Murray added the comment: We'll have to wait for Nick to chime in, but I'll make a couple of comments. First, I think this is a bug in partial, so I think we need to decide what, if anything, to do about that first, before we decide if signature needs to compensate for it or not.

[issue21125] traceback.extract_tb says quadruple when it means tuple

2014-04-01 Thread Glenn Maynard
New submission from Glenn Maynard: https://docs.python.org/2/library/traceback.html A “pre-processed” stack trace entry is a quadruple (filename, line number, function name, text) representing the information that is usually printed for a stack trace. There's no such thing as a quadruple.

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread Yury Selivanov
Yury Selivanov added the comment: First, I think this is a bug in partial, so I think we need to decide what, if anything, to do about that first, before we decide if signature needs to compensate for it or not. Agree. Although, it looks like it's not something that partial is doing, it

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread Yury Selivanov
Yury Selivanov added the comment: Although, it looks like it's not something that partial is doing, it seems like this call logic is implemented somewhere way deeper. Forget about what I said. Yes, it's a bug in partial. Fixing it, will require having the code from Signature.bind reflected

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread R. David Murray
R. David Murray added the comment: Oh, the error message comes from deep in the guts of python, yes. I'm saying that the fact that partial lets you write partial(foo, a='bar') when a is a positional argument is a bug. Even if other people agree with me (and they may not, consenting adults

[issue21125] traceback.extract_tb says quadruple when it means tuple

2014-04-01 Thread R. David Murray
R. David Murray added the comment: A google for quadruple got me wikipedia as the first hit, with this as the match text: Quadruple may refer to: A 4-tuple, ... So, it's tech-speak. The alternative would be to say either a 4-tuple or a tuple of four elements. I'm fine with someone

[issue21123] Compilation error on _struct module on Python 3.4

2014-04-01 Thread dellair jie
dellair jie added the comment: Duplicated with Issue21124 -- resolution: - duplicate status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21123 ___

[issue21076] Turn signal.SIG* constants into enums

2014-04-01 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: If there are no other concerns I will commit latest patch tomorrow, then do the renaming. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21076 ___

[issue15067] Clean up the sqlite3 docs

2014-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2e13f0d49b8e by Zachary Ware in branch '2.7': Issue #15067: Remove reference to a rejected PEP. http://hg.python.org/cpython/rev/2e13f0d49b8e New changeset 4a2dabac976d by Zachary Ware in branch '3.4': Issue #15067: Port 2.7 sqlite3 docs to 3.4

[issue19546] configparser leaks implementation detail

2014-04-01 Thread Claudiu.Popa
Claudiu.Popa added the comment: But the last traceback conveys enough information, the user can see immediately that the given section does not exist. My problem with the current behaviour is that the first error distracts the user, while the actual problem is the second traceback. But I have

[issue21111] PyLong_AsUnsignedLongAndOverflow does not exist

2014-04-01 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- components: +Interpreter Core -Extension Modules stage: - needs patch type: - enhancement versions: +Python 3.5 -Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue2

[issue21126] Integrate doctest.run_docstring_examples() with unittest

2014-04-01 Thread Giampaolo Rodola'
New submission from Giampaolo Rodola': In order to run a certain function via doctest run_docstring_examples() can be used: http://stackoverflow.com/a/10081450/376587 The function returns None though. I am in a situation where I want to run a single function's doctest from a unittest and want

[issue19546] configparser leaks implementation detail

2014-04-01 Thread R. David Murray
R. David Murray added the comment: Why? Just let the context convey the information. It's not like we are building a UI here, this is for the programmer. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19546

[issue19546] configparser leaks implementation detail

2014-04-01 Thread R. David Murray
R. David Murray added the comment: Although I will grant you that I have to guess at what the bad value substitution error message is trying to tell me, so that error message could use some improvement. -- ___ Python tracker rep...@bugs.python.org

[issue17846] Building Python on Windows - Supplementary info

2014-04-01 Thread michael kearney
michael kearney added the comment: Observation: Tools\buildbot\build.bat solves all the problems I was having. That is to say, a single command exists to build python on windows w/o problems. It has worked since at least since python 3.3.1, which I think preceded my original submission.

[issue21118] str.translate is absurdly slow in majority of use cases (takes up to 60x longer than similar functions)

2014-04-01 Thread Josh Rosenberg
Josh Rosenberg added the comment: @haypo: Are you planning to run with this then? Or shall I pick up where your patch leaves off? Thanks for the pointer to the codecs charmap_build; it's not documented anywhere that I can tell, so I didn't even know it existed. Now to dig into the source to

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread Nick Coghlan
Nick Coghlan added the comment: Huh, that actually sounds like a possible design flaw in the core argument binding semantics. I'll have to think about that one some more. In the meantime, as far as this issue goes, I'm inclined to say that signature should throw an exception to be clear that

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread Nick Coghlan
Nick Coghlan added the comment: Oh, wait, it *does* have a usable signature. It's just that all the *subsequent* positional-or-keyword parameters also have to be marked as keyword-only. -- ___ Python tracker rep...@bugs.python.org

[issue21127] Path objects cannot be constructed from str subclasses

2014-04-01 Thread Antony Lee
New submission from Antony Lee: Trying to construct a Path object from a str subclass, e.g. class S(str): pass Path(S(foo)) fails because the subclass cannot be interned. I think that the interning should simply be removed for non-exactly-str arguments (it is only here for performance

[issue21128] testing stdlib and compatibility with pypy

2014-04-01 Thread mattip
New submission from mattip: In continuation of issue 20887, this patch closes and removes all temp files created while running regression tests for stdlib 2.7.6 on win32 and pypy. Note that a gc.collect was required to release the closed files in test_argparse, as well as making them all rw.

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-01 Thread Ned Deily
Ned Deily added the comment: Just as an experiment (using the 3.4 branch and the Xcode 5.1 clang), the list of unique symbols not found during the test dlopen in setup.py when using -flto: _PyArg_ParseTuple _PyArg_ParseTupleAndKeywords _PyBaseObject_Type _PyBool_Type _PyByteArray_Type

[issue21082] os.makedirs(exist_ok=True) is not thread-safe: umask is set temporary to 0, serious security problem

2014-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9186f4a18584 by Benjamin Peterson in branch '3.2': remove directory mode check from makedirs (closes #21082) http://hg.python.org/cpython/rev/9186f4a18584 New changeset 6370d44013f7 by Benjamin Peterson in branch '3.3': merge 3.2 (#21082)

[issue21082] os.makedirs(exist_ok=True) is not thread-safe: umask is set temporary to 0, serious security problem

2014-04-01 Thread Benjamin Peterson
Benjamin Peterson added the comment: I've now removed the offending behavior. exist_ok is still racy because it uses path.isdir() in the exceptional case, but fixing that can be an enhancement elsewhere. -- nosy: +benjamin.peterson ___ Python

[issue21117] inspect.signature: inaccuracies for partial functions

2014-04-01 Thread Yury Selivanov
Yury Selivanov added the comment: Oh, wait, it *does* have a usable signature. It's just that all the *subsequent* positional-or-keyword parameters also have to be marked as keyword-only. Interesting idea. I'll incorporate this logic into the patch. --

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-04-01 Thread Ned Deily
Ned Deily added the comment: It looks like -Werror=declaration-after-statement was added to BASECFLAGS in configure.ac during the 3.4 development cycle by a3559c8c614b and e47806951fb2. Unfortunately, BASECFLAGS propagates through to extension module builds as well. If

[issue21124] _struct module compilation error under Cygwin 1.7.17 on Python 3.4

2014-04-01 Thread Ned Deily
Ned Deily added the comment: This looks like a duplicate of Issue6672. -- components: +Build nosy: +ned.deily resolution: - duplicate stage: - committed/rejected status: open - pending superseder: - Add Mingw recognition to pyport.h to allow building extensions title: Compilation

[issue21127] Path objects cannot be constructed from str subclasses

2014-04-01 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21127 ___ ___ Python-bugs-list mailing list

[issue21128] testing stdlib and compatibility with pypy

2014-04-01 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- keywords: +patch nosy: +serhiy.storchaka stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21128 ___

[issue21121] -Werror=declaration-after-statement is added even for extension modules through setup.py

2014-04-01 Thread nils
nils added the comment: The workaround indeed works. At least I can work now until this gets officialy fixed. Thanks! export CFLAGS=$(python3.4 -c 'import sysconfig; print(sysconfig.get_config_var(CFLAGS).replace(-Werror=declaration-after-statement,))') --

[issue21129] Segfault in python interpreter

2014-04-01 Thread Mayank Gupta
New submission from Mayank Gupta: If I open the python interpreter: $ python Then type def to_hex(i): result = hex(i)[2:] My interpreter segfaults (EXC_BAD_ACCESS). Here's a backtrace from lldb: (lldb) bt * thread #1: tid = 0x152e7f, 0x0001002eff97 readline.so`call_readline + 647, queue

[issue21129] Segfault in python interpreter

2014-04-01 Thread Zachary Ware
Zachary Ware added the comment: If you're using OS X 10.9+, you'll need to upgrade your Python installation. See #18458. -- nosy: +zach.ware resolution: - duplicate stage: - committed/rejected status: open - closed superseder: - interactive interpreter crashes and test_readline

[issue4712] Document pickle behavior for subclasses of dicts/lists

2014-04-01 Thread Eric Snow
Changes by Eric Snow ericsnowcurren...@gmail.com: -- nosy: +eric.snow versions: +Python 3.5 -Python 3.2, Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4712 ___

[issue21125] traceback.extract_tb says quadruple when it means tuple

2014-04-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: I'll make the change to 4-tuple. -- assignee: docs@python - rhettinger nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21125 ___

[issue21125] traceback.extract_tb says quadruple when it means tuple

2014-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1c112eb4eb56 by Raymond Hettinger in branch '2.7': Issue 21125: minor wording tweak. http://hg.python.org/cpython/rev/1c112eb4eb56 -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue21125] traceback.extract_tb says quadruple when it means tuple

2014-04-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset dfa399e74fcf by Raymond Hettinger in branch '3.4': Issue 21125: minor documentation tweak. http://hg.python.org/cpython/rev/dfa399e74fcf -- ___ Python tracker rep...@bugs.python.org

[issue21125] traceback.extract_tb says quadruple when it means tuple

2014-04-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the bug report, Glenn. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21125 ___

[issue20968] mock.MagicMock does not mock __truediv__

2014-04-01 Thread Raymond Hettinger
Raymond Hettinger added the comment: The patch looks clean and correct. It passes the test suite. I recommend going ahead and applying the patch. -- nosy: +rhettinger ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue20968

[issue18652] Add itertools.first_true (return first true item in iterable)

2014-04-01 Thread Joshua Bronson
Changes by Joshua Bronson jabron...@gmail.com: -- nosy: +jab ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18652 ___ ___ Python-bugs-list mailing