Amaury Forgeot d'Arc added the comment:
yes, except that TCHAR* depends on compilation settings (it resolves to wchar_t
when UNICODE is #defined); simply use char*.
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
PEP 277 explicitly states that unicode strings should be passed to
wide-character functions, whereas byte strings use "standard" functions.
This is done in posixmodule.c, for example.
The "current local
Amaury Forgeot d'Arc added the comment:
It does not work on Windows:
>>> ctypes.CDLL(b'kernel32')
Traceback (most recent call last):
File "", line 1, in
File "D:\afa\python\py3k-1\lib\ctypes\__init__.py", line 350, in __init__
self._handl
Amaury Forgeot d'Arc added the comment:
It does not work on Windows:
>>> subprocess.Popen("c:/windows/notepad.exe", cwd=b'c:/temp')
Traceback (most recent call last):
File "", line 1, in
File "D:\afa\python\py3k-1\lib\subproce
Amaury Forgeot d'Arc added the comment:
PyUnicode_FSConverter returns bytes and bytearray objects unchanged; otherwise
it always return bytes.
Your patch should handle the case when name2 is a bytearray.
--
nosy: +amaury.forgeotdarc
___
P
Changes by Amaury Forgeot d'Arc :
--
keywords: +easy
___
Python tracker
<http://bugs.python.org/issue8384>
___
___
Python-bugs-list mailing list
Unsubsc
Changes by Amaury Forgeot d'Arc :
--
assignee: -> haypo
nosy: +haypo
___
Python tracker
<http://bugs.python.org/issue8386>
___
___
Python-bugs-lis
Amaury Forgeot d'Arc added the comment:
Can you run the following command:
ld -v
and paste the result?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
"This is for version 2.6". But how? the traceback shows C:\Python25 on almost
every line.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Changes by Amaury Forgeot d'Arc :
--
resolution: -> invalid
status: open -> closed
___
Python tracker
<http://bugs.python.org/issue8026>
___
___
Amaury Forgeot d'Arc added the comment:
Yes, I think what I wrote above applies here: the string is stored in the
"args" variable. When the exception is raised, the traceback contains the
*live* frame objects, with position in the bytecode and all local variables.
This all
Amaury Forgeot d'Arc added the comment:
Indeed, every function of the API is consistent in this aspect, success or
failure should not make a difference in reference counts. Do you have an
evidence of the contrary?
Note that it's possible that because of the failure, some argument
Changes by Amaury Forgeot d'Arc :
--
assignee: -> amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issue8278>
___
___
Python-bugs-lis
Amaury Forgeot d'Arc added the comment:
yes, my code uses the newer version of ElementTree which will be included with
2.7 and 3.2
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
On Windows, time_t is 64bit, but various functions convert it to a 32bit long.
Attached patch uses time_t instead of long in various places, this fixes the
proposed test.
Martin, do you think it's a viable approach? If so, I'll go and
Amaury Forgeot d'Arc added the comment:
ElementTree does parse comments, it just omit them in the tree.
A quick search lead me to this page: http://effbot.org/zone/element-pi.htm
which can be further simplified:
from xml.etree import ElementTree
class MyTreeBuilder(ElementTree.TreeBu
Amaury Forgeot d'Arc added the comment:
Please generate patches with "context diff", or better "unified diff", with the
"diff -u" command.
I've done it, before the source code changes and the patch becomes impossible
to apply.
Note that the new
Amaury Forgeot d'Arc added the comment:
Note that the exact version which changed the behavior is 1.2.3.5, see
http://www.zlib.net/ChangeLog.txt
- Use zlib header window size if windowBits is 0 in inflateInit2()
--
___
Python tracker
Amaury Forgeot d'Arc added the comment:
Updated patch.
[I also tried to avoid reading the underlying file if
len(self.bytebuffer)>=size, but it does not work with multibytes chars when
size=1]
--
Added file: http://bugs.python.org/file16706/codecs_read
Amaury Forgeot d'Arc added the comment:
Buffering applies when writing, not when reading a file.
There is indeed a problem in codecs.py: after a readline(), read() will return
the content of the internal buffer, and not more.
The "size" parameter is a hint, and should not be
Amaury Forgeot d'Arc added the comment:
Which functions are affected by this change?
Py_UNICODE_ISLINEBREAK()? unicode.splitlines()?
--
assignee: -> flox
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.or
Amaury Forgeot d'Arc added the comment:
According to http://www.zlib.net/ChangeLog.txt, since zlib 1.2.3.5::
- Use zlib header window size if windowBits is 0 in inflateInit2()
The failing test should be changed, for example::
self.assertRaises(ValueError, zlib.decompressob
Amaury Forgeot d'Arc added the comment:
Storing unicode in c_filename would not solve the problem: "surrogateescape"
characters are not printable.
There is no need to support non-decodable filenames in the import mechanism.
--
___
Amaury Forgeot d'Arc added the comment:
I've read on a random forum somewhere that % need to be doubled on Windows 7.
Tom, can you try changing the association by typing
FTYPE Python.File="C:\Python31\py31.exe" "%%1" %%*
--
Amaury Forgeot d'Arc added the comment:
> Looking closer at the patch, you also changed the unicodetype mappings
> and since this removes a lot of entries, it looks like the Unicode
> consortium either moved some mappings out of the UCD file into a
> separate file or made som
Amaury Forgeot d'Arc added the comment:
What does the patch achieve?
--
___
Python tracker
<http://bugs.python.org/issue8110>
___
___
Python-bugs-list m
Amaury Forgeot d'Arc added the comment:
cp720.py was added a few months ago, and will be available with 3.2.
for the impatient, it's here:
http://svn.python.org/view/python/branches/py3k/Lib/encodings/cp720.py?view=markup
--
resolution: -> out of date
status: o
Amaury Forgeot d'Arc added the comment:
two questions:
- where did you obtain cp720.py, are you sure it was a python3 version?
- I've never seen a "3.2 RC2" version. Did you mean the py3k branch?
--
nosy: +amaury.forgeotdarc
__
Amaury Forgeot d'Arc added the comment:
I think this change is worth a sentence in the documentation.
"Improved algorithm" is a bit terse.
--
nosy: +amaury.forgeotdarc
status: closed -> open
___
Python tracker
<http://bugs
Amaury Forgeot d'Arc added the comment:
it's not about platform detection; does IronPython have the equivalent of
msvcrt.open_osfhandle()?
--
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
fwiw, the similar issue2241 was rejected two years ago.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
but, does it work even with your fix?
it seems to me that "from _subprocess import *" will fail miserably.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
By design, a thread object can be started only once:
http://docs.python.org/library/threading.html#threading.Thread.start
You should create another threading.Thread object.
--
nosy: +amaury.forgeotdarc
resolution: -> invalid
stat
Amaury Forgeot d'Arc added the comment:
The restriction that imposes the "__name__= '__main__'" idiom also applies when
multiprocessing is not used in the main module.
Actually the main module is always reloaded in the subprocess. The docs should
Amaury Forgeot d'Arc added the comment:
2.6 and 3.0.1 used to disable the Microsoft CRT argument error handler: they
return EINVAL, but newer versions don't, and should check their arguments
before calling _spawnv.
FWIW, the checks are::
pathname != NULL
*pathname !=
Amaury Forgeot d'Arc added the comment:
Because this is a global setting for the whole process. This was discussed with
issue4804.
--
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
haypo, it seems you removed the initial message...
--
___
Python tracker
<http://bugs.python.org/issue8063>
___
___
Amaury Forgeot d'Arc added the comment:
Did someone notice that on Windows, subprocess imports threading, and use
threads for the communicate() method?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
I would keep the call to PyThreadState_Swap() next to PyThreadState_New():
create the thread state and install it. _PyGILState_Init() may come after.
--
nosy: +amaury.forgeotdarc
___
Python tracker
Amaury Forgeot d'Arc added the comment:
Unfortunately this patch would also replace legitimate uses of a "file"
function.
--
assignee: -> benjamin.peterson
nosy: +amaury.forgeotdarc, benjamin.peterson
stage: -> patch review
_
Amaury Forgeot d'Arc added the comment:
> TypeError: can't write str to text stream
>
> Is it better?
There is the same ambiguity in http://docs.python.org/library/io.html
"text" is not defined. And "string" is often used incorrectly
Amaury Forgeot d'Arc added the comment:
It would be simpler to add a ".. class:: MatchObject" directive.
Also, RegexpObject should be handled as well.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
No, the description above says it: only the first thread calls
Py_ADDRESS_IN_RANGE. The other thread happens to modify the memory at the
beginning of the page, just at the address (POOL)->arenaindex.
Could we use an "inline" function
Amaury Forgeot d'Arc added the comment:
No, because normally distributions do not use debug builds.
but that's the reason why tests are needed: they must pass with asserts enabled.
--
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
It's not about byte ordering. '@' and '=' also change the alignment!
The documentation says it well:
- '@' (or no marker) uses the 'native' alignment, which (on every platform I
know) aligns 4-bytes int
Amaury Forgeot d'Arc added the comment:
Marc-André's remark was that if char<0x80 (the vast majority), it's not
necessary to call any decode function: just copy the byte. Other cases (error,
or non-default encoding) may
Amaury Forgeot d'Arc added the comment:
> > But why is it necessary to check for chars above 0x7f?
> The Python default encoding has to be ASCII compatible,
Yes, but it is not necessarily as strict.
for example, after I manage to set the default encoding to latin-1,
u"%s&qu
Amaury Forgeot d'Arc added the comment:
> Could you please check for chars above 0x7f first and then use
> PyUnicode_Decode() instead of the PyUnicode_FromStringAndSize() API
I concur: PyUnicode_FromStringAndSize() decodes with utf-8 whereas the expected
conversion char->unic
Amaury Forgeot d'Arc added the comment:
Interesting. What is the content of sys.path when you start ./python from the
build tree?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issu
Amaury Forgeot d'Arc added the comment:
I have seen somewhere (ask google), that python 2.6.5 would be released
mid-march.
But except for a few platforms, python.org does not provide compiled binaries.
--
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
Please use patches to show where the code changed.
(I generated one; it looks good to me)
I would like this kind of patches applied to CPython.
Looking at the Pypy test suite, the following test files seem easy to update:
test_bz2
test_du
Amaury Forgeot d'Arc added the comment:
libc.daemon() calls forks(), which duplicates only the main thread.
The other thread does not exists in the forked process, and the interpreter
blocks while trying to wait for it...
Please use os.fork() instead, it has code to forget the threads cr
Amaury Forgeot d'Arc added the comment:
Is it normal that even after the call to next(), the generator frame contains a
reference to the RuntimeError?
Long explanation:
- When the function exits, there is a cycle [parent frame]-> ['it' variable]->
[generator frame]->
Amaury Forgeot d'Arc added the comment:
nul is a special "dos device"
_getfullpathname() correctly returns \\.\nul, but normpath() then simplifies it
to \\nul
I suggest that normpath() be changed to consider \\.\ as a special prefix, and
keep it intact when it appears at t
Amaury Forgeot d'Arc added the comment:
This was fixed with issue7249 and will be available with 2.6.5
--
nosy: +amaury.forgeotdarc
resolution: -> out of date
status: open -> closed
___
Python tracker
<http://bugs.python
Amaury Forgeot d'Arc added the comment:
> I'd like to propose to change default diff format to unicode as well
What kind of "unicode" format is it?
--
___
Python tracker
<http:/
Amaury Forgeot d'Arc added the comment:
Already fixed with issue7610.
--
nosy: +amaury.forgeotdarc
resolution: -> duplicate
status: open -> closed
superseder: -> Cannot use both read and readline method in same ZipExtFile
object
Amaury Forgeot d'Arc added the comment:
The issue tracker is not to a place to find problems in your code (network
programming is difficult, even with python).
Please ask your questions on the comp.lang.python newsgroup, where many people
will be ready to help you.
--
Amaury Forgeot d'Arc added the comment:
Why backport? Isn't this a new feature?
--
___
Python tracker
<http://bugs.python.org/issue4978>
___
___
Amaury Forgeot d'Arc added the comment:
> Note that Python is free to change the meaning of Py_UNICODE
> (e.g. to use UCS4 on all platforms)
Python-UCS4 has never worked on Windows. Most developers on Windows, taking
example on core python source code, implicitly a
Amaury Forgeot d'Arc added the comment:
Then there are many places to change, in core python as well as in third-party
code. And PyArg_ParseTuple("u") would not work any more.
--
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
Again, on Windows there are many many usages of PyUnicode_AS_UNICODE() that
pass the result to various Windows API functions, expecting a nul-terminated
array of WCHARs. Please don't c
Amaury Forgeot d'Arc added the comment:
This very fix was already done in py3k with issue3661.
Unfortunately it was decided at the time that 2.6 is not affected...
Patch is OK, please apply.
--
nosy: +amaury.forgeotdarc
stage: -> commi
Amaury Forgeot d'Arc added the comment:
Here is my review of issue7092_syntax_imports_v3.diff:
- test_itertools.py: please replace
[tuple([arg[i] if i < len(arg) else None for arg in args])
for i in range(max(map(len, args)))]
by something more readable (nested for l
Amaury Forgeot d'Arc added the comment:
This is slightly incorrect: if PyFile_FromFile fails for another reason
(PyString_FromString(name) runs out of memory), the fp is not closed and the
caller is right to call fclose().
IMO PyFile_FromFile() should be changed to consistently leave t
Amaury Forgeot d'Arc added the comment:
It seems a perfect case for "duck typing" style of programming:
All namedtuple classes:
- inherit from tuple
- have a "_fields" class attribute
These two properties could be the "duck test" for namedtuples, regar
Amaury Forgeot d'Arc added the comment:
> Shouldn't the comment char definition belong in a dialect class?
The proposed patch does this correctly; then csv.reader automatically accepts
the dialect parameters to override the selected dialect.
I'm still -1 on the feature - n
Amaury Forgeot d'Arc added the comment:
Comment lines in csv data may be common in some areas, but they are not part of
any standard, and they are not the only possible extension to csv files (for
example: ignore empty lines, or a terminal \ for line continuation...)
Currently all membe
Amaury Forgeot d'Arc added the comment:
The module is probably reloaded, which causes code like:
_ord = ord
def ord(c):
... _ord(c) ...
to form a recursion loop.
Attached patch removes the need for a special ord().
All this should be simply removed in py3k branch: ord() an
Amaury Forgeot d'Arc added the comment:
I feel uneasy to change the default unicode-escape encoding.
I think that we mix two features here; to transfer a unicode string between two
points, programs must agree on where the data ends, and how characters are
represented as bytes.
All c
Amaury Forgeot d'Arc added the comment:
This was merged into 2.6 with r74432, into 2.5 with r77666, into 3.1 with
r74436.
--
assignee: -> jyasskin
nosy: +jyasskin
resolution: -> fixed
status: open -> closed
___
Python
Amaury Forgeot d'Arc added the comment:
IMO we could just catch the WindowsError, and skip the test if its winerror
attribute is 1314 (=ERROR_PRIVILEGE_NOT_HELD).
--
___
Python tracker
<http://bugs.python.org/issu
Amaury Forgeot d'Arc added the comment:
pythonw.exe has an invalid stdout.
Does the problem reproduce when you call print function directly, without a
thread?
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
The patch looks good; the line
tstate->thread_id = PyThread_get_thread_ident();
is needed because the tstate is created in the main thread, but used in another
thread.
--
nosy: +amaury.for
Amaury Forgeot d'Arc added the comment:
> Base type Unicode buffers end with a null-Py_UNICODE termination,
> but this is not used anywhere, AFAIK
On Windows, code like
CreateDirectoryW(PyUnicode_AS_UNICODE(po), NULL)
is very common, at least in po
Amaury Forgeot d'Arc added the comment:
> I don't see the point in changing the various conversion APIs in the
> unicode database to return Py_UCS4 when there are no conversions that
> map code points between BMP and non-BMP.
For consistency: if Py_UNICODE_ISPRINTABLE
Amaury Forgeot d'Arc added the comment:
The problem seems to be fixed in trunk (the future 2.7).
BufferedRandom.seek() contains a block labelled "# Undo read ahead." which does
not exists in 2.6.
I reproduce the problem with a file opened with mode "rb+"
from io
Amaury Forgeot d'Arc added the comment:
I don't understand. How is the subprocess stdout related to the main
program output?
Stream-specific encoding could be useful for subprocesses that expect
latin-1 from stdin but write utf-8 to stdout. I'm not sure we shou
Amaury Forgeot d'Arc added the comment:
It's certainly because python is installed in a directory with non-ascii
characters.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.
Amaury Forgeot d'Arc added the comment:
Committed r77126 in trunk.
I reflowed the text for getch(), so that help(msvcrt) displays nicely in a
80-chars-wide console (this was my "test")
I was about to merge it into py3k, when I realized that the documentation
should be updat
Amaury Forgeot d'Arc added the comment:
Fixed with r77122 (trunk) and r77125 (release26-maint).
py3k uses PyUnicode_FromFormat directly and does not have this problem.
I merged the test there nonetheless.
--
resolution: -> fixed
status: open -
Amaury Forgeot d'Arc added the comment:
This is a duplicate of issue4806.
--
nosy: +amaury.forgeotdarc
resolution: -> duplicate
status: open -> closed
superseder: -> Function calls taking a generator as star argument can mask
TypeErrors in
Amaury Forgeot d'Arc added the comment:
Here is a patch, along with the test that I modified a little bit:
- it uses _saferepr (and repr.Repr) to render the exception object
- it also fixes exception raised by the "p" action.
- The test uses a raw docstring, to avoid chr(255
Amaury Forgeot d'Arc added the comment:
To the poster's defense, the paragraph mentioning "external.bat" is
below the list of the external projects.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bu
Amaury Forgeot d'Arc added the comment:
This is a good idea. I have some comments though:
- the second docstring says "heapmin" when it should describe "locking".
- there are strange characters around "pushed back". Please use only ascii
characters.
- The bod
Amaury Forgeot d'Arc added the comment:
Should all these ValueErrors be turned into IOErrors?
--
nosy: +amaury.forgeotdarc, pitrou
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
Closing as duplicate of issue7191
--
nosy: +amaury.forgeotdarc
resolution: -> duplicate
status: open -> closed
superseder: -> Odd behaviour with zlib.decompressobj optional parameter "wbits"
__
Amaury Forgeot d'Arc added the comment:
Using ISO format certainly makes sense, but it seems to me that after
dt=datetime.fromtimestamp(mtime), dt.tzinfo is always None, so the test is
not necessary.
--
nosy: +amaury.forgeotdarc
___
Python tr
Amaury Forgeot d'Arc added the comment:
Indeed, r60797 and r64753 removed sys._compact_freelists, in favor of an
automatic call to all PyXxx_ClearFreelist() during the collection of the
highest generation.
--
nosy: +amaury.forgeotdarc
resolution: -> out of date
stat
Amaury Forgeot d'Arc added the comment:
_CrtSetReportMode() is exposed without the leading underscore. IMO the
_CRT_WARN and other constants should be renamed the same way.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.py
Amaury Forgeot d'Arc added the comment:
For this kind of report you should provide more information. Is this an
enhancement to the Cookie object? Why is it needed?
Do you really propose that users directly use the _multi attribute
directly (the leading _ suggest an internal attribute)?
Amaury Forgeot d'Arc added the comment:
This is also allowed by PEP8.
--
nosy: +amaury.forgeotdarc
___
Python tracker
<http://bugs.python.org/issue7513>
___
___
Amaury Forgeot d'Arc added the comment:
The WeakMethod idea is not new:
http://code.activestate.com/recipes/81253/
http://mindtrove.info/articles/python-weak-references/#toc-extending-weak-
references
--
nosy: +amaury.forgeotdarc
___
P
Amaury Forgeot d'Arc added the comment:
Here is a patch+test
--
keywords: +patch
nosy: +amaury.forgeotdarc
Added file: http://bugs.python.org/file15504/with_popen.patch
___
Python tracker
<http://bugs.python.org/i
Amaury Forgeot d'Arc added the comment:
This was already corrected with issue5275. Thanks however for the report.
--
nosy: +amaury.forgeotdarc
resolution: -> out of date
status: open -> closed
superseder: -> BaseCookie.load doesn't create Morsel o
Amaury Forgeot d'Arc added the comment:
The documentation is os.rst is too laconic (coming from the Windows
world, I could not understand what the function is about).
The docstring is much better (at least I understand it's related to the
Unix security model), I suggest to use
Amaury Forgeot d'Arc added the comment:
Here is a new patch against a fresh trunk, and with the suggested changes:
they indeed make the code more consistent with other parts.
--
keywords: +needs review
Added file: http://bugs.python.org/file15433/isoformat-2.
Amaury Forgeot d'Arc added the comment:
Fixed with r76625 (trunk), r76626 (py3k) and r76627 (relase31-maint)
--
resolution: -> fixed
status: open -> closed
___
Python tracker
<http://bugs.python
Amaury Forgeot d'Arc added the comment:
Seconded.
But such messages are also printed when the interpreter exits, when
poorly written __del__ methods access already disposed modules. Raising
a full traceback could cause users to think that the error is more
severe than it is.
Is the
New submission from Amaury Forgeot d'Arc :
import _locale
_locale.setlocale(12345)
Crashes on Windows with exit code 0xc417, a.k.a
STATUS_INVALID_CRUNTIME_PARAMETER.
2.6 and 3.0 are not affected.
setlocale should check the category before passing it to the C runtime:
LC_MIN <=
1101 - 1200 of 2691 matches
Mail list logo