[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

2012-03-16 Thread Eli Bendersky
Changes by Eli Bendersky : Added file: http://bugs.python.org/file24898/issue13782.1.patch ___ Python tracker ___ ___ Python-bugs-list mailing

[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

2012-03-16 Thread Eli Bendersky
Changes by Eli Bendersky : Removed file: http://bugs.python.org/file24897/issue13782.1.patch ___ Python tracker ___ ___ Python-bugs-list maili

[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

2012-03-16 Thread Eli Bendersky
Eli Bendersky added the comment: Attaching a patch that sets the record straight in 3.3 - the 3 methods will raise TypeError, in both C and Python implementations. Also adds a test that verifies this, and updating the documentation. Note that in the C implementation extend wasn't actually typ

[issue14345] Document socket.SOL_SOCKET

2012-03-16 Thread anatoly techtonik
New submission from anatoly techtonik : socket.get/setsockopt() docs can be improved by providing description for SOL_SOCKET constant, and link to source code for other level constants and socket level options. -- assignee: docs@python components: Documentation messages: 156140 nosy: d

[issue1683368] object.__init__ shouldn't allow args/kwds

2012-03-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: python-dev is just the name of the robot which notes records changesets. -- ___ Python tracker ___ ___

[issue1683368] object.__init__ shouldn't allow args/kwds

2012-03-16 Thread Guido van Rossum
Guido van Rossum added the comment: Please don't add python-...@python.org to the nosy list. -- nosy: -python-dev ___ Python tracker ___ _

[issue1683368] object.__init__ shouldn't allow args/kwds

2012-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 25b71858cb14 by Benjamin Peterson in branch 'default': make extra arguments to object.__init__/__new__ to errors in most cases (finishes #1683368) http://hg.python.org/cpython/rev/25b71858cb14 -- nosy: +python-dev

[issue13782] xml.etree.ElementTree: Element.append doesn't type-check its argument

2012-03-16 Thread Eli Bendersky
Eli Bendersky added the comment: Link to related python-dev discussion: http://mail.python.org/pipermail/python-dev/2012-March/117715.html -- ___ Python tracker ___ ___

[issue14250] for string patterns regex.flags is never equal to 0

2012-03-16 Thread Eli Bendersky
Changes by Eli Bendersky : -- nosy: -eli.bendersky ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail

[issue14315] zipfile.ZipFile() unable to open zip File

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Thanks. There must be multiple extra fields allowed. This output suggests that a) zipfile mis-parses the extra field in some peculiar case (which I doubt) or b) the file either gives a bad field length or third extra field is mal-formed and that other tools c

[issue14322] More test coverage for hmac

2012-03-16 Thread Brian Landers
Brian Landers added the comment: Updated to use the correct assert* methods. -- Added file: http://bugs.python.org/file24896/test_hmac.patch ___ Python tracker ___ _

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Brian Landers
Brian Landers added the comment: Updated to add Matlab refs, also added a roundtrip RGB-YIQ-RGB test to match the other conversions. -- Added file: http://bugs.python.org/file24895/colorlib.patch ___ Python tracker

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Mark, I know you have worked on numerical algorithms. 1. Do you agree that this is a reasonable change? 2. Should new tests go in maintenance release? -- nosy: +mark.dickinson ___ Python tracker

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: Yes, put reference in source. I checked that you copied correctly. I think there is some controversy, which I do not understand, about adding tests to maintenance releases without a bug fix. I will ask, so do not do it yet. -- ___

[issue14344] repr of email policies is wrong

2012-03-16 Thread Éric Araujo
New submission from Éric Araujo : >>> import email.policy as p >>> p.default Policy() >>> p.HTTP Policy(["linesep='\\r\\n'", 'max_line_length=None']) I think you wanted Policy(linesep='\r\n', max_line_length=None); the problem comes from __repr__ where a format field is replaced by a list, whic

[issue11686] Update of some email/ __all__ lists

2012-03-16 Thread R. David Murray
R. David Murray added the comment: Thanks for the patch, Steffen. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker __

[issue11686] Update of some email/ __all__ lists

2012-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 32d3ecacdabf by R David Murray in branch '3.2': #11686: news entry. http://hg.python.org/cpython/rev/32d3ecacdabf New changeset 26c8c43dd774 by R David Murray in branch 'default': Merge #11686: news entry. http://hg.python.org/cpython/rev/26c8c43dd

[issue11686] Update of some email/ __all__ lists

2012-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 63a6d35fcac8 by R David Murray in branch '3.2': #11686: add missing entries to email __all__ lists. http://hg.python.org/cpython/rev/63a6d35fcac8 New changeset 561fc3b4cc2a by R David Murray in branch 'default': Merge #11686: add missing entries to

[issue14343] In re's examples the example with re.split() shadows builtin input()

2012-03-16 Thread Matthew Barnett
Changes by Matthew Barnett : -- title: In re's examples the example with re.split() overlaps builtin input() -> In re's examples the example with re.split() shadows builtin input() ___ Python tracker _

[issue14342] In re's examples the example with recursion doesn't work

2012-03-16 Thread Matthew Barnett
Matthew Barnett added the comment: As far as I can tell, back in 2003, changes were made to replace the recursive scheme which used stack allocation with a non-recursive scheme which used heap allocation in order to the improve the behaviour. To me it looks like an oversight and that the exam

[issue11780] email.encoders are broken

2012-03-16 Thread R. David Murray
R. David Murray added the comment: Thanks, fixed. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue11780] email.encoders are broken

2012-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 195b67c26ce7 by R David Murray in branch '3.2': #11780: s/throw/raise/ http://hg.python.org/cpython/rev/195b67c26ce7 New changeset 63c46a8547fb by R David Murray in branch 'default': Merge #11780: s/throw/raise/ http://hg.python.org/cpython/rev/63c

[issue11780] email.encoders are broken

2012-03-16 Thread Éric Araujo
Éric Araujo added the comment: I think it’s best to always say that exceptions are raised, and keep “throw” for the generator method. It’s consistent and avoids confusion. -- nosy: +eric.araujo ___ Python tracker

[issue11780] email.encoders are broken

2012-03-16 Thread R. David Murray
R. David Murray added the comment: Nope, those errors are correct. The encodings functions do not apply to Multipart messages. I've updated the docs to reflect that. -- components: +Documentation -Library (Lib) resolution: -> fixed stage: -> committed/rejected status: open -> close

[issue11780] email.encoders are broken

2012-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 1be426a555ca by R David Murray in branch '3.2': #11780: document that email.encoders throw TypeError on multipart messages. http://hg.python.org/cpython/rev/1be426a555ca New changeset 060eda590fa0 by R David Murray in branch 'default': Merge #11780

[issue14339] Optimizing bin, oct and hex

2012-03-16 Thread Eric V. Smith
Changes by Eric V. Smith : -- nosy: +eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue12788] test_email fails with -R

