[issue10281] Exception raised when an NNTP overview field is absent

2010-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch trying to better handle whitespace. Would it be ok for you? -- Added file: http://bugs.python.org/file19473/nntpover2.patch ___ Python tracker <http://bugs.python.org/issue10

[issue10281] Exception raised when an NNTP overview field is absent

2010-11-02 Thread Antoine Pitrou
Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file19473/nntpover2.patch ___ Python tracker <http://bugs.python.org/issue10281> ___ ___ Python-bug

[issue10281] Exception raised when an NNTP overview field is absent

2010-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Oops, sorry. -- Added file: http://bugs.python.org/file19474/nntpover2.patch ___ Python tracker <http://bugs.python.org/issue10

[issue1926] NNTPS support in nntplib

2010-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > * the command-line option for the SSLContext won't work, since a > > context is a custom object, not a string; I would rework this part > > anyway, since I don't think separate options for the "SSL host" are > >

[issue10173] Don't pickle TestCase instances in test_multiprocessing

2010-11-02 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r86130 (3.2), r86131 (2.7) and r86132 (3.1). -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10295] _socket.pyd uses winsock2, select.pyd uses winsock 1

2010-11-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +loewis ___ Python tracker <http://bugs.python.org/issue10295> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10284] NNTP should accept bytestrings for username and password

2010-11-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- resolution: invalid -> stage: committed/rejected -> needs patch status: closed -> open title: Exception raised when decoding NNTP newsgroup descriptions -> NNTP should accept bytestrings for username

[issue2281] Enhanced cPython profiler with high-resolution timer

2010-11-03 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +krisvale ___ Python tracker <http://bugs.python.org/issue2281> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10281] Exception raised when an NNTP overview field is absent

2010-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, committed in r86139. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10282] IMPLEMENTATION token differently delt with in NNTP capability

2010-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Rather than special casing the dict item, I would rather add an "nntp_implementation" attribute containing the desired value. > Besides, shouldn't it be checked that the line is not empty, before > splitting it? If the line is emp

[issue10285] Other status field flags in documentation for NNTP LIST command

2010-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: Improvement committed in r86140, thank you! -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue10273] Clean-up Unittest API

2010-11-03 Thread Antoine Pitrou
Antoine Pitrou added the comment: > For assertItemsEqual Raymond suggests assertElementCountsEqual. See > issue 10242. Why replace a long awkward name with an even longer and more awkward name? -- ___ Python tracker <http://bugs.p

[issue9611] FileIO not 64-bit safe under Windows

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > About the issue, I'd suggest to just clamp the length to 2**32-1, and > don't bother retrying; leave this to the buffered layer. Yes, I think it's reasonable. (or perhaps clamp to something page-aligned, such as 2**32-4096). Also, the s

[issue10311] Signal handlers must preserve errno

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: This is a good idea IMO. It would be better if you minimized style changes, so that the patch is easier to review. Also, is the while loop around write() necessary here? -- nosy: +exarkun, loewis, pitrou stage: -> patch review versions: +Python

[issue10312] intcatcher() can deadlock

2010-11-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson ___ Python tracker <http://bugs.python.org/issue10312> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10309] dlmalloc.c needs _GNU_SOURCE for mremap()

2010-11-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- assignee: -> theller nosy: +theller ___ Python tracker <http://bugs.python.org/issue10309> ___ ___ Python-bugs-list mai

[issue10310] signed:1 bitfields rarely make sense

2010-11-04 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +amaury.forgeotdarc stage: -> patch review versions: +Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/issu

[issue10306] Weakref callback exceptions should be turned into warnings.

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: The behaviour of weakrefs here mirrors what is already done for __del__ exceptions. Using warnings would mean that exceptions can get silenced implicitly (for example, if an exception happens twice at the same location) which is not very Pythonic: generally

[issue10311] Signal handlers must preserve errno

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > ["this" = only saving/restoring errno when needed] > True, but practically nothing is officially safe to do in signal > handlers, so it's good to avoid code which can be avoided there. > If one can be bothered to, that is. I thi

