[issue21379] StopIteration is silenced when raised by generator within context manager

2014-04-28 Thread Nick Coghlan
Nick Coghlan added the comment: This is expected behaviour - "raise StopIteration" in a generator is equivalent to "return", except it can occur inside a called function. The bug here is in the given context manager definition - it should be taking appropriate action if the "next" call failing

[issue21305] PEP 466: update os.urandom

2014-04-28 Thread Donald Stufft
Donald Stufft added the comment: One of the reasons the PEP was done the way it was done was it allowed you to write 2/3 compatible code without version checks. Enhancing that class won't land until 3.5 which is 18+ months away. Further more the os.urandom persistent FD's already exists and is

[issue8776] Bytes version of sys.argv

2014-04-28 Thread Nick Coghlan
Nick Coghlan added the comment: Makes sense to me. Assuming we eventually manage to resolve the POSIX locale issue, the bytes variant will become even less useful. -- resolution: later -> rejected status: open -> closed ___ Python tracker

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-28 Thread Anton Afanasyev
Changes by Anton Afanasyev : Added file: http://bugs.python.org/file35086/issue21321_2.7_e3217efa6edd_4.diff ___ Python tracker ___ ___ Python

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-28 Thread Anton Afanasyev
Changes by Anton Afanasyev : Added file: http://bugs.python.org/file35087/issue21321_3.4_8c8315bac6a8_4.diff ___ Python tracker ___ ___ Python

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-28 Thread Anton Afanasyev
Anton Afanasyev added the comment: Hi Antoine, my test works for me. It can be either >>> a = [1, 2, 3] or >>> a = iter([1, 2, 3]) , no matter: both objects will be +1 referenced after taking >>> b = islice(a, 1) . My test failed without patch and passed with one. But your test is more straight

[issue21037] add an AddressSanitizer build option

2014-04-28 Thread Charles-François Natali
Charles-François Natali added the comment: I'd like to move this forward: it could IMO be a great way to proactively detect potential security defects, and nasty stack/heap/memory corruption in general. The remaining - missing - part is buildbot integration: AFAICT the only specific thing to

[issue21305] PEP 466: update os.urandom

2014-04-28 Thread Charles-François Natali
Charles-François Natali added the comment: > Yes, I'm proposing to enhance this class. The problem is AFAICT there's currently no way to get a file descriptor to the underlying /dev/urandom (and I don't know how it works on Windows). Also, this would duplicate the work which has already been do

[issue18314] Have os.unlink remove junction points

2014-04-28 Thread Kim Gräsman
Kim Gräsman added the comment: By the way, is PyMem_RawMalloc/PyMem_RawFree preferred for memory allocation across the board? If so, I can just prepare a new patch for you with that changed, zero-initialization in place and the prefix-overrun fixed. I might get to it tonight. -- ___

[issue21305] PEP 466: update os.urandom

2014-04-28 Thread STINNER Victor
STINNER Victor added the comment: Le 29 avr. 2014 00:22, "Donald Stufft" a écrit : > Well except random.SystemRandom doesn't keep the file open (At least in 2.7) and actually it just calls os.urandom under the covers, also it doesn't make it very nice to get a glob of random bytes. Yes, I'm pro

[issue17861] put opcode information in one place

2014-04-28 Thread Martin v . Löwis
Martin v. Löwis added the comment: It would be possible to have the daily DMG builder run "make touch". -- ___ Python tracker ___ ___

[issue21054] Improve indexing of syntax symbols

2014-04-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- dependencies: +Index 'as' in import and with statements -Derby: Convert the _sre module to use Argument Clinic ___ Python tracker ___

[issue21054] Improve indexing of syntax symbols

2014-04-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- dependencies: +Derby: Convert the _sre module to use Argument Clinic, Index (augmented) assignment symbols ___ Python tracker ___

[issue1820] Enhance Object/structseq.c to match namedtuple and tuple api

2014-04-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: > Is accessing _fields a common operation? Not common at all -- it is used for introspection. That said, there is nearly zero savings from generating the tuple upon look-up. I would say that using a PyGetSetDef is a false optimization. -- ___

[issue21055] Index (augmented) assignment symbols

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset d32b6900da6f by Terry Jan Reedy in branch '2.7': Closes #21055: Index (augmented) assignment symbols. http://hg.python.org/cpython/rev/d32b6900da6f New changeset 0b946c8d7837 by Terry Jan Reedy in branch '3.4': Issue #21055: Index (augmented) assign

[issue21048] Index 'as' in import and with statements

2014-04-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: I forgot the # in commit message. Changeset: 90501 (9a0fc12991e2) Closes 21048: Index 'as' in import and with statements. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tr

[issue21352] improve documentation indexing

2014-04-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +terry.reedy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.

[issue21026] Document sitecustomize.py problems with pythonw

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 79a4560a702f by Terry Jan Reedy in branch '2.7': Closes #21026: Augment site doc based on experiments. Patch by Carol Willing. http://hg.python.org/cpython/rev/79a4560a702f New changeset 3fef95842314 by Terry Jan Reedy in branch '3.4': Issue #21026:

[issue18314] Have os.unlink remove junction points

2014-04-28 Thread Kim Gräsman
Kim Gräsman added the comment: Sorry, that wasn't clear. I mean if you change allocator _from_ calloc, make sure the buffer is zeroed out after allocation. -- ___ Python tracker ___

[issue21377] PyBytes_Concat could try to concat in-place

2014-04-28 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file35085/issue_21377_r2.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue18314] Have os.unlink remove junction points