2012-03-16 Thread R. David Murray
Changes by R. David Murray : -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ ___

[issue12788] test_email fails with -R

2012-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 474338602bd8 by R David Murray in branch 'default': #12788: fix error in test_policy when run under refleak detection http://hg.python.org/cpython/rev/474338602bd8 -- nosy: +python-dev ___ Python tracker

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: attaching the equivalent patch against python 3.2. that could also use a pair of eyeballs for review. it should show up as 'patch 4' in the rietveld reviews. -- Added file: http://bugs.python.org/file24894/malloc-import-pathbufs-py32.003.diff ___

[issue14302] Move python.exe to bin/

2012-03-16 Thread Brian Curtin
Brian Curtin added the comment: A suggested solution to that was to add BinaryPath to give them the proper path. We could potentially expose BinaryPath in older installers, just pointing at the same value as InstallPath. It's an installer-only change and very low (no?) risk, just preparing us

[issue14302] Move python.exe to bin/

2012-03-16 Thread Mark Hammond
Mark Hammond added the comment: Tools that use the registry will typically look up the InstallPath key and look for python.exe there. They will not look in sub-directories (except some may look in PCBuild and PCBuild/amd64). It is exactly those tools I'm concerned about. -- __

[issue14337] Recent refleaks

2012-03-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: I think I've nailed them all now. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue14302] Move python.exe to bin/

2012-03-16 Thread Brian Curtin
Brian Curtin added the comment: It'll break tools who just look for "C:\\Python%d%d\python.exe" % (x, y) or some variation, but that's not a very dependable solution. If you're using the registry to find actual install locations, I think you'll be alright. What other solutions for finding pyt

[issue14343] In re's examples the example with re.split() overlaps builtin input()

2012-03-16 Thread py.user
New submission from py.user : http://docs.python.org/py3k/library/re.html#making-a-phonebook input -> text -- assignee: docs@python components: Documentation, Regular Expressions messages: 156114 nosy: docs@python, ezio.melotti, mrabarnett, py.user priority: normal severity: normal stat

[issue14302] Move python.exe to bin/

