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
Changes by Antoine Pitrou :
Removed file: http://bugs.python.org/file19473/nntpover2.patch
___
Python tracker
<http://bugs.python.org/issue10281>
___
___
Python-bug
Antoine Pitrou added the comment:
Oops, sorry.
--
Added file: http://bugs.python.org/file19474/nntpover2.patch
___
Python tracker
<http://bugs.python.org/issue10
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
> >
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
Changes by Antoine Pitrou :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue10295>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
Changes by Antoine Pitrou :
--
nosy: +krisvale
___
Python tracker
<http://bugs.python.org/issue2281>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
Ok, committed in r86139.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
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
Antoine Pitrou added the comment:
Improvement committed in r86140, thank you!
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
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
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
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
Changes by Antoine Pitrou :
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.org/issue10312>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Antoine Pitrou :
--
assignee: -> theller
nosy: +theller
___
Python tracker
<http://bugs.python.org/issue10309>
___
___
Python-bugs-list mai
Changes by Antoine Pitrou :
--
nosy: +amaury.forgeotdarc
stage: -> patch review
versions: +Python 2.7, Python 3.1
___
Python tracker
<http://bugs.python.org/issu
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
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
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
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
Antoine Pitrou added the comment:
Ok, committed in r86169.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/i
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.
--
___
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
Antoine Pitrou added the comment:
Done in r86174.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10293>
___
__
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
_
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
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
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
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
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
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
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
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
Antoine Pitrou added the comment:
Committed in r86179.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
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
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
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
Changes by Antoine Pitrou :
--
nosy: +benjamin.peterson
versions: +Python 3.2 -Python 2.6
___
Python tracker
<http://bugs.python.org/issue1346238>
___
___
Pytho
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
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
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
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
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
Changes by Antoine Pitrou :
--
nosy: +asksol, jnoller
type: -> behavior
versions: +Python 2.7, Python 3.1
___
Python tracker
<http://bugs.python.org/issu
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
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.
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
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
-
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:
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
Antoine Pitrou added the comment:
Fixed in r86307.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Changes by Antoine Pitrou :
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issue10359>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Antoine Pitrou :
--
nosy: +asksol
___
Python tracker
<http://bugs.python.org/issue10348>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
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
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
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
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
Antoine Pitrou added the comment:
Fixed in r86369.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
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
Antoine Pitrou added the comment:
The shutdown change was committed in r86383.
--
___
Python tracker
<http://bugs.python.org/issue4471>
___
___
Python-bugs-list m
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
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
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:
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
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
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
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).
-
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
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
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 -
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
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
Antoine Pitrou added the comment:
Globals cache patch posted on issue10401.
--
___
Python tracker
<http://bugs.python.org/issue10399>
___
___
Python-bugs-list m
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 "
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
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
Antoine Pitrou added the comment:
There are still sporadic failures such as:
==
ERROR: testURLread (test.test_urllibnet.URLTimeoutTest)
--
Traceback (most
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
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
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.
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
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
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
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
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
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
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
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
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
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
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
Changes by Antoine Pitrou :
--
nosy: +gregory.p.smith
___
Python tracker
<http://bugs.python.org/issue10430>
___
___
Python-bugs-list mailing list
Unsubscribe:
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
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
>
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
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
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
2201 - 2300 of 16792 matches
Mail list logo