[issue30468] Propagate zipfile.py pypy issue #905 patch to CPython 3.7

2017-05-24 Thread Shubha Ramani
(see the attached patch for PyPy) The patch fixed a significant performance bottleneck in PyPy. -- files: issue905.diff keywords: patch messages: 294413 nosy: shubhar priority: normal severity: normal status: open title: Propagate zipfile.py pypy issue #905 patch to CPython 3.7 type

[issue30467] Propagate zipfile.py pypy issue #905 patch to CPython 2.7

2017-05-24 Thread Shubha Ramani
Changes by Shubha Ramani <shubha.ram...@intel.com>: -- title: Propagate zipfile.py pypy issue #905 patch to CPython -> Propagate zipfile.py pypy issue #905 patch to CPython 2.7 ___ Python tracker <rep...@bugs.python.org> <http

[issue30467] Propagate zipfile.py pypy issue #905 patch to CPython

2017-05-24 Thread Shubha Ramani
(see the attached patch for PyPy) The patch fixed a significant performance bottleneck in PyPy. -- files: issue905.diff keywords: patch messages: 294411 nosy: shubhar priority: normal severity: normal status: open title: Propagate zipfile.py pypy issue #905 patch to CPython type

[issue28148] [Patch] Also stop using localtime() in timemodule

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +993 ___ Python tracker ___ ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-31 Thread Donald Stufft
Changes by Donald Stufft : -- pull_requests: +959 ___ Python tracker ___ ___

[issue10030] Patch for zip decryption speedup

2017-03-30 Thread Serhiy Storchaka
Changes by Serhiy Storchaka <storchaka+cpyt...@gmail.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue10030] Patch for zip decryption speedup