2012-03-16 Thread Mark Hammond
Mark Hammond added the comment: To clarify the second comment from Eric: it is actually the first of the proposals that I consider controversial - moving where python.exe lives (regardless of to where) will break 3rd party tools. If a decision was made to move it anyway, then renaming "Scrip

[issue14342] In re's examples the example with recursion doesn't work

2012-03-16 Thread py.user
New submission from py.user : http://docs.python.org/py3k/library/re.html#avoiding-recursion >>> import sys >>> sys.getrecursionlimit() 1000 >>> import re >>> s = 'Begin ' + 1000*'a very long string ' + 'end' >>> re.match('Begin (\w| )*? end', s).end() 19009 >>> -- assignee: docs@python

[issue14341] sporadic (?) test_urllib2 failures

2012-03-16 Thread Antoine Pitrou
New submission from Antoine Pitrou : == FAIL: test_method_deprecations (test.test_urllib2.OpenerDirectorTests) -- Traceback (most recent call last): File "/ho

[issue14315] zipfile.ZipFile() unable to open zip File

2012-03-16 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This is print from *other* _decodeExtra call. Add print('start') at start of _decodeExtra and you will see it. start b'\xfe\xca\x00\x00' 51966 0 b'' start start b'\x00' -- nosy: +storchaka ___ Python tracker

[issue13512] ~/.pypirc created insecurely

2012-03-16 Thread Éric Araujo
Éric Araujo added the comment: Barry, Benjamin: I’d like to fix this but am not sure if it should apply to 2.6 and 3.1 too. It does not look like a major flaw (see for example the assessment on the Red Hat bug page). -- components: +Distutils2 keywords: +easy nosy: +alexis, benjamin.

[issue14315] zipfile.ZipFile() unable to open zip File

2012-03-16 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +eric.araujo ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14338] Document how to forward POST data on redirects

2012-03-16 Thread Éric Araujo
Éric Araujo added the comment: The idea is to add a short example in Doc/howto/urllib2.rst. Senthil explained how to do things on #14144 (“obtain the redirected URL and then POST to [it]”), and the example should be introduced by a clear warning about security/misbehavior risks (this is why

[issue14339] Optimizing bin, oct and hex

2012-03-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Interpreter Core -Library (Lib) nosy: +mark.dickinson, skrah stage: -> patch review ___ Python tracker ___ __

[issue14335] Reimplement multiprocessing's ForkingPickler using dispatch_table

2012-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for this! Committed now. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker ___ __

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: Updated to use PyErr_NoMemory(). Thanks Antoine! I'm now working on this for 3.2 as well before I commit. -- Added file: http://bugs.python.org/file24893/malloc-import-pathbufs-py27.003.diff ___ Python tracker

[issue14335] Reimplement multiprocessing's ForkingPickler using dispatch_table

2012-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset b2a8310de718 by Antoine Pitrou in branch 'default': Issue #14335: multiprocessing's custom Pickler subclass now inherits from the C-accelerated implementation. http://hg.python.org/cpython/rev/b2a8310de718 -- nosy: +python-dev ___

[issue14337] Recent refleaks

2012-03-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: Okay, hopefuly fixed now. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscrib

[issue14144] urllib2 HTTPRedirectHandler not forwarding POST data in redirect

2012-03-16 Thread Éric Araujo
Éric Araujo added the comment: Continued in #14338. -- resolution: invalid -> works for me stage: patch review -> committed/rejected ___ Python tracker ___ _

[issue14302] Move python.exe to bin/

2012-03-16 Thread Brian Curtin
Brian Curtin added the comment: If that thread ever comes to a conclusion, can someone summarize it here? Also, is there a reason distutils even matters here? -- ___ Python tracker ___

[issue14336] Difference between pickle implementations for function objects

2012-03-16 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +alexandre.vassalotti, pitrou versions: +Python 3.2 ___ Python tracker ___ ___ Python-bugs-list mail

[issue14313] zipfile should raise an exception for unsupported compression methods

2012-03-16 Thread Éric Araujo
Éric Araujo added the comment: The requested change is arguably a new feature, but it seems to me that the current behavior is not acceptable and should be changed. -- title: zipfile does not unpack files from archive (files extracted have zero length) -> zipfile should raise an excep

[issue14335] Reimplement multiprocessing's ForkingPickler using dispatch_table

2012-03-16 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +alexandre.vassalotti, jnoller, pitrou ___ Python tracker ___ ___ Python-bugs-list mailing list Unsu

