New submission from Alexandre Vassalotti:
In distutils.unixccompiler, there is a hack to passing correctly the -R
option to gcc (and a few other compilers). However, there is a small bug
that causes gcc to not be detected correctly if the compiler name
does not start with gcc (e.g., i486
Changes by Alexandre Vassalotti:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1032
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options
Alexandre Vassalotti added the comment:
As far as I know, StringIO should not do any string transformations.
From PEP-3116 New I/O, last paragraph of the section Text I/O:
Another implementation, StringIO, creates a file-like TextIO
implementation without an underlying Buffered I/O object
Alexandre Vassalotti added the comment:
That's why the current behaviour is not correct: When I write('\n'),
getvalue() currently returns '\r\n'.
Oh, I missed your example in your initial message. So yes, I agree that
StringIO shouldn't translate newlines like that. I attached a patch
Alexandre Vassalotti added the comment:
The patch is incorrect since find returns -1 on failure.
Oops, that is right. I attached the corrected patch.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1032
__Index: Lib
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Although, I would really like to see support of pickling generators. It is not
really possible in CPython. This is recurrent request. I even wrote a small
article about it.
http://peadrop.com/blog/2009/12/29/why-you-cannot-pickle
Alexandre Vassalotti alexan...@peadrop.com added the comment:
The value of the instruction pointer depends on the byte-code. So it's not
portable either.
But, the bigger issue is the fact generator objects do not have names we can
refer to, unlike top-level functions and classes which pickle
Alexandre Vassalotti added the comment:
I am not sure how the parser work, so I can't comment if your change to
it is correct. It would probably a better idea to keep it for later,
when the semantic differences between str8 and bytes objects will be
resolved.
I think changing b'' to buffer(b
Changes by Alexandre Vassalotti:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1247
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options
Changes by Alexandre Vassalotti:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1247
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options
New submission from Alexandre Vassalotti:
This patch removes the buffer API from PyUnicode, as specified by PEP
3137. All the unit tests passes. However, I believe there is a few
function calls to PyArg API that could become problematic if they are
given a PyUnicode object:
% egrep -R
Alexandre Vassalotti added the comment:
I found a few problems in your patch. In PyCode_New() the type check
for the filename argument is incorrect:
--- Objects/codeobject.c(revision 58412)
+++ Objects/codeobject.c(working copy)
@@ -59,7 +59,7 @@
freevars == NULL
Changes by Alexandre Vassalotti:
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1272
__
___
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options
Alexandre Vassalotti added the comment:
Guido wrote:
Why copy the default encoding before mangling it? With a little
extra care you will only have to copy it once. Also, consider not
mangling at all, but assuming the encoding comes in a canonical form
-- several other functions assume
Alexandre Vassalotti added the comment:
There was a problem with one of the call of PyArg_ParseTuple in the OS/2
version of listdir() in the posix module. I also clarified the error
message of the 't' format unit.
__
Tracker [EMAIL PROTECTED]
http
Alexandre Vassalotti added the comment:
Guido wrote:
I figured out the problem -- it came from marshalled old code objects.
If you throw away all .pyc files the problem goes away. You can also
get rid of the similar checks for the 'name' argument -- this should
just be a PyUnicode too
Alexandre Vassalotti added the comment:
Remove the PyString type check on 'filename' and 'name' in PyCode_New.
Oops. I removed one of the ! the checks by mistake.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1272
Alexandre Vassalotti added the comment:
Committed in r58455.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1260
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Alexandre Vassalotti added the comment:
Christian wrote:
Alexandre's mangle loop doesn't do the same job as mine. Chars like _
and - aren't removed from the encoding name and the if clauses don't
catch for example UTF-8 or ISO-8859-1 only UTF8 or ISO8859-1.
That isn't true. My mangler does
Alexandre Vassalotti added the comment:
I have a question for Alexandre related to frozen.c -- why is there a
mode line with an encoding involved in freezing hello.py?
For some reason which I don't know about, freeze.py tries to read all
the modules accessible from sys.path:
# collect
Alexandre Vassalotti added the comment:
I thought of another way to implement PyUnicode_DecodeFSDefault. If
Py_FileSystemDefaultEncoding is set, decode with the codecs module,
otherwise use UTF-8 + replace. This works because when
Py_FileSystemDefaultEncoding is initialized at the end
New submission from Alexandre Vassalotti:
Here a preliminary patch to make PyString return integers on indexing
and iteration. There is still quite a few XXX in the patch, that I would
like to fix. However, the good thing is all tests passes.
--
components: Interpreter Core
files
Changes by Alexandre Vassalotti:
--
nosy: +alexandre.vassalotti
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1278
__
___
Python-bugs-list mailing list
Unsubscribe
Alexandre Vassalotti added the comment:
I wrote in msg56419:
It is not perfect, since the extra function calls in the codecs module
causes test_profile and test_doctest to fail.
How this was resolved?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org
Alexandre Vassalotti added the comment:
Do you have a use-case for this? In Py3k, I don't think adding support
for the 'with' statement to StringIO makes any sense, since the close()
method does nothing.
--
nosy: +alexandre.vassalotti
__
Tracker [EMAIL
Alexandre Vassalotti added the comment:
I still don't understand why you are using (sizeof lower) - 2
It is simply to avoid duplicating the constant (a.k.a. the Don't Repeat
Yourself (DRY) rule).
and what lower[(sizeof lower) - 2] returns. Is it the memory address
of lower[17
Alexandre Vassalotti added the comment:
Personally, I used like to subtract pointer, ((lower - l + 1)
(sizeof lower)) to get the bound.
Doh. I got it backward. It's (l - lower + 1), not (lower - l + 1).
But now, I find Guido's trick more cute (and less error-prone).
At least, I got
Alexandre Vassalotti added the comment:
On 11/7/07, Guido van Rossum [EMAIL PROTECTED] wrote:
On 11/7/07, Christian Heimes [EMAIL PROTECTED] wrote:
Christian Heimes added the comment:
By the way what happened to the SoC project related to Python's new IO
subsystem? IIRC somebody
Alexandre Vassalotti added the comment:
On 11/7/07, Guido van Rossum wrote:
Cool. How hard do you think it would be to extend your work on
StringIO into a translation of TextIOWrapper into C?
Well, StringIO and TextIOWrapper are quite different. The only part
that I could reuse, from StringIO
Alexandre Vassalotti added the comment:
Please assign this to me.
I am planning to fix this, along a few other bugs, with my new revision
of the pickle protocol.
--
nosy: +alexandre.vassalotti
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org
Alexandre Vassalotti added the comment:
Please assign this bug to me.
Note that neither cPickle or pickle is able to load the stream generated
by cPickle correctly:
g = group(None)
subitem(g)
g[0].parent is g
True
gp = cPickle.loads(cPickle.dumps(g))
gp[0].parent is gp
Alexandre Vassalotti added the comment:
Please mark this bug as Won't Fix.
As Tim said, the list-based interface of cPickle is unsupported and
pending removal. Please use the pickle.dumps and pickle.loads functions
if you want string interface to pickle.
--
nosy: +alexandre.vassalotti
Alexandre Vassalotti added the comment:
Please assign this bug to me.
This certainly doesn't look easy to fix. I will look into it, but I can
promise that I can fix it.
--
nosy: +alexandre.vassalotti
type: - behavior
versions: +Python 2.6, Python 3.0
Alexandre Vassalotti added the comment:
Thank you, Georg!
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1338
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Changes by Alexandre Vassalotti:
--
assignee: - alexandre.vassalotti
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue892902
___
Python-bugs-list mailing list
Changes by Alexandre Vassalotti:
--
assignee: - alexandre.vassalotti
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1761028
_
___
Python-bugs-list mailing list
New submission from Alexandre Vassalotti:
The current documentation for the pickle module (and related modules) is
outdated and should be updated. For example, the section Pickling and
unpickling extension types [1] is not only confusing, but outright
wrong. For Python 2.6, the documentation
Alexandre Vassalotti added the comment:
This should be fixed along issue1536.
--
assignee: - alexandre.vassalotti
dependencies: +pickle's documentation is severely outdated
nosy: +alexandre.vassalotti
Tracker [EMAIL PROTECTED]
http
Alexandre Vassalotti added the comment:
This should be fixed along with issue1536.
I am assigning this to me, instead of Fred Drake. (Is that okay with
you, Fred?)
--
assignee: fdrake - alexandre.vassalotti
dependencies: +pickle's documentation is severely outdated
nosy
Alexandre Vassalotti added the comment:
[I just realized that dependencies in the tracker should go the other
way around.]
--
dependencies: +Update pickle docs to describe format of persistent IDs, cPickle
not always same as pickle
__
Tracker [EMAIL
Changes by Alexandre Vassalotti:
--
dependencies: -pickle's documentation is severely outdated
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue655802
___
Python
Alexandre Vassalotti added the comment:
Here a patch that adds support for any iterable (or sequence) of
integers to bytearray.extend().
--
assignee: - alexandre.vassalotti
keywords: +patch
nosy: +alexandre.vassalotti
resolution: accepted -
Added file: http://bugs.python.org/file8847
Alexandre Vassalotti added the comment:
Made 2 minor enhancements to the patch:
+ Added the proper type-cast to PyMem_Realloc call.
+ Changed (len 1) to (len 1) + 1, just to be sure that the
buffer doesn't overflow if __length_hint__ return 0 or 1 erroneously.
Added file: http
Alexandre Vassalotti added the comment:
There is a reference leak in my previous patches. So, I updated (again)
the patch. There is still another possible leak if the PyMem_Realloc
return NULL (i.e., the system is out of memory), but I don't think it
worth fixing.
Added file: http
Alexandre Vassalotti added the comment:
Here yet another revision of the patch. This one makes
bytearray.extend() try to determine the length of its argument a bit
more aggressively -- i.e., also uses PyObject_Length().
Added file: http://bugs.python.org/file8856/byte_extend-4.patch
Alexandre Vassalotti added the comment:
Done. Is there any other issue with the patch?
Added file: http://bugs.python.org/file8857/byte_extend-5.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1283
__Index: Objects
Alexandre Vassalotti added the comment:
First, I would like to say thank you both for spending your time trying
to do a contribution to Python.
However, I believe the current behavior of cmd.py is correct. The module
documentation states clearly that End of file on input is processed
Alexandre Vassalotti added the comment:
Thank you, Paul, for the patches.
I reviewed the patches and improved them. Here the list of changes:
- Added unit test for the import fixers.
- Renamed Lib/Queue.py to Lib/queue.py.
- Updated Tools/webchecker/wsgui.py.
- Updated
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file8868/queue-rename-misc.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1005
__
___
Python-bugs-list
Changes by Alexandre Vassalotti:
--
assignee: collinwinter - brett.cannon
nosy: -collinwinter
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1005
__
___
Python-bugs
Changes by Alexandre Vassalotti:
--
assignee: brett.cannon - collinwinter
nosy: +collinwinter
Added file: http://bugs.python.org/file8866/queue-rename-documentation.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1005
Alexandre Vassalotti added the comment:
Looks good to me. I updated the patch to use .get() with a default value
instead of a if-statement with .has_key().
--
nosy: +alexandre.vassalotti
priority: - normal
Added file: http://bugs.python.org/file8869/check-content-length.patch
New submission from Alexandre Vassalotti:
If an iterator with a __length_hint__ method that returns a negative
integer is passed to list(), a SystemError is raised.
class A:
... def __iter__(self):
... return self
... def __length_hint__(self):
... return -1
...
list
Alexandre Vassalotti added the comment:
Thank you Gregory for the review!
Committed to r59314.
--
resolution: - accepted
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1283
Alexandre Vassalotti added the comment:
Fixed for Py3k in r59316.
Should this gets backported?
--
status: open -
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1553
Changes by Alexandre Vassalotti:
--
nosy: +alexandre.vassalotti
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue614555
___
Python-bugs-list mailing list
Alexandre Vassalotti added the comment:
The PEP has been deferred and the patch is out of date. So, is this
change still wanted?
--
nosy: +alexandre.vassalotti
resolution: - out of date
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org
Alexandre Vassalotti added the comment:
Committed in r59411. Thanks!
--
resolution: - accepted
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1530
Alexandre Vassalotti added the comment:
Looks good to me. Here's slightly modified patch ready to be committed.
--
keywords: +patch
nosy: +alexandre.vassalotti
priority: - low
Added file: http://bugs.python.org/file8893/doctest.patch
__
Tracker [EMAIL
Changes by Alexandre Vassalotti:
--
versions: +Python 3.0
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1573
__
___
Python-bugs-list mailing list
Unsubscribe:
http
New submission from Alexandre Vassalotti:
I found that the parser fails to handle correctly the (incorrect) case
where the single-star (*), used for delimiting keyword-only arguments,
is immediately followed by a **keywords parameter:
def f(*, **kw):
... pass
...
python: Python/ast.c:652
Alexandre Vassalotti added the comment:
Amaury is right. def f(*, **kw): pass should raise a SyntaxError. The
keyword-only delimiter is useless since the **kw parameter already only
accepts keywords.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1573
New submission from Alexandre Vassalotti:
I think Python 2.x should mimic, or improve on, the behavior of Py3k for
handling broken pipes. That is:
1. Don't print the message close failed: [Errno 32] Broken pipe,
from filemodule.c; since this is impossible to override from Python.
2. Check
Alexandre Vassalotti added the comment:
Fixed in r59480.
--
nosy: +alexandre.vassalotti
resolution: - fixed
status: open - closed
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1313119
Alexandre Vassalotti added the comment:
I compiled Python using gcc 4.3.0 with the -Wstrict-overflow, and that's
the only warning I got:
Objects/doubledigits.c: In function ‘_PyFloat_Digits’:
Objects/doubledigits.c:313: error: assuming signed overflow does not
occur when assuming that (X + c
New submission from Alexandre Vassalotti:
Finally, here is my C implementation of BytesIO. The code is well tested
and include the proper unit tests. The only remaining issues are:
- The behavior of the close() method.
- The failure of test_profile and test_cProfile.
Currently, I have
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9085/add-bytesio-setup.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python-bugs-list
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9086/swap-initstdio-initsite.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9087/test_memoryio.py
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python-bugs-list
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9088/remove-old-stringio-test.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python
Changes by Alexandre Vassalotti:
Added file: http://bugs.python.org/file9089/truncate-semantic-change.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python
Changes by Alexandre Vassalotti:
--
nosy: +brett.cannon
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Alexandre Vassalotti added the comment:
So, here's one big patch. I have updated the behavior of close(), so that
The profile tests often fail when io.py changes because they happen to
depend on golden output which includes line numbers of code in io.py
that happens to be traced during
Alexandre Vassalotti added the comment:
[grrr, I eat my words]
So, here's one big patch. I have updated the behavior of close(), so that
... it matches the behavior of 2.x.
As a side-effect, this make __next__ raises a
ValueError, instead of StopIteration.
... when the file is closed
Changes by Alexandre Vassalotti:
--
status: open - closed
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1753
__
___
Python-bugs-list mailing list
Unsubscribe:
http
Changes by Alexandre Vassalotti:
Removed file: http://bugs.python.org/file9096/bytesio+misc-fixes.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
__
___
Python-bugs
Alexandre Vassalotti added the comment:
I got a patch that also fixes the profiler tests. That was easy after
all. :-)
Added file: http://bugs.python.org/file9099/bytesio+misc-fixes-2.patch
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1751
Alexandre Vassalotti added the comment:
Hm. I don't get any warning, related to the overflow issue, neither with
-Wstrict-overflow=3, nor -Wstrict-overflow=5. Are the cPickle warnings
already fixed?
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1621
Alexandre Vassalotti added the comment:
FYI, StringIO and BytesIO, in Python 3K, already support the context
management protocol.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1286
New submission from Alexandre Vassalotti:
I have found a few instances of the following pattern in Py3k:
char buf[MAX];
len = PyUnicode_GET_SIZE(str);
if (len = MAX)
/* return error */
strcpy(buf, PyUnicode_AsString(str));
which could overflow if str contains non-ASCII
Changes by Alexandre Vassalotti:
--
title: Potential Overflow due to incorrect usage of PyUnicode_AsString. -
Potential overflows due to incorrect usage of PyUnicode_AsString.
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1950
Changes by Alexandre Vassalotti:
--
nosy: +alexandre.vassalotti
_
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue1692335
_
___
Python-bugs-list mailing list
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Thanks for the review!
Your description of the patch is a bit misleading. As far as I can
tell only the first chunk (Python/import.c changes) addresses a
potential buffer overflow.
Yes, you are right. It seems only the bug
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Yes, that sounds like a good idea. Although I haven't reviewed this
patch yet, I find the naming of the `ustr` variable confusing -- e.g. is
it a bytes object or a unicode object? (It seems to be bytes). Anyway, I
will check this out
Changes by Alexandre Vassalotti [EMAIL PROTECTED]:
--
nosy: +alexandre.vassalotti
__
Tracker [EMAIL PROTECTED]
http://bugs.python.org/issue2307
__
___
Python-bugs-list mailing
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
Here is a patch against the latest trunk (r61578) that includes the
accelerator module of io.BytesIO with its test suite. The patch also
changes the behavior of the truncate method to imply a seek(). Please
review!
Added file: http
Alexandre Vassalotti [EMAIL PROTECTED] added the comment:
I don't think this should be added to 2.5. Only bugfixes are admissible
to the backporting process (see PEP 6).
Finally, could you post the diff of your changes as described at
http://www.python.org/dev/patches/. Thanks
Alexandre Vassalotti alexan...@peadrop.com added the comment:
How about checking the preconditions before calling asctime()? If the check
fails, then we can raise an exception without crashing.
--
___
Python tracker rep...@bugs.python.org
http
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Good idea!
You can remove the doctest behavior. I don't think it is useful. But if you
remove it, make sure you add an usage message when no argument is given.
--
___
Python tracker rep
Alexandre Vassalotti alexan...@peadrop.com added the comment:
The code for import_module_implementations seems a bit fragile. Prefixing the
module name with an underscore might not always yield the name of the optimized
implementation. An explicit dictionary to map the Python and C
Alexandre Vassalotti alexan...@peadrop.com added the comment:
It's a documentation enhancement request. The updated documentation in Python 3
for pickle added most of the requested details.
--
resolution: - fixed
status: open - closed
___
Python
Alexandre Vassalotti alexan...@peadrop.com added the comment:
The new documentation for pickle in Python 3 fixes this.
I still believe we should outline the differences between pickle.py and
cPickle. But at this point, it's unlikely I will put the time to do it. Feel
free to open a new issue
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Thank you for the nice investigative work!
I will try my best to review this patch by next week.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5180
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Do I understand correctly that the issue is that python
Pickler class has dispatch attribute but C Pickler does
not?
Yes.
The add_dispatch_check-0.patch patch does not seem
to add class attribute, it adds an instance attribute
Alexandre Vassalotti alexan...@peadrop.com added the comment:
One easy fix for this would be to make InteractiveConsole use the string
__main__ instead of __console__. But other than that, I don't think we can
fix this within pickle.
--
___
Python
Alexandre Vassalotti alexan...@peadrop.com added the comment:
This begs a question, however: why not use regular python bytecode in pickles?
Unlike pickle protocols, the bytecode is not required to be compatible across
Python versions. Furthermore, Python bytecode is designed has a general
Alexandre Vassalotti alexan...@peadrop.com added the comment:
It works for pickle/_pickle and heapq/_heapq, but won't work for io/_io/_pyio.
You can make the dictionary values as lists for the 'blocked' argument for
import_fresh_module(). That would work.
And, can you add documentation
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Now, that 2.7 is out we won't able to commit this anymore. It is sad to abandon
a good patch like this.
--
resolution: - wont fix
stage: patch review - committed/rejected
status: open - closed
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Closing this since Python 2.7 is out now.
--
nosy: +alexandre.vassalotti
resolution: - wont fix
stage: needs patch - committed/rejected
status: open - closed
___
Python tracker rep
Alexandre Vassalotti alexan...@peadrop.com added the comment:
Actually, you are right. This could be added as bug fix.
--
resolution: wont fix -
stage: committed/rejected - needs patch
status: closed - open
___
Python tracker rep...@bugs.python.org
1 - 100 of 579 matches
Mail list logo