[issue1859] textwrap doesn't linebreak on "\n"

2012-04-11 Thread Otto Kekäläinen
Otto Kekäläinen added the comment: In previous comment: (eg. Wordwrap in Python) -> (wordwrap() in PHP) Some examples of how this function works on text blocks: Original text: -- *Maksaako riippuvuus yksittäisestä ohjelmistoyritykstä Helsingille vuosittain 3,4 miljoonaa euroa?* Helsingin k

[issue1859] textwrap doesn't linebreak on "\n"

2012-04-11 Thread Otto Kekäläinen
Otto Kekäläinen added the comment: As a note to comments msg60038-msg60040, for anybody like me who ended up here after Googling around on how to do wordwrap in Python: The function textwrap in Python is for single strings/paragraphs only, and it does not work as wordwrap normally works in te

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread STINNER Victor
STINNER Victor added the comment: +def time_independent_equals(a, b): +if len(a) != len(b): +return False This is not time independent. Is it an issue? +if type(a[0]) is int: It's better to write isinstance(a, bytes). You should raise a TypeError if a is not a bytes or str. -

[issue14558] Documentation for unittest.main does not describe some keyword arguments.

2012-04-11 Thread Ezio Melotti
Changes by Ezio Melotti : -- nosy: +ezio.melotti, michael.foord stage: -> needs patch versions: -Python 2.6, Python 3.1, Python 3.4 ___ Python tracker ___ _

[issue14558] Documentation for unittest.main does not describe some keyword arguments.

2012-04-11 Thread Jeffrey Finkelstein
New submission from Jeffrey Finkelstein : Documentation for unittest.main, at , does not describe the keyword arguments 'module', 'argv', or 'testLoader'. -- assignee: docs@python components: Documentation messages: 158104

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide added the comment: Here's a v1. Works with both str and bytes types for Python 3.x. Not sure I'm completely happy with the docs, but I'd appreciate any feedback on them! -- keywords: +patch Added file: http://bugs.python.org/file25186/hmac-time-independent-v1.patch

[issue5895] socketmodule.c on HPUX ia64 without _XOPEN_SOURCE_EXTENDED compiles incorrectly

2012-04-11 Thread Adi Roiban
Changes by Adi Roiban : -- nosy: +adiroiban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14556] telnetlib Telnet.expect fails with timeout=0

2012-04-11 Thread Joel Lovinger
Joel Lovinger added the comment: Quick response! Based on review of Telnet.expect in Python 2.4.3 and Python 2.7.1/2.7.3. In Python 2.4.3 the timeout is passed unmodified on each loop iteration to the underlying select to get more data for a potential match. Iteration only ends on EOF, sel

[issue12428] functools test coverage

2012-04-11 Thread Brian Thorne
Brian Thorne added the comment: I've updated the patch to address the comments here and in the code review. I added more cross testing of the pure Python implementation of partial - as you pointed out inheritance wasn't supported so I changed from the simple closure to a class implementation.

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-11 Thread Eric Snow
Changes by Eric Snow : -- nosy: +eric.snow ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14515] tempfile.TemporaryDirectory documented as returning object but returns name

2012-04-11 Thread Nick Coghlan
Nick Coghlan added the comment: Change looks fine to me - go ahead and commit it :) -- ___ Python tracker ___ ___ Python-bugs-list ma

[issue5113] 2.5.4.3 / test_posix failing on HPUX systems

2012-04-11 Thread Adi Roiban
Changes by Adi Roiban : -- nosy: +adiroiban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14557] HP-UX libraries not included

2012-04-11 Thread Adi Roiban
New submission from Adi Roiban : Hi, I am trying to build Python on HP-UXiv3. HP-UX also keeps libs in /usr/lib/hpux64 and /usr/lib/hpux32. I have attached a patch for searching these folders. The patch is against the latest version of cpython. I have tests the change on Python 2.5.6.

[issue9175] ctypes doesn't build on hp-ux

2012-04-11 Thread Adi Roiban
Changes by Adi Roiban : -- nosy: +adiroiban ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.o

[issue14556] telnetlib Telnet.expect fails with timeout=0

2012-04-11 Thread R. David Murray
R. David Murray added the comment: Can you point to the changes you think are at issue? That might help us track down why the change was made. This isn't necessarily a bug, but even if it isn't, the behavior should probably be explicitly documented. -- nosy: +jackdied, r.david.murra

[issue14547] Python symlink to script behaves unexpectedly

2012-04-11 Thread Nick Coghlan
Nick Coghlan added the comment: Specifically, we end up calling os.realpath() (or the C level equivalent) when initialising __main__.__file__ and sys.path[0]. Agreed this behaviour should be documented (and tested!) explicitly. -- assignee: -> docs@python components: +Documentation,

[issue14556] telnetlib Telnet.expect fails with timeout=0

2012-04-11 Thread Joel Lovinger
New submission from Joel Lovinger : In Python 2.4.3 a Telnet.expect with timeout=0 would always make at least one call to Telnet.fill_rawq if a match couldn't be found and the connection was open. In Python 2.7.1/2.7.3 Telnet.expect with timeout=0 breaks before any call to Telnet.fill_rawq if

[issue14399] zipfile and creat/update comment

2012-04-11 Thread R. David Murray
Changes by R. David Murray : -- Removed message: http://bugs.python.org/msg158095 ___ Python tracker ___ ___ Python-bugs-list mailing

[issue14399] zipfile and creat/update comment

2012-04-11 Thread R. David Murray
R. David Murray added the comment: Serhiy: this looks good. I get some test errors when I apply it on 2.7 though. Would you be interested in doing a 2.7 version as well? (Minor comment: the test method would be better as two test methods, and it would be nice to have a third test method tha

[issue14399] zipfile and creat/update comment

2012-04-11 Thread R. David Murray
R. David Murray added the comment: Serhiy: this looks good. I get some test errors when I apply it on 2.7 though. Would you be interested in doing a 2.7 version as well? (Minor comment: the test method would be better as two test methods, and it would be nice to have a third test method tha

[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2012-04-11 Thread Paul A.
Paul A. added the comment: Yes indeed, sorry for not answering that question the first time. The trace is complete, and is from python... although most of it is really in the shared lib rather than the executable. -- ___ Python tracker

[issue14552] test module: remove repetition

2012-04-11 Thread R. David Murray
New submission from R. David Murray : 2.7 d60ef141e090 3.2 f25fb7e1d076 3.3 bd353f12c007 Thanks. -- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior ___ Python tracker

[issue14553] http.server module: grammar fix

2012-04-11 Thread Roundup Robot
New submission from Roundup Robot : New changeset ed5788424c34 by R David Murray in branch '3.2': #14553: fix word order. http://hg.python.org/cpython/rev/ed5788424c34 New changeset bd353f12c007 by R David Murray in branch 'default': Merge doc fixes #14553 and #14552. http://hg.python.org/cpytho

[issue14553] http.server module: grammar fix

2012-04-11 Thread R. David Murray
R. David Murray added the comment: Thanks. -- nosy: +r.david.murray resolution: -> fixed status: open -> closed type: -> behavior ___ Python tracker ___ __

[issue14555] clock_gettime/settime/getres: Add more clock identifiers

2012-04-11 Thread R. David Murray
Changes by R. David Murray : -- type: -> enhancement ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://ma

[issue14554] test module: correction

2012-04-11 Thread Georg Brandl
Georg Brandl added the comment: I think a patch is missing :) -- nosy: +georg.brandl ___ Python tracker ___ ___ Python-bugs-list mail

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread sbt
sbt added the comment: > That's a problem indeed. Perhaps we need a global "fork lock" shared > between subprocess and multiprocessing? I did an atfork patch which included a (recursive) fork lock. See http://bugs.python.org/review/6721/show The patch included changes to multiprocessing

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-11 Thread Brett Cannon
Brett Cannon added the comment: Once importlib bootstrapping lands and I expose the rest of the API you can replace imp.load_source() w/ importlib.SourceFileLoader(name, path).load_module(name) and get the same result. -- ___ Python tracker

[issue14555] clock_gettime/settime/getres: Add more clock identifiers

2012-04-11 Thread STINNER Victor
STINNER Victor added the comment: Extract of FreeBSD manpage of clock_gettime: The clock_id argument can be one of the following values: CLOCK_REALTIME, CLOCK_REALTIME_PRECISE, CLOCK_REALTIME_FAST for time that increments as a wall clock should; CLOCK_MONOTONIC, CLOCK_MONOTONIC_P

[issue14555] clock_gettime/settime/getres: Add more clock identifiers

2012-04-11 Thread STINNER Victor
New submission from STINNER Victor : Python 3.3 supports the following clock identifiers: * CLOCK_REALTIME * CLOCK_MONOTONIC * CLOCK_MONOTONIC_RAW * CLOCK_HIGHRES * CLOCK_PROCESS_CPUTIME_ID * CLOCK_THREAD_CPUTIME_ID Linux has more clocks: * CLOCK_BOOTTIME * CLOCK_REALTIME_COARSE * CLO

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide added the comment: Will do! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pytho

[issue14554] test module: correction

2012-04-11 Thread Tshepang Lekhonkhobe
New submission from Tshepang Lekhonkhobe : add missing '\n' -- assignee: docs@python components: Documentation messages: 158082 nosy: docs@python, tshepang priority: normal severity: normal status: open title: test module: correction versions: Python 2.7, Python 3.2, Python 3.3

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Hmm... > I don't really like disabling GC, because it has a process-wide side > effect, and hence isn't thread-safe: if another thread forks() or > creates a subprocess right at the wrong time, it could end up with the > GC disabled for good... That's a probl

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: Hmm... I don't really like disabling GC, because it has a process-wide side effect, and hence isn't thread-safe: if another thread forks() or creates a subprocess right at the wrong time, it could end up with the GC disabled for good... -- ___

[issue11501] distutils.archive_util should handle absence of zlib module

2012-04-11 Thread Éric Araujo
Éric Araujo added the comment: Reopening for 2.7.4. -- assignee: tarek -> eric.araujo resolution: fixed -> stage: committed/rejected -> commit review status: closed -> open versions: +Python 2.7 ___ Python tracker

[issue14553] http.server module: grammar fix

2012-04-11 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- assignee: docs@python components: Documentation files: grammar.diff keywords: patch nosy: docs@python, tshepang priority: normal severity: normal status: open title: http.server module: grammar fix versions: Python 3.2, Python 3.3 Added file: http://b

[issue14552] test module: remove repetition

2012-04-11 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- assignee: docs@python components: Documentation files: repetition.diff keywords: patch nosy: docs@python, tshepang priority: normal severity: normal status: open title: test module: remove repetition Added file: http://bugs.python.org/file25182/repeti

[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > I think it's bundled with our copy of libffi. > > i'm not familiar - at all - with libffi. > But does it really need a bundled malloc() implementation? Well, the upstream libffi includes dlmalloc.c, so I guess it somehow needs it (perhaps only on certain p

[issue14540] Crash in Modules/_ctypes/libffi/src/dlmalloc.c on ia64-hp-hpux11.31

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > I think it's bundled with our copy of libffi. i'm not familiar - at all - with libffi. But does it really need a bundled malloc() implementation? > I'd be more than happy to use my own installation of libffi instead, but it > seems the --with-syste

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > Ok, doc improved in 9d4109af8f3b. LGTM. Kristján, how about updating your patch to only fix the original problem you spotted (notify() called before wait()), then we can see the remaining parts? -- ___ P

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > Given that this issue has affected a lot of security-sensitive third-party > code (keyczar, openid providers, almost every python web service that > implements "secure cookies" [1] or other HMAC-based REST API signatures), I > do like the idea of a

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-11 Thread R. David Murray
R. David Murray added the comment: OK, the text at the start of the section, that I didn't notice in the 2.7 docs, says they are obsolete and replaced by find_module and import_module. But load_source is much more convenient, so I for one am not going to remove my use of it in the tests I ju

[issue14444] Virtualenv not portable from Python 2.7.2 to 2.7.3 (os.urandom missing)

2012-04-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Closing, now that we've released finals. -- resolution: -> invalid status: open -> closed ___ Python tracker ___ __

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hmm, yes, I don't remember exactly why, but it seems they were deprecated ("obsolete"), so it sounds reasonable to un-document them. -- ___ Python tracker ___

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Shouldn't there be a try..finally, in case os.fork() fails? -- ___ Python tracker ___ ___ Python-bu

[issue14508] gprof2html is broken

2012-04-11 Thread R. David Murray
R. David Murray added the comment: Thanks for the patch. I don't think you ran the test though, since it didn't pass, and there was a mistake in your patch :) I had to change the test considerably, and only applied the test part on 3.3 since I used mock. -- resolution: -> fixed sta

[issue14508] gprof2html is broken

2012-04-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4d603d6782db by R David Murray in branch '3.2': #14508: make gprof2html script runnable under python3 http://hg.python.org/cpython/rev/4d603d6782db New changeset 73fba223c0a5 by R David Murray in branch 'default': #14508: make gprof2html script run

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

2012-04-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hello Glenn, Your suggestions were valid. I have made those changes in the code. Thanks! I think, we can close this bug now and move over to others. Thanks, Senthil -- status: open -> closed ___ Python tracker

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

2012-04-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset c67efb8ffca4 by Senthil Kumaran in branch '2.7': Issue 10484 - Incorporate improvements to CGI module - Suggested by Glenn Linderman. Refactor code and tests http://hg.python.org/cpython/rev/c67efb8ffca4 New changeset fc001124a3ee by Senthil Kumar

[issue14551] imp.load_source docs removed from python3 docs...is this correct?

2012-04-11 Thread R. David Murray
New submission from R. David Murray : This was removed in 2cf7bb2bbfb8 along with a bunch of other functions. Yet in issue 13959 Brett mentions needing to implement it. I don't see any replacement for its functionality in importlib, so I would think it would be a function we would want to ke

[issue4892] Sending Connection-objects over multiprocessing connections fails

2012-04-11 Thread sbt
sbt added the comment: The last patch did not work on Unix. Here is a new version where the reduction functions are automatically registered, so allow_connection_pickling() is redundant. -- Added file: http://bugs.python.org/file25181/mp_pickle_conn.patch

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread sbt
sbt added the comment: Patch to disable gc. -- keywords: +patch Added file: http://bugs.python.org/file25180/mp_disable_gc.patch ___ Python tracker ___ _

[issue14515] tempfile.TemporaryDirectory documented as returning object but returns name

2012-04-11 Thread R. David Murray
R. David Murray added the comment: I misread the docs. They aren't wrong, but it is still the case that they don't mention that the directory name is what you get on entry to the context, which is what led to my confusion. Here's a patch. -- keywords: +patch nosy: +ncoghlan Added

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, doc improved in 9d4109af8f3b. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubs

[issue14550] os.path.abspath() should have an option to use PWD

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, reformulating the title a bit. -- components: +Library (Lib) -None title: os.path.abspath() returns physical path, not logical path. -> os.path.abspath() should have an option to use PWD versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, P

[issue14550] os.path.abspath() returns physical path, not logical path.

2012-04-11 Thread Craig Sawyer
Craig Sawyer added the comment: Antoine, I see your point about getcwd() not having symlinks, doesn't mean any path outside of getcwd() might have symlinks, and I agree this is true. I apologize. As for which one to choose, it should choose based on PWD (i.e. the current working directory's

[issue14549] Recursive inclusion of packages

2012-04-11 Thread Éric Araujo
Éric Araujo added the comment: IMO the best behavior would be to always recurse and have an option to exclude specific submodules. When the Django devs want to package their code, they think about a Python package named django, docs and scripts, not about django, django.views, django.http, e

[issue14550] os.path.abspath() returns physical path, not logical path.

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > while abspath() uses getcwd() but because of POSIX.1-2008 (IEEE Std > 1003.1-2008) says os.getcwd() returns without symbolic links as well, > so os.path.abspath() == os.path.realpath() near as I can tell. Just because getcwd() doesn't contain any symbolic lin

[issue14547] Python symlink to script behaves unexpectedly

2012-04-11 Thread R. David Murray
R. David Murray added the comment: The content of a symbolic symlink is a symbolic reference to another location in the file system. If you had used a hard link it would certainly work as you expected. The behavior with respect to symbolic links ought to be documented here: http://docs.py

[issue14550] os.path.abspath() returns physical path, not logical path.

2012-04-11 Thread Craig Sawyer
New submission from Craig Sawyer : we have os.path.abspath() and os.path.realpath(). the difference according to the documentation is realpath() returns the physical path (i.e. no symlinks in the path). while abspath() uses getcwd() but because of POSIX.1-2008 (IEEE Std 1003.1-2008) says os.

[issue14549] Recursive inclusion of packages

2012-04-11 Thread Erik Bray
Erik Bray added the comment: Potential downside: Say I have foo, foo.bar, and foo.tests. I want to install foo and foo.bar, but not foo.tests. Then I have to manually list all the packages I do want: packages = foo foo.bar That's fine, but one nice thing about find_packages is that

[issue14549] Recursive inclusion of packages

2012-04-11 Thread Erik Bray
Erik Bray added the comment: +1 for the wildcard syntax. -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: ht

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread Nadeem Vawda
Changes by Nadeem Vawda : -- nosy: +nadeem.vawda ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue14549] Recursive inclusion of packages

2012-04-11 Thread Éric Araujo
New submission from Éric Araujo : For projects with more than a few packages, it is tedious to list all subpackages manually in setup.cfg. There was once a find_packages in distutils2.util (copied from distribute), but when we moved away from setup.py it was removed (I don’t remember all the

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Disabling gc during fork seems to prevent the errors. Sounds reasonable to me. -- components: +Library (Lib) nosy: +neologix, pitrou type: -> behavior versions: +Python 2.7, Python 3.2, Python 3.3 ___ Python trac

[issue13903] New shared-keys dictionary implementation

2012-04-11 Thread Mark Shannon
Mark Shannon added the comment: I don't really understand your objection to changing the method-cache size. As I said, I can remove the change, but that will cause the performance regression that Antoine noticed. -- ___ Python tracker

[issue14545] html module should not be available in Python 3.1

2012-04-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2776ccf003cc by Georg Brandl in branch '3.2': Closes #14545: make clearer what was added. http://hg.python.org/cpython/rev/2776ccf003cc New changeset f5f8a7fd881c by Georg Brandl in branch 'default': #14545: merge 3.2 http://hg.python.org/cpython/r

[issue14548] garbage collection just after multiprocessing's fork causes exceptions

2012-04-11 Thread sbt
New submission from sbt : When running test_multiprocessing on Linux I occasionally see a stream of errors caused by ignored weakref callbacks: Exception AssertionError: AssertionError() in ignored These do not cause the unittests to fail. Finalizers from the parent process are supposed to

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-11 Thread Vinay Sajip
Vinay Sajip added the comment: > But why on earth would one want a BOM in UTF-8-encoded data? It is > byte-order independent! Lord only knows, but the RFC does call for it - msg157572 has an actual excerpt from RFC 5424. -- ___ Python tracker

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-11 Thread Tim Golden
Tim Golden added the comment: It's used by some systems (Windows Notepad does this if you save as UTF8) to indicate that the byte stream *is* UTF8-encoded. It's not so much a BOM as a magic cookie. I can't speak for syslog, I'm afraid TJG -- nosy: +tim.golden

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-11 Thread Guido van Rossum
Guido van Rossum added the comment: But why on earth would one want a BOM in UTF-8-encoded data? It is byte-order independent! -- nosy: +gvanrossum ___ Python tracker ___

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide added the comment: > One thing that could definitely be interesting is to look through the > code base and example to see if a similar - but vulnerable - pattern > is used, and fix such occurrences. Based on some quick greps, I didn't see many internal users of hmac and the curre

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread R. David Murray
R. David Murray added the comment: It would also be reasonable to add a comment to the code mentioning why this particular (security) comparison is *not* vulnerable to a timing attack, which would serve the education purpose if someone does look at the code. -- nosy: +r.david.murray

[issue14341] sporadic (?) test_urllib2 failures

2012-04-11 Thread Senthil Kumaran
Senthil Kumaran added the comment: Hi Antoine, I saw that check_warnings was commonly used ( and perhaps I had used to earlier without any problems) and overlooked assertWarns. But I think, it is good to remove support.check_warnings dependency here and just use assertWarnings. Let me see

[issue14341] sporadic (?) test_urllib2 failures

2012-04-11 Thread Roundup Robot
Roundup Robot added the comment: New changeset 751c7b81f6ee by Senthil Kumaran in branch 'default': use assertWarns instead of check_warnings - Issue14341 http://hg.python.org/cpython/rev/751c7b81f6ee -- nosy: +python-dev ___ Python tracker

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Bill Jefferson
Bill Jefferson added the comment: Mark and Eric.. Wonderful! I got it now. I used x.sort(reverse=True) and x.sort(reverse=False) and it works just fine. Thanks for your help. Bill..   Regards from: William Jefferson Photography 514 Daniels St., #211 Raleigh, NC 27605 Cell Phone: (919

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread sbt
sbt added the comment: I think it would be reasonable to add a safe comparison function to hmac. Its documentation could explain briefly when it would be preferable to "==". -- ___ Python tracker _

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > You call it obfuscating, I call it security correctness and developer > education. Tomayto, tomahto. ;-) Well, I'd be prompt to changing to a more robust digest check algorithm if the current one had a flaw, but AFAICT, it's not the case (but I'm no

[issue14547] Python symlink to script behaves unexpectedly

2012-04-11 Thread Johannes Buchner
New submission from Johannes Buchner : If I have a script foo/bar.py import baz and create a symlink to it, called barhere.py ln -s foo/bar.py barhere.py when I run it, it behaves unexpectedly, specifically it behaves differently than if I had copied it here. It prefers to import baz from f

[issue14546] lll.py can't handle multiple parameters correctly

2012-04-11 Thread R. David Murray
R. David Murray added the comment: Thanks for the patch. Do you have any interest in writing a test for this? Tests for tools go in Lib/test/test_tools.py. -- nosy: +r.david.murray stage: -> test needed type: -> behavior versions: +Python 3.2, Python 3.3 -Python 3.4 __

[issue14546] lll.py can't handle multiple parameters correctly

2012-04-11 Thread Carton He
New submission from Carton He : Space errors in calling of lll(arg) of main() cause it only applies to the last parameter instead of all parameters. Patch attached for Python 3.1 -- components: Demos and Tools files: lll.py.patch keywords: patch messages: 158036 nosy: carton priority:

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide added the comment: You call it obfuscating, I call it security correctness and developer education. Tomayto, tomahto. ;-) Anywho, your call of course, feel free to close. -- ___ Python tracker

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: I don't see the point of obfuscating the code to avoid a vulnerability to which the code is not even vulnerable, just so that it can be used as example... There are *thousands* of ways to introduce security flaws, and the Python code base if not a secur

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide added the comment: Ah yeah, I suppose it's not be exploitable in this case due to the challenge nonce. However, it might still be a good thing to fix for to set an example for other hmac module users (internal or external) that might not have the same situation. -- ___

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Jon Oberheide
Jon Oberheide added the comment: In fact, it'd probably be useful to have a time_independenct_comparison() helper function somewhere in general. -- ___ Python tracker ___ _

[issue1522400] irda socket support

2012-04-11 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +neologix ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.py

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, Mark. Indeed, my answer as written is meaningless. I meant it doesn't sort in reverse, it just reverses. -- ___ Python tracker ___ ___

[issue14452] SysLogHandler sends invalid messages when using unicode

2012-04-11 Thread Vinay Sajip
Vinay Sajip added the comment: I have a possible suggestion about how to resolve this issue: The SysLogHandler will not do BOM insertion unless the message is Unicode. If it is Unicode, it will add the attribute 'UTF8BOM' to the LogRecord, with the value u'\ufeff'. The record will then be for

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Mark Dickinson
Mark Dickinson added the comment: Bill, list.reverse doesn't do any *sorting* at all; it merely *reverses* the list contents. >>> x = [1, 3, 4, 2] >>> x.reverse() >>> x [2, 4, 3, 1] If you want to do a reverse sort, you can either first sort normally and then reverse the result, or (easier

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > According to PEP 384 (Defining a Stable ABI) the thread state object > is opaque, so we should be free to add or remove fields. Mmh, be aware the stable ABI is only a restricted part of the official API. There are APIs which are not part of the stable ABI, bu

[issue13897] Move fields relevant to sys.exc_info out of frame into generator/threadstate

2012-04-11 Thread Mark Shannon
Mark Shannon added the comment: According to PEP 384 (Defining a Stable ABI) the thread state object is opaque, so we should be free to add or remove fields. Nevertheless, I have added a new patch that simply moves the f_exc... fields from the frame object to the generator. It is not as effic

[issue14542] reverse() doesn't reverse sort correctly

2012-04-11 Thread Bill Jefferson
Bill Jefferson added the comment: Eric. Thanks for answering, but I don't understand the difference between "reversing a list" and "reversing it's current values". If I have a list containing elements: A, B, C, D and reverse the list's current values, I get: D, C, B, A, which is the same

[issue14432] Bug in generator if the generator in created in a C thread

2012-04-11 Thread Mark Shannon
Mark Shannon added the comment: Rather than ensuring that f_tstate always points to the current frame, just remove it altogether. Patch attached -- nosy: +Mark.Shannon Added file: http://bugs.python.org/file25176/remove_f_tstate.patch ___ Python tra

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

2012-04-11 Thread Yap Sok Ann
Yap Sok Ann added the comment: On 64-bit Windows with Visual Studio 2008 Professional, I also need to apply vcvars4.diff to avoid getting the ValueError. Is this something to be expected? -- nosy: +sayap ___ Python tracker

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le mercredi 11 avril 2012 à 11:32 +, Charles-François Natali a écrit : > One can imagine, for example, that another implementation (or maybe > CPython in a later version) exposes native condition variables on > POSIX, instead of emulating them (e.g. what hap

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: [...] > Disagreed. Unit tests should definitely protect against the introduction > of bugs (willingly or not). And unpredictable behaviour is usually > considered a bug. > > If you think the condition variable specification should be changed, you > can

[issue14532] multiprocessing module performs a time-dependent hmac comparison

2012-04-11 Thread Charles-François Natali
Charles-François Natali added the comment: > if response == digest: > can be replaced by: >    if sum(x^y for x, y in itertools.zip_longest(response, digest, > fillvalue=256)) == 0: Yeah, sure, but is it useful at all? The digest changes at every connection attempt, so this should not be exploi

[issue1522400] irda socket support

2012-04-11 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscr

[issue8536] Support new features of ZLIB 1.2.4

2012-04-11 Thread Martin v . Löwis
Changes by Martin v. Löwis : -- keywords: -easy ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyt

[issue8799] Hang in lib/test/test_threading.py

2012-04-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Le mercredi 11 avril 2012 à 10:50 +, Kristján Valur Jónsson a écrit : > > But, once again, "the condition may not yet hold true" is false. > In our current implementation, yes. But it is intentionally left > undefined in the specification of the condition v

  1   2   >