New submission from Michael Curran m...@nvaccess.org:
There seem to be problems with WINFUNCTYPE callbacks causing exceptions, and or
getting their return value ignored by the caller, when using Python 2.7 rc1.
Two examples provided.
Example 1:
Providing a WINFUNCTYPE wrapped python function
Changes by Michael Curran m...@nvaccess.org:
Added file: http://bugs.python.org/file17605/test_keyHook.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8959
___
Michael Curran m...@nvaccess.org added the comment:
I should also note that this has been tested on Windows 7 and XP (32 bit).
I have also seen cases where Python has crashed completely, rather than just
causing a WindowsError, in these circomstances.
--
anatoly techtonik techto...@gmail.com added the comment:
Does it work with FAT32 or network filesystem?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8828
___
Marc-Andre Lemburg m...@egenix.com added the comment:
STINNER Victor wrote:
STINNER Victor victor.stin...@haypocalc.com added the comment:
t# was meant to provide access to text data, so replacing it with a
parser code that is meant for binary data is not correct. The
closes Python3 gets
Marc-Andre Lemburg m...@egenix.com added the comment:
Brett Cannon wrote:
Brett Cannon br...@python.org added the comment:
So yes, cPickle/pickle, cStringIO/StringIO, heapq, etc. are all examples of
the approach. One could choose to write the pure Python version first,
profile the
Marc-Andre Lemburg m...@egenix.com added the comment:
STINNER Victor wrote:
STINNER Victor victor.stin...@haypocalc.com added the comment:
Note that these shortcut bypass the codec registry logic.
Yes, but it's already the case without my patch. I don't think that it's
really useful
STINNER Victor victor.stin...@haypocalc.com added the comment:
I like the idea of a pure Python implementation of the datetime module, for
different reasons:
- it will become the reference implementation
- other Python interpreters can use it
- it can be used to test another implementation,
Marc-Andre Lemburg m...@egenix.com added the comment:
STINNER Victor wrote:
STINNER Victor victor.stin...@haypocalc.com added the comment:
I like the idea of a pure Python implementation of the datetime module, for
different reasons:
- it will become the reference implementation
-
STINNER Victor victor.stin...@haypocalc.com added the comment:
I created a tarball (.tar.gz) on Windows with Python 3.1 (which uses mbcs
encoding). With locale.getpreferredencoding() == 'cp1252', é (U+00e9) is
encoded 0xe9 (1 byte) and à (U+00e0) as 0xe0 (1 byte). WinRAR displays
correctly
STINNER Victor victor.stin...@haypocalc.com added the comment:
Commited in 3.2 (r81869), blocked in 3.1 (r81870).
--
Oops, I don't know why I wrote utf-16 and utf-32. I don't want to add them to
the shortcuts.
--
resolution: - fixed
status: open - closed
R. David Murray rdmur...@bitdance.com added the comment:
This module is used as a foundation for the HTMLParser and sgmllib
modules (indirectly, for htmllib as well). It has no documented
public API and should not be used directly.
So, #2 is not relevant unless you are talking about a
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk:
--
assignee: - vinay.sajip
nosy: +vinay.sajip
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8924
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Le jeudi 10 juin 2010 14:02:34, vous avez écrit :
Commited in 3.2 (r81869), blocked in 3.1 (r81870).
This commit introduced a regression: ISO-8859-15 was seen as an alias to
ISO-8859-1 because the normalized string was truncated.
New submission from Tamás Gulácsi gt-...@gthomas.homelinux.org:
I'm trying to compile Python2.7rc1 on AIX 5.3 with the following call:
FW=/home/kobe/kobed/tgulacsi/freeware
CC='xlc_r -q64' CXX='xlC_r -q64' AR='ar -X64' NM='nm -X64' LD='ld -X64' \
LD_LIBRARY_PATH=$FW/lib:$LD_LIBRARY_PATH \
Changes by Antoine Pitrou pit...@free.fr:
--
assignee: - tarek
nosy: +tarek
priority: normal - high
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8961
___
Mark Dickinson dicki...@gmail.com added the comment:
Committed, r81873. Thanks for reviewing, Victor.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8950
___
Mark Dickinson dicki...@gmail.com added the comment:
FWIW, I prefer PyLongObject* over PyLong. (Though I'm sure I'm guilty of
writing PyLong in comments.)
--
nosy: +mark.dickinson
___
Python tracker rep...@bugs.python.org
Michael Foord mich...@voidspace.org.uk added the comment:
Committed revision 81875.
Committed revision 81874.
--
resolution: - accepted
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
Marc-Andre Lemburg m...@egenix.com added the comment:
STINNER Victor wrote:
STINNER Victor victor.stin...@haypocalc.com added the comment:
My tests with 7-zip and WinRAR conviced me that it's not a good idea to use
utf-8 *by default* on Windows. But since mbcs doesn't support
Martin v. Löwis mar...@v.loewis.de added the comment:
7-zip encodes à (U+00e0) as 0x85 (1 byte), and é (U+00e9) as 0x82 (1
byte). I don't know this encoding.
That's an old DOS code paged used in Europe: CP850
There is a good chance that they use it because it is the OEM code page
on the
Lars Gustäbel l...@gustaebel.de added the comment:
Maybe I'm going out on a limb here, but I think we should again consider what
tarfile users on Windows(!) actually use it for under which circumstances. The
following list is probably not exhaustive, but IMHO covers 90%:
1. Download tar
Changes by Mark Dickinson dicki...@gmail.com:
--
resolution: - fixed
stage: - committed/rejected
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8950
___
New submission from STINNER Victor victor.stin...@haypocalc.com:
ctypes doesn't have strict separation between bytes and characters, whereas
Python3 splitted str/unicode of Python2 into bytes/str which a strict
separation. The result is that sometimes it works (no error), sometimes it
fails
Changes by STINNER Victor victor.stin...@haypocalc.com:
Added file: http://bugs.python.org/file17611/ctypes_conversion.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8966
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
Added file: http://bugs.python.org/file17612/ctypes_s_set.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8966
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
Added file: http://bugs.python.org/file17613/ctypes_tests.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8966
___
Changes by STINNER Victor victor.stin...@haypocalc.com:
Removed file: http://bugs.python.org/file17610/ctypes_conversion.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8966
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
BTW, looking at test_bad_address(), I wonder why it puts extra dots in the url?
The comment above it suggests that the intent is to use a name within RFC 2606
.invalid TLD. Not likely to be a problem in your case, but
Martin v. Löwis mar...@v.loewis.de added the comment:
This looks like a glibc bug to me. I suspect an unauthorized redhat change; I
hope Ulrich Drepper would have never accepted a glibc that causes getaddrinfo
to implicitly call setlocale - see
Sridhar Ratnakumar sridh...@activestate.com added the comment:
FYI, I cannot reproduce this on AIX 5.1:
bash-2.04$ i/bin/python
ActivePython 2.7.0c1.0 (ActiveState Software Inc.) based on
Python 2.7rc1 (r27rc1:81772, Jun 5 2010, 23:20:01) [C] on aix5
Type help, copyright, credits or license
Marc-Andre Lemburg m...@egenix.com added the comment:
Frederic Torres wrote:
New submission from Frederic Torres fredericaltor...@gmail.com:
Method _sys_version() module Lib\platform.py does parse correctly IronPython
2.x version
The format of sys.version now start with a version
Changes by Lars Gustäbel l...@gustaebel.de:
--
assignee: - lars.gustaebel
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8958
___
___
New submission from Antoine Pitrou pit...@free.fr:
This test failure just happened to me on a py3k checkout:
test test_urllibnet failed -- Traceback (most recent call last):
File /home/antoine/py3k/debug/Lib/test/test_urllibnet.py, line 191, in
test_data_header
time.strptime(datevalue,
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
How do I enable `network' resource?
I am getting
$ ./python.exe -m test.regrtest test_urllibnet
test_urllibnet
test_urllibnet skipped -- Use of the `network' resource not enabled
1 test skipped:
test_urllibnet
Those
Antoine Pitrou pit...@free.fr added the comment:
How do I enable `network' resource?
Use the -unetwork flag to regrtest.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8963
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
What is your locale?
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8963
___
Antoine Pitrou pit...@free.fr added the comment:
I've reported the bug upstream at Mandriva:
https://qa.mandriva.com/show_bug.cgi?id=59736
It would be nice to know whether other distributions with a Redhat lineage are
affected. Can someone with such a distribution the code in msg107484?
In
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Is this check needed on darwin? Why not simply set fs_encoding = 'utf-8'?
--
nosy: +flox
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8965
Antoine Pitrou pit...@free.fr added the comment:
Strangely, it also works here from the prompt:
import time
time.strptime('Thu, 10 Jun 2010 19:03:39 GMT', '%a, %d %b %Y %H:%M:%S GMT')
time.struct_time(tm_year=2010, tm_mon=6, tm_mday=10, tm_hour=19, tm_min=3,
tm_sec=39, tm_wday=3,
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
I still cannot reproduce the failure, but please, try the attached patch.
--
keywords: +patch
Added file: http://bugs.python.org/file17608/issue8963.diff
___
Python tracker
Sridhar Ratnakumar sridh...@activestate.com added the comment:
On 2010-06-10, at 1:06 PM, Lars Gustäbel wrote:
Is this problem specific to 2.7rc1
Yes.
or are other versions affected as well?
Nope, at least ... I know that 2.6 doesn't have this problem.
--
Lars Gustäbel l...@gustaebel.de added the comment:
Unfortunately I do not have access to an OS X machine. Is this problem specific
to 2.7rc1 or are other versions affected as well? I thought the OS X filesystem
was case sensitive ...
--
nosy: +lars.gustaebel
Antoine Pitrou pit...@free.fr added the comment:
The patch is not sufficient, since other failures can then occur if
test_strptime gets run after test_urllibnet:
==
ERROR: test_twelve_noon_midnight
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
The patch is not sufficient, since other
failures can then occur if test_strptime gets
run after test_urllibnet
This looks like a bug in support.run_with_locale decorator.
It is described as
Changes by Antoine Pitrou pit...@free.fr:
--
versions: +Python 2.6, Python 2.7, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8963
___
Antoine Pitrou pit...@free.fr added the comment:
In setipaddr() in socketmodule.c, the following line appears to change the
current locale when DNS lookup fails:
error = getaddrinfo(name, NULL, hints, res);
This is checked by making a call to setlocale(LC_TIME, NULL) before and after
the
Antoine Pitrou pit...@free.fr added the comment:
Would s/LC_TIME/LC_ALL/ in my patch fix your problem?
As I explained, this wouldn't fix the later failures in test_strptime.
--
___
Python tracker rep...@bugs.python.org
STINNER Victor victor.stin...@haypocalc.com added the comment:
2. Create backups for personal use.
What? Really? I'm sure that all Windows users will use ZIP or maybe RAR, but
never the geek choice.
1. Download tar archives from a webpage (when no zip is supplied) for viewing
or
Vinay Sajip vinay_sa...@yahoo.co.uk added the comment:
It seems like the logging message will be Unicode (as you have specified that
it should be so) but the exception message will be string. Can you confirm
whether this is the case? What type is the return value of
Formatter.formatException
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Antoine,
Would s/LC_TIME/LC_ALL/ in my patch fix your problem? I could not find an
affected system, but I simulated the problem by adding
locale.setlocale(locale.LC_ALL, ) call in the test.
I think the patch is worth
Antoine Pitrou pit...@free.fr added the comment:
What is your locale?
$ locale
LANG=fr_FR.utf8
LC_CTYPE=fr_FR.utf8
LC_NUMERIC=fr_FR.utf8
LC_TIME=fr_FR.utf8
LC_COLLATE=fr_FR.utf8
LC_MONETARY=fr_FR.utf8
LC_MESSAGES=fr_FR.utf8
LC_PAPER=fr_FR.utf8
LC_NAME=fr_FR.utf8
LC_ADDRESS=fr_FR.utf8
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
$ ./python.exe -m test.regrtest -unetwork test_urllibnet
test_urllibnet
1 test OK.
Also the arguments to strptime from reported error message work fine:
import time
time.strptime('Thu, 10 Jun 2010 19:03:39 GMT', '%a, %d
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
type: - feature request
versions: +Python 3.2 -Python 3.0
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1452
___
Antoine Pitrou pit...@free.fr added the comment:
Ok, so what it boils down to is the following behaviour:
import locale, socket
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
locale.getlocale(locale.LC_TIME)
(None, None)
sock.connect((invalidhost, 80))
Traceback (most recent call
STINNER Victor victor.stin...@haypocalc.com added the comment:
Updated version of the utf-8 patch:
- Use also UTF-8 for Windows CE
- Update the documentation
- Prepare the NEWS entry
--
Added file: http://bugs.python.org/file17609/tarfile_windows_utf8-2.patch
Antoine Pitrou pit...@free.fr added the comment:
The culprit seems to be test_bad_address. If I disable this test, or replace
the bad URL by a good one, everything works fine. It seems that failing to
resolve the domain name changes the current locale...
--
Ronald Oussoren ronaldousso...@mac.com added the comment:
I haven't looked at the actual test yet, but the filesystem encoding on OSX is
UTF-8.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8965
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
It looks like your libc calls setlocale(LC_ALL, ) on error. This may or may
not be right and not python's problem in any case. What is worth to
investigate, however is why @run_with_locale decorator fails to restore the
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
My knowledge may be out of date, but I thought multiple inheritance was only
supported at the python level. If this is still the case, then no
initialization check is needed. (You cannot get an uninitialized type at
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
type: - feature request
versions: +Python 3.2 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1516
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
I understand that the latest RFE in this issue is to provide a custom __repr__
to functools.partial. Something along the lines of
class partial(functools.partial):
def __repr__(self):
return
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
versions: +Python 3.2 -Python 2.7, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4113
___
New submission from STINNER Victor victor.stin...@haypocalc.com:
PyErr_SetExcFromWindowsErrWithFilenameObject() and
PyErr_SetFromErrnoWithFilenameObject() have the same code to read the localized
error message. The code can be factorized in a new function
PyErr_GetWindowsMessage().
About the
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Victor,
Your patch works for me and makes sense even though I don't really know where
Py_FileSystemDefaultEncoding is set on Darwin. :-)
--
___
Python tracker
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
On the second thought, test_imp is not the right place to test this. Can you
add a sys module test for this issue?
--
stage: - unit test needed
___
Python tracker
A.M. Kuchling li...@amk.ca added the comment:
Demo/embed/demo.c calls PySys_SetArgv(), which may be where
some people are copying their code from. I've updated it to
use PySys_SetArgvEx() and added an explanatory comment in rev. 81881.
--
nosy: +akuchling
New submission from Ilya Sandler ilya.sand...@gmail.com:
the token module defines constants for token types e.g
NAME = 1
NUMBER = 2
STRING = 3
NEWLINE = 4
etc.
These constants are very useful for any code which needs to tokenize python
source, yet they are not listed in the
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
--
stage: - patch review
type: - feature request
versions: +Python 3.2 -Python 2.7, Python 3.1
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1402289
Changes by STINNER Victor victor.stin...@haypocalc.com:
--
nosy: +lemburg, loewis
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8969
___
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
Patch commited as r81883 (blocked in 3.1: r81884).
Can you add a sys module test for this issue?
Ok, I added a test to test_sys: r81885 (blocked in 3.1: r81886).
I don't really know where Py_FileSystemDefaultEncoding
is set on
STINNER Victor victor.stin...@haypocalc.com added the comment:
Hum. To avoid regression, we should maybe have a test with the C locale.
@belopolsky: Can you try test_sys.patch on Mac OS X?
--
Added file: http://bugs.python.org/file17617/test_sys.patch
STINNER Victor victor.stin...@haypocalc.com added the comment:
I worked again on the patch. I opened new issues to prepare the new mbcs codec:
- #8966: ctypes: remove implicit conversion between unicode and bytes
- #8967: Create PyErr_GetWindowsMessage() function
- #8969: Windows: use (mbcs
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Nope.
$ ./python.exe -m test.regrtest test_sys
test test_sys failed -- Traceback (most recent call last):
File Lib/test/test_sys.py, line 877, in test_getfilesystemencoding
self.assertEqual(fs_encoding, 'utf-8')
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
Added file: http://bugs.python.org/file17619/issue8965-test.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8965
___
A.M. Kuchling li...@amk.ca added the comment:
Since the function was also added to 2.6, the 2.6 What's New should mention it;
added in rev81887.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5753
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
Added file: http://bugs.python.org/file17620/issue8965-test.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8965
___
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
Removed file: http://bugs.python.org/file17619/issue8965-test.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8965
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Sorry for extra traffic. I thought my patch introduced an indentation error,
but it looks like you truly don't check sys.getfilesystemencoding() output if
not on darwin.
--
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
Added file: http://bugs.python.org/file17621/issue8965-test-1.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8965
___
STINNER Victor victor.stin...@haypocalc.com added the comment:
New version of the patch:
- decode_mbcs() calls raise_translate_exception() to set the error (in the
previous patch, I'm not sure that the error was set)
- include #8784 patch (tarfile uses utf-8 as the default encoding)
-
Mark Nottingham m...@mnot.net added the comment:
I'm using it from HTMLParser; try to parse a document with the DTD given when
error is something like:
def error(self, msg):
self.errors += 1
and it will loop.
--
___
Python tracker
Mark Nottingham m...@mnot.net added the comment:
Attaching test case.
--
Added file: http://bugs.python.org/file17623/testcase_8885.py
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8885
___
Changes by R. David Murray rdmur...@bitdance.com:
--
superseder: - friendly errors for UAC misbehavior in windows installers
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8870
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Looks reasonable to me as well. Code patch applies cleanly, but tests don't.
I'll get it ready for commit.
--
assignee: - belopolsky
nosy: +belopolsky
resolution: - accepted
versions: -Python 2.6, Python 2.7,
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
I am attaching an updated patch, but it fails one of the old tests. Need to
investigate this some more.
--
resolution: accepted -
Added file: http://bugs.python.org/file17624/issue3129.diff
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
Attached patch works and passes the tests. The failing test was clearly wrong.
I am still not sure that it is right to raise TypeError rather than
struct.error on invalid offset in pack_into, but this is a separate
Changes by Alexander Belopolsky belopol...@users.sourceforge.net:
Removed file: http://bugs.python.org/file17624/issue3129.diff
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3129
___
Alexander Belopolsky belopol...@users.sourceforge.net added the comment:
On Thu, Jun 10, 2010 at 10:37 PM, R. David Murray
rep...@bugs.python.org wrote:
R. David Murray rdmur...@bitdance.com added the comment:
I actually agree with Anatoly here. I find it much more intuitive to do
import
Tamás Gulácsi gt-...@gthomas.homelinux.org added the comment:
srid,
You must be right, but the question is: How can I compile Python-2.7rc1 on AIX
5.3? I'd never said that this is a Python fault...
I downloaded and extracted a fresh tarball, but the result is the same with the
given
Changes by Tamás Gulácsi gt-...@gthomas.homelinux.org:
--
type: - compile error
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8961
___
___
Éric Araujo mer...@netwok.org added the comment:
It is. Constants should be documented in the regular doc, not only by
introspection or reading the source. See the doc for tokenize: “All constants
from the token module are also exported from tokenize, as are two additional
token type values”.
Michael Curran m...@nvaccess.org added the comment:
The issue does not occure with Python 2.7 beta 1, but does occure in Python 2.7
beta 2.
So, with this in mind, its probably more likely that it may have been caused by
the following change:
- On Windows, ctypes does no longer check the stack
93 matches
Mail list logo