2014-04-28 Thread Kim Gräsman
Kim Gräsman added the comment: Aha, that might cause trouble. I think you should add a memset() to sero out the newly allocated buffer also, I think I may have used calloc to be able to assume it was initialized with zeros. -- ___ Python tracker <

[issue21377] PyBytes_Concat could try to concat in-place

2014-04-28 Thread Nikolaus Rath
Nikolaus Rath added the comment: Tentative patch attached. The test suite still passes, but I'm not sure if it actually exerts the new code path. Is there a standard way to test the C api? -- keywords: +patch Added file: http://bugs.python.org/file35084/issue_21377.diff ___

[issue21380] timezone support in strftime methods broken

2014-04-28 Thread Saimadhav Heblikar
Changes by Saimadhav Heblikar : -- nosy: +sahutd ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-04-28 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file35083/issue_21057_r3.diff ___ Python tracker ___ ___ Python-bugs-list mailin

[issue20951] SSLSocket.send() returns 0 for non-blocking socket

2014-04-28 Thread Nikolaus Rath
Changes by Nikolaus Rath : Added file: http://bugs.python.org/file35082/issue20951_r3.diff ___ Python tracker ___ ___ Python-bugs-list mailing

[issue9253] argparse: optional subparsers

2014-04-28 Thread paul j3
paul j3 added the comment: Another Stackoverflow question triggered by this issue http://stackoverflow.com/questions/23349349/argparse-with-required-subparser -- ___ Python tracker _

[issue21381] python build crash on Mavericht

2014-04-28 Thread Christian Tismer
Christian Tismer added the comment: Ned: """In general, we don't test or claim to support building for a deployment target lower than the system being built on.""" This is not convincing, because the cpython builds are always against <$ MACOSX_DEPLOYMENT_TARGET=10.6> . Other builds use the cur

[issue21381] python build crash on Mavericht

2014-04-28 Thread Ned Deily
Ned Deily added the comment: In general, we don't test or claim to support building for a deployment target lower than the system being built on. It's always safer to build on the same version as the deployment target. I'll take a look at it, though. -- nosy: +ned.deily

[issue21381] python build crash on Mavericht

2014-04-28 Thread Christian Tismer
New submission from Christian Tismer: Building python on OSX Mavericks (10.9) of Python 3.4 crashes when this is set: MACOSX_DEPLOYMENT_TARGET=10.7 This happens with OSX 10.9.2, all current updates installed, as of 2014-04-28. Demo script: You can use my attached script to validate this error.

[issue10872] Add mode to TextIOWrapper repr

2014-04-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: accepted -> fixed status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailin

[issue13248] deprecated in 3.2/3.3, should be removed in 3.4

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2cceb8cb552b by Giampaolo Rodola' in branch 'default': fix isuse #13248: remove previously deprecated asyncore.dispatcher __getattr__ cheap inheritance hack. http://hg.python.org/cpython/rev/2cceb8cb552b --

[issue15088] PyGen_NeedsFinalizing is public, but undocumented

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, PyGen_NeedsFinalizing still exists but it isn't used anymore in the code base (following PEP 442). -- nosy: +pitrou ___ Python tracker

[issue18727] test for writing dictionary rows to CSV

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hi Muhammad, Sorry, I had forgotten about this issue. I have now committed the patch to 3.5. Thanks for your contribution! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.5 -Python 3.4 ___