[issue14313] zipfile does not unpack files from archive (files extracted have zero length)

2012-03-16 Thread Éric Araujo
Changes by Éric Araujo : -- nosy: +alanmcintyre, eric.araujo stage: needs patch -> ___ Python tracker ___ ___ Python-bugs-list mailin

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-16 Thread Thomas Wouters
Thomas Wouters added the comment: For the record, as I said in the review of 002.diff: LGTM. -- ___ Python tracker ___ ___ Python-bug

[issue2377] Replace __import__ w/ importlib.__import__

2012-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: There are also reference leaks: $ ./python -m test -R 3:2 test_bz2 [1/1] test_bz2 beginning 5 repetitions 12345 . test_bz2 leaked [-1, -1] references, sum=-2 $ ./python -m test -R 3:2 test_hashlib [1/1] test_hashlib beginning 5 repetitions 12345 . test

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Brian Landers
Brian Landers added the comment: Matlab docs are here: - http://www.mathworks.com/help/toolbox/images/ref/rgb2ntsc.html - http://www.mathworks.com/help/toolbox/images/ref/ntsc2rgb.html Should these be referenced in the source itself? re new versions: sure, I'll create a separate patch for addi

[issue14302] Move python.exe to bin/

2012-03-16 Thread Éric Araujo
Éric Araujo added the comment: IIUC this is about two changes: - Moving python.exe to the scripts subdirectory instead of the top-level install dir - Renaming that subdir from Scripts to bin The first change will reduce the number of dirs to add to PATH from two to one, which sounds nice; the

[issue13903] New shared-keys dictionary implementation

2012-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: The latest patch has a significant (negative) effect on some benchmarks: ### silent_logging ### Min: 0.057927 -> 0.068228: 1.18x slower Avg: 0.058218 -> 0.068660: 1.18x slower Significant (t=-36.06) ### mako ### Min: 0.118240 -> 0.140451: 1.19x slower Avg: 0.1

[issue14340] Update embedded copy of expat - fix security & crash issues

2012-03-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: It is much less effort for us to simply take a new version of an external library and recompile rather than consider it part of our code that shouldn't change within a release and manually deal with patching it and cherry picking patches onto it. -

[issue14340] Update embedded copy of expat - fix security & crash issues

2012-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > What would be awesome is if we could just kill embedded versions of libraries > like expat. It practically wouldn't change much, since we still bundle them as part of Windows binaries. -- ___ Python tracker

[issue14340] Update embedded copy of expat - fix security & crash issues

2012-03-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: Indeed! How do we do that on windows and osx where these may not exist outside of Python? We already require a set of external dependency libraries on windows, could we just add expat to the list? -- ___ Python

[issue14340] Update embedded copy of expat - fix security & crash issues

2012-03-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: What would be awesome is if we could just kill embedded versions of libraries like expat. -- ___ Python tracker ___ ___

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: Updated per review (style changes). -- Added file: http://bugs.python.org/file24892/malloc-import-pathbufs-py27.002.diff ___ Python tracker

[issue14323] Normalize math precision in RGB/YIQ conversion

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: The idea seems reasonable. Do you have a link or reference to a Matlab doc with the coefficients? Enhancements only go in new versions. -- nosy: +terry.reedy versions: -Python 2.7, Python 3.2 ___ Python tracker

[issue14315] zipfile.ZipFile() unable to open zip File

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: .apk is primarily used for Android Package files https://en.wikipedia.org/wiki/APK_%28file_format%29 which are zipped JAR-based archives. By changing .apk to .zip, I can open the file in Win7 explorer, which has zip built in. A 'crash' is a segfault or equvale

[issue12338] multiprocessing.util._eintr_retry doen't recalculate timeouts

2012-03-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: > _eintr_retry is currently unused. AFAICT it's still used in forking.py. -- versions: +Python 3.3 ___ Python tracker ___

[issue14340] Update embedded copy of expat - fix security & crash issues

2012-03-16 Thread Gregory P. Smith
New submission from Gregory P. Smith : As pointed out in #14234, our embedded copy of expat used by pyexpat for xml parsing in Modules/expat/ is out of date. There have been many fixes to expat that we have not applied including a few potential crash and security fixes. We should upgrade it w

[issue14234] CVE-2012-0876 (hash table collisions CPU usage DoS) for embedded copy of expat

2012-03-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: I'm opening another issue to track updating the embedded copy of expat within Python. FWIW, Python 2.7 & 3.2 and later support a --with-system-expat option which is what I'd *hope* that any OS distro is building their Python with rather than using the olde

