Antoine Pitrou added the comment:
First, I get the following compilation warnings under Linux:
/home/antoine/cpython/26/Modules/_fileio.c: In function ‘fileio_truncate’:
/home/antoine/cpython/26/Modules/_fileio.c:651: attention : unused variable
‘tempposobj’
/home/antoine/cpython/26/Modules
Antoine Pitrou added the comment:
Here is a patch. A static empty string is used in case PyByteArray_AS_STRING()
is asked on an empty bytearray, instead of returning NULL.
Another possibility would be to implement tp_new for bytearray and always
allocate a new 1-byte string, but this would
Antoine Pitrou added the comment:
The posixmodule was committed with a test in r77571 (py3k) and r77572 (3.1).
--
___
Python tracker
<http://bugs.python.org/issue7
Changes by Antoine Pitrou :
Removed file:
http://bugs.python.org/file15660/posixmodule_fn_bytearray_fix_01.patch
___
Python tracker
<http://bugs.python.org/issue7
Changes by Antoine Pitrou :
Removed file: http://bugs.python.org/file15663/release_bytes.diff
___
Python tracker
<http://bugs.python.org/issue7561>
___
___
Python-bug
Antoine Pitrou added the comment:
(I meant the posixmodule fix, of course)
--
___
Python tracker
<http://bugs.python.org/issue7561>
___
___
Python-bugs-list m
Antoine Pitrou added the comment:
The bytearray fix has been committed in r77573 (trunk), r77574 (2.6), r77576
(py3k), r77577 (3.1). The issue can now be closed.
--
resolution: -> fixed
stage: test needed -> committed/rejected
status: open -&g
Changes by Antoine Pitrou :
--
assignee: -> ghaering
nosy: +ghaering
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/issue7723>
___
___
Antoine Pitrou added the comment:
This is not exact. buffer() doesn't exist at all in 3.x, and it issues a
warning in 2.x when used with the -3 flag:
$ ./python -3
Python 2.7a2+ (trunk:77580M, Jan 17 2010, 16:51:51)
[GCC 4.4.1] on linux2
Type "help", "copyright", &
Antoine Pitrou added the comment:
> Replace 'may' with 'will' or 'shall' everywhere the context indicates
> a mandatory requirement.
>
> Since this possibly affects the entire Python documentation, does it
> make sense to discuss this on python-
Antoine Pitrou added the comment:
The patch looks rather good. Is `self.MAX_N` still necessary in read()? I guess
it's rare to read more than 2GB at once, though...
--
___
Python tracker
<http://bugs.python.org/i
Antoine Pitrou added the comment:
Hello Gerhard,
> As far as I can see, the Python 3 definition of the old "buffer"
> interface is "anything that I can apply memoryview to".
Roughly, yes.
> When returning BLOBs, the sqlite3 module now returns bytes objects. I
>
Antoine Pitrou added the comment:
Can someone check if this still applies to Python 3.1/3.2?
By the way, I see no reason not to buffer at least the subprocess's stdout and
stderr streams.
--
versions: -Python 2.4, Python 2.5, Python 2.6, Pytho
Antoine Pitrou added the comment:
You might want to investigate which C library call opens this file, and propose
a patch to release the GIL before doing that call. As far as I can tell, Python
itself does not open /etc/localtime in any place.
--
nosy: +pitrou
Antoine Pitrou added the comment:
with_writable_cwd should probably use functools.wraps.
--
___
Python tracker
<http://bugs.python.org/issue7712>
___
___
Pytho
Changes by Antoine Pitrou :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue7736>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
Releasing the GIL when calling C library functions (e.g. opendir()) is not a
requirement, it's just an optimization for slightly better multi-threading.
Also, as shown in the backtrace, PyGILState_Ensure() is called which should
only try to acquire th
Antoine Pitrou added the comment:
Ah, thanks for the explanation. Yes indeed the patch looks ok for the
job. You should just be aware that similar problems may appear with
other system calls. I don't think we have ever considered that common C
calls such as opendir() could call back into P
Antoine Pitrou added the comment:
> Well, now that I know what to look for, tracking down more of these
> problems should be significantly faster and easier. Are you generally
> going to accept similar patches for other unprotected syscalls?
Until now the rule of thumb was to cons
Antoine Pitrou added the comment:
As discussed on python-dev, this patch should probably be rejected.
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue7
Antoine Pitrou added the comment:
> * Instead of deprecating the set/getcheckinterval APIs, convert the
> arguments passed to these to the switch interval. The new APIs
> set/getswitchinteral are then not needed.
This is certainly not a good idea. The semantics are different, whi
Antoine Pitrou added the comment:
> While the semantics are different, the result is similar and
> the actual numbers used are usually determined by experiment
> or rough estimate - noone expects the APIs to provide any kind
> of exact timing and it's not needed either.
Ther
Antoine Pitrou added the comment:
> Just use some conversion formula, e.g. switching interval in micro
> seconds = constant * byte code check interval. We can then determine
> a constant to match todays CPU performance.
Well, there are two problems:
- opcode execution cost varies
Changes by Antoine Pitrou :
--
nosy: +orsenthil
___
Python tracker
<http://bugs.python.org/issue7751>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
The documentation mentions that mhlib is deprecated and mailbox should be used
instead. Is there any point in trying to fix it?
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue7
Changes by Antoine Pitrou :
--
stage: test needed -> patch review
versions: +Python 2.6 -Python 3.2
___
Python tracker
<http://bugs.python.org/issue7759>
___
_
Changes by Antoine Pitrou :
--
nosy: +akuchling
___
Python tracker
<http://bugs.python.org/issue7759>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
As for your other comments, Marc-Andre:
> * Please check whether you can move these variable declarations inside
> the main loop function (as statics):
> [snip]
They are used in other functions than in the main loop, so it's not possible.
>
Antoine Pitrou added the comment:
I meant "worse than milliseconds", sorry.
--
___
Python tracker
<http://bugs.python.org/issue7753>
___
___
Python-b
Antoine Pitrou added the comment:
> > The documentation mentions that mhlib is deprecated and mailbox
> > should be used instead. Is there any point in trying to fix it?
>
> It looks like Btrfs will eventually conform to traditional st_nlink
> behavior. However, that sti
Antoine Pitrou added the comment:
> Sorry, I don't understand what you are proposing. Do you mean we
> should just let the test fail for people who develop on HFS+ and
> Btrfs filesystems? That seems not so good.
Hmm, you are right. From a quick glance, the patch looks ok. I
Antoine Pitrou added the comment:
How would you suggest to implement sys.executable if not by looking at
sys.argv[0] (or the C equivalent, rather)?
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue7
Antoine Pitrou added the comment:
Le mercredi 27 janvier 2010 à 10:37 +, Marc-Andre Lemburg a écrit :
>
> I find it rather strange that Python 3.x now only supports
> NT and POSIX threads in ceval while it still supports the
> whole set of other thread implementations for
Antoine Pitrou added the comment:
Le mercredi 27 janvier 2010 à 10:33 +, Marc-Andre Lemburg a écrit :
>
> It appears to be better to use clock_gettime(CLOCK_MONOTONIC)
> where available and only use gettimeofday() as fallback solution
> together with times(), ftime() and tim
Antoine Pitrou added the comment:
> The arguments given in that thread sound a bit strange to me:
> just because there were no changes to a few files, doesn't really
> say anything about whether they contain working code or not.
That was a heuristic. Files which do not get any m
Changes by Antoine Pitrou :
--
dependencies: -please support lzma compression as an extension and in the
tarfile module
priority: -> high
___
Python tracker
<http://bugs.python.org/iss
Changes by Antoine Pitrou :
--
dependencies: +xz compressor support
___
Python tracker
<http://bugs.python.org/issue5689>
___
___
Python-bugs-list mailin
Antoine Pitrou added the comment:
Agreed with Skip, Raymond and Amaury.
Since the csv module returns you an iterator, it's easy enough to wrap it in
another iterator.
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issu
Antoine Pitrou added the comment:
In this case, what is wrong with:
if isinstance(obj, my_tuple): ...
or do you want to catch all namedtuples? And if so, why?
(I suppose it would be easy to make all namedtuples inherit from a common base
class, though)
--
assignee: -> rhettin
Antoine Pitrou added the comment:
> I need to be able to catch all named tuples, I don't know in advance
> what instance of a namedtuple it might be, but I want my function to
> only accept named tuples. Is this unreasonable?
I don't know. Why exactly don't you want
Changes by Antoine Pitrou :
--
assignee: -> pitrou
resolution: -> accepted
versions: +Python 2.7
___
Python tracker
<http://bugs.python.org/issue7610>
___
__
Antoine Pitrou added the comment:
The patch has been committed in r77798 (trunk) and r77800 (py3k). Thank you!
I won't commit it to 2.6 and 3.1 because it's too involved to qualify as a bug
fix, though.
--
resolution: accepted -> fixed
stage: patch review -> committed
Antoine Pitrou added the comment:
Thank you. The patch was committed mostly unchanged in r77802 (a few cosmetic
fixes). Now trunk and py3k must absolutely be patched in order to conform to
the new behaviour. Can you produce a patch for trunk?
--
priority: -> release blocker
st
Changes by Antoine Pitrou :
Removed file: http://bugs.python.org/file15931/patch26_largefile_tested.patch
___
Python tracker
<http://bugs.python.org/issue6939>
___
___
Changes by Antoine Pitrou :
--
nosy: +astrand
stage: test needed -> patch review
___
Python tracker
<http://bugs.python.org/issue5673>
___
___
Python-bugs-lis
Antoine Pitrou added the comment:
Some comments:
- why do you say Thread.join() uses a busy loop? is it because it uses
Condition.wait()? If so, this will be solved in py3k by issue7316 (which you
are welcome to review). Otherwise, I think there should be an upper bound on
the sleeping
Antoine Pitrou added the comment:
Given the very small benefits, I don't think there's any point in making this a
configuration variable. A hardcoded flag would be sufficient, and expert users
would be able to recompile their Python (as with the FAST_
Antoine Pitrou added the comment:
> It appears to be better to use clock_gettime(CLOCK_MONOTONIC)
> where available and only use gettimeofday() as fallback solution
> together with times(), ftime() and time().
Ok, I've tried and it's less good than expected. Using CLOCK_M
Antoine Pitrou added the comment:
> pthreads will default to use the real time clock. In order
> to have them use the monotonic timer, you have to setup
> a condition variable attribute: See the man-page for
> pthread_condattr_setclock().
I'll look at that, but I'm not t
New submission from Antoine Pitrou :
This is a fresh py3k checkout on a fresh Debian Lenny install:
==
ERROR: testHistoryUpdates (test.test_readline.TestHistoryManipulation
New submission from Antoine Pitrou :
This is a fresh py3k checkout on a fresh Debian Lenny install:
==
ERROR: test_pool_worker_lifetime
(test.test_multiprocessing.WithProcessesTestPoolWorkerLifetime
Antoine Pitrou added the comment:
Yes, a test could use Google or gmane (according to the FAQ, nntps is
supported: http://gmane.org/faq.php ).
The test should skip gracefully (using the skipTest() API) if the connection
fails, so that network errors or service unavailability don't
Antoine Pitrou added the comment:
Well the fix is easy for old-style classes, since we just have to use
hasattr(obj, '__call__') in that case.
--
keywords: +easy
nosy: +pitrou
priority: normal -> critical
___
Python tracker
<http:/
Antoine Pitrou added the comment:
"subtype == _InstanceType" can probably be replaced with "subtype is
_InstanceType". Otherwise, the patch looks good to me.
--
nosy: +benjamin.peterson
___
Python tracker
<http://bu
Changes by Antoine Pitrou :
--
nosy: +rhettinger
___
Python tracker
<http://bugs.python.org/issue7782>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
I didn't test the patch but some comments:
- PyThreadState_Prealloc and PyThreadState_Init should probably be prefixed
with an underscore, because there's no use for them outside of the interpreter
- _PyThreadState_New should be static. Besid
Antoine Pitrou added the comment:
Oh, and besides, you can use the -R option to regrtest to find out if there are
any reference leaks (e.g. "-R 3:2:").
--
___
Python tracker
<http://bugs.python.
Antoine Pitrou added the comment:
The patch should come with a test.
--
___
Python tracker
<http://bugs.python.org/issue5677>
___
___
Python-bugs-list mailin
Antoine Pitrou added the comment:
Your patch lacked a fix for test_largefile (I think it is skipped under
Windows). I added this and committed it in r77890. Will port to py3k.
--
resolution: -> accepted
versions: -Python 2.7
___
Python trac
Antoine Pitrou added the comment:
Committed in py3k (r77895, r77896) and 3.1 (r77897). Thank you Pascal!
--
resolution: accepted -> fixed
stage: needs patch -> committed/rejected
status: open -> closed
___
Python tracker
<http://bug
Antoine Pitrou added the comment:
> I'd consider that a bug. Esp. the IO lib should be 8-bit clean
> in the sense that it doesn't add any special meaning to NUL
> characters or code points.
It doesn't add any special meaning to them. It just relies on a NUL
being pres
Antoine Pitrou added the comment:
This is a particularly verbose patch for the information it is trying to convey.
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue6
Changes by Antoine Pitrou :
--
assignee: georg.brandl -> brett.cannon
nosy: +brett.cannon
___
Python tracker
<http://bugs.python.org/issue7829>
___
___
Python-
Antoine Pitrou added the comment:
I think checking errno would be fine (provided it eliminates all variations ot
this bug).
--
___
Python tracker
<http://bugs.python.org/issue5
Antoine Pitrou added the comment:
Also witnessed on one of the buildbots:
test test_multiprocessing failed -- Traceback (most recent call last):
File
"/home/pybot/buildarea/3.x.klose-debian-ia64/build/Lib/test/test_multiprocessing.py",
line 1076, in test_pool_worke
Changes by Antoine Pitrou :
--
versions: +Python 2.6, Python 2.7
___
Python tracker
<http://bugs.python.org/issue7805>
___
___
Python-bugs-list mailing list
Unsub
Antoine Pitrou added the comment:
Le lundi 01 février 2010 à 19:21 +, Marc-Andre Lemburg a écrit :
> > This is not an implementation detail.
>
> It is, otherwise I would have documented it.
Ok, so the current allocation scheme of unicode objects is an
implementation detail as
Antoine Pitrou added the comment:
Flattening should only happen for instances of the exact type. When people
create subclasses, there's usually a reason for it.
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/i
Antoine Pitrou added the comment:
Could you produce a patch?
--
keywords: +easy
nosy: +pitrou
priority: -> normal
stage: -> needs patch
___
Python tracker
<http://bugs.python.org/
Antoine Pitrou added the comment:
I still think this is much too verbose. The second note looks redundant with
the first one and the third one.
Remember, the notes you are adding may be useful, but they'll also make reading
the whole page more te
Antoine Pitrou added the comment:
There's a patch to make array implement the new buffer API in the following
issue, which was closed:
http://bugs.python.org/issue6071
The patch is "hasharray.patch".
--
nosy: +pitrou
___
Python
Antoine Pitrou added the comment:
> An errno+ferror approach works except for two cases:
>
> (1) MS fgets() does not consider reading from a write-only stream
> an error. While annoying, I think this is standard conforming.
>
> (2) OpenSolaris sets errno unr
Antoine Pitrou added the comment:
The following sentences look like a distraction to me:
« Additional quoting may be required because the entire string is a Python
string. It may be useful to use a Python raw string in complex cases. »
It is true of every string literal and is not specific
Antoine Pitrou added the comment:
When PyMemoryView_FromObject() doesn't return NULL, you should decref the
result. Otherwise, it's "perfect".
--
___
Python tracker
<http://bu
New submission from Antoine Pitrou :
test_pep3118.py creates a dummy memoryview class and says "It can be removed
when the py3k memoryview object is backported". Since memoryview has been
backported to trunk, it should be removed.
--
assignee: theller
components: Tes
Antoine Pitrou added the comment:
I've added a missing call to PyBuffer_Release() and committed the patch to
trunk (r77916).
--
___
Python tracker
<http://bugs.python.org/i
New submission from Antoine Pitrou :
For some reason it only fails in py3k, not trunk.
test_capi
beginning 5 repetitions
12345
test test_capi crashed -- : PyDateTime_CAPI somehow
initialized
1 test failed:
test_capi
[101007 refs]
--
assignee: benjamin.peterson
components: Tests
Antoine Pitrou added the comment:
Needs to be merged in py3k :)
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/issue7816>
___
___
Python-bugs-list m
Antoine Pitrou added the comment:
Merged in r77918 (py3k) and r77920 (3.1).
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Antoine Pitrou added the comment:
Pablo's documentation patch for py3k has been committed.
--
___
Python tracker
<http://bugs.python.org/issue7723>
___
___
Antoine Pitrou added the comment:
We all agree that lzma/xz is important, what is needed is a patch.
--
___
Python tracker
<http://bugs.python.org/issue6
Changes by Antoine Pitrou :
--
nosy: +loewis
___
Python tracker
<http://bugs.python.org/issue5677>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
Hmm, test_file.py is for the new IO library (backported from 3.x). You should
use test_file2k.py for tests against the 2.x file object.
Also, readinto() should take something such as a bytearray() as argument, not a
string.
--
versions: +Python 2.7
Changes by Antoine Pitrou :
--
nosy: +alexandre.vassalotti
___
Python tracker
<http://bugs.python.org/issue7848>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
Indeed, it seems the exception isn't always normalized.
--
nosy: +benjamin.peterson, pitrou
___
Python tracker
<http://bugs.python.org/i
Antoine Pitrou added the comment:
No, it's also in 2.6.
--
___
Python tracker
<http://bugs.python.org/issue7853>
___
___
Python-bugs-list mailing list
Antoine Pitrou added the comment:
Can you provide a patch?
--
keywords: +easy
type: -> behavior
___
Python tracker
<http://bugs.python.org/issue7728>
___
_
Antoine Pitrou added the comment:
> I agree. Does subprocess.TimeoutExpired sound good?
Yes.
> It won't be possible with the current implementation to put the partial output
> in the exception, because read blocks.
Fair enough :)
> I think call and check_call shou
Antoine Pitrou added the comment:
Committed in all four branches, thank you.
--
resolution: -> fixed
stage: patch review -> committed/rejected
status: open -> closed
___
Python tracker
<http://bugs.python.o
Antoine Pitrou added the comment:
Oh and the following line shouldn't be needed:
data = b'xxx' if 'b' in mode else u'xxx'
Since old-style file objects always take bytestrings (it's harmless, though,
because the uni
New submission from Antoine Pitrou :
First, listening and/or connecting often fails.
Second, the test should use try/finally to release all resources even in case
of failure.
This is breaking most buildbots currently:
http://www.python.org/dev/buildbot/trunk/
[snip]
test_listen_config_1_ok
Antoine Pitrou added the comment:
> I wonder if the ValueError in fileio.c is intentional:
I don't know, but this would be the subject of a separate issue anyway.
--
___
Python tracker
<http://bugs.python.or
Antoine Pitrou added the comment:
You can't get the exception before it is even raised...
--
nosy: +pitrou
___
Python tracker
<http://bugs.python.org/i
Antoine Pitrou added the comment:
The patch was committed in r77989 (trunk) and r77990 (2.6). Thank you Stefan!
--
resolution: -> fixed
stage: test needed -> committed/rejected
status: open -> closed
___
Python tracker
<http://bug
Antoine Pitrou added the comment:
Indeed. In that case, I am all for it.
--
___
Python tracker
<http://bugs.python.org/issue7859>
___
___
Python-bugs-list mailin
Antoine Pitrou added the comment:
Looks like a missing "goto done" in posix_utime(), posixmodule.c, line 2805.
Could you test the following patch?
--
keywords: +patch
nosy: +pitrou
priority: -> normal
stage: -> needs patch
type: -> behavior
versions: +Python 2.7,
Changes by Antoine Pitrou :
--
nosy: +lemburg
___
Python tracker
<http://bugs.python.org/issue7860>
___
___
Python-bugs-list mailing list
Unsubscribe:
Antoine Pitrou added the comment:
It's also inconsistent with Linux behaviour:
>>> import sys
>>> sys.maxsize
2147483647
>>> import platform
>>> platform.machine()
'x86_64'
>>> platform.architecture()
('32bit', 'E
Antoine Pitrou added the comment:
The test could simply check that platform.machine() never returns "x86" when
sys.maxsize is greater than 2**32.
(and it would even be platform-agnostic)
--
___
Python tracker
<http://bugs.python.
Antoine Pitrou added the comment:
There's a Python binding for some lzma lib here: https://launchpad.net/pyliblzma
--
___
Python tracker
<http://bugs.python.org/i
4501 - 4600 of 16792 matches
Mail list logo