Antoine Pitrou added the comment:
As Eric said. Please see the socket.makefile doc:
“Return a file object associated with the socket. The exact returned type
depends on the arguments given to makefile(). These arguments are interpreted
the same way as by the built-in open() function.”
(http
Antoine Pitrou added the comment:
Ah, sorry for closing, then. You are right, this is a genuine issue.
--
___
Python tracker
<http://bugs.python.org/issue10
Antoine Pitrou added the comment:
There are a couple of things I don't understand:
+* :class:`~email.generator.Generator` will convert message bodies that
+ have a :mailheader:`ContentTransferEncoding` of 8bit and a known charset to
+ instead have a :mailheader:`CotnentTransferEncodin
Antoine Pitrou added the comment:
I wanted to go forward with this and so I've committed the patch in r85321. If
you're concerned about the lack of support for IP addresses, you can open a new
issue (and even provide a patch!). Thank you.
--
resolution: -> fixed
stage:
Antoine Pitrou added the comment:
Can you show a snippet of the code (or descrive it in detail) that "processes"
the GzipFile? Right now it's not obvious which operations you are doing.
--
components: +Library (Lib) -Windows
nosy: +pitrou
stage: unit test needed ->
Antoine Pitrou added the comment:
Here is the API addition I would suggest for the http.client module:
Add two new keyword arguments `context` and `check_hostname` to
HTTPSConnection; `context` would allow to pass a SSLContext instance for
certificate checking and other options (default None
New submission from Antoine Pitrou :
The urllib.request documentation intermingles old 2.x urllib (FancyURLopener,
etc.) with urllib2-inherited (*Handler, build_opener, etc.) primitives without
making any distinction. This makes it rather confusing for the reader to figure
out which ones to
New submission from Antoine Pitrou :
3.x urllib.request still has a lot of stuff inherited from 2.x urllib:
URLopener, FancyURLopener, the urlretrieve implementation (perhaps others?).
Ideally, urlretrieve should be reimplemented using urlopen or build_opener, and
the other stuff deprecated
Antoine Pitrou added the comment:
@contextlib.contextmanager
def null():
yield
Do we really need to add this to the stdlib?
Previous proposals to add an "identity function" or "no-op function" have
always be refused. This one seems even less useful.
Antoine Pitrou added the comment:
> @Antoine: it is true that a null context manager can be easily
> defined, but it does requires a separate generator definition, often
> repeated in different modules. This is markedly less elegant than
> just using contextlib.null() in an expr
Antoine Pitrou added the comment:
> Generator converts 8bit bodies into 7bit bodies by applying an
> appropriate 7bit CTE. The reason it does this is that the output of
> Generator will often be passed to some other Python library function
> (most often smtplib) that can only
Antoine Pitrou added the comment:
> Even if smtplib accepted bytes (it currently does not),
That sounds like a critical failure.
--
___
Python tracker
<http://bugs.python.org/iss
Antoine Pitrou added the comment:
Here is a preliminary patch for http.client. I think it would be good to have
local tests using a custom HTTPS server, too.
--
keywords: +patch
Added file: http://bugs.python.org/file19162/httpcli.patch
___
Python
Antoine Pitrou added the comment:
> The important point is that we have to use the same encoding to decode
> and encode command line arguments.
I don't think I agree with this. It's only important when you run a Python
interpreter using subprocess, but the point of using subp
Antoine Pitrou added the comment:
For the record, this can be now reproduced under Linux by forcing different
locale and filesystem encodings:
$ PYTHONFSENCODING=utf8 LANG=ISO-8859-1 ./python -m test.regrtest test_cmd_line
[1/1] test_cmd_line
test test_cmd_line failed -- Traceback (most
Antoine Pitrou added the comment:
Cert generation script committed in r85327.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Antoine Pitrou added the comment:
> Antoine: Python cannot possibly know whether a command line argument
> is meant as a file name or as some other text, and what encoding the
> receiving application will apply to it (if any).
I understand. But practicality seems to suggest that, mo
Antoine Pitrou added the comment:
The patch is obviously against 2.x (there are some PyString_Check's on module
names, for example). It should be regenerated against 3.x.
Also, it would be nice if a test could be devised to check that the shutdown
procedure works as expected (I'
New submission from Antoine Pitrou :
This is only with 3.1. Following patch allows building:
Index: setup.py
===
--- setup.py(révision 85336)
+++ setup.py(copie de travail)
@@ -1450,7 +1450,7 @@
# The versions with
Antoine Pitrou added the comment:
Fixed in r85337.
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue10056>
___
__
Antoine Pitrou added the comment:
I backported the patch to 2.7 (r85335) and to 3.1 (r85338). Hopefully things
will be ok now.
--
___
Python tracker
<http://bugs.python.org/issue8
Antoine Pitrou added the comment:
> -1. Environment variables are typically set in a text editor or on
> the command line, so they will typically have the locale's encoding.
Fair enough.
> If the mere existence of the fsname encoding leads to that much
> confusion, I think I
Antoine Pitrou added the comment:
> For the command line, it would mean that we
> introduced a new encoding: "command line encoding", which will be utf-8 on
> OSX.
Or more generally "environment encoding", if it's also used for env
vars. This could
Antoine Pitrou added the comment:
Here is another patch for http.client containing more tests, including with a
mismatching cert. Comments welcome.
--
Added file: http://bugs.python.org/file19178/httpcli2.patch
___
Python tracker
<h
Antoine Pitrou added the comment:
Fixed in 3.2 (r85342), 3.1 (r85343) and 2.7 (r85344). Thank you!
--
nosy: +pitrou
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
versions: +Python 3.1, Python 3.2
___
Pytho
Antoine Pitrou added the comment:
> Please no. We run into problems because we have two inconsistent
> encodings, and now you propose to introduce another one, allowing
> for even more inconsistencies???
It would not really be a "third encoding", since it would replace the
Antoine Pitrou added the comment:
> Any chance on folding the HTTPSServer class into http.server?
Its API and implementation would first have to be cleaned up.
I'd prefer if it were the subject of a separate issue.
--
___
Python tracke
Antoine Pitrou added the comment:
What happens if you comment out "# define USE_SEMAPHORES" in
Python/thread_pthread.h?
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.o
Antoine Pitrou added the comment:
What about this patch?
Index: Python/thread_pthread.h
===
--- Python/thread_pthread.h (révision 85348)
+++ Python/thread_pthread.h (copie de travail)
@@ -64,7 +64,8 @@
/* Whether or not
Antoine Pitrou added the comment:
> 3.1 branch does not have this problem because that patch was not
> applied to release31-maint. Is this intentional?
I don't remember, I suppose it feared it could be an incompatible change or
perhaps cause build problems.
Anyway, I committed yo
Antoine Pitrou added the comment:
Patch committed in r85352, thanks.
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.or
Antoine Pitrou added the comment:
Committed to 3.x in r85353.
--
___
Python tracker
<http://bugs.python.org/issue9437>
___
___
Python-bugs-list mailing list
Unsub
Antoine Pitrou added the comment:
Backported to 2.7 in r85358.
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> pending
___
Python tracker
<http://bugs.python.o
Antoine Pitrou added the comment:
Le dimanche 10 octobre 2010 à 18:23 +, Martin v. Löwis a écrit :
> Martin v. Löwis added the comment:
>
> > For the command line arguments and environment variables, we don't have a
> > lot
> > of choices: locale or filesys
Antoine Pitrou added the comment:
> This should be fixed as a regression.
As far as I understand, this is not a regression. I don't think the cStringIO
code has changed in years.
--
___
Python tracker
<http://bugs.python.org
Antoine Pitrou added the comment:
> Ok, reading more carefully, it's not a regression. But it's certainly
> a bug, and should be fixed.
Right. The patch looks straightforward, but I'm not familiar with the
cStringIO code.
Antoine Pitrou added the comment:
There are now failures on the FreeBSD 7.2 buildbot:
==
ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase
Antoine Pitrou added the comment:
Apparently, the error message is:
gcc: ${LDFLAGS}: No such file or directory
--
___
Python tracker
<http://bugs.python.org/issue9
Antoine Pitrou added the comment:
The cause for the failure seems to be a bug in the dreaded _parse_makefile().
When you give it a Makefile such as:
LDFLAGS=-foo
PY_LDFLAGS=-bar
LDSHARED=$(CC) -shared ${LDFLAGS} $(PY_LDFLAGS)
It outputs the following variables:
{'CC': ''
Antoine Pitrou added the comment:
> However, I completely fail to see the advantage that the
> PYTHONFSENCODING variable has over the LANG variable. If it's
> possible to set PTHONFSENCODING in some application, it surely
> is also possible to set LANG (or LC_CTYPE), no? Set
Antoine Pitrou added the comment:
Here is a patch which also adds 'cafile' and 'capath' keyword arguments to
urlopen().
--
stage: needs patch -> patch review
Added file: http://bugs.python.org/file19185/httpcli+urllib.patch
___
Antoine Pitrou added the comment:
Here is a new patch with doc updates for urllib.request.
--
Added file: http://bugs.python.org/file19186/httpcli+urllib2.patch
___
Python tracker
<http://bugs.python.org/issue9
Antoine Pitrou added the comment:
This patch should fix the test hanging issues witnessed on some machines.
--
Added file: http://bugs.python.org/file19187/httpcli+urllib3.patch
___
Python tracker
<http://bugs.python.org/issue9
Changes by Antoine Pitrou :
--
nosy: +orsenthil
___
Python tracker
<http://bugs.python.org/issue9991>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
Probably issue7140, which will disable clearing of the module dict if it's
caught in a reference cycle (which it is here, since A.__init__ and A.__del__
will reference it as their globals dict).
--
nosy: +benjamin.peterson, p
Antoine Pitrou added the comment:
Hello,
Some quick comments:
- the C module should be private and therefore called _zipdecrypt
- if you want to avoid API mismatch, you could give a tp_call to your C
decrypter object, rather than a "decrypt" method
- you can put all initializati
Changes by Antoine Pitrou :
--
nosy: +belopolsky
___
Python tracker
<http://bugs.python.org/issue10073>
___
___
Python-bugs-list mailing list
Unsubscribe:
Changes by Antoine Pitrou :
--
nosy: +giampaolo.rodola
___
Python tracker
<http://bugs.python.org/issue10072>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
http://www.openssl.org/docs/ssl/SSL_CTX_set_session_cache_mode.html suggests
that SSL session caching already occurs by default in server mode:
“SSL_SESS_CACHE_SERVER
Server sessions are added to the session cache. When a client proposes a
session to be
Antoine Pitrou added the comment:
I'd say disable hostnames in file:// URIs altogether. There's no practical
reason for forcing a hostname in there, and trying to check that it matches the
local host's FQDN sounds like a distraction.
-
Antoine Pitrou added the comment:
(by disable I meant disallow, sorry)
--
___
Python tracker
<http://bugs.python.org/issue10063>
___
___
Python-bugs-list mailin
Changes by Antoine Pitrou :
Removed file: http://bugs.python.org/file19189/unnamed
___
Python tracker
<http://bugs.python.org/issue9003>
___
___
Python-bugs-list mailin
New submission from Antoine Pitrou :
This patch adds a method to query the session cache statistics from an SSL
context. See
http://www.openssl.org/docs/ssl/SSL_CTX_set_session_cache_mode.html# for more
info.
--
components: Library (Lib)
files: sslstats.patch
keywords: patch
messages
Antoine Pitrou added the comment:
The accept() issue is the following: the socket created by accept() (in
Lib/socket.py) will formally inherit its parent's `type` attribute (including
any SOCK_NONBLOCK and SOCK_CLOEXEC flags).
However, the underlying Linux socket is created by the a
Antoine Pitrou added the comment:
I've renamed the method to session_stats() and commited the patch in r85383.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> pending
___
Python tracker
<http:
Changes by Antoine Pitrou :
--
status: pending -> closed
___
Python tracker
<http://bugs.python.org/issue10075>
___
___
Python-bugs-list mailing list
Unsubscri
Antoine Pitrou added the comment:
The proposed test case doesn't test a lot, IMHO. It would be better if it sent
binary from one end and received unicode on the other end, or vice-versa (with
explicit encoding and errors, prefe
Antoine Pitrou added the comment:
Patch committed in r85384.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Antoine Pitrou added the comment:
You can check accept4() presence by adding it to the AC_CHECK_FUNCS macro in
configure.in around line 2553, and add the corresponding HAVE_ACCEPT4 lines in
pyconfig.h.in. Then run "autoconf" and you will have access to a HAVE_ACCEPT4
constant wh
Antoine Pitrou added the comment:
> Therefore, I propose we remove the Py_REFCNT == 1 guard in
> module_dealloc, and simply leave as an open bug that modules will clear
> their dictionaries on deallocation.
Yes, I think it's the best solution. People can easily copy the dict if
Antoine Pitrou added the comment:
Patch committed in r85408. I believe this fixes, at last, the whole issue
people were complaining about.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
versions: -P
Antoine Pitrou added the comment:
I don't think freopen() is the right solution, since it might open another
(different) file descriptor under the hood; but Python always uses file
descriptor 1 when creating sys.stderr.
I would suggest instead something such as (untested):
int tmpfd;
New submission from Antoine Pitrou :
It might be useful to make public the SSL support for asyncore which is
currently implemented in various tests.
--
assignee: giampaolo.rodola
components: Library (Lib)
messages: 118519
nosy: giampaolo.rodola, pitrou
priority: normal
severity: normal
Antoine Pitrou added the comment:
(I'm posting this issue after having read this message:
http://mail.python.org/pipermail/python-list/2010-October/1257689.html
where the poster is clearly confused about SSL support for asyncore)
--
___
P
Antoine Pitrou added the comment:
I don't see any actual problem here. If you want help understanding Python's
semantics, please post to comp.lang.python.
--
nosy: +pitrou
resolution: -> invalid
status: open -> closed
___
Pytho
Changes by Antoine Pitrou :
--
assignee: -> tarek
components: +Distutils -Tests
nosy: +eric.araujo, tarek
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/i
Antoine Pitrou added the comment:
By the way, don't you want to handle SIGILL and SIGBUS too?
--
___
Python tracker
<http://bugs.python.org/issue8863>
___
___
Antoine Pitrou added the comment:
Thank you very much! I've committed the patch in r85420 (3.2) and r85421 (3.1).
--
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.pyth
Antoine Pitrou added the comment:
> You would be wise to avoid using heap storage once you're in the crash
> handler. From a security standpoint, if something has managed to
> damage the heap (which is not uncommon in a crash), you should not
> attempt to allocate or free hea
Antoine Pitrou added the comment:
> I am then confused by this in the initial comment:
>
> > It calls indirectly PyUnicode_EncodeUTF8() and so call
> > PyBytes_FromStringAndSize() which allocates memory on the heap.
>
> I've not studied the patch though, so this
Antoine Pitrou added the comment:
> Also, dup2 is not available on Windows (at least not from what I've
> read).
MSDN says dup2 is deprecated but you can use _dup2 instead:
http://msdn.microsoft.com/en-us/library/8syseb29%28v=VS.80%29.aspx
> From my understanding, freopen() is
Antoine Pitrou added the comment:
Actually, the error message is (when interpreted as utf-8):
==
FAIL: test_listdir (test.test_pep277.UnicodeFileTests
Changes by Antoine Pitrou :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue9774>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
I've commited a patch in r85423 to skip test_smtpnet when the connection to
gmail fails (which it probably does because of a firewall somewhere).
--
nosy: +pitrou
___
Python tracker
<http://bugs.py
Antoine Pitrou added the comment:
For the record, when compiling on this buildbot, there's the following error
message:
make: Warning: File `Makefile' has modification time 4.7 s in the future
which seems to hint that the filesystem on the buildbot is slightly
misbehaving, o
Antoine Pitrou added the comment:
Backported to 3.1 (r85424) and 2.7 (r85425).
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Antoine Pitrou added the comment:
> However, since the Makefile now explicitly appends PY_LDFLAGS to
> LDSHARED, we could also stop doing so in ./configure.
I've committed a patch which does just this (in r85422). Hopefully it
won'
New submission from Antoine Pitrou :
It can be useful to enable or disable global Python features based on
command-line flags. The -X is supposed to allow implementation-specific options
but it is currently disabled for CPython. This patch allows to use -X for
arbitrary options in CPython
Antoine Pitrou added the comment:
Thanks for the information. I'm afraid I can't be of any more help, since I'm
not a Windows developer. I hope someone else can chime in.
--
nosy: +brian.curtin, tim.golden
___
Python
New submission from Antoine Pitrou :
This patch outputs a warning on file deallocation when it hasn't been
explicitly closed by the programmer.
Printing the warning by default is probably not desirable, but using the patch
for "-X" options in issue10089 would allow to switch on
Antoine Pitrou added the comment:
By the way, python-dev discussion was here:
http://mail.python.org/pipermail/python-dev/2010-September/104247.html
The rough consensus seems to be that there should be a command-line option to
enable it, but to enable it by default with pydebug
Antoine Pitrou added the comment:
See issue10093 for a possible use case.
--
___
Python tracker
<http://bugs.python.org/issue10089>
___
___
Python-bugs-list m
Antoine Pitrou added the comment:
> For some reason does another trip through BEGIN_SELECT_LOOP() macro
Indeed:
if (!timeout)
+#ifdef HAVE_ACCEPT4
+/* inherit socket flags and use accept4 call */
+flags = s->sock_type & (SOCK_CLOEXEC | SOCK_NONBLOCK);
+
Changes by Antoine Pitrou :
Removed file: http://bugs.python.org/file19224/deallocwarn.patch
___
Python tracker
<http://bugs.python.org/issue10093>
___
___
Python-bug
Changes by Antoine Pitrou :
Added file: http://bugs.python.org/file19225/deallocwarn.patch
___
Python tracker
<http://bugs.python.org/issue10093>
___
___
Python-bug
Antoine Pitrou added the comment:
> If the warnings are emitted as usual with the warnings module, you can
> use -W to control this.
Right. Perhaps we can add a new warning category (e.g. ResourceWarning), or
simply reuse RuntimeW
Antoine Pitrou added the comment:
> I think that we should accept that b'\xff' can be decoded as '\xff' and
> that's all.
What do you plan to do to fix this failure?
==
New submission from Antoine Pitrou :
The Windows 7 buildbot sometimes shows a failure in test_os:
test test_os failed -- Traceback (most recent call last):
File
"D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_os.py",
line 1080, in test_CTRL_BREAK_EVEN
Antoine Pitrou added the comment:
There is a slight issue with warnings, and that's the filtering by
module/location. Since these warnings will occur in destructors, they can
appear at any point without being related to the code being executed. The
"default" filtering method (
Antoine Pitrou added the comment:
> Does this work also for sockets?
Not with the current implementation. I guess this could be added, but then I
would have to make the warning method ("_dealloc_warn") public on IO classes.
--
___
P
Antoine Pitrou added the comment:
Here is an updated patch using warnings (RuntimeWarning for now) and also
warning about unclosed sockets.
--
Added file: http://bugs.python.org/file19231/deallocwarn2.patch
___
Python tracker
<h
Antoine Pitrou added the comment:
Fixed in r85471.
--
nosy: +pitrou
resolution: -> fixed
stage: -> committed/rejected
status: open -> closed
versions: -Python 2.6
___
Python tracker
<http://bugs.python.o
Antoine Pitrou added the comment:
> I've been in touch with the copyright holders of pyOpenSSL and they
> all were positive about contributing the code to the PSF under a
> contributor agreement.
> So how should we go about this ? Open a new ticket ?
I would like to see public
Antoine Pitrou added the comment:
> > This sounds a bit ridiculous. Why not add the crypto routines directly
> > to the stdlib?
>
> To make those routines available to a broader audience and to
> get more user feedback.
Sure. But it can be any standalone package, not
Antoine Pitrou added the comment:
> The APIs should probably be discussed on the Python crypto or
> pyOpenSSL list and the discussion about its integration into the
> stdlib on either the python-dev or the stdlib list.
If the target goal is stdlib inclusion, the APIs should be dis
Antoine Pitrou added the comment:
Patch committed in r85480, thanks!
--
resolution: -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
New submission from Antoine Pitrou :
This is following r85480 (issue #7523). It seems the Debian unstable system on
one of the buildbots has SOCK_NONBLOCK and SOCK_CLOEXEC, but doesn't support
creating sockets using these
Antoine Pitrou added the comment:
Thanks for the research. Given that it only happens on Debian unstable, and it
only happens if you explicitly use SOCK_{CLOEXEC,NONBLOCK}, I would vote for
not adding a workaround until some supported OS also exhibits the issue
Antoine Pitrou added the comment:
Er, this patch is horrible. You should fix the generic bug, not workaround it
on your particular environment. The test still fails with NO_PROXY:
$ NO_PROXY=1 ./python -m test.regrtest test_urllib
[1/1] test_urllib
Warning -- os.environ was modified by
Antoine Pitrou added the comment:
Fixed in r85489, please backport.
--
versions: -Python 3.2
___
Python tracker
<http://bugs.python.org/issue10094>
___
___
Pytho
1901 - 2000 of 16792 matches
Mail list logo