New submission from Kristján Valur Jónsson krist...@ccpgames.com:
Holding the keymutex lock during malloc and free operations is not a good
idea. The reason is, that custom implementations of malloc and free, can use
the TLS themselves. This is, for example, true in embedded situations,
Michael Haubenwallner michael.haubenwall...@salomon.at added the comment:
While I do agree this being an AIX bug, it is not a blocker here:
fcntl extension does not _depend_ on flock, it just does _prefer_ flock:
If not available, fcntl extension uses something else (fcntl IIRC), as it did
R. David Murray rdmur...@bitdance.com added the comment:
Matt: if you want to learn the file format and propose a patch, I think it
would be OK for gzip to duck-type the file object and only raise an error when
a seek is explicitly requested. After all, that's the way real file objects
work.
Changes by R. David Murray rdmur...@bitdance.com:
--
keywords: +easy
nosy: +pitrou
versions: +Python 3.2
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9759
___
R. David Murray rdmur...@bitdance.com added the comment:
Note that issue 6074 may be relevant to your problem.
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9761
___
New submission from Giampaolo Rodola' g.rod...@gmail.com:
import atexit
@atexit.register
def goodbye1():
print(1)
@atexit.register
def goodbye2():
print(2)
The code above prints:
2
1
...that is, the last registered function is executed first.
Wouldn't the contrary be better?
Changes by desolat nuabara...@web.de:
--
nosy: +desolat
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6074
___
___
Python-bugs-list mailing list
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
The patch looks good.
Apart from PyGILState_Ensure(), are there other parts of the code that use
these functions?
--
nosy: +amaury.forgeotdarc
___
Python tracker rep...@bugs.python.org
Skip Montanaro s...@pobox.com added the comment:
I'm sure you can craft cases where one order is preferable to
another, but I don't think you can make the case in general
that first in, first out is preferable to last in, first out,
or any other ordering of exit functions.
--
nosy:
Changes by Amaury Forgeot d'Arc amaur...@gmail.com:
--
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9748
___
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
FNFCIREAD co are macros to help the definition of callback functions:
http://msdn.microsoft.com/en-us/library/ff797940.aspx
hf is defined as INT_PTR, but the value it receives is the result of
FNFCIOPEN(), which fits in int.
It is safe
R. David Murray rdmur...@bitdance.com added the comment:
If this is a problem with the Apple supplied tk there isn't much we can do
about it from the Python end. We've had a number of other bugs like that...
--
nosy: +r.david.murray
___
Python
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9788
___
___
Python-bugs-list
Éric Araujo mer...@netwok.org added the comment:
I wonder if the scheme names could be made more consistent, removing the need
for a function.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8772
New submission from Nick Coghlan ncogh...@gmail.com:
memoryview objects currently offer no way to explicitly release the underlying
buffer.
This may cause problems for mutable objects that are locked while PEP 3118
buffer references remain unreleased (e.g. in 3.2, io.BytesIO supports
Nick Coghlan ncogh...@gmail.com added the comment:
The test suite actually does force a GC collection cycle, so the test may be
more portable than I first thought, but the need to do that suggests an
explicit buffer release API may be a more appropriate solution.
--
Antoine Pitrou pit...@free.fr added the comment:
See the context management patch at #9757.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9789
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
I think it's not a matter of preferable but most expected and I see FIFO as
the most expected behavior in this case.
--
___
Python tracker rep...@bugs.python.org
Nick Coghlan ncogh...@gmail.com added the comment:
Thanks for that link. Compared to what either of us managed in the original
thread, I think my first post here better articulates why the ability to
explicitly release the buffer is important - not because of general memory
usage, but because
Éric Araujo mer...@netwok.org added the comment:
Thank you for the patch. Review:
1) Why not raise an exception? A recursive variable definition is an error.
Tarek, is this behavior change OK?
2) Does this apply to the new top-level sysconfig module and/or
distutils.sysconfig?
3) I’d use a
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +eric.araujo
stage: - committed/rejected
superseder: - C++ compilation support for distutils
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9031
Changes by Nick Coghlan ncogh...@gmail.com:
--
resolution: - duplicate
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9789
___
Changes by Nick Coghlan ncogh...@gmail.com:
--
superseder: - Add context manager protocol to memoryviews
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9789
___
Nick Coghlan ncogh...@gmail.com added the comment:
I closed 9789 as a duplicate of this. Bringing the details from that issue over
here:
memoryview objects currently offer no way to explicitly release the underlying
buffer.
This may cause problems for
Antoine Pitrou pit...@free.fr added the comment:
Just tried to apply the patch:
- test_capi now freezes in auto-thread-state
- test_threading now freezes in test_finalize_runnning_thread
--
nosy: +pitrou
___
Python tracker rep...@bugs.python.org
New submission from Brian Curtin cur...@acm.org:
As pointed out by Nick Coghlan on python-dev, ntpath.samefile and
ntpath.sameopenfile are vulnerable to deadlock because they contain imports.
--
assignee: brian.curtin
components: Extension Modules, Windows
files: review_email.txt
Éric Araujo mer...@netwok.org added the comment:
Arfrever’s patch looks good. There is no tests for detect_language now; should
the patch be blocked by that?
(Note: Remember to use “hg import --user 'Arfrever Frehtes Taifersar Arahesis
preferred email'” to give proper credit)
--
Antoine Pitrou pit...@free.fr added the comment:
You have a bug in PyThread_delete_key_value() (to_free = NULL?).
Also, you should move the /* NB This does *not* free p-value! */ comments at
the right places.
--
nosy: +pitrou
___
Python tracker
Antoine Pitrou pit...@free.fr added the comment:
LIFO looks preferable if you want your setup/teardown code to be properly
nested (that is, if I set up A before B, I want B to be torn down before A).
--
nosy: +pitrou
___
Python tracker
Éric Araujo mer...@netwok.org added the comment:
Thanks for the report. I just checked 2.7 and 3.2 (by monkey-patching os.uname
to return something with a space and calling the two get_platform) and this is
fixed (both use an underscore), probably thanks to the freeze and revert of
distutils.
Changes by Éric Araujo mer...@netwok.org:
--
stage: - committed/rejected
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9250
___
Éric Araujo mer...@netwok.org added the comment:
Is this still relevant for the new sysconfig module? Tests would be a valuable
addition.
--
components: +Library (Lib) -Build, Distutils
nosy: +eric.araujo
type: compile error - behavior
versions: +Python 2.7, Python 3.1, Python 3.2
Changes by Éric Araujo mer...@netwok.org:
--
versions: -Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1299
___
___
Python-bugs-list
Éric Araujo mer...@netwok.org added the comment:
Status update:
- site does not depend on distutils anymore in 2.7 and 3.2, now that
distutils.sysconfig has been move to sysconfig.
- distutils is frozen, so it won’t get a refactor.
- Tarek is nearly done removing log in distutils2.
Sébastien Sablé sa...@users.sourceforge.net added the comment:
Here is a new test for flock. HAVE_FLOCK is defined if we can link a C
application calling flock, or if flock is defined in libbsd.
FLOCK_NEEDS_LIBBSD is also defined in the second case.
AC_MSG_CHECKING(for flock)
have_flock=no
Éric Araujo mer...@netwok.org added the comment:
It seems to me that atexit is simple by design: It registers callables that do
one thing, period. If you have dependencies in your cleanup code, you should
write a function doing the Right Thing™ and register that. This keeps the
implementation
Antoine Pitrou pit...@free.fr added the comment:
I've just merged Sébastien's patches in r84584 (3.x), r84585 (2.7) and r84586
(3.1). If you'd like to improve the fixes (as per your latest message), please
say so, otherwise I'll close the issue.
(and thanks for your contributions!)
Antoine Pitrou pit...@free.fr added the comment:
For the record, here are the unladen swallow benchmark results against stock
py3k:
### pickle ###
Min: 1.644222 - 0.812691: 2.0232x faster
Avg: 1.652311 - 0.814994: 2.0274x faster
Significant (t=297.660908)
Stddev: 0.00594 - 0.00207: 2.8732x
Antoine Pitrou pit...@free.fr added the comment:
The patch in #1926 is more modern and up-to-date, closing as duplicate.
--
nosy: +pitrou
resolution: - duplicate
stage: unit test needed -
status: open - closed
superseder: - NNTPS support in nntplib
Éric Araujo mer...@netwok.org added the comment:
Implemented by Konrad and merged into the main repo.
--
resolution: accepted - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
The patch might need a little reworking to make it work under 3.x, although
probably not much.
It should also, IMHO, take an instance of the new SSLContext class (*) as a
parameter, rather than the keyfile and certfile args.
(*)
Éric Araujo mer...@netwok.org added the comment:
Hooks implemented for any command by Konrad and merged into the main repo.
--
resolution: accepted - fixed
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker
Terry J. Reedy tjre...@udel.edu added the comment:
It is possible that only a fixed-size buffer is needed. If so, use of an
alternate read mechanism could be conditioned on the underlying file(like)
object not having seek.
It is also possible to direct a stream to a temporary file, but I
Terry J. Reedy tjre...@udel.edu added the comment:
I hope the trivial 2-byte fix does not get lost in the general issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9730
___
sorin sorin.sbar...@gmail.com added the comment:
+1 for adding it because it will make the code easier to read/understand.
Bad performance could be documented and it's related about internal
representation.
--
nosy: +sorin
___
Python tracker
Éric Araujo mer...@netwok.org added the comment:
I understand this is not a bug but a nicety/performance issue, so I’m
reassigning to distutils2.
--
components: -Distutils
nosy: +eric.araujo
versions: +Python 2.5, Python 2.6, Python 3.1
___
Python
Changes by Éric Araujo mer...@netwok.org:
--
nosy: +alexis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8933
___
___
Python-bugs-list mailing
Éric Araujo mer...@netwok.org added the comment:
FTR, the distutils2 repo is http://bitbucket.org/tarek/distutils2.
distutils2.tests.support contains helper to create temp directories and run
commands; see docstrings and example uses in the tests for more info.
--
Éric Araujo mer...@netwok.org added the comment:
Status update: Josip implemented PEP 376 to provide the installation database
and Alexis is working on distutils2.install_tools to provide an uninstall
function. User-level tools like pip can reuse this code to provide an uninstall
Guido van Rossum gu...@python.org added the comment:
Given this explanation, of course I am +1 on an explicit release() method. But
I'm still skeptical that a context manager adds much (not sure if that counts
as -0 or +0 :-).
I suppose after release() is called all accesses through the
Changes by Terry J. Reedy tjre...@udel.edu:
--
nosy: -terry.reedy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue7894
___
___
Python-bugs-list
Éric Araujo mer...@netwok.org added the comment:
I talked a bit about that with haypo. A strong sandbox would have to intercept
a number of C and Python calls to catch everything. The sandbox module in
setuptools/distribute does that in 250 lines. I’m not sure it catches C code
run from
Changes by Éric Araujo mer...@netwok.org:
--
components: +Distutils
nosy: +eric.araujo
versions: -Python 2.5, Python 2.6, Python 3.0, Python 3.3
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5243
Éric Araujo mer...@netwok.org added the comment:
Adding back distutils1. This is a bug, not a feature.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5243
___
Antoine Pitrou pit...@free.fr added the comment:
Given this explanation, of course I am +1 on an explicit release()
method. But I'm still skeptical that a context manager adds much (not
sure if that counts as -0 or +0 :-).
Ok, release() is probably enough.
I suppose after release() is
Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Sorry, this needs to stay closed.
It has no chance.
--
nosy: +rhettinger
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9080
Terry J. Reedy tjre...@udel.edu added the comment:
The patch changes the internal function that constructs the dict mapping b
items to indexes to read as follows:
create b2j mapping
if isjunk function, move junk items to junk set
if autojunk, move popular items to popular set
I helped
Antoine Pitrou pit...@free.fr added the comment:
Actually, writing a test ended up quite easy (by re-using an existing test in
test_ioctl and simply enlarging its buffer). I've committed an updated patch in
r84589 (3.x), r84590 (3.1) and r84591 (2.7).
Thank you!
--
resolution: -
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +loewis
versions: +Python 3.1, Python 3.2 -Python 3.0
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3402
___
Michael Haubenwallner michael.haubenwall...@salomon.at added the comment:
Sorry to be pedantic - but it looks like (don't have a build environment at
hand at the moment) it will fail to build as 64bit on the not-so-up-to-date AIX
with missing 64bit flock implementation:
There, the
Benjamin Peterson benja...@python.org added the comment:
I don't think the order should be defined.
--
nosy: +benjamin.peterson
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9788
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Ok, I'll shut up then. =)
If you agree, I could make a patch to make the docs more explicit about
atexit’s simplicity and lack of guarantee about run order.
Sure, go ahead.
--
___
Python
New submission from Giampaolo Rodola' g.rod...@gmail.com:
A very simple test suite which tests at least basic features and methods should
be written.
test_ftplib.py and test_smtplib.py can be taken as an example.
Assigning this to me as a reminder.
--
assignee: giampaolo.rodola
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Unfortunately nntplib lacks a test suite.
I created #9791 to address this issue.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1926
Antoine Pitrou pit...@free.fr added the comment:
Note that according to RFC 3977, “The character set for all NNTP commands is
UTF-8”.
But it also says this about multi-line data blocks:
Note that texts using an encoding (such as UTF-16 or UTF-32) that may
contain the octets NUL, LF, or
Antoine Pitrou pit...@free.fr added the comment:
Actually, I just noticed there's some beginnings of a test file in #9360.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9791
___
Antoine Pitrou pit...@free.fr added the comment:
Sorry to be pedantic - but it looks like (don't have a build
environment at hand at the moment) it will fail to build as 64bit on
the not-so-up-to-date AIX with missing 64bit flock implementation:
There, the compile-check will succeed and
Jon Anglin jang...@fortresgrand.com added the comment:
Here is a unit test for os.getppid on Windows. The test_os.diff file is the
diff of the Lib/test/test.os.py file from the py3k svn branch.
--
Added file: http://bugs.python.org/file18784/test_os.diff
New submission from Antoine Pitrou pit...@free.fr:
When you call socket.create_connection() and it fails because it hits the
socket timeout, the socket.timeout error is recast as a generic socket.error,
which makes analyzing the failure more difficult (also, it means the errno
attribute is
Jon Anglin jang...@fortresgrand.com added the comment:
I have uploaded a new diff file (from the py3k svn trunk) that has all of the
changes in Doc/library/os.rst, Modules/posixmodule.c, and Lib/test/test_os.py.
It is called 6394.diff. Let me know if I can do anything else to make this
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +bethard
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9779
___
___
Python-bugs-list
New submission from Dag Odenhall dag.odenh...@gmail.com:
Spotted a typo reading the What's New for 3.2a2 and thought I should give
contributing a fix a try. Please excuse me if I failed to follow some
procedure; this is my first contribution to the core source tree.
--
assignee:
Michael Haubenwallner michael.haubenwall...@salomon.at added the comment:
Using this patch based on current py3k branch I've been able now to build the
fcntl module for 32bit aix5.3 (with flock) and 64bit aix5.3 (without flock),
both using an old gcc-3.3.6, as well as for 64bit linux.
If
Giampaolo Rodola' g.rod...@gmail.com added the comment:
On Ubuntu 10.04:
giampa...@ubuntu:~/svn/python-3.2$ ./python
Python 3.2a1+ (py3k:84457, Sep 3 2010, 20:18:38)
[GCC 4.4.3] on linux2
Type help, copyright, credits or license for more information.
import socket
import socket
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
I'm currently working on it. I'll certainly commit it shortly with a few
changes:
- no need to say that a function fails with WindowsError, at least in the
docstring.
- return error sooner to reduce indentation.
- in tests, use
Antoine Pitrou pit...@free.fr added the comment:
Here is a patch.
--
keywords: +patch
Added file: http://bugs.python.org/file18788/createconn.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9792
Sébastien Sablé sa...@users.sourceforge.net added the comment:
I inverted the actions in the test I proposed in msg115768 (quick note from
home, should have tested at work before posting). It should be:
AC_MSG_CHECKING(for flock)
have_flock=no
AC_TRY_LINK([
#include confdefs.h
#include
Changes by R. David Murray rdmur...@bitdance.com:
--
nosy: +bethard
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9509
___
___
Python-bugs-list
Antoine Pitrou pit...@free.fr added the comment:
Patch committed in r84598. Needs backporting to 3.1 and 2.7.
--
resolution: - fixed
stage: needs patch - committed/rejected
status: open - pending
___
Python tracker rep...@bugs.python.org
Antoine Pitrou pit...@free.fr added the comment:
Improved again and committed in r84597 and r84599. Needs backporting.
--
nosy: +pitrou
resolution: - fixed
stage: - committed/rejected
status: open - pending
versions: -Python 2.6
___
Python tracker
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Committed r84601. Thanks for the patch and your perseverance!
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6394
___
Changes by Amaury Forgeot d'Arc amaur...@gmail.com:
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue6394
Changes by Antoine Pitrou pit...@free.fr:
--
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8574
___
___
Python-bugs-list
Changes by Antoine Pitrou pit...@free.fr:
--
status: pending - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9792
___
___
Python-bugs-list
Éric Araujo mer...@netwok.org added the comment:
Fixed in r84602, thanks.
Note that for such small things, you don’t have to make a patch, it’s actually
faster to just open the file at the right line and fix it than download and
apply a patch. You can also send an email to d...@python.org
Nick Coghlan ncogh...@gmail.com added the comment:
Is this not covered by PEP 3118 at all?
The PEP says “this memory view object holds on to the memory of base
[i.e. the object the buffer was acquired from] until it is deleted”.
Apparently issues pertaining to delayed garbage collection
Antoine Pitrou pit...@free.fr added the comment:
Committed in r84607.
--
resolution: - fixed
stage: patch review - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9707
New submission from Giampaolo Rodola' g.rod...@gmail.com:
Patch in attachment adds a context manager to socket.socket class so that
socket.create_connection() can be used with with statement.
--
components: Library (Lib)
files: socket_ctx_mgr.patch
keywords: patch
messages: 115812
Éric Araujo mer...@netwok.org added the comment:
The bug has been present since the addition of those options in 2000. It is now
fixed in py3k (r84608), 3.1 (r84609), 2.7 (r84610) and distutils2
(374a277616d8). Thanks!
--
resolution: accepted - fixed
stage: patch review -
Antoine Pitrou pit...@free.fr added the comment:
You don't need to use socketserver. Take a look at how the other tests in
test_socket are written. Inheriting from ThreadedTCPSocketTest should be easy.
--
___
Python tracker rep...@bugs.python.org
Changes by Éric Araujo mer...@netwok.org:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9793
___
New submission from Antoine Pitrou pit...@free.fr:
As the title says. __exit__() simply has to call self.quit(), AFAICT.
--
components: Library (Lib)
messages: 115815
nosy: pitrou
priority: normal
severity: normal
status: open
title: nntplib.NNTP should support the context protocol
Changes by Antoine Pitrou pit...@free.fr:
--
nosy: +giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9795
___
___
Python-bugs-list
R. David Murray rdmur...@bitdance.com added the comment:
I've included my take on this in my proposed patch for issue 9608.
--
stage: - committed/rejected
superseder: - Re-phrase best way of using exceptions in doanddont.rst
type: - behavior
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
It wasn't easy but here it is. =)
I'll submit a patch which updates the doc tomorrow.
--
Added file: http://bugs.python.org/file18790/socket_ctx_mgr.patch
___
Python tracker
Changes by Giampaolo Rodola' g.rod...@gmail.com:
--
assignee: - giampaolo.rodola
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue9794
___
___
Giampaolo Rodola' g.rod...@gmail.com added the comment:
Assigning this to me.
Hopefully this should go into the plan of adding a context manager to all
network libs (ftplib, smptlib, imaplib, etc..) in time for Python 3.2.
--
assignee: - giampaolo.rodola
R. David Murray rdmur...@bitdance.com added the comment:
Here is a more extensive rewrite that I think makes things clearer and (I hope)
makes the text read better. I also updated the preceding section per the
confusion expressed in issue 8518.
Note that this patch is somewhat Python3
STINNER Victor victor.stin...@haypocalc.com added the comment:
PyUnicode_FromFormat(%s, text) expects a utf-8 buffer.
Really? I don't see how *s++ = *f; (where s is Py_UNICODE* and f is char*)
can decode utf-8. It looks more like ISO-8859-1.
Very recently (r84472, r84485), some C files of
STINNER Victor victor.stin...@haypocalc.com added the comment:
About embedded Python interpreters or py2exe-style applications: do you mean
that the application calls a C function to set the encoding before starting the
interpreter? Or you mean the Python function, sys.setfilesystemencoding()?
1 - 100 of 137 matches
Mail list logo