[issue18727] test for writing dictionary rows to CSV

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2502843dbedf by Antoine Pitrou in branch 'default': Issue #18727: improve test coverage of the csv module by testing for DictWriter.writerows. http://hg.python.org/cpython/rev/2502843dbedf -- nosy: +python-dev _

[issue18564] Integer overflow in socketmodule

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Michele, do you plan to update this patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing li

[issue13248] deprecated in 3.2/3.3, should be removed in 3.4

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Apparently we missed some of the stuff here. -- ___ Python tracker ___ ___ Python-bugs-list mailing

[issue19420] Leak in _hashopenssl.c

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: 3.3 is in security mode now, so this can be closed IMO. -- nosy: +pitrou resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.4 -Python 3.3 ___ Python tracker

[issue19767] pathlib: iterfiles() and iterdirs()

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Having an `iterdirs()` method next to `iterdir()` is very confusing. We should find something else, so how about `files()` and `subdirs()`? -- nosy: +pitrou ___ Python tracker

[issue18400] Minor increase to Pickle test coverage

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Why only test the _Pickler class and not both the Python and C versions? -- nosy: +pitrou ___ Python tracker ___ ___

[issue18616] enable more ssl socket options with get_server_certificate

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: To be frank, it's quite easy to open the connection and read the cert yourself, so I don't think complicating this API is very useful. Still, I'm leaving this open so that other developers can chime in. -- nosy: +christian.heimes, dstufft, giampaolo.rod

[issue20064] PyObject_Malloc is not documented

2014-04-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +haypo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python

[issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is committed, thank you. -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2 ___ Python tracker

[issue9307] Py_TPFLAGS_LONG_SUBCLASS is not documented

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 37786ae8cc1c by Antoine Pitrou in branch '3.4': Issue #9307: document the various Py_TPFLAGS_*_SUBCLASS flags. Patch by Yury V. Zaytsev. http://hg.python.org/cpython/rev/37786ae8cc1c New changeset d1a03834cec7 by Antoine Pitrou in branch 'default'

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-04-28 Thread Nathaniel Smith
Nathaniel Smith added the comment: > It would be interesting to see some NumPy benchmarks (Nathaniel?). What is it you want to see? NumPy already uses calloc; we benchmarked it when we added it and it made a huge difference to various realistic workloads :-). What NumPy gets out of this isn't

[issue7105] weak dict iterators are fragile because of unpredictable GC runs

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since this is backported, shouldn't it be closed? -- ___ Python tracker ___ ___ Python-bugs-list mail

[issue1615158] POSIX capabilities support

2014-04-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: patch review -> needs patch ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed an alternate patch using traceback.clear_frames(). -- resolution: -> fixed stage: needs patch -> resolved status: open -> closed ___ Python tracker _

[issue9815] assertRaises as a context manager keeps tracebacks and frames alive

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6ab3193e890e by Antoine Pitrou in branch '3.4': Issue #9815: assertRaises now tries to clear references to local variables in the exception's traceback. http://hg.python.org/cpython/rev/6ab3193e890e New changeset 553fe27521be by Antoine Pitrou in b

[issue10203] sqlite3.Row doesn't support sequence protocol

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Issue #13583 ("sqlite3.Row doesn't support slice indexes") is partly related. -- nosy: +jesstess, pitrou ___ Python tracker ___

[issue21137] Better repr for threading.Lock()

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The repr of threading._RLock contains owner and count, but not > lock/unlock status. The repr of locks from _dummy_thread also should > contain lock/unlock status. And it would be nice to have the > open/closed status in the repr of other synchronization primit

[issue20361] -W command line options and PYTHONWARNINGS environmental variable should not override -b / -bb command line options

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: The patch is a bit problematic, because Py_BytesWarningFlag may also be set by e.g. an application embedding Python, but then Python's main.c won't be executed. -- ___ Python tracker

[issue20355] -W command line options should have higher priority than PYTHONWARNINGS environmental variable

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed. Thanks, Arfrever! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue20355] -W command line options should have higher priority than PYTHONWARNINGS environmental variable

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 78c0d80a04f9 by Antoine Pitrou in branch 'default': Issue #20355: -W command line options now have higher priority than the PYTHONWARNINGS environment variable. Patch by Arfrever. http://hg.python.org/cpython/rev/78c0d80a04f9 New changeset 925c0b6

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-04-28 Thread Stefan Krah
Stefan Krah added the comment: The order of the nelem/elsize matters for readability. Otherwise it is not intuitive what happens after the jump to redirect in _PyObject_Alloc(). Why would you assert that 'nelem' is one? -- ___ Python tracker

[issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC

2014-04-28 Thread akira
akira added the comment: Antoine, thank you for reviewing. I appreciate the patience. -- ___ Python tracker ___ ___ Python-bugs-list m

[issue21273] don't defined socket constants which are not implemented for GNU/Hurd

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, rejecting. -- resolution: -> rejected status: open -> closed ___ Python tracker ___ ___ Python-

[issue21305] PEP 466: update os.urandom

2014-04-28 Thread Donald Stufft
Donald Stufft added the comment: Just verified that 3.x also does not exhibit this behavior with random.SystemRandom (except implicitly through os.urandom doing it). -- ___ Python tracker _

[issue17227] devguide: buggy heading numbers

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I agree with Chris, changing the tocdepth doesn't sound like the right solution. Is this a Sphinx bug? Georg, could you please take a look? -- ___ Python tracker _

[issue21353] document Popen.args attribute

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Gregory, do you think this is ok to document? -- nosy: +gregory.p.smith, pitrou stage: -> patch review versions: -Python 3.3 ___ Python tracker __

[issue5404] Cross-compiling Python

2014-04-28 Thread Stefan Krah
Stefan Krah added the comment: Here's a cross-compile script for arm-linux-gnueabi. Building 3.4 works on Ubuntu 14.04. I cannot run the tests, since I only have an old Debian-ARM qemu image with the wrong glibc version. For 3.5 we have a regression due to the new matrix operator. -- A

[issue21305] PEP 466: update os.urandom

2014-04-28 Thread Donald Stufft
Donald Stufft added the comment: Well except random.SystemRandom doesn't keep the file open (At least in 2.7) and actually it just calls os.urandom under the covers, also it doesn't make it very nice to get a glob of random bytes. -- ___ Python trac

[issue21225] io.py: Improve docstrings for classes

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've backported Andrew's change. -- nosy: +pitrou resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker __

[issue21225] io.py: Improve docstrings for classes

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6e23afdee4e4 by Andrew Kuchling in branch '2.7': #21225: copy docstrings from base classes http://hg.python.org/cpython/rev/6e23afdee4e4 -- ___ Python tracker

[issue19217] Calling assertEquals for moderately long list takes too long

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ezio, do you intend to add a test to your patch? -- nosy: +pitrou ___ Python tracker ___ ___ Python-

[issue7511] msvc9compiler.py: ValueError when trying to compile with VC Express

2014-04-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +brian.curtin, tim.golden ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue21305] PEP 466: update os.urandom

2014-04-28 Thread STINNER Victor
STINNER Victor added the comment: Please don't backport this "feature". We had to wait 20 years before someone requested the feature, but only a few months before the first user reported an issue ("regression"?). IMO it would be much better to use explicitly a random.SystemRandom instance whi

[issue21380] timezone support in strftime methods broken

2014-04-28 Thread Michael P. Soulier
New submission from Michael P. Soulier: msoulier@cappuccino:~$ python Python 2.7.3 (default, Mar 13 2014, 11:03:55) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from datetime import datetime >>> now = datetime.now() >>> now.strftime("%z") '' >>>

[issue21233] Add *Calloc functions to CPython memory allocation API

2014-04-28 Thread STINNER Victor
STINNER Victor added the comment: > Hmm, obmalloc.c changed as well, so already the gcc optimizer can take > different paths and produce different results. If decimal depends on allocator performances, you should maybe try to implement a freelist. > Also I did set mpd_callocfunc to PyMem_Calloc

[issue21378] ImportError: No module named 'concurrent.futures'

2014-04-28 Thread Ned Deily
Ned Deily added the comment: FWIW, works for me using the python.org 3.4 64-bin installer. What is the output of: python3 -c 'import sys;print(sys.version)' As Claudiu suggests, check for a concurrent.py shadowing the standard library version. Also, why are you setting PYTHONPATH to include

[issue21379] StopIteration is silenced when raised by generator within context manager

2014-04-28 Thread Hannan Aharonov
Changes by Hannan Aharonov : -- type: -> behavior ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail

[issue21379] StopIteration is silenced when raised by generator within context manager

