Changes by Antoine Pitrou :
--
assignee: -> jnoller
nosy: +jnoller
priority: -> low
stage: -> needs patch
type: -> behavior
versions: +Python 2.7, Python 3.1, Python 3.2
___
Python tracker
<http://bugs.pytho
Antoine Pitrou added the comment:
A better resolution IMO would be to output tracebacks on stderr instead.
--
nosy: +flox, pitrou
___
Python tracker
<http://bugs.python.org/issue8
Antoine Pitrou added the comment:
Matthew, can you confirm whether the socket had a timeout set to it?
(either through settimeout() or setglobaltimeout())
I think this is a bug in Python's socket module.
recv()-like functions are written so as to first call select() before actually
rece
Antoine Pitrou added the comment:
[...]
> we call internal_select(s, 1) (1 for writting) before sending.
Oh, sorry, you are right.
--
___
Python tracker
<http://bugs.python.org/iss
Antoine Pitrou added the comment:
Jesus, this looks ok, have you checked the changes work fine under e.g. Linux?
I don't think DEC Unix is supported anymore, actually I'm not sure anyone still
uses it.
--
priority: release block
Antoine Pitrou added the comment:
> Reading PEP11, I don't see the procedure to propose a platform for
> deprecation. Just mailing python-dev?
Yes.
> Thanks for the review, Pitrou.
You can call me Antoine.
--
___
Python
Antoine Pitrou added the comment:
> Well, at the risk of stating the obvious, perhaps the dup() thing
> should be eliminated. The justification for it seems less than clear,
> and apparently it causes some problems.
I've just found another problem while investigating the
Antoine Pitrou added the comment:
Someone with a better knowledge of ABCs than me should probably do a final
review of this.
--
___
Python tracker
<http://bugs.python.org/issue2
Changes by Antoine Pitrou :
--
___
Python tracker
<http://bugs.python.org/issue7946>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/m
Changes by Antoine Pitrou :
--
components: +Interpreter Core -None
___
Python tracker
<http://bugs.python.org/issue7946>
___
___
Python-bugs-list mailin
Antoine Pitrou added the comment:
> I stand corrected. However, I'm going to have to think of a
> completely different approach for carrying out that functionality as I
> don't know how the take_gil() function is able to determine whether
> gil_last_holder has been d
Changes by Antoine Pitrou :
--
nosy: +amaury.forgeotdarc, loewis
___
Python tracker
<http://bugs.python.org/issue7027>
___
___
Python-bugs-list mailing list
Unsub
Antoine Pitrou added the comment:
Thank you very much! Committed in r80540 (trunk), r80541 (2.6), r80542 (py3k),
r80543 (3.1).
--
nosy: +pitrou
resolution: -> fixed
stage: -> committed/rejected
status: open -> pending
versions: +P
Changes by Antoine Pitrou :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue8549>
___
___
Python-bugs-list mailing list
Unsubscri
Antoine Pitrou added the comment:
I just tried the patch. One problem is that you are supposed to be able to call
close() several times without having it fail:
>>> f = open("LICENSE")
>>> f.close()
>>> f.close()
>>> f = io.open("LICENSE&q
Antoine Pitrou added the comment:
Your proposal looks reasonable.
Two things:
- your patch should include an unit test (see Lib/test/test_file2k.py)
- fileobject.c should use tabs for indentation, not spaces
And you're right, py3k doesn't have this problem.
--
nosy: +pitro
New submission from Antoine Pitrou :
We should expose SSL contexts at the Python level, and rework SSL sockets to
use those objects internally (rather than creating their own private context).
It would allow to:
- specify the various options iteratively, rather than having to dump them all
in
Antoine Pitrou added the comment:
Here is an updated patch for py3k (the previous one didn't apply cleanly).
--
Added file: http://bugs.python.org/file17112/sslopts2.patch
___
Python tracker
<http://bugs.python.org/i
Antoine Pitrou added the comment:
Someone else requested it and even provided a patch. See you on issue4870.
--
resolution: out of date -> duplicate
status: pending -> closed
superseder: -> ssl module is missing SSL_OP_NO_SSLv2
___
Pytho
Antoine Pitrou added the comment:
This is now fixed, right? Personal experience as well as buildbot behaviour
seems to show that parallel test execution (either through -j, or by running
several test suites at the same time) works ok.
--
nosy: +exarkun, pitrou
resolution: accepted
Antoine Pitrou added the comment:
This looks reasonable enough.
--
nosy: +pitrou
stage: unit test needed -> patch review
___
Python tracker
<http://bugs.python.org/iss
Antoine Pitrou added the comment:
issue8550 is probably a prerequisite for implementing this properly.
--
dependencies: +Expose SSL contexts
nosy: +pitrou
stage: -> needs patch
versions: -Python 2.7
___
Python tracker
<http://bugs.pyth
Changes by Antoine Pitrou :
--
nosy: +exarkun
___
Python tracker
<http://bugs.python.org/issue6560>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
Ok, so it was fixed.
--
nosy: +pitrou
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Antoine Pitrou added the comment:
Do you still witness the issue?
Could you post a small code sample showing the problem with IMAP4_SSL?
(it's not obvious it's a Python problem at all; details of the TCP
implementation are obviously handled by the OS, and Python only uses the
Antoine Pitrou added the comment:
do_handshake() not respecting the socket timeout was fixed in r80452.
--
nosy: +pitrou
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/
Antoine Pitrou added the comment:
Fixed in r80557 (trunk) and r80558 (2.6). 3.1 and 3.2 weren't affected, but I
still merged in the additional tests. Thank you!
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: ope
Antoine Pitrou added the comment:
Well, realistically, if you have open sockets at shutdown, there isn't a big
difference between closing and not closing them. They will be reaped with the
process anyway.
--
nosy: +pitrou
___
Python tracker
Antoine Pitrou added the comment:
> Unfortunately, that can result in ugly error messages when the
> interpreter is exiting.
The classical solution is to early bind the necessary globals to
argument defaults, such as:
def __del__(self, _socketclose=_socketclose):
_socketclos
Antoine Pitrou added the comment:
This is a last-minute API change. truncate() was modified not to change the
file position anymore. We should probably document it more explicitly.
See the following subthread in python-dev:
http://mail.python.org/pipermail/python-dev/2009-September/092127
Antoine Pitrou added the comment:
> I'm quite surprised it wasn't already covered by the test suite :S
Probably an oversight. Do you want to add some tests?
> Should a flush on a closed stream fail (at the moment sometimes it
> does, sometimes doesn't) ?
It probabl
Changes by Antoine Pitrou :
--
nosy: +heikki
___
Python tracker
<http://bugs.python.org/issue8550>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
I've updated the doc in r80591. Sorry for the inconvenience!
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python
Antoine Pitrou added the comment:
> In BaseServer, a threading.Event is used in shutdown, so it can block
> until server_forever is finished (after checking __serving). Since the
> SIGTERM interrupts the select system call, the event set is never
> reached, and shutdown hangs wa
Antoine Pitrou added the comment:
For what it's worth, I documented the possibility to call close() several times
in r80592.
> Then when you try to wrap a non-readable stream into a readable
> buffered stream (like BufferedRWPair), it should raise a value error as
> wel
Antoine Pitrou added the comment:
Besides someone having to produce the patch, it would also need the release
manager's approval (Benjamin).
--
nosy: +benjamin.peterson, pitrou
___
Python tracker
<http://bugs.python.org/i
Antoine Pitrou added the comment:
Py_LOCAL_INLINE is also not used a lot. Usually, the compiler will inline small
static functions by itself. Most of the time, we used #defines rather than
functions when we want to inline short snippets of code.
--
nosy: +pitrou
Antoine Pitrou added the comment:
Committed in r80610. Thanks!
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
New submission from Antoine Pitrou :
I don't know how official installers are built, but the standard build
procedure with the Visual Studio files uses a custom checkout of OpenSSL
0.9.8l. OpenSSL is now at version 1.0.x, which adds security fixes and
improvements.
I'd suggest u
Antoine Pitrou added the comment:
Well, the problem is that it's a regression from 2.6.
It also shows why these "fancy" structs aren't necessarily a good idea.
I agree fixing in py3k is less important, though it would be nice too.
Antoine Pitrou added the comment:
> But maybe this is not so important, as these are programming errors
> anyway.
Agreed :)
> One thing I'm still wondering : why couldn't we obtain these C
> extension by cythonizing _pyio ? Are there features that cython lac
Changes by Antoine Pitrou :
--
versions: +Python 2.7 -Python 3.1
___
Python tracker
<http://bugs.python.org/issue2091>
___
___
Python-bugs-list mailing list
Unsub
Changes by Antoine Pitrou :
--
nosy: +brian.curtin, exarkun, tim.golden
type: -> behavior
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2
___
Python tracker
<http://bugs.python.org/iss
Antoine Pitrou added the comment:
I agree with the points raised against Josiah's patch. I'm not sure O(n)
cancellation is really a concern. The main focus of optimization should be the
scheduler's loop itself, and both approaches have an O(log n) complexity there
AF
Antoine Pitrou added the comment:
Tres, can you update your patch against SVN trunk?
Also, please do an unified diff, we are mostly used to this format.
--
stage: unit test needed -> patch review
versions: +Python 2.7, Python 3.2
___
Python trac
Antoine Pitrou added the comment:
> This should be fixed; I suggest deprecating PyWeakref_GetObject() and
> adding another C API function that does not return a borrowed reference.
Another possibility is to document the fact that Py_INCREF() should be called
in most cases. It would b
New submission from Antoine Pitrou :
Some tests in test_multiprocessing (py3k) are skipped because they "require
_ctypes", but I do have ctypes. Here are the skipped tests:
test_array (test.test_multiprocessing.WithProcessesTestArray) ... skipped
'requires _ctypes'
tes
Antoine Pitrou added the comment:
> OK. I've attached a patch which removes the use of get_unused_port for
> test_smtplib and test_multiprocessing.
Great, thank you. It was committed in r80669 (trunk), r80670 (2.6), r80671
(py3k), r80672 (3.1).
Note that there are still a coup
Changes by Antoine Pitrou :
--
components: +Tests -Extension Modules
nosy: +brett.cannon, ncoghlan
stage: -> needs patch
type: -> behavior
versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2
___
Python tracker
<http://bugs.p
Changes by Antoine Pitrou :
--
assignee: -> brett.cannon
components: +Tests
nosy: +brett.cannon, haypo
___
Python tracker
<http://bugs.python.org/iss
Changes by Antoine Pitrou :
--
assignee: -> barry
components: +Tests
nosy: +barry
stage: unit test needed -> needs patch
___
Python tracker
<http://bugs.python.org/
Antoine Pitrou added the comment:
Vinay, are you ok with the proposed patch?
--
nosy: +vinay.sajip
___
Python tracker
<http://bugs.python.org/issue8576>
___
___
Antoine Pitrou added the comment:
In posixmodule.c, the following snippet doesn't make sense anymore:
if (k == NULL) {
PyErr_Clear();
continue;
}
If memory allocation of the bytes object fails, we should erro
Changes by Antoine Pitrou :
--
nosy: +gregory.p.smith -gps
___
Python tracker
<http://bugs.python.org/issue8407>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Antoine Pitrou :
The documentation for the 'y' format (PyArg_ParseTuple and friends) states that:
« The bytes object must not contain embedded NUL bytes; if it does, a TypeError
exception is raised. »
But, reading Python/getargs.c, the strlen() check is actually
New submission from Antoine Pitrou :
This patch fixes, reorders and improves c-api/arg.rst.
I would even suggest to go further and single out a couple of "most useful"
formats ('s', 'y*', 'i', 'l'...) so that people don't get lost in al
Antoine Pitrou added the comment:
Patch uploaded at http://codereview.appspot.com/979047
--
___
Python tracker
<http://bugs.python.org/issue8593>
___
___
Pytho
Antoine Pitrou added the comment:
Here is a patch exposing SSL contexts as the "SSLContext" class. Also, SSL
sockets are refactored to create a standalone SSLContext object, unless you
create them using the new SSLContext.wrap_socket(). Please note that
SSLContexts do not expose
Antoine Pitrou added the comment:
You should not use find_unused_port(), because it causes problems on some
Windows buildbot. Also, there's something fishy in your patch, because you
never set self.source_address.
--
___
Python tracker
Antoine Pitrou added the comment:
Rewriting another implementation of traceback formatting in C is bad.
Just import the "traceback" module and call the desired function in that module.
--
nosy: +pitrou
versions: -Python 2.7
___
Pyth
Antoine Pitrou added the comment:
Oh, well, sorry. That's what you are already doing. Forget me :)
--
___
Python tracker
<http://bugs.python.org/i
Antoine Pitrou added the comment:
New patch with docs.
--
Added file: http://bugs.python.org/file17178/sslcontext2.patch
___
Python tracker
<http://bugs.python.org/issue8
Antoine Pitrou added the comment:
Since it may reorder output, I think it's better revert the patch and try the
other solution. However, I don't think you need to replace sys.stdout at all:
just output the traceback more carefully.
--
status: pendi
Antoine Pitrou added the comment:
Thank you. Now committed in r80704 (trunk), r80705 (py3k), r80706 (2.6), r80707
(3.1).
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: +Python 3.1, P
Antoine Pitrou added the comment:
> See, for example, the test for "source_address" parameter of
> socket.create_connection() function.
Instead of testing the port, you could test the host. For example
by using two different loopback addresses (127.0.0.1 and 127.0.0.2?). W
New submission from Antoine Pitrou :
All test_gdb tests fail here with both trunk and py3k. The failure is always
the same so I'm just quoting one of them below:
==
FAIL: test_basic_command (test.test_gdb.PyBtTests)
V
Antoine Pitrou added the comment:
This sounds silly to me. You can write a file in two lines:
with open("foo", "wb") as f:
f.write(contents)
If you want to do something more useful, you can add a function for atomic
writing of a file.
--
nosy: +pitrou
v
Antoine Pitrou added the comment:
> @Antoine: Yes, that would be the idea (provide a robust pattern by
> using a temporary file, then rename it)
Then perhaps it would be better as a context manager:
with shutil.atomic_write("foo", "wb") as
Antoine Pitrou added the comment:
I've applied Eric's and Brian's suggestions and committed the patch to r80714
(py3k) and r80715 (3.1). Thank you!
--
resolution: -> fixed
status: open -> closed
___
Python tracker
&l
Antoine Pitrou added the comment:
The patch wasn't exactly good. Here is a working patch. Applying it reveals a
couple of different failures, but I will open a separate issue.
--
Added file: http://bugs.python.org/file17193/ignore-stderr-thread-noise
New submission from Antoine Pitrou :
I now get the following failures in test_gdb:
==
FAIL: test_pyup_command (test.test_gdb.StackNavigationTests)
Verify that the "py-up" com
Antoine Pitrou added the comment:
Thanks for the patch! It was committed in r80720 (trunk), r80721 (2.6), r80722
(py3k), r80723 (3.1).
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Pytho
Antoine Pitrou added the comment:
> Well, a context manager sounds overkill since we just want to write
> some content in a file (and nothing else during that context).
Using a context manager, though, is the recommended idiom to write
files. I think there's a value in remaining
Antoine Pitrou added the comment:
> Giving the ability to the developers to work in a context manager
> means that you potentially give them the ability to break this
> atomicity.
AFAICT this doesn't make sense. The writing isn't atom
Antoine Pitrou added the comment:
> You mean that socket.create_connection(), httplib (issue 3972) and
> ftplib (issue 8594) should have used a different API to implement
> their "source_address" option?
source_address=("192.168.0.2", 0))
>
Antoine Pitrou added the comment:
Roundup ate my code. I meant:
>>> s = socket.create_connection(("python.org", 80),
>>> source_address=("192.168.0.2", 0))
>>> s.getsockname()
('192.168.0.2', 40496)
--
__
Changes by Antoine Pitrou :
--
___
Python tracker
<http://bugs.python.org/issue8576>
___
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/m
Antoine Pitrou added the comment:
We could have a separate list storing the original bytes form of sys.path; this
list would be used by find_module() as long as Py_FileSystemDefaultEncoding
isn't initialized.
--
nosy: +pitrou
___
Python tr
Antoine Pitrou added the comment:
Or find_module() could use wcstombs() as long as Py_FileSystemDefaultEncoding
is NULL.
--
___
Python tracker
<http://bugs.python.org/issue8
Antoine Pitrou added the comment:
Most of this should be solved if the patch in issue8550 gets accepted. As for
test_decode_certificate, it seems it isn't used anywhere, and could therefore
be deleted.
--
___
Python tracker
Antoine Pitrou added the comment:
There's a patch in issue8550 to expose SSL contexts as first-class objects. It
allows you to create first your context object(s) and load certificates, then
drop privileges, then create sockets using this/these contexts.
In any case, resolution can
Antoine Pitrou added the comment:
> Can anyone move this to Stage: patch review (for the fix approach
> proposed in msg90336)? Or does anyone have better idea on how to move
> this closer to final fix or wontfix / reject? Thank you!
I stand by my opinion that adding another ha
Antoine Pitrou added the comment:
Can you try the following:
>>> f = open('LICENSE', 'rb')
>>> f.flush()
--
___
Python trac
Antoine Pitrou added the comment:
Ok, can you try the following patch then:
Index: Lib/gzip.py
===
--- Lib/gzip.py (révision 80760)
+++ Lib/gzip.py (copie de travail)
@@ -362,7 +362,7 @@
if self.mode == WRITE
Changes by Antoine Pitrou :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue8610>
___
___
Python-bugs-list mailing list
Unsubscribe:
New submission from Antoine Pitrou :
This is on py3k, with gcc 4.4.3:
/home/antoine/py3k/__svn__/Modules/socketmodule.c: In function
'socket_gethostbyaddr':
/home/antoine/py3k/__svn__/Modules/socketmodule.c:3238: warning: dereferencing
pointer 'sa' does break strict-
New submission from Antoine Pitrou :
This is on py3k, with gcc 4.4.3:
/home/antoine/py3k/__svn__/Modules/_multiprocessing/multiprocessing.c: In
function 'multiprocessing_sendfd':
/home/antoine/py3k/__svn__/Modules/_multiprocessing/multiprocessing.c:125:
warning: dereferencing t
Antoine Pitrou added the comment:
> It would be nice to restore the original behaviour, if possible, since
> the optimization causes difficulties when debugging. One solution
> would be to add '-O0' to OPT for debug builds (on gcc), as in the
> attached patch. You t
New submission from Antoine Pitrou :
OpenSSL 1.0.0 needs to change the cipher list for some test_ssl tests to
succeed, but the cipher list can't be changed in 2.6/3.1 (maintenance
branches). The solution is to skip these tests with the newer OpenSSLs.
This patch uses the "openssl&q
Antoine Pitrou added the comment:
New patch after reindent of _ssl.c
--
Added file: http://bugs.python.org/file17225/sslcontext3.patch
___
Python tracker
<http://bugs.python.org/issue8
Antoine Pitrou added the comment:
I've committed the patch in r80802 (trunk) and r80803 (py3k).
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyt
Antoine Pitrou added the comment:
My intuition about an API problem seems to be mistaken. If I compile Python in
debug mode without any optimizations ("CFLAGS='' ./configure --with-pydebug"),
all tests pass. The default builds of Python use -O2 nowadays, even in debug
mod
Antoine Pitrou added the comment:
> I don't think we should use the openssl binary for anything. It may
> belong to a different version, and it may not be available (in
> particular on Windows).
Agreed.
> I don't understand the problem you are trying to solve. What exa
Antoine Pitrou added the comment:
Here is a patch which skips test_gdb when Python was built with something else
than -O0.
--
keywords: +patch
title: gdb API issues -> test_gdb can fail with compiler opts
Added file: http://bugs.python.org/file17226/gdbopts.pa
Antoine Pitrou added the comment:
> Notice that we should *not* test OpenSSL - hopefully, they have their
> own test suites. Instead, we should only test the Python integration of
> OpenSSL. Therefore, we should only write test cases that work
> independent of the OpenSSL version
Antoine Pitrou added the comment:
> I don't think the test actually achieves that, as we are testing against
> our own implementation (IIUC). To be sure that this really triggers the
> right bytes on the wire, we would have to test against an independent
> TLS implementation.
Antoine Pitrou added the comment:
This is more of a documentation issue than anything else. The fact that the
argument is named "maxsplit" and accepts a default value doesn't mean it's
usable as a keyword argument. It would be difficult to document a parameter
without giv
Antoine Pitrou added the comment:
> pthread_sigmask should be used instead. I could either expose both of >
> these and let the caller choose, or I could make signal.sigprocmask use >
> pthread_sigmask if it's available, and fall back to sigprocmask.
Or perhaps you could
Antoine Pitrou added the comment:
> If everyone agrees this is inappropriate for 2.7
I think the decision is up to Benjamin.
--
nosy: +benjamin.peterson
___
Python tracker
<http://bugs.python.org/iss
Antoine Pitrou added the comment:
I've committed a patch which unconditionally skips those tests in 2.6 (r80867)
and 3.1 (r80868). Thanks for your advice.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: ope
5001 - 5100 of 16792 matches
Mail list logo