2017-03-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset 06e522521c06671b4559eecf9e2a185c2d62c141 by Serhiy Storchaka in branch 'master': bpo-10030: Sped up reading encrypted ZIP files by 2 times. (#550) https://github.com/python/cpython/commit/06e522521c06671b4559eecf9e2a185c2d62c141 --

[issue10030] Patch for zip decryption speedup

2017-03-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Brian, you requested tests, but PR 550 doesn't add new API and doesn't change the behavior of public API. No new tests are needed. -- nosy: +brian.curtin versions: +Python 3.7 -Python 3.4 ___ Python tracker

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 5dc33eea538361f8a218255f83db2e9298dd8c53 by INADA Naoki in branch 'master': bpo-29110: add test for Aifc_write. (GH-293) https://github.com/python/cpython/commit/5dc33eea538361f8a218255f83db2e9298dd8c53 --

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset b7fb1e25c89a9eb85b95027f4167bc0977687c43 by INADA Naoki in branch '3.5': bpo-29110: Fix file object leak in `aifc.open` (GH-311) https://github.com/python/cpython/commit/b7fb1e25c89a9eb85b95027f4167bc0977687c43 --

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset c9131b61fa060a51ec181053cade9f0a7ee91e4f by INADA Naoki in branch '3.6': [3.6] bpo-29110: Fix file object leak in `aifc.open` (#310) https://github.com/python/cpython/commit/c9131b61fa060a51ec181053cade9f0a7ee91e4f --

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-24 Thread INADA Naoki
INADA Naoki added the comment: New changeset 02eb4b0bd4a7d86cf5e40567aaa8710b00e079a4 by INADA Naoki in branch '2.7': bpo-29110: Fix file object leak in aifc.open (GH-356) https://github.com/python/cpython/commit/02eb4b0bd4a7d86cf5e40567aaa8710b00e079a4 --

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-03-17 Thread Larry Hastings
Changes by Larry Hastings : -- pull_requests: +597 ___ Python tracker ___ ___

[issue10030] Patch for zip decryption speedup

2017-03-07 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- pull_requests: +452 ___ Python tracker ___ ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-28 Thread INADA Naoki
Changes by INADA Naoki <songofaca...@gmail.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker <rep...@bugs.python.org> <http://bu

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-28 Thread INADA Naoki
INADA Naoki added the comment: OK, since Aifc_write is harder to test, and the exception is very unlikely happens, I fixed only Aifc_read. -- ___ Python tracker

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-28 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +303 ___ Python tracker ___ ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: test.support.swap_attr() provides the functionality similar to mock. check_no_resource_warning() can be backported to 2.7. But if there are problems with testing in 2.7 you can backport without tests. -- ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-26 Thread INADA Naoki
INADA Naoki added the comment: Anyone mind Python 2.7? Since Python 2.7 doesn't have mock and check_no_resource_warning context manager, I can't cherry-pick easily. Backporting is bother to me, and the issue doesn't seem so critical. Can I just close this issue? --

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-26 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +272 ___ Python tracker ___ ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-26 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +271 ___ Python tracker ___ ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-26 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- assignee: serhiy.storchaka -> inada.naoki ___ Python tracker ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-25 Thread INADA Naoki
Changes by INADA Naoki : -- pull_requests: +263 ___ Python tracker ___ ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-21 Thread INADA Naoki
INADA Naoki added the comment: New changeset 03f68b60e17b57f6f13729ff73245dbb37b30a4c by INADA Naoki in branch 'master': bpo-29110: Fix file object leak in `aifc.open` when given invalid AIFF file. (GH-162) https://github.com/python/cpython/commit/03f68b60e17b57f6f13729ff73245dbb37b30a4c

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2017-02-18 Thread Anthony Zhang
Changes by Anthony Zhang : -- pull_requests: +127 ___ Python tracker ___ ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2016-12-30 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you for your patches Anthony. Could you please create a unittest for the first issue? The second issue is well known. Since the behavior is documented, I think it can be changed only in Python 3.7. The patch needs the "versionchanged"

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2016-12-29 Thread Serhiy Storchaka
Changes by Serhiy Storchaka <storchaka+cpyt...@gmail.com>: -- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka stage: -> patch review versions: -Python 3.3, Python 3.4 ___ Python tracker <rep...@bugs.python.org> <h

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2016-12-29 Thread Anthony Zhang
Changes by Anthony Zhang : Added file: http://bugs.python.org/file46088/fix_aifc_leak_and_file_object_close.patch ___ Python tracker ___

[issue29110] [patch] Fix file object leak in `aifc.open` when given invalid AIFF file.

2016-12-29 Thread Anthony Zhang
ds, code runs normally until the inner context manager exits, and the file object gets closed, even though the file object wasn't opened by ``aifc``. Solution Attached are patches that fix each issue separately - the first patch fixes the first mentioned issue, while the second patch fix

[issue29055] random.choice on empty sequence should hide previous exception [patch]

2016-12-27 Thread Raymond Hettinger
Raymond Hettinger added the comment: Thanks for the patch. Please submit a contributor agreement for future work. We would like to have it for all patches (though this one was so tiny it isn't strictly required). -- resolution: -> fixed status: open -> closed versions: +Pyth

[issue29055] random.choice on empty sequence should hide previous exception [patch]

2016-12-27 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0001ae913759 by Raymond Hettinger in branch '3.6': Issue #29055: Suppress upstream exception for random.choice() https://hg.python.org/cpython/rev/0001ae913759 -- nosy: +python-dev ___ Python tracker

[issue29055] random.choice on empty sequence should hide previous exception [patch]

2016-12-27 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- assignee: -> rhettinger ___ Python tracker ___

[issue29055] random.choice on empty sequence should hide previous exception [patch]

2016-12-23 Thread Josh Rosenberg
Josh Rosenberg added the comment: Seems reasonable to me. -- nosy: +josh.r ___ Python tracker ___ ___

[issue29055] random.choice on empty sequence should hide previous exception [patch]

2016-12-23 Thread then0rTh
): ... IndexError: Cannot choose from an empty sequence * the ValueError doesn't add any useful information, only bloats stderr * the "During handling" line indicates that something went wrong inside random.py This patch uses `raise x from None` to hide the ValueError, resulting in muc

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-14 Thread Andrey Fedorov
Andrey Fedorov added the comment: Here's the full extension of the example from documentation that doesn't seem to handle classes and functions consistently: import mock patches = { 'requests_get': 'requests.get', 'mymodule_Class1': 'mymodule.Class1' } root_mock =

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-14 Thread Michael Foord
Michael Foord added the comment: Oh, I see what you mean - an attribute that doesn't exist on the original. With autospec that should throw an exception (AttributeError) I think, yes. -- ___ Python tracker

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-14 Thread Syed Suhail Ahmed
Syed Suhail Ahmed added the comment: But since autospec is set as True, then shouldnt attach_mock throw an exception when called with an attribute that doesn't exist? On Mon, Nov 14, 2016 at 5:12 PM, Michael Foord wrote: > > Michael Foord added the comment: > > It

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-14 Thread Michael Foord
Michael Foord added the comment: It should be perfectly valid to use attach_mock with an attribute that doesn't already exist. Part of it's purpose is to create new attributes. -- ___ Python tracker

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-11 Thread Andrey Fedorov
mented, but I would prefer > manager.attach_mock to also work with whatever the return value of patch() > is. > > On Fri, Nov 11, 2016 at 12:08 PM, Syed Suhail Ahmed < > rep...@bugs.python.org> wrote: > >> >> Syed Suhail Ahmed added the comment: >> >

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-11 Thread Andrey Fedorov
Andrey Fedorov added the comment: There's some vagueness on how this is implemented, but I would prefer manager.attach_mock to also work with whatever the return value of patch() is. On Fri, Nov 11, 2016 at 12:08 PM, Syed Suhail Ahmed <rep...@bugs.python.org> wrote: > > Syed Suhail

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-11 Thread Syed Suhail Ahmed
Syed Suhail Ahmed added the comment: So from what I have understood, manager.attach_mock must raise an Exception when it is called with a wrong attribute, since the patch is called with autospec=True and you cannot call a mock with non existing attributes.Is that correct

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-08 Thread Michael Foord
Michael Foord added the comment: Sure, go ahead Syed. Feel free to ask any questions you may have. -- ___ Python tracker ___

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-07 Thread Syed Suhail Ahmed
Syed Suhail Ahmed added the comment: I would like to work on this issue. -- nosy: +Syed Suhail Ahmed ___ Python tracker ___

[issue28569] mock.attach_mock should work with any return value of patch()

2016-11-07 Thread Michael Foord
on that). -- stage: -> needs patch versions: -Python 2.7, Python 3.3, Python 3.4, Python 3.5, Python 3.6 ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.or

[issue28619] [Patch] Stop using inet_ntoa() when possible.

2016-11-05 Thread Ed Schouten
, as inet_ntoa() uses internal storage for the return value. In other words, we'd better not use inet_ntoa() at all. Attached is a patch for Python's socketmodule that changes the existing call to inet_ntoa() to use inet_ntop() when available. This has the advantage of fixing the build

[issue28569] mock.attach_mock should work with any return value of patch()

2016-10-31 Thread Andrey Fedorov
Changes by Andrey Fedorov <and...@humblebundle.com>: -- title: mock.attach_mock should work with return value of patch() -> mock.attach_mock should work with any return value of patch() ___ Python tracker <rep...@bugs.pytho

[issue28569] mock.attach_mock should work with return value of patch()

2016-10-31 Thread Andrey Fedorov
New submission from Andrey Fedorov: The attach_mock in the following code sample fails silently: >>> from mock import patch, Mock >>> p = patch('requests.get', autospec=True) >>> manager = Mock() >>> manager.attach_mock(p.start(), 're

[issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available

2016-10-28 Thread Xavier de Gaye
Changes by Xavier de Gaye : -- nosy: +xdegaye ___ Python tracker ___ ___ Python-bugs-list

[issue28503] [Patch] '_crypt' module: fix implicit declaration of crypt(), use crypt_r() where available

2016-10-22 Thread Ed Schouten
in a 'crypt_data' object that will hold the resulting string for you. Extend the code to use this function when available. This patch is actually needed to make this module build on CloudABI (https://mail.python.org/pipermail/python-dev/2016-July/145708.html). CloudABI's C library doesn't provide

[issue28502] [Patch] Make os.chdir() optional

2016-10-21 Thread Ed Schouten
to provide support for process working directories. chdir() is therefore entirely absent. It looks like chdir() is only used by Python in its posixmodule. The attached patch adds a new Autoconf check and adds the proper #if logic around its implementation. Changes to the Autoconf/Automake files

[issue28501] [Patch] Make os.umask() optional

2016-10-21 Thread Ed Schouten
model as opposed to a discretionary access control system, there is no support for UNIX credentials and permissions. This means that umask() is also absent. It looks like umask() is only used by Python in its posixmodule. The attached patch adds a new Autoconf check and adds the proper #if logic

[issue27701] [posixmodule] [Refactoring patch] Simply call into *at() functions unconditionally when present

2016-10-21 Thread Ed Schouten
Ed Schouten added the comment: Attached is an updated version of the patch that applies cleanly against Python 3.6.0b2. -- Added file: http://bugs.python.org/file45181/27701.diff ___ Python tracker <rep...@bugs.python.org> <http://bugs.p

[issue11664] Add patch method to unittest.TestCase

2016-10-04 Thread Mariatta Wijaya
Changes by Mariatta Wijaya : -- nosy: +Mariatta ___ Python tracker ___ ___

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-28 Thread Alexander Belopolsky
Changes by Alexander Belopolsky : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3afad465b3e1 by Alexander Belopolsky in branch '3.6': Issue #28148: Added a NEWS entry. https://hg.python.org/cpython/rev/3afad465b3e1 -- ___ Python tracker

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c81b9107ec42 by Alexander Belopolsky in branch '3.6': Issue #28148: Stop using localtime() and gmtime() in the time module. https://hg.python.org/cpython/rev/c81b9107ec42 -- nosy: +python-dev ___ Python

[issue28303] [PATCH] Fix broken grammar in "pydoc3 unittest"

2016-09-28 Thread Shlomi Fish
Shlomi Fish added the comment: You're welcome, and thanks for applying the patch so quickly. -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28300] [PATCH] Fix misspelled "implemented" word

2016-09-28 Thread Shlomi Fish
Shlomi Fish added the comment: You're welcome and thanks for applying it (and so quickl). -- ___ Python tracker ___

[issue28300] [PATCH] Fix misspelled "implemented" word

2016-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset ce19dcce84fe by Berker Peksag in branch '3.5': Issue #28300: Fix typos, patch by Shlomi Fish https://hg.python.org/cpython/rev/ce19dcce84fe New changeset 078f185f0041 by Berker Peksag in branch '3.6': Issue #28300: Merge from 3.5 https

[issue28303] [PATCH] Fix broken grammar in "pydoc3 unittest"

2016-09-28 Thread Berker Peksag
Berker Peksag added the comment: Good catch, thanks! -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.5, Python 3.6 ___ Python tracker

[issue28303] [PATCH] Fix broken grammar in "pydoc3 unittest"

2016-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 650775f10178 by Berker Peksag in branch '3.5': Issue #28303: Fix grammar in unittest.__doc__, patch by Shlomi Fish https://hg.python.org/cpython/rev/650775f10178 New changeset d0b509777443 by Berker Peksag in branch '3.6': Issue #28303: Merge from

[issue28300] [PATCH] Fix misspelled "implemented" word

2016-09-28 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: commit review -> resolved status: open -> closed versions: +Python 3.5 ___ Python tracker

[issue28303] [PATCH] Fix broken grammar in "pydoc3 unittest"

2016-09-28 Thread Shlomi Fish
New submission from Shlomi Fish: Currently the comment in the example in "pydoc3 unittest" reads: « ## test method names begin 'test*' » This is broken grammar and the attached patch against the hg default branch corrects it. All tests are passing and I disclaim any implicit o

[issue28300] [PATCH] Fix misspelled "implemented" word

2016-09-28 Thread SilentGhost
SilentGhost added the comment: LGTM -- assignee: -> docs@python components: +Documentation nosy: +SilentGhost, docs@python stage: -> commit review type: -> behavior versions: +Python 3.6 ___ Python tracker

[issue28300] [PATCH] Fix misspelled "implemented" word

2016-09-28 Thread Shlomi Fish
New submission from Shlomi Fish: This patch fixes two places where "implement" was misspelled. I hereby disclaim all ownership of my changes (but crediting me will be appreciated.) -- files: python-fix-spelling-of-implement.patch keywords: patch messages: 277616 nosy: shlomi

[issue11664] Add patch method to unittest.TestCase

2016-09-19 Thread Christian Heimes
Changes by Christian Heimes : -- versions: +Python 3.7 -Python 3.5 ___ Python tracker ___

[issue28156] [Patch] posixmodule: Make the presence of os.getpid() optional

2016-09-15 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker

[issue28156] [Patch] posixmodule: Make the presence of os.getpid() optional

2016-09-15 Thread Roundup Robot
Roundup Robot added the comment: New changeset d17ff867580f by Berker Peksag in branch '3.6': Issue #28156: Export os.getpid() conditionally https://hg.python.org/cpython/rev/d17ff867580f New changeset 33834105048e by Berker Peksag in branch 'default': Issue #28156: Merge from 3.6

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > I thought `[...]localtime_r()`'s way of ordering the arguments made most > sense here. Right. I keep forgetting which one is localtime_r and which is localtime_s. I don't think there is any preference in the Python codebase. (PEP 8 is silent on this

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Ed Schouten
Ed Schouten added the comment: I've been brainwashed by https://google.github.io/styleguide/cppguide.html#Function_Parameter_Ordering over the last couple of years, which is why I thought `localtime()/localtime_r()`'s way of ordering the arguments made most sense here. ;-) --

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: I see that you picked localtime_s-like order of arguments. While I have no personal preference, I wonder why you prefer output to follow input. The usual UNIX/C convention is the opposite. Interfaces like sprintf, strcat, strftime and many other have

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: Very nice. I'll give it a week or two for the others to chime in and commit if I don't hear any objections. -- keywords: +patch stage: patch review -> commit review versions: +Python 3.7 ___ Python trac

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Ed Schouten
Ed Schouten added the comment: Does this patch look all right to you? -- Added file: http://bugs.python.org/file44667/patch-pytime-localtime-gmtime ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > Maybe we can just pick a prototype that's as Pythonesque as possible that > also fixes these shortcomings. Any thoughts? Yes, and just call it _PyTime_localtime without the ugly suffix. -- ___ Python

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Ed Schouten
Ed Schouten added the comment: As a person who keeps a close eye on the Austin Group mailing lists (i.e., 'the POSIX working group'), my guess is that it's very unlikely that POSIX will ever add those *_s() extensions. Here's a discussion on Reddit that actually captures all of the arguments

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > we should likely introduce full wrappers that have a name starting with > _PyTime_, right? Yes, and I would like to give some thought to what the best API would be. The two choices are to emulate localtime_r on Windows or emulate localtime_s on

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Ed Schouten
Ed Schouten added the comment: Hi Alexander, I'm absolutely no expert when it comes to the Python codebase, so I've got a question. If we're going to movein this to Include/pytime.h, we should likely introduce full wrappers that have a name starting with _PyTime_, right? This header seem to

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Alexander Belopolsky
of localtime are often undesirable. Nevertheless, I would like to hear from more people before accepting this. -- assignee: -> belopolsky nosy: +akira, belopolsky, haypo, lemburg, pitrou, tim.peters stage: -> patch review type: ->

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: > What would be the right location for [the Windows wrappers]? I would say Include/pytime.h: /** Symbols and macros to supply platform-independent interfaces to time related

[issue28156] [Patch] posixmodule: Make the presence of os.getpid() optional

2016-09-14 Thread Ed Schouten
provide full support for integers up to 64 bits in size. This means that CloudABI could only provide 63-bit process identifiers, which is far smaller than, say, a UUID. For this reason we've decided to omit getpid() altogether. Attached is a patch that makes use of the already existing HAVE_GETPID

[issue28148] [Patch] Also stop using localtime() in timemodule

2016-09-14 Thread Ed Schouten
Changes by Ed Schouten <e...@nuxi.nl>: -- title: Also stop using localtime() in timemodule -> [Patch] Also stop using localtime() in timemodule ___ Python tracker <rep...@bugs.python.org> <http://bugs.pyt

[issue28153] [Patch] selectmodule: Make kqueue()'s event filters optional

2016-09-14 Thread Berker Peksag
Berker Peksag added the comment: Thanks! -- nosy: +berker.peksag resolution: -> fixed stage: -> resolved status: open -> closed type: -> behavior versions: +Python 3.7 ___ Python tracker

[issue28153] [Patch] selectmodule: Make kqueue()'s event filters optional

2016-09-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset 57ff729e923f by Berker Peksag in branch '3.6': Issue #28153: Make kqueue()'s event filters optional https://hg.python.org/cpython/rev/57ff729e923f New changeset 6c5f9c6c25ea by Berker Peksag in branch 'default': Issue #28153: Merge from 3.6

[issue28153] [Patch] selectmodule: Make kqueue()'s event filters optional

2016-09-14 Thread Ed Schouten
/EVFILT_WRITE) and waiting on timers (EVFILT_TIMER). The existing selectmodule already allows some filters to be present optionally (e.g., EVFILT_NETDEV). The attached patch extends this work by only defining the filter and corresponding filter flags when available. I've also added guards around

[issue28081] [Patch] timemodule: Complete Autoconf bits for clock_*() functions: make clock_getres() and clock_settime() optional

2016-09-13 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0ea088671bc2 by Benjamin Peterson in branch '3.6': more granular configure checks for clock_* functions (closes #28081) https://hg.python.org/cpython/rev/0ea088671bc2 New changeset 3ce29b2452f0 by Benjamin Peterson in branch 'default': merge 3.6

[issue21018] [patch] added missing documentation about escaping characters for configparser

2016-09-12 Thread Arun Persaud
Arun Persaud added the comment: updated the patch, let me know if it needs additional changes. -- Added file: http://bugs.python.org/file44598/escape.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue28081] [Patch] timemodule: Complete Autoconf bits for clock_*() functions: make clock_getres() and clock_settime() optional

2016-09-12 Thread STINNER Victor
STINNER Victor added the comment: LGTM, but I wait until Python 3.6 beta 1 is tagged to push this change. -- ___ Python tracker ___

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Martin Panter
Changes by Martin Panter <vadmium...@gmail.com>: -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5, Python 3.6 -Python 3.7 ___ Python tracker <rep...@bugs.python.org> &l

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c26dce72a4da by Martin Panter in branch '3.5': Issue #28066: Fix include search directory logic for out-of-tree builds https://hg.python.org/cpython/rev/c26dce72a4da New changeset 3ef078f96494 by Martin Panter in branch 'default': Issue #28066:

[issue28081] [Patch] timemodule: Complete Autoconf bits for clock_*() functions: make clock_getres() and clock_settime() optional

2016-09-11 Thread Berker Peksag
Changes by Berker Peksag : -- nosy: +haypo ___ Python tracker ___ ___

[issue28081] [Patch] timemodule: Complete Autoconf bits for clock_*() functions: make clock_getres() and clock_settime() optional

2016-09-11 Thread Ed Schouten
with HAVE_CLOCK_GETRES instead of using HAVE_CLOCK_GETTIME. There don't seem to be any shared functions/structures/etc., so we can safely decouple them. 2. For consistency, also add Autoconf bits for clock_settime(). In timemodule.c, use HAVE_CLOCK_SETTIME as a guard. The reason why I'm sending in this patch

[issue27701] [posixmodule] [Refactoring patch] Simply call into *at() functions unconditionally when present

2016-09-11 Thread Ed Schouten
Ed Schouten added the comment: Hmmm... Taking a second look at my patch: I still think it's conceptually a good idea to pursue this, but I think it may be wiser to first focus on the bits that are strictly necessary from my side. The patch that I've posted previously has the disadvantage

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Ed Schouten
Ed Schouten added the comment: It does. I can now cross build Python for CloudABI by copying importlib.h and importlib_external.h from the native build directory to the target build directory. Thanks! -- ___ Python tracker

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Martin Panter
Changes by Martin Panter : Added file: http://bugs.python.org/file44549/srcdir-check.patch ___ Python tracker ___

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Martin Panter
Changes by Martin Panter : Removed file: http://bugs.python.org/file44548/srcdir-check.patch ___ Python tracker ___

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Martin Panter
, as I just wrote in that bug, the built Python/importlib.h is already supposed to be searchable. However the logic seems to be broken. Can you see if this patch helps? -- stage: -> patch review Added file: http://bugs.python.org/file44548/srcdir-check.pa

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Serhiy Storchaka
Changes by Serhiy Storchaka <storchaka+cpyt...@gmail.com>: -- keywords: +patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-11 Thread Ed Schouten
Ed Schouten added the comment: The nice thing is that in our case, the importlib changes are already compatible with the native build. So yes, we can reuse the frozen module from the native build. :-) Ah, yes. Issue 27641 already prevents that it's cross compiled. This patch was written

[issue28066] [Patch] Fix the ability to cross compile Python when doing a rebuild of importlib.h

2016-09-10 Thread Martin Panter
thought we recently prevented this from being cross-compiled: Issue 27641, revision bc677cb34889, Jul 2016. Your patch seems to be based ontop of this change. Perhaps you have found some way to bypass that cross-compilation detection logic. The addition of $(FREEZE_IMPORTLIB) is a bit like

<    1   2   3   4   5   6   7   8   9   10   >