[issue14339] Optimizing bin, oct and hex

2012-03-16 Thread Serhiy Storchaka
New submission from Serhiy Storchaka : This patch slightly optimize conversion int to string with base 2, 8 or 16 by calculating exactly number of digits and avoiding unnecessary memory allocation. The code is similar to used for decimal conversion. Without patch: $ ./python -m timeit -s 'x=1'

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread R. David Murray
R. David Murray added the comment: When do patches get applied? The general answer is "when someone gets around to it" :) In this particular case the issue 8739 patch is waiting on the resolution of its dependency (logging uses smtpd in its tests, and the 8739 patch breaks the logging test)

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread Jason Killen
Jason Killen added the comment: On using a different approach: I weighed an approach like that and decided to go with what I thought was the clean/simple/easy approach. If there were more commands that smptd.py accepted I would have probably gone with more like what you mentioned. Change i

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-16 Thread Brett Cannon
Brett Cannon added the comment: Cursory glance has the patch LGTM. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue14245] float rounding examples in FAQ are outdated

2012-03-16 Thread Mark Dickinson
Mark Dickinson added the comment: Fine by me. Language nitpick: "approximation to" sounds a bit better to my ears than "approximation of" -- ___ Python tracker ___ __

[issue14338] urllib2 HowTo for overriding post/3xx behavior.

2012-03-16 Thread beeNuts
New submission from beeNuts : Issue #14144, with the title "urllib2 HTTPRedirectHandler not forwarding POST data in redirect" was recently closed with these comments: "This could be cookbook recipe style example, if it's utility value is high. I am closing this issue as I feel that the require

[issue14311] ConfigParser does not parse utf-8 files with BOM bytes

2012-03-16 Thread Łukasz Langa
Łukasz Langa added the comment: What you considered a workaround is actually what you should be using faced with BOM bytes. This is a broader issue in Python, not necessarily connected with ConfigParser or any other library. Also, this has been already reported here: http://bugs.python.org/i

[issue14338] urllib2 HowTo for overriding post/3xx behavior.

2012-03-16 Thread beeNuts
Changes by beeNuts : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue14337] Recent refleaks

2012-03-16 Thread Stefan Krah
Stefan Krah added the comment: Ah, thanks for the pointer. 9e7f6ddc0d76 is clean, but default still leaks. Next attempt: OK: d2460ff173ff Leak: 3b2856d8614b test_dict leaked [12, 12] references, sum=24 test_builtin leaked [24, 24] references, sum=48 test_unittest leaked [970, 970] references

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread R. David Murray
R. David Murray added the comment: Oh, by the way the mention of EHLO in that message depends on issue 8739 going in. -- ___ Python tracker ___

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread R. David Murray
R. David Murray added the comment: Thanks for the patch. I think this is fine. An alternate approach would be to introduce the concept of a state (like imaplib has), have a list of which commands are allowed in which state, and implement the check in the command processing function, but that

[issue14306] try/except block is both efficient and expensive?

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I think it would be sufficient to add ' if no exceptions are raised' to the first sentence. The example that follows in the entry clarifies the implications of "cheap to try, expensive to catch". -- keywords: +patch nosy: +terry.reedy ___

[issue14269] SMTPD server does not enforce client starting mail transaction with HELO or EHLO

2012-03-16 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

[issue14331] Python/import.c uses a lot of stack space due to MAXPATHLEN

2012-03-16 Thread Gregory P. Smith
Gregory P. Smith added the comment: It looks like MAXPATHLEN is 4096 on our systems. The offending code that caused a stack overflow segfault shows over 100 Python/import.c function calls in its backtrace. -- ___ Python tracker

[issue14337] test_builtin: refleaks

2012-03-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: Yes, see 9e7f6ddc0d76 for the fix. -- resolution: -> out of date status: open -> closed ___ Python tracker ___

[issue14337] test_builtin: refleaks

2012-03-16 Thread Stefan Krah
New submission from Stefan Krah : I don't see immediately why, but since 3877bf2e323 test_builtin and a couple of other tests leak in refcounting mode: hg up 8a5742b7a14d make distclean && ./configure --with-pydebug && make ./python -m test -uall -R :: test_builtin [1/1] test_builtin beginning

[issue14297] Custom string formatter doesn't work like builtin str.format

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: We know that string.Formatter does not properly duplicate str.format. #13598 is specifically about use of {}. Search "string Formatter" for other related issues. -- nosy: +terry.reedy resolution: -> duplicate status: open -> closed superseder: -> stri