2014-04-28 Thread Hannan Aharonov
New submission from Hannan Aharonov: If the code that defines a context manager performs some operations on a generator that cause it to raise StopIteration, this exception is propagated to the context manager's __exit__() method and there swallowed by a try..except block. This can cause une

[issue21378] ImportError: No module named 'concurrent.futures'

2014-04-28 Thread Claudiu.Popa
Claudiu.Popa added the comment: Do you have a module/file named concurrent.py in your PATH? -- nosy: +Claudiu.Popa ___ Python tracker ___

[issue17386] Bring Doc/make.bat as close to Doc/Makefile as possible

2014-04-28 Thread Zachary Ware
Zachary Ware added the comment: New patch, fixes a typo bug in a useless statement (by removing the statement) and a few pesky tabs that made their way into make.bat. Also, a little better organization in the vars at the top. -- Added file: http://bugs.python.org/file35079/issue17386.

[issue21378] ImportError: No module named 'concurrent.futures'

2014-04-28 Thread Bill Bergmann
New submission from Bill Bergmann: python 3.4 attempting to run example at https://docs.python.org/3/library/concurrent.futures.html 17.4.2.1 $ python3 17_4_2.py Traceback (most recent call last): File "", line 2195, in _find_and_load_unlocked AttributeError: 'module' object has no attribute

[issue17861] put opcode information in one place

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1fd9c3f6cf68 by Ned Deily in branch 'default': Issue #17861: Allow generate_opcode_h to run with a system Python 2.5. http://hg.python.org/cpython/rev/1fd9c3f6cf68 -- ___ Python tracker

[issue17861] put opcode information in one place

2014-04-28 Thread Ned Deily
Ned Deily added the comment: Thanks, David. Ideally, the generator script shouldn't run during an installer build since presumably the generated file should be up-to-date in the repo. "make touch" could handle that but the installer build does use a separate build/object directory and doesn't

[issue8776] Bytes version of sys.argv

2014-04-28 Thread STINNER Victor
STINNER Victor added the comment: Today I regret os.environb (I added it). If I remember correctly, os.environb was added before the PEP 383 (surrogateescape). This PEP makes os.environb almost useless. In Python 3, Unicode is the natural choice, and thanks to the PEP 383, it's still possible

