[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-03-17 Thread Ned Deily
Ned Deily added the comment: FD_CLOEXEC is first support on OS X 10.5. Here's a patch to skip the test on earlier systems: tested on 10.4, 10.5, and 10.10. -- nosy: +ned.deily stage: -> commit review Added file: http://bugs.python.org/file38516/issue23458_tiger.patch

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: Ned Deily added the comment: > FD_CLOEXEC is first support on OS X 10.5. Here's a patch to skip the test on > earlier systems: tested on 10.4, 10.5, and 10.10. What do you mean by "first support"? Does it mean that fcntl(fd, F_SETFD, FD_CLOEXEC) is simply a n

[issue23625] load_module() docs: zipped eggs are not loaded.

2015-03-17 Thread Thomas Guettler
Thomas Guettler added the comment: In this case I am wearing newbee user glasses. And with this glasses on my nose, I don't care for implementation. I am confused that imp module does not work like "import foo". -- ___ Python tracker

[issue23679] SSL Ciphers RC4

2015-03-17 Thread mogli
mogli added the comment: That was fast, great job! For the record: The SSLv3 issue I also wrote about was a false positive because the test only works with Javascript. Python 2.7.9 has SSLv3 disabled by default as it should. urllib2.urlopen("https://sslv3.dshield.org";) # fails as it should

[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4accc35cbfcf by Victor Stinner in branch 'default': Revert changeset d927047b1d8eb87738676980a24930d053ba2150 https://hg.python.org/cpython/rev/4accc35cbfcf -- nosy: +python-dev ___ Python tracker

[issue23646] PEP 475: handle EINTR in the time module, retry sleep()

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: I commited sleep_eintr.patch by mistake. After this change, test_socket started to fail on Windows. I don't understand why. http://buildbot.python.org/all/builders/AMD64%20Windows7%20SP1%203.x/builds/5836/steps/test/logs/stdio =

[issue23625] load_module() docs: zipped eggs are not loaded.

2015-03-17 Thread Paul Moore
Paul Moore added the comment: Egg files are a format defined by setuptools. If you look in the setuptools documentation it notes that egg files are simply zipfiles with a particular structure and naming convention. So from a core Python perspective, you can use eggs just like any other zipfile

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread STINNER Victor
New submission from STINNER Victor: Attached patch fixes the usage of the PyMODINIT_FUNC macro. My patch is based on Thomas Wouters's patch of the issue #11410. I don't understand why Modules/pyexpat.c redefined PyMODINIT_FUNC if not defined. In which case PyMODINIT_FUNC was not defined? I'm

[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: I extracted the changes on the PyMODINIT_FUNC macro and I opened the issue #23685. -- ___ Python tracker ___ __

[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: +#if defined(__GNUC__) && __GNUC__ >= 4 +# define HAVE_ATTRIBUTE_VISIBILITY +#endif Clang now also supports __attribute__((visibility("..."))). I don't know since which version. I'm not sure because I don't see it: http://clang.llvm.org/docs/AttributeRef

[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: > The getargs.c change *is* necessary, although it doesn't have to be that > exact change. Why not moving these declarations to Include/modsupport.h where _PyArg_Parse...() are already used? -- ___ Python tracker

[issue23625] load_module() docs: zipped eggs are not loaded.

2015-03-17 Thread Thomas Guettler
Thomas Guettler added the comment: The docs should be where new users look. I don't speak about several hundret words Where do you think new users look for documentation if they want a method which does find a module? -- ___ Python tracker

[issue18814] Add codecs.convert_surrogateescape to "clean" surrogate escaped strings

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I uploaded the patch just before your comment Nick. Here is updated patch. Functions are renamed as Nick suggested, added two more functions: decompose_astrals() and compose_surrogate_pairs(). They are mainly for example here, they can be committed in other

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: Hum, I'm lost with the problem with C++ :-( What is your use case? Do you want to compile CPython with C++? Or compile a third-party extension with C++ and this extension includes "Python.h" which includes "pyatomic.h". For third-party code, pyatomic.h is only

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: > For third-party code, pyatomic.h is only needed by PyThreadState_GET() in > pystate.h. Maybe we should hide completly pyatomic.h. Currently, pyatomic.h > is not really used if Py_LIMITED_API is defined. pystate_cplusplus.patch: disable completly pyatomic.h o

[issue23686] Upgrade copy of OpenSSL bundled with Python

2015-03-17 Thread Alex Gaynor
New submission from Alex Gaynor: On Thursday OpenSSL will disclose some security issues and issue new releases: https://mta.openssl.org/pipermail/openssl-announce/2015-March/20.html When that happens, Python's that bundle an OpenSSL should be upgraded. -- keywords: security_issue m

[issue18814] Add codecs.convert_surrogateescape to "clean" surrogate escaped strings

2015-03-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file38520/codecs_convert_escapes_2.patch ___ Python tracker ___ ___ Python-bu

[issue22585] os.urandom() should use getentropy() of OpenBSD 5.6

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 371deb4a5fd1 by Ned Deily in branch '3.4': Issue #22585: make URandomFDTests test case actually run https://hg.python.org/cpython/rev/371deb4a5fd1 New changeset c89f7c34e356 by Ned Deily in branch 'default': Issue #22585: null merge https://hg.pytho

[issue23115] Backport #22585 -- getentropy for urandom to Python 2.7

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 961efafe9497 by Ned Deily in branch '2.7': Issue #22585, #23115: make URandomFDTests test case actually run https://hg.python.org/cpython/rev/961efafe9497 -- ___ Python tracker

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-03-17 Thread Ned Deily
Ned Deily added the comment: $ sw_vers ProductName:Mac OS X ProductVersion: 10.4.11 BuildVersion: 8S165 $ ./python Python 3.4.3+ (3.4:910a7a540a31, Mar 17 2015, 03:33:01) [GCC 4.0.1 (Apple Computer, Inc. build 5370)] on darwin Type "help", "copyright", "credits" or "license" for more inform

[issue23686] Upgrade copy of OpenSSL bundled with Python

2015-03-17 Thread Ned Deily
Changes by Ned Deily : -- components: +Build nosy: +ned.deily, steve.dower, zach.ware stage: -> needs patch versions: +Python 2.7, Python 3.4, Python 3.5 ___ Python tracker ___

[issue23686] Update Windows and OS X installer OpenSSL to 1.0.2a

2015-03-17 Thread Ned Deily
Changes by Ned Deily : -- title: Upgrade copy of OpenSSL bundled with Python -> Update Windows and OS X installer OpenSSL to 1.0.2a ___ Python tracker ___ __

[issue23593] Update Windows and OS X installer OpenSSL to 1.0.2

2015-03-17 Thread Ned Deily
Ned Deily added the comment: Superseded by Issue23686, OpenSSL 1.0.2a -- resolution: -> out of date stage: patch review -> resolved status: open -> closed superseder: -> Update Windows and OS X installer OpenSSL to 1.0.2a ___ Python tracker

[issue18814] Add codecs.convert_surrogateescape to "clean" surrogate escaped strings

2015-03-17 Thread Nick Coghlan
Nick Coghlan added the comment: I'd wondered about that with respect to rehandle_surrogatepass. The current implementation looks like it processes *all* surrogates (even valid surrogate pairs), so "handle_surrogates" might be a suitable name. If the intent is for it to be "handle_lone_surrogat

[issue18814] Add codecs.convert_surrogateescape to "clean" surrogate escaped strings

2015-03-17 Thread Nick Coghlan
Nick Coghlan added the comment: Oh, and yes, I agree a python-dev discussion would be a good idea. >From my perspective, "rehandle_surrogateescape" is the key function for making >it easier to check for malformed input data from operating system interfaces. The other items I don't personally h

[issue1553375] Add traceback.print_full_exception()

2015-03-17 Thread Nick Coghlan
Nick Coghlan added the comment: Adding Robert Collins to the nosy list to see if the recent traceback changes make it easier to implement this one correctly. Robert, for context, the general idea here is to be able to stitch the traceback for a caught exception together with the stack trace fo

[issue22698] Add constants for ioctl request codes

2015-03-17 Thread M. Levinson
M. Levinson added the comment: In addition to ioctl constants from Linux, it would also be very helpful to add the constants from NetBSD et al. that are described in their ioctl(2) man page: http://man.netbsd.org/man/ioctl+2+NetBSD-current Thank you! -- nosy: +mrl

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: >Hum, I'm lost with the problem with C++ :-( What is your use case? Do >you >want to compile CPython with C++? Or compile a third-party >extension with C++ >and this extension includes "Python.h" which >includes "pyatomic.h". My use case is I have C++ code

[issue23687] Stacktrace identifies wrong line in multiline list comprehension

2015-03-17 Thread Edward
New submission from Edward: This code: z = [ ["Y" for y in None ] for x in range(4) ] produces this stacktrace in both Python 2.7 and 3.4: Traceback (most recent call last): File "/Users/edwsmith/dev/untitled4/test.py", line 7, in ] for x in range(4) File "/Users/e

[issue2292] Missing *-unpacking generalizations

2015-03-17 Thread Brett Cannon
Changes by Brett Cannon : -- priority: normal -> release blocker ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue23458] [2.7] random: make the file descriptor non-inheritable (on POSIX)

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: Ok, so Python 3.4 works as expected on Mac OS X 10.4. It's probably because Python 3.4 uses ioctl() if available. Maybe ioctl() works, but not fcntl(). os.urandom() only *tries* to make the file descriptor non-inheritable. It would be possible to backport some

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: @Joshua: Can you please try to compile your extension with Py_LIMITED_API defined? Ex: "#define Py_LIMITED_API 0x0303" at the top of your C file, or g++ -DPy_LIMITED_API=0x0303. And can you also please try to patch Python with pystate_cplusplus.patch?

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread Wolfgang Maier
New submission from Wolfgang Maier: I thought I'd go back to work on a test patch for issue21560 today, but now I'm puzzled by the explicit handling of memoryviews in gzip.GzipFile.write. The method is defined as: def write(self,data): self._check_closed() if self.mode != WR

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread Wolfgang Maier
Changes by Wolfgang Maier : -- keywords: +patch Added file: http://bugs.python.org/file38521/memoryview_write.patch ___ Python tracker ___ ___

[issue23684] urlparse() documentation does not account for default scheme

2015-03-17 Thread Demian Brecht
Demian Brecht added the comment: +1 to the change, but I'd propose maybe "value of *scheme*" given the tables are inline with both urlsplit and urlparse docs? -- nosy: +demian.brecht ___ Python tracker ___

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: The patch looks good to be me, but it lacks an unit test. Can you please add a simple unit test to ensure that it's possible to memoryview to write(), and that the result is correct? (ex: uncompress and ensure that you get the same content) -- nosy: +

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: +serhiy.storchaka type: resource usage -> performance ___ Python tracker ___ ___ Python-bugs-list

[issue22931] cookies with square brackets in value

2015-03-17 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the report Mark, updating this patch to be more backwards compatible was on my to-do list. I've attached a new patch that simply adds the new characters to the legal value set. It does look like that's the commit that introduced this issue, but the c

[issue23625] load_module() docs: zipped eggs are not loaded.

2015-03-17 Thread Mark Lawrence
Mark Lawrence added the comment: https://pythonhosted.org/setuptools/ -- nosy: +BreamoreBoy ___ Python tracker ___ ___ Python-bugs-lis

[issue12855] linebreak sequences should be better documented

2015-03-17 Thread SMRUTI RANJAN SAHOO
SMRUTI RANJAN SAHOO added the comment: i think in this, "line \fone\nline two\n" ,the space after line taking some garbage value or you can say hex value of "\". so that's why that is showing some hex value. if you write "\n " instead of"\" then you can't find that hex value. i attached my id

[issue22931] cookies with square brackets in value

2015-03-17 Thread Demian Brecht
Changes by Demian Brecht : Removed file: http://bugs.python.org/file38522/issue22931_1.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue22931] cookies with square brackets in value

2015-03-17 Thread Demian Brecht
Changes by Demian Brecht : Added file: http://bugs.python.org/file38525/issue22931_1.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue2211] Cookie.Morsel interface needs update

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch with extended and unified tests. Also fixed one bug. I have left comments about some changes on Rietveld. -- Added file: http://bugs.python.org/file38524/issue2211_6.patch ___ Python tracker

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Better way is data = data.cast('B'). -- ___ Python tracker ___ ___ Python-bugs-list mailing list U

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: > Better way is data = data.cast('B'). Why is this cast required? Can you please elaborate? If some memoryview must be rejected, again, we need more unit tests. -- ___ Python tracker

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread Steve Dower
Steve Dower added the comment: I don't think we should be using PyMODINIT_FUNC for builtin modules, since that will make the init functions publicly available from python35.dll. That said, I do like being able to be consistent here... can we define PyMODINIT_FUNC differently when building pyth

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: "I don't think we should be using PyMODINIT_FUNC for builtin modules, since that will make the init functions publicly available from python35.dll." Do you mean that my change on PC/config.c is wrong? For example, Modules/arraymodule.c already contains: "PyMO

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread Wolfgang Maier
Wolfgang Maier added the comment: Here is a patch with memoryview tests. Are tests and code patches supposed to go in one file or separate ones ? -- Added file: http://bugs.python.org/file38526/test_memoryview_write.patch ___ Python tracker

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread Wolfgang Maier
Wolfgang Maier added the comment: @Serhiy: Why would data = data.cast('B') be required ? When would the memoryview not be in 'B' format already ? -- ___ Python tracker ___ _

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread Steve Dower
Steve Dower added the comment: Just had a look in Include/pyport.h and we're already defining PyMODINIT_FUNC differently for building core, so all your changes should be fine. The redefinition you removed from pyexpat.c was clearly never meant to be used for builtin modules. -- _

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: memoryview is converted to bytes because len() for memoryview returns a size of first dimension (a number of items for one-dimension view), not a number of bytes. >>> m = memoryview(array.array('I', [1, 2, 3])) >>> len(m) 3 >>> len(m.tobytes()) 12 >>> len(m.

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread Wolfgang Maier
Wolfgang Maier added the comment: > memoryview is converted to bytes because len() for memoryview returns a size > of first dimension (a number of items for one-dimension view), not a number > of bytes. > m = memoryview(array.array('I', [1, 2, 3])) len(m) > 3 len(m.tobytes()) >

[issue18814] Add codecs.convert_surrogateescape to "clean" surrogate escaped strings

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Note that provided Python implementations are rather a proof of concept. After discussion I'll provide more efficient C implementations, that should be 1-2 orders faster (and infinitely fast for common case of ASCII strings). --

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: builtin_modules.patch: add _PyBUILTIN_MODINIT_FUNC macro and use it on modules which are builtins on POSIX. I checked: it's not necessary to modify Modules/config.c to make the symbol hidden: only the C code in Modules/ need to set the attribute on the functio

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 22a0c925a7c2 by Victor Stinner in branch 'default': Issue #23685: Fix usage of PyMODINIT_FUNC in _json, _scproxy, nis, pyexpat https://hg.python.org/cpython/rev/22a0c925a7c2 -- nosy: +python-dev ___ Pytho

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: I commited PyMODINIT_FUNC.patch without the useless change on PC/config.c. -- ___ Python tracker ___ ___

[issue23689] Memory leak in Modules/sre_lib.h

2015-03-17 Thread Evgeny Kapun
New submission from Evgeny Kapun: In Modules/sre_lib.h on line 882 [1], a block of memory is allocated. If SRE(match) function later terminates abruptly, either because of a signal or because subsequent memory allocation fails, this block is never released. [1] https://hg.python.org/cpython/fi

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: > Are tests and code patches supposed to go in one file or separate ones ? It's more convinient to have a single patch with both changes. -- ___ Python tracker ___

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

2015-03-17 Thread Demian Brecht
Demian Brecht added the comment: Updated patch changes the following: + Removes support for trailers in requests as they're not supported + If Transfer-Encoding is explicitly set by the client, it's assumed that the caller will handle all encoding (backwards compatibility) + Fixed a bug where c

[issue21076] Turn signal.SIG* constants into enums

2015-03-17 Thread Ethan Furman
Ethan Furman added the comment: Working on issue23673 I saw this in the new signal.py: +def _enum_to_int(value): +"""Convert an IntEnum member to a numeric value. +If it's not a IntEnum member return the value itself. +""" +try: +return int(value) +except (ValueError,

[issue21076] Turn signal.SIG* constants into enums

2015-03-17 Thread Ethan Furman
Ethan Furman added the comment: Removing the 'enum_to_int' function would also take care of the accepting inappropriate types problem. -- ___ Python tracker ___

[issue23685] Fix usage of PyMODINIT_FUNC

2015-03-17 Thread Steve Dower
Steve Dower added the comment: Sounds good. Wasn't quite sure if you were after any effect or just consistency :) -- ___ Python tracker ___ _

[issue23690] re functions never release GIL

2015-03-17 Thread Evgeny Kapun
New submission from Evgeny Kapun: Looks like function in re module (match, fullmatch and so on) don't release GIL, even though these operations can take much time. As a result, other threads can't run while a pattern is being matched, and thread switching doesn't happen as well. -- co

[issue23689] Memory leak in Modules/sre_lib.h

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: There is maybe a bug. Can you show an example of regex and a text where the memory leak occurs? You can use the tracemalloc module to check if there is a memory leak. Or use sys.getcounts() if you compiled Python in debug mode. sre_lib.h is very complex, it us

[issue23690] re functions never release GIL

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: Supporting to release the GIL would require to redesign the _sre module. For example, the getstring() gets a "view" of a Python string, it doesn't copy the string. So we must hold the GIL, otherwise the Python string can be modified by other threads. Copying a

[issue11410] Use GCC visibility attrs in PyAPI_*

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: In the issue #23685, I proposed a patch to add _PyBUILTIN_MODINIT_FUNC for builtin modules. It makes possible to hide PyInit_xxx symbols of builtin symbols with __attribute__((visibility("hidden"))). It also avoids to export these privates symbols on Windows i

[issue23691] re.finditer iterator is not reentrant, but doesn't protect against nested calls to __next__

2015-03-17 Thread Evgeny Kapun
New submission from Evgeny Kapun: Iterator returned by re.finditer includes a SRE_STATE value, which is not designed to be used concurrently. However, it is possible to call __next__ on such iterator while another such call is in progress, e.g. from a signal handler. This may result in corrupt

[issue23689] Memory leak in Modules/sre_lib.h

2015-03-17 Thread Evgeny Kapun
Evgeny Kapun added the comment: Memory leak only happens if match operation terminates abruptly, e.g. because of SIGINT. In this case, DO_JUMP doesn't come back. -- ___ Python tracker _

[issue23690] re functions never release GIL

2015-03-17 Thread Evgeny Kapun
Evgeny Kapun added the comment: Aren't Python strings immutable? Also, match functions still permit execution of signal handlers, which can execute any Python code. If GIL is needed during matching, can it be released temporarily to permit thread switching? -- __

[issue23689] Memory leak in Modules/sre_lib.h

2015-03-17 Thread Evgeny Kapun
Evgeny Kapun added the comment: Tracemalloc code: import re import signal import tracemalloc class AlarmError(Exception): pass def handle_alarm(signal, frame): raise AlarmError signal.signal(signal.SIGALRM, handle_alarm) s1 = tracemalloc.take_snapsho

[issue23689] Memory leak in Modules/sre_lib.h

2015-03-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- nosy: +serhiy.storchaka ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https:

[issue23325] Turn SIG_DFL and SIG_IGN into functions

2015-03-17 Thread Ethan Furman
Ethan Furman added the comment: A private method is being added to Enum to better support Enum replacement of constants, part of which includes changing __reduce_ex__ to return the string of the name. These changes answer points 1 and 4. Point 2 would be nice, but seems somewhat less importan

[issue23689] Memory leak in Modules/sre_lib.h

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: May be this patch helps. -- keywords: +patch stage: -> patch review versions: +Python 2.7, Python 3.5 Added file: http://bugs.python.org/file38529/sre_clean_repeat_data.patch ___ Python tracker

[issue433030] SRE: Atomic Grouping (?>...) is not supported

2015-03-17 Thread Evgeny Kapun
Changes by Evgeny Kapun : -- nosy: +abacabadabacaba ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://ma

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: You patch is correct Wolfgang, but with cast('B') the patch would be smaller (no need to replace len(data) to nbytes). While we are here, it is possible to add the support of general byte-like objects. if not isinstance(data, bytes): data = memoryview(d

[issue9134] sre bug: lastmark_save/restore

2015-03-17 Thread Evgeny Kapun
Changes by Evgeny Kapun : -- nosy: +abacabadabacaba ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue23692] Undocumented feature prevents re module from finding certain matches

2015-03-17 Thread Evgeny Kapun
New submission from Evgeny Kapun: This pattern matches: re.match('(?:()|(?(1)()|z)){2}(?(2)a|z)', 'a') But this doesn't: re.match('(?:()|(?(1)()|z)){0,2}(?(2)a|z)', 'a') The difference is that {2} is replaced by {0,2}. This shouldn't prevent the pattern from matching anywhere where i

[issue2211] Cookie.Morsel interface needs update

2015-03-17 Thread Demian Brecht
Demian Brecht added the comment: Thanks for the updates Serhiy. All look good to me. -- ___ Python tracker ___ ___ Python-bugs-list mai

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: > @Joshua: Can you please try to compile your extension with Py_LIMITED_API > defined? Ex: "#define Py_LIMITED_API 0x0303" at the top of your C file, > or g++ -DPy_LIMITED_API=0x0303. It fails in that case, because SWIG is using functions that are

[issue8027] distutils fail to determine c++ linker with unixcompiler if using ccache

2015-03-17 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: This bug is still in Python 3.5.0a2 (but first issue 23644 needs to be fixed before g++ can be used at all) Attached is a patch for Python 3.5.0. -- versions: +Python 3.5 Added file: http://bugs.python.org/file38530/fix-distutils-350.patch

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread Joshua J Cogliati
Joshua J Cogliati added the comment: Once this is fixed, maybe issue 8027 can be fixed as well in 3.5.0. -- ___ Python tracker ___ ___

[issue1553375] Add traceback.print_full_exception()

2015-03-17 Thread Robert Collins
Robert Collins added the comment: That should be straightforward - its just sequence suffix/prefix overlap detection, and FrameSummary (unlike frames) can be compared with ==. So yes, I think it makes it easier. It's not on my immediate itch-scratching though, but if someone were to poke at it

[issue23631] 3.5 (a2) traceback regression snarls Idle

2015-03-17 Thread Robert Collins
Robert Collins added the comment: Closing, though ideally Terry can confirm it is fully fixed for him. -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue18983] Specify time unit for timeit CLI

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1ebf8d5b7d60 by Robert Collins in branch 'default': Issue #18983: Allow selection of output units in timeit. https://hg.python.org/cpython/rev/1ebf8d5b7d60 -- nosy: +python-dev ___ Python tracker

[issue18983] Specify time unit for timeit CLI

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset ed34dd00405e by Robert Collins in branch 'default': Fix patch attribution for issue 18983. https://hg.python.org/cpython/rev/ed34dd00405e -- ___ Python tracker ___

[issue18983] Specify time unit for timeit CLI

2015-03-17 Thread Robert Collins
Changes by Robert Collins : -- nosy: +rbcollins resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ __

[issue23631] 3.5 (a2) traceback regression snarls Idle

2015-03-17 Thread Berker Peksag
Changes by Berker Peksag : -- stage: needs patch -> resolved ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue23606] ctypes.util.find_library("c") no longer makes sense

2015-03-17 Thread eryksun
eryksun added the comment: Say I need to use ctypes to call _wsopen_s to open a file without write sharing. If I read you correctly, you're saying I'll need to know it's exported by api-ms-win-crt-stdio-l1-1-0.dll? Does the 'l1-1-0' suffix reflect a version number that will be incremented over

[issue2211] Cookie.Morsel interface needs update

2015-03-17 Thread Demian Brecht
Changes by Demian Brecht : -- stage: patch review -> commit review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue23183] timeit CLI best of 3: undocumented output format

2015-03-17 Thread Robert Collins
Changes by Robert Collins : -- nosy: +rbcollins ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue23183] timeit CLI best of 3: undocumented output format

2015-03-17 Thread Robert Collins
Robert Collins added the comment: Here is a patch with some prose - feedback appreciated! -- keywords: +patch Added file: http://bugs.python.org/file38531/issue-23183-1.patch ___ Python tracker

[issue23183] timeit CLI best of 3: undocumented output format

2015-03-17 Thread Robert Collins
Changes by Robert Collins : -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://

[issue23690] re functions never release GIL

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: > Aren't Python strings immutable? Yes. But the re module supports more types than just str and bytes. For example, bytearray is also accepted: >>> re.match(b'^abc', b'abc') <_sre.SRE_Match object; span=(0, 3), match=b'abc'> >>> re.match(b'^abc', bytearray(b'a

[issue23552] Have timeit warn about runs that are not independent of each other

2015-03-17 Thread Robert Collins
Robert Collins added the comment: I think for PyPI its actually important here - the JIT'd state of the code is essentially global state being mutated - you can't assess how fast the code is without first warming up the JIT, and if it warms up half way through your fastest run, you're still no

[issue23689] Memory leak in Modules/sre_lib.h

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: Oh cool, you wrote a script to reproduce the issue! And Serhiy wrote a patch, great! Great job guys. sre_clean_repeat_data.patch looks good to me. @Serhiy: Can you try the example to ensure that it fixes the issue? If yes, go ahead! -- _

[issue23688] unnecessary copying of memoryview in gzip.GzipFile.write ?

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: > While we are here, it is possible to add the support of general byte-like > objects. With and without the patch, write() accepts bytes, bytearray and memoryview. Which other byte-like types do you know? writeframesraw() method of aifc, sunau and wave module

[issue6422] timeit called from within Python should allow autoranging

2015-03-17 Thread Robert Collins
Changes by Robert Collins : -- nosy: +rbcollins stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23552] Have timeit warn about runs that are not independent of each other

2015-03-17 Thread Robert Collins
Robert Collins added the comment: Reviewed on rietvald. -- stage: -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset cb05b6d7aacd by Victor Stinner in branch 'default': Issue #23644: Fix issues with C++ when compiling Python extensions https://hg.python.org/cpython/rev/cb05b6d7aacd -- ___ Python tracker

[issue23644] g++ module compile fails with ‘_Atomic’ does not name a type

2015-03-17 Thread STINNER Victor
STINNER Victor added the comment: "With the pystate_cplusplus.patch I was able to compile both min_example.tar.gz and my actual extension. So I with your patch, it does work. Thank you." Cool! I applied this simple patch instead of trying to write an ugly glue in pyatomic.h between C and C++

  1   2   >