[issue14336] Difference between pickle implementations for function objects

2012-03-16 Thread sbt
New submission from sbt : When pickling a function object, if it cannot be saved as a global the C implementation falls back to using copyreg/__reduce__/__reduce_ex__. The comment for the changeset which added this fallback claims that it is for compatibility with the Python implementation. S

[issue14250] for string patterns regex.flags is never equal to 0

2012-03-16 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue14245] float rounding examples in FAQ are outdated

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: The last version in the message above looks good to me. Ready to markup and apply? -- keywords: +patch nosy: +terry.reedy stage: -> patch review ___ Python tracker _

[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset d08f0f3ab23e by Benjamin Peterson in branch 'default': plug memory leak (closes #14325) http://hg.python.org/cpython/rev/d08f0f3ab23e -- stage: -> committed/rejected status: open -> closed ___ Python tr

[issue14332] Better explain "junk" concept in difflib doc

2012-03-16 Thread Weronika Patena
Weronika Patena added the comment: Ah, I see. True, the ndiff docstring doesn't actually explain what junk IS - I was just engaging in wishful thinking and assuming it did the thing I wanted. A better explanation would help. -- ___ Python tracker

[issue14313] zipfile does not unpack files from archive (files extracted have zero length)

2012-03-16 Thread Glenn Linderman
Glenn Linderman added the comment: While Amaury's comment is no doubt true, shouldn't z.read raise an exception if it encounters an unsupported compression type? -- nosy: +v+python ___ Python tracker

[issue10484] http.server.is_cgi fails to handle CGI URLs containing PATH_INFO

2012-03-16 Thread Glenn Linderman
Glenn Linderman added the comment: Senthil, from you patch, I discovered where the test_httpservers.py lives, and added '/cgi-bin/file1.py/../../a': ('/', 'a'), to a local copy, and it worked fine against whatever version of the server and tests it was running against... but tha

[issue14309] Deprecate time.clock()

2012-03-16 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> time.clock() has been in use for ages in many many scripts. >> We don't want to carelessly break all those. > > I don't want to remove the function, just mark it as deprecated to > avoid co

[issue14332] Better explain "junk" concept in difflib doc

2012-03-16 Thread Terry J. Reedy
Terry J. Reedy added the comment: I reproduced the observed behavior in 3.3.0a. However, I am rather sure it is not a bug. In any case, linejunk is not ignored. Passing 'lambda x: 1/0' causes ZeroDivisionError, proving that it gets called. The body of ndiff(linejunk,charjunk,a,b) is return

[issue14328] Add keyword-only parameter support to PyArg_ParseTupleAndKeywords

2012-03-16 Thread Benjamin Peterson
Benjamin Peterson added the comment: Shouldn't using vgetargs1 with '$' in the format string just be an error? vgetargs1 doesn't know anything about keyword arguments. -- ___ Python tracker __

[issue12568] Add functions to get the width in columns of a character

2012-03-16 Thread Éric Araujo
Changes by Éric Araujo : -- Removed message: http://bugs.python.org/msg156059 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue12568] Add functions to get the width in columns of a character

2012-03-16 Thread Éric Araujo
Éric Araujo added the comment: eo -- nosy: +benjamin.peterson, eric.araujo, lemburg ___ Python tracker ___ ___ Python-bugs-list maili

[issue13512] ~/.pypirc created insecurely

2012-03-16 Thread Jakub Wilk
Changes by Jakub Wilk : -- nosy: +jwilk ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/

[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Stefan Krah
Stefan Krah added the comment: Here's leak.py. -- Added file: http://bugs.python.org/file24890/leak.py ___ Python tracker ___ ___ Pyt

[issue14325] Stop using the garbage collector to manage the lifetime of the getargs.c freelist

2012-03-16 Thread Stefan Krah
Stefan Krah added the comment: I'm getting a leak since this revision: ./configure --without-pymalloc CFLAGS="-O0 -g" && make valgrind --db-attach=yes --suppressions=./Misc/valgrind-python.supp --leak-check=full ./python leak.py ==32303== 16 bytes in 1 blocks are definitely lost in loss recor

[issue14334] Crash: getattr(type, '__getattribute__')(type, type)

2012-03-16 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3d4d52e47431 by Benjamin Peterson in branch '2.7': check for string attribute names in old-style classes (closes #14334) http://hg.python.org/cpython/rev/3d4d52e47431 -- stage: needs patch -> committed/rejected status: open -> closed _

  1   2   >