[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-28 Thread Charles-François Natali
Charles-François Natali added the comment: > Perhaps so, but I think we should open a separate ticket for that > instead of instituting some feature creep here (no matter how > reasonable the concept or its changes would be). Agreed. The patch looks good to me, so feel free to commit! (FWIW, gz

[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-28 Thread Skip Montanaro
Skip Montanaro added the comment: On Mon, Apr 28, 2014 at 3:08 PM, Charles-François Natali wrote: > In short, I think the overall buffering should be rewritten :-) Perhaps so, but I think we should open a separate ticket for that instead of instituting some feature creep here (no matter how rea

[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-28 Thread Charles-François Natali
Charles-François Natali added the comment: That could make sense, dunno. Note that the bz2 module uses a harcoded 8K value. Note that the buffer size should probably be passed to the open() call. Also, the allocation is quite peculiar: it uses an exponential buffer size, starting at a tiny val

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: (note I haven't looked at the C part of the patch) -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue17861] put opcode information in one place

2014-04-28 Thread David Bolen
David Bolen added the comment: This generator script breaks the daily OSX DMG builds on my bolen-dmg buildslave for the 3.x branch. The issue is with the use of "with" as the slave uses Python 2.5 to build the installer. Now, that's old, and I'm not even sure how necessary the daily builds a

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Anton, the test is wrong: it is taking a reference to the iterable object (the list), not the iterator. To check the reference to the original iterator is released, something like this would work: >>> import itertools, weakref >>> it = (x for x in (1, 2)) >>>

[issue8776] Bytes version of sys.argv

2014-04-28 Thread Raymond Hettinger
Raymond Hettinger added the comment: Without commenting on this specific proposal, I would like to make an overall observation that Python is impairing its usability by adding too-many-ways-to-it in a number of categories (file descriptor variants of file methods, multiple versions of time.tim

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-28 Thread Anton Afanasyev
Changes by Anton Afanasyev : Added file: http://bugs.python.org/file35077/issue21321_3.4_8c8315bac6a8_3.diff ___ Python tracker ___ ___ Python

[issue21321] itertools.islice() doesn't release reference to the source iterator when the slice is exhausted

2014-04-28 Thread Anton Afanasyev
Anton Afanasyev added the comment: Hi Antoine, I have no found a way to check resource usage in test infrastructure and I don't think it could be done carefully. The only method I found to test issue is straightforward: just to check source iterator is not referenced from itertools.islice() af

[issue21377] PyBytes_Concat could try to concat in-place

2014-04-28 Thread Antoine Pitrou
New submission from Antoine Pitrou: Currently, PyBytes_Concat always creates a new bytes object for the result. However, when Py_REFCNT(*pv) == 1, it could instead call _PyBytes_Resize() and then concat the second argument in place. (like e.g. _PyUnicode_Append does) -- components: In

[issue21057] TextIOWrapper does not support reading bytearrays or memoryviews

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > My usecase is that I have a binary stream class that internally uses > memoryviews. Ok, I think it is a reasonable use case. I'm gonna look at your patch and give it a review. -- stage: -> patch review ___ Pytho

[issue21372] multiprocessing.util.register_after_fork inconsistency

2014-04-28 Thread Ned Deily
Changes by Ned Deily : -- nosy: +sbt ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/ma

[issue18314] Have os.unlink remove junction points

2014-04-28 Thread Tim Golden
Tim Golden added the comment: I'm just pinging #python-dev to see if there's a way to request a buildbot build from a specific server-side clone. Meanwhile, though, I definitely introduced a change into your code which I thought I had reverted, but clearly hadn't! The code, as committed, used

[issue5404] Cross-compiling Python

2014-04-28 Thread Gregory P. Smith
Gregory P. Smith added the comment: I haven't tried a cross compile in ages. If nothing else I don't think this issue should be closed until we have at least one buildbot setup to cross compile it and run it on the target platform. That's on my long "todo for python" wish list but I haven't h

[issue21376] asyncio docs refer to wrong TimeoutError

2014-04-28 Thread Guido van Rossum
Guido van Rossum added the comment: I considered this, and decided against unifying the two TimeoutErrors. First the builtin TimeoutError is specifically a subclass of OSError representing the case where errno is ETIMEDOUT. But asyncio.TimeoutError means nothing of the sort. Second, the prec

[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-28 Thread Skip Montanaro
Skip Montanaro added the comment: On Mon, Apr 28, 2014 at 1:59 PM, Antoine Pitrou wrote: > Well, I think that compressed files in general would benefit from a > larger buffer size than plain binary I/O, but that's just a hunch. I agree. When writing my patch, my (perhaps specious) thinking went

[issue16104] Compileall script: add option to use multiple cores

2014-04-28 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: -pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pyth

[issue21376] asyncio docs refer to wrong TimeoutError

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Gasp. Perhaps concurrent.futures.TimeoutError can inherit from the standard TimeoutError? The following patch doesn't seem to disrupt the test suite: diff --git a/Lib/concurrent/futures/_base.py b/Lib/concurrent/futures/_base.py --- a/Lib/concurrent/futures/_ba

[issue16104] Compileall script: add option to use multiple cores

2014-04-28 Thread Jim Jewett
Jim Jewett added the comment: Trying to put bounds on the disagreements. Does anyone disagree with any of the following: (1) compileall currently runs single-threaded in a single process. (2) This enhancement intends to allow parallelization by process. (3) Users MAY need to express whe

[issue21312] Update thread_foobar.h to include timed locking and TLS support

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7bb1bda5dcef by Antoine Pitrou in branch 'default': Issue #21312: Update the thread_foobar.h template file to include newer threading APIs. Patch by Jack McCracken. http://hg.python.org/cpython/rev/7bb1bda5dcef -- nosy: +python-dev __

[issue21312] Update thread_foobar.h to include timed locking and TLS support

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, noone chimed in, so I committed the patch :-) Thank you very much for your contribution! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue19940] ssl.cert_time_to_seconds() returns wrong results if local timezone is not UTC

2014-04-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 7191c37238d5 by Antoine Pitrou in branch 'default': Issue #19940: ssl.cert_time_to_seconds() now interprets the given time string in the UTC timezone (as specified in RFC 5280), not the local timezone. http://hg.python.org/cpython/rev/7191c37238d5

[issue20962] Rather modest chunk size in gzip.GzipFile

2014-04-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Sure, it might not be optimal for compressed files, but I gues that > the optimal value is function of the compression-level block size and > many other factors which are just too varied to come up with a > reasonable heuristic. Well, I think that compressed f

  1   2   >