[issue10311] Signal handlers must preserve errno

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: By the way, I'd like to clear out a potential misunderstanding: the function you are patching doesn't call Python signal handlers in itself (those registered using signal.signal()). It only schedules them for later execution. If you want to save er

[issue10314] Improve JSON encoding with sort_keys=True

2010-11-04 Thread Antoine Pitrou
New submission from Antoine Pitrou : This patch makes sorting of keys when encoding a dict into JSON faster by not calling pure Python code. -- components: Library (Lib) files: jsonsort.patch keywords: patch messages: 120418 nosy: pitrou priority: normal severity: normal status: open

[issue10314] Improve JSON encoding with sort_keys=True

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, committed in r86169. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/i

[issue9611] FileIO not 64-bit safe under Windows

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I propose a different solution: On Windows, instead of calling > write(), we call WriteFile directly. If I'm not mistaken, WriteFile takes the length as a DWORD, which is still 32 bits under Win64. -- ___

[issue10293] PyMemoryView object has obsolete members

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, there's this strange-looking thing in PyMemoryView_GetContiguous: if (buffertype == PyBUF_SHADOW) { /* return a shadowed memory-view object */ view->buf = dest; mem->base = PyTuple_Pack(2, obj, bytes); ... but I d

[issue10293] PyMemoryView object has obsolete members

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Done in r86174. -- resolution: -> fixed status: open -> closed ___ Python tracker <http://bugs.python.org/issue10293> ___ __

[issue3699] test_bigaddrspace broken

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've made cosmetic changes and applied in r86175 (3.2) and r86176 (3.1). Thank you! -- priority: high -> normal resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _

[issue10313] Reassure user: test_os BytesWarning is OK

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: I guess you're not seeing them because Victor silenced them a couple of days ago in r85902. Hallvard, if you update your py3k working copy, do these warnings disappear? -- nosy: +pitrou ___ Python tracker

[issue10302] Add class-functions to hash many small objects with hashlib

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: This sounds dangerously like a micro-optimization to me, and I'm not sure an additional API is ok for that. -- nosy: +gregory.p.smith, pitrou ___ Python tracker <http://bugs.python.org/is

[issue9611] FileIO not 64-bit safe under Windows

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > On a second thought... is there another example where a *blocking* > stream does not write all the data without raising an exception? It can happen with pipes or sockets, if some buffer can only store part of the data. Or any regular stream if a sig

[issue10283] New parameter for an NNTP newsgroup pattern in LIST ACTIVE

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: That's a fine addition, I've committed it in r86177. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs

[issue10279] test_gc failure on Windows x64

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: %Id is actually the expansion of PY_FORMAT_SIZE_T. Include/pyport.h says: /* PY_FORMAT_SIZE_T is a platform-specific modifier for use in a printf * format to convert an argument with the width of a size_t or Py_ssize_t. * C99 introduced "z" for th

[issue10279] test_gc failure on Windows x64

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, the issue seems to be simpler. This piece of code calls PyErr_WarnFormat, which doesn't use the platform's printf but Python's own format codes as documented in http://docs.python.org/dev/c-api/unicode.html#PyUnicode_FromFormat

[issue10279] test_gc failure on Windows x64

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Could you check the following patch works for you? -- assignee: -> brian.curtin keywords: +patch Added file: http://bugs.python.org/file19499/gcprint.patch ___ Python tracker <http://bugs.python.org/issu

[issue10302] Add class-functions to hash many small objects with hashlib

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Thanks for your comment; it is a very valid point to consider. > However, as a vector-based implementation is roughly three to four > times faster than what the current API can provide by design (reduced > overhead and GIL-relaxation not incl

[issue10279] test_gc failure on Windows x64

2010-11-04 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r86179. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10327] Abnormal SSL timeouts when using socket timeouts - once again

2010-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > When using socket timeouts (eg. with socket.setdefaulttimeout()), > whatever the timeout I use (eg. 10 seconds), I begin having random > "SSLError: The read operation timed out" exceptions in my http calls, > via urlopen or 3rd party

[issue10329] trace.py and unicode in Python 3

2010-11-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- components: +Library (Lib) nosy: +belopolsky stage: -> patch review type: -> behavior versions: +Python 3.1, Python 3.2 ___ Python tracker <http://bugs.python.org/i

[issue10329] trace.py and unicode in Python 3

2010-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I would be +0 on adding errors='replace' or 'backshlashreplace' to the > open() call in write_results_file(), but hardcoding encoding="utf-8" > is definitely not the right thing to do. Who are the consumer

[issue1346238] A constant folding optimization pass for the AST

2010-11-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +benjamin.peterson versions: +Python 3.2 -Python 2.6 ___ Python tracker <http://bugs.python.org/issue1346238> ___ ___ Pytho

[issue10282] IMPLEMENTATION token differently delt with in NNTP capability

2010-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed the new attribute in r86213. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.pyth

[issue10311] Signal handlers must preserve errno

2010-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, fixed in r86214 (3.x), r86215 (3.1) and r86216 (2.7). Thanks for the patch! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http://bug

[issue10330] trace module doesn't work without threads

2010-11-05 Thread Antoine Pitrou
New submission from Antoine Pitrou : The trace module doesn't work when threading is disabled ("./configure --without-threads"). The following patch fixes this: diff -r 345827dcf409 Lib/trace.py --- a/Lib/trace.py Fri Nov 05 20:58:28 2010 +0100 +++ b/Lib/trace.py Fri

[issue10180] File objects should not pickleable

2010-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r86220. I won't backport it since it would risk breaking existing code, although relying on this is really a bug in itself. -- resolution: -> fixed stage: -> committed/rejected status: ope

[issue10331] test_gdb failure when warnings printed out

2010-11-05 Thread Antoine Pitrou
New submission from Antoine Pitrou : There is this kind of failures on Barry's new buildbot. It looks like warning messages should be ignored when checking gdb output: == FAIL: test_NULL_ob

[issue10332] Multiprocessing maxtasksperchild results in hang

2010-11-05 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +asksol, jnoller type: -> behavior versions: +Python 2.7, Python 3.1 ___ Python tracker <http://bugs.python.org/issu

[issue10333] Remove ancient backwards compatibility GC API

2010-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: Looks good to me. I suppose everything builds fine? -- components: +Extension Modules, Interpreter Core nosy: +pitrou stage: -> commit review versions: +Python 3.2 ___ Python tracker <http://bugs.pyth

[issue10330] trace module doesn't work without threads

2010-11-05 Thread Antoine Pitrou
Antoine Pitrou added the comment: > dummy_threading feels a bit like black magic to me. What do you think > about something like issue10330.diff attached. It's fine for me. -- ___ Python tracker <http://bugs.python.

[issue1926] NNTPS support in nntplib

2010-11-06 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the patch, Andrew. It looks mostly good. I would rename setreadermode to _setreadermode (there's no reason to make it public IMO). Also, I would not explicitly check "STARTTLS" in the capabilities. It the server doesn't support

[issue10339] test_lib2to3 leaks

2010-11-06 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is only on 3.1: $ ./python -m test.regrtest -R 3:3 test_lib2to3 test_lib2to3 beginning 6 repetitions 123456 No handlers could be found for logger "RefactoringTool" .. test_lib2to3 leaked [32, 32, 32] references, sum=96 -

[issue10347] regrtest progress counter makes -f option less useful

2010-11-07 Thread Antoine Pitrou
New submission from Antoine Pitrou : The regrtest progress counter ("[ 1/350]") is very nice but makes it less practical to use the "-f" option to regrtest. -- components: Tests messages: 120684 nosy: georg.brandl, pitrou priority: low severity: normal status:

[issue10329] trace.py and unicode in Python 3

2010-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: For the record, the test failure can reproduced by the following: $ LANG=C ./python -m test.regrtest test_imp test_trace [1/2] test_imp [2/2] test_trace /home/antoine/py3k/__svn__/Lib/unittest/case.py:402: ResourceWarning: unclosed file <_io.TextIOWrap

[issue10347] regrtest progress counter makes -f option less useful

2010-11-07 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in r86307. -- resolution: -> fixed stage: -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10359] ISO C cleanup

2010-11-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +amaury.forgeotdarc ___ Python tracker <http://bugs.python.org/issue10359> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10348] multiprocessing: use SysV semaphores on FreeBSD

2010-11-08 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +asksol ___ Python tracker <http://bugs.python.org/issue10348> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10360] _weakrefset.WeakSet.__contains__ should not propagate TypeErrors

2010-11-08 Thread Antoine Pitrou
Antoine Pitrou added the comment: What is the behaviour of WeakKeyDictionary here? I don't really agree that TypeError should be silenced. -- nosy: +pitrou versions: +Python 3.2 ___ Python tracker <http://bugs.python.org/is

[issue10372] [REGRESSION] test_gc fails in non-debug mode.

2010-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: For some reason, this starts happening with the Lib/tokenize.py change in r86346. Resource warnings don't get enabled by -Wd: With r86345: $ ./python -Wd -c "open('LICENSE')" -c:1: ResourceWarning: unclosed file <_io.TextIOWrap

[issue10372] [REGRESSION] test_gc fails in non-debug mode.

2010-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Weirdly, this patch fixes the issue, but I'm unable to say why: diff -r cd1de1ff2657 Lib/tokenize.py --- a/Lib/tokenize.py Tue Nov 09 02:08:59 2010 +0100 +++ b/Lib/tokenize.py Tue Nov 09 17:16:21 2010 +0100 @@ -24,12 +24,12 @@ __author__ = 'K

[issue10372] [REGRESSION] test_gc fails in non-debug mode.

2010-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: One observation is that when the -W option is used, the "warnings" module gets loaded very early and itself imports linecache which then imports tokenize. At this point, the standard IO streams have not been initialized (_io is imported late

[issue10372] [REGRESSION] test_gc fails in non-debug mode.

2010-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. It moves warnings initialization after io initialization (the latter being arguably more critical than the former). Also adds two tests. -- assignee: haypo -> keywords: +patch stage: needs patch -> patch review versions: +Pyth

[issue1926] NNTPS support in nntplib

2010-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: I have committed the patch in r86365, and I've made usenetrc False by default in r86366. Thanks for contributing! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed

[issue10022] Emit more information in decoded SSL certificates

2010-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed in r86369. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue4471] IMAP4 missing support for starttls

2010-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've committed some of the remote tests in r86380, which also helped me fix a bug in login() in 3.x. -- nosy: +pitrou ___ Python tracker <http://bugs.python.org/i

[issue4471] IMAP4 missing support for starttls

2010-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: The shutdown change was committed in r86383. -- ___ Python tracker <http://bugs.python.org/issue4471> ___ ___ Python-bugs-list m

[issue4471] IMAP4 missing support for starttls

2010-11-09 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is an updated STARTTLS patch for py3k. -- stage: -> patch review type: -> feature request versions: +Python 3.2 -Python 2.6 Added file: http://bugs.python.org/file19562/imaptls.patch ___ Python tracker

[issue10383] test_os leaks under Windows

2010-11-11 Thread Antoine Pitrou
New submission from Antoine Pitrou : Y:\>py3k\__svn__\PCbuild\python_d.exe -m test.regrtest -R 3:2 test_os [1/1] test_os [33558 refs] beginning 5 repetitions 12345 [33558 refs] .[33558 refs] .[33558 refs] .[33558 refs] .[33558 refs] . test_os leaked [3, 3] references, sum=6 1 test fai

[issue10372] [REGRESSION] test_gc fails in non-debug mode.

2010-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed in r86395 (3.x); I've only backported the tests to 2.7 and 3.1. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Python tracker <http:

[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2010-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Should we escalate this issue to CVA for Python 2.x? It's more of a missing feature than a security issue in itself, although the missing feature has to do with security. -- ___ Python tracke

[issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate

2010-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: > > > > It's more of a missing feature than a security issue in itself, although > > the missing feature has to do with security. > > Still it would be nice to see in python 2.x at some point don't you think? Well, lots

[issue8804] http.client should support SSL contexts

2010-11-11 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed as part of #9003. -- resolution: -> duplicate status: open -> closed superseder: -> urllib.request and http.client should allow certificate checking ___ Python tracker <http://bugs.python.o

[issue10359] ISO C cleanup

2010-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Stable branches (2.7 and 3.1) only get bug fixes, not new features or > code cleanups. Éric, making code compliant *is* a bug fix (admittedly of minor importance here, since all modern compilers accept the non-compliant code anyway). -

[issue1625576] add ability to specify name to os.fdopen

2010-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The requested feature would require an additional argument to fdopen() and open(), which already have many args. It would be better IMO to make the `name` attribute on file objects writeable. By the way, right now (in 3.x) fdopen() gives you the file

[issue4471] IMAP4 missing support for starttls

2010-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: The starttls patch has been committed in r86431. Thank you very much for writing the initial patch. -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed ___ Pytho

[issue10397] Unified Benchmark Suite fails on py3k with --track-memory

2010-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Please note that some benchmarks are now natively py3k-compatible, you don't have to run make_perf3.sh. Anyway, the patch is now pushed to http://hg.python.org/benchmarks/rev/7c7dc1c4d8d4, thank you! -- resolution: -> fixed status: open -

[issue10399] AST Optimization: inlining of function calls

2010-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: As I understand it, functions are "name-resolved" before the arguments are evaluated, There is no difference between resolution of function names and of other names. For example, global names (LOAD_GLOBAL) are resolved entirely at runtime (just

[issue10401] Globals / builtins cache

2010-11-12 Thread Antoine Pitrou
New submission from Antoine Pitrou : Here is the Nth patch for a globals/builtins cache. As other caches at the same kind, it shows very small to no gain on non-micro benchmarks, showing that contrary to popular belief, globals/builtins lookup are not a major roadblock in today's P

[issue10399] AST Optimization: inlining of function calls

2010-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Globals cache patch posted on issue10401. -- ___ Python tracker <http://bugs.python.org/issue10399> ___ ___ Python-bugs-list m

[issue10284] NNTP should accept bytestrings for username and password

2010-11-12 Thread Antoine Pitrou
Antoine Pitrou added the comment: Hello Julien, > That's one of the reasons why AUTHINFO SASL is better than AUTHINFO > USER. It also allows whitespaces (a few news servers do not parse > well whitespaces in user names or passwords after AUTHINFO USER/PASS > -- imagine "

[issue10402] sporadic test_bsddb3 failures

2010-11-12 Thread Antoine Pitrou
New submission from Antoine Pitrou : test_bsddb3 often produces the following failure under the Windows buildbots. It could probably be solved by choosing a larger timeout (time.time() on Windows is rather imprecise): test test_bsddb3 failed -- Traceback (most recent call last): File &q

[issue10260] Add a threading.Condition.wait_for() method

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Ok, here is a new patch which slightly expands the documentation and improves > the timeout unittest. > If there are no objections I'll then commit this shortly. Again, I think you should use a larger timeout value than 0.1, to avoid intermi

[issue10116] Sporadic failures in test_urllibnet

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: There are still sporadic failures such as: == ERROR: testURLread (test.test_urllibnet.URLTimeoutTest) -- Traceback (most

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
New submission from Antoine Pitrou : This is a patch experiment which does two things: - make dicts denser by making the resize factor 2 instead of 4 for small dicts - improve cache locality on collisions by using linear probing It should be noted that these two changes are not independent

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a benchmark adapted from another bug entry (I merely adapted the dict sizes in order to better exhibit the performance degradation when the CPU cache becomes too small to hold the whole dict). Results without the patch: 1 words (9092 keys

[issue10401] Globals / builtins cache

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: There aren't many possible approaches. The more complex variants of globals caches try to also speedup writes, which is IMO a waste of time since rebinding globals is not a good coding practice, and especially not in the middle of time-critical loops.

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > My previous experiments along these lines showed it was a dead-end. > The number of probes was the most important factor and beat-out any > effort to improve cache utilization from increased density. Can you describe your experiments? What wor

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > FWIW, one way to make a dict denser without increasing the number of > probes is to use Brent's Variation of Algorithm D in Knuth. That > optimizes the insertion order to minimize the number of collisions and > lets you pack well over two-th

[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: Well, since this benchmark is already 3.x compatible, there's not much sense in making a 2to3 pass, is there? So perhaps "make_perf3.sh" (which I've never used) should be a bit smarter. -- ___ P

[issue10408] Denser dicts and linear probing

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > See Objects/dictnotes.txt for some of the results. > I spent about full month trying to optimize dict > performance either by tuning parameters or using > different algorithms. Well, I've seen those results. I'm asking about which w

[issue10411] Pickle benchmark fails after converting Benchmark Suite to py3k

2010-11-13 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Are there any files in performance/ that need 2to3? All the ones that require external libs (such as django, spambayes, etc.). Although, of course, since they require external libs it's not sure the translation will work either. I think I've

[issue10418] test_io hangs on 3.1.3rc1

2010-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: Can you run regrtest with the -v option, to know which test case fails? (we have several OS X buildbots which run this test fine, by the way, including a Snow Leopard instance) Note: 9223372036854775808 is 2**63 or 0x8000. -- nosy

[issue10418] test_io hangs on 3.1.3rc1

2010-11-14 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I ran the test with the -v option flag. The malloc error don't happen > at the same place the hang up happens. The first one happens at: The malloc error is normal, then, it's part of that test. It's a pity OS X dumps something on s

[issue10260] Add a threading.Condition.wait_for() method

2010-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Good point, Antoine. I'm always trying to keep those timeouts low, > however, to avoid having the testsuite duration grow too much with > every test :) Well, better to have slower tests than intermittently faili

[issue1326113] Letting "build_ext --libraries" take more than one lib

2010-11-15 Thread Antoine Pitrou
Antoine Pitrou added the comment: Since "--libraries" is plural, and since the help text says: --libraries (-l) external C libraries to link with it should IMO be considered a bug. (Standard UNIX linkers have a different convention: you can specify -l several times in ord

[issue10429] bug in test_imaplib

2010-11-15 Thread Antoine Pitrou
New submission from Antoine Pitrou : The following warning suggests the test is wrong: c:\buildslave-py3k\3.x.curtin-win2008-amd64\build\lib\test\test_imaplib.py:231: BytesWarning: Comparison between bytes and string self.assertFalse('LOGINDISABLED' in self.server.ca

[issue10429] bug in test_imaplib

2010-11-16 Thread Antoine Pitrou
Antoine Pitrou added the comment: This was a real bug in IMAP.starttls() actually. Fixed in r86485. -- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed ___ Python tracker <http://bugs.python.or

[issue10430] _sha.sha().digest() method is endian-sensitive. and hexdigest()

2010-11-16 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- nosy: +gregory.p.smith ___ Python tracker <http://bugs.python.org/issue10430> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue10441] some stdlib modules need to be updated to handle SSL certificate validation

2010-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: http.client and urllib.request are already done (*), and imaplib is covered in issue10274. (*) http://docs.python.org/dev/library/http.client.html http://docs.python.org/dev/library/urllib.request.html Do you have other modules in mind or should I close this

[issue10441] some stdlib modules need to be updated to handle SSL certificate validation

2010-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Are you referring to > http://code.python.org/hg/branches/py3k/rev/86f97255bfc8 > > where there is now > " > 2.29 + .. warning:: > 2.30 + If neither *cafile* nor *capath* is specified, an HTTPS > request >

[issue10441] some stdlib modules need to be updated to handle SSL certificate validation

2010-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Well, what are the usual paths for windows and linux? > Just try those(by default) and if this fails (no ca's paths work) then > raise an exception and have a parameter to disable this behaviour. That's a possible resolution, b

[issue10443] add wrapper for SSL_CTX_set_default_verify_paths

2010-11-17 Thread Antoine Pitrou
New submission from Antoine Pitrou : SSL_CTX_set_default_verify_paths allows to select the system-wide CA certificates on an SSL context, if OpenSSL was built with the right options. We could also try to expose those default paths by calling X509_get_default_cert_file

[issue10441] some stdlib modules need to be updated to handle SSL certificate validation

2010-11-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Actually, it seems OpenSSL is often built with the paths to system certificates, which can be enabled by an undocumented function. See issue10443. -- ___ Python tracker <http://bugs.python.org/issue10

<    18   19   20   21   22   23   24   25   26   27   >