New submission from Ulrich Eckhardt:
When you rename a test function, you can't explicitly specify it on the
commandline any more. During normal test runs, it is automatically discovered
though. The error is that the old name was not found, even though the new name
was specified. The attached
Ulrich Eckhardt added the comment:
There is at least one thing that is missing in the patch, it lacks the
necessary tests. The partialbug.py demonstrates the issue, it could be used as
a base. However, even then, there is still one thing that is problematic: The
fact that partial() returns
Changes by Ulrich Eckhardt ulrich.eckha...@dominolaser.com:
--
nosy: +eckhardt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue11470
___
___
Python
Ulrich Eckhardt added the comment:
Just for the record, the behaviour is documented, unfortunately in the very
last line of the functools documentation: Also, partial objects defined in
classes behave like static methods and do not transform into bound methods
during instance attribute look
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
For reference, see the thread on the users' mailinglist/newsgroup from
2011-06-29 how to call a function for evry 10 seconds and the thread on the
developers' mailinglist from 2011-06-30 time.sleep(-1) behaviour.
The problem is how
Changes by Ulrich Eckhardt eckha...@satorlaser.com:
--
nosy: +eckhardt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1669539
___
___
Python-bugs
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
I just stumbled across the issue with isabs(). I'd also say that Mark Hammond
already provided the typical use case for this, i.e. that you allow relative
paths for convenience when storing them or putting them on the commandline
Changes by Ulrich Eckhardt eckha...@satorlaser.com:
--
nosy: +eckhardt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5117
___
___
Python-bugs-list
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
Good catch, it just took me a while to actually figure out myself where
the bug is. Try the following instead:
import io
io.FileIO('foo.text', 'w++')
This will yield ValueError: Must have exactly one of read/write/append
mode
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
What specific file would you put these pragmas into? Are you perhaps
proposing to change upstream code?
I would put it into the only sourcefile there is, and yes, I would
change upstream code. Obviously, it would be better to get
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
Technically, both changes (or neither of them) generate the same
output binaries, so I Don't Care(tm). My approach for disabling the
warnings in the code has (to me) two advantages:
1. You immediately see that warnings are disabled. I
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
The syntax would be this:
#if defined(_MSC_VER)
# pragma warning(push)
/* Disable warnings for this file, see
http://www.sqlite.org/faq.html#q17 why we don't care for them. */
# pragma warning(disable: 4244)
# pragma warning
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
For a background, see the developers' mailing list from 2009-01-26,
subject FormatError() in callproc.c under win32. The attached patch
removes the redundant call to FormatError(). It also makes
SetException() a static function, since
Changes by Ulrich Eckhardt eckha...@satorlaser.com:
--
nosy: +eckhardt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue1754
___
___
Python-bugs-list
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
It's not just that function, at least not in trunk. There are also
PyErr_SetFromErrnoWithFilename, PyErr_SetFromErrnoWithUnicodeFilename
and _PyErr_BadInternalCall which should be made const correct, see
attached patch for trunk
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
Okay, the changes necessary to the NT thread code are rather minimal,
see attached patch. The file thread_wince.c could then be removed, too.
I also removed a comment which was left over from the version before but
doesn't apply any
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
The attached patch is for sysmodule.c, it contains two changes:
1. The check whether stdin is a directory is rewritten without using
fstat(), which doesn't exist under CE.
2. Replacing sys.argv[0] with the full path is skipped, CE
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
Okay, hopefully this patch is final. The last one was using 'errno' in
debug mode, but under CE using CreateThread() it should use
GetLastError(). I also took the liberty of saving that error information
for both variants directly after
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
Actually, I made the distinction between the 'int e' and the 'unsigned
e' consciously. When using 'errno', using an 'int' is correct. When
using GetLastError(), I would have used a win32 DWORD if there was a
format sequence
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
I don't really know what happens when you try to read()/fread() from
stdin that is a directory, but I guess it will fail quickly even
without an explicit check by Python. A directory can be opened under
win32 just like a file, so I
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
Changed patch with curly brackets outside the conditional code.
Added file: http://bugs.python.org/file12689/python-2.7-wince-sysmodule.1.patch
___
Python tracker rep...@bugs.python.org
http
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
That's all fine, but why do you need a variable named e in
the first place? Can't you leave the code as it was before?
There is an intermediate call to a function that retrieves the
thread's ID. That function may or may not change
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
The CE documentation mentions directories, too, but is silent on the
FILE_FLAG_BACKUP_SEMANTICS use for them. Also, even using that flag, I
can't open a directory under CE. It seems that this check is
superfluous there.
I can also
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
Next attempt, exclude all win variants from check.
Added file: http://bugs.python.org/file12690/python-2.7-wince-sysmodule.2.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
The thread code is unaffected by the Unicode/ANSI issues, but CE
doesn't have _beginthread[ex], which are mandatory for the desktop
variants. I have checkin 68455 and I will try to compile the new NT
code under CE to estimate how
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
GetFileAttributes[W|A] returns a DWORD with this value when it
couldn't determine the file's attributes. In the Python codebase,
there are basically three values this is compared with, the above
macro, 0x and (DWORD)-1
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
The patch replaces remaining magic numbers with INVALID_FILE_ATTRIBUTES.
--
keywords: +patch
Added file: http://bugs.python.org/file12673/python-2.7-fileattrib-magic.0.patch
___
Python
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
There is a separate file thread_wince.h for use with CE, but that is
firstly not used due to a missing macro definition and secondly it
doesn't compile as it is. The attached patch defines WINCE_THREADS for
CE and makes the file
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
CE6 doesn't provide strdup() but provides an equivalent _strdup() in
stdlib.h. The attached patch simply #defines strdup _strdup after
including said header file.
--
components: Interpreter Core
files: python-2.7-wince-strdup
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
4. I wonder if internal_close() should reset only the 'fd' field
or if it should also reset 'readable', 'writable', 'seekable'
seekable(), readable() and writable() raise an error if the file
is closed. I think it's fine to leave
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
I do have an issue with the patch's startup code. The prototype for
the thread entry should be DWORD WINAPI function(PVOID);. The
important distinction is the WINAPI part, which resolves to __stdcall
but doesn't have to. I know
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
There are several checks like GetVersion() 0x8000 that try to
determine whether there is support for the WCHAR versions of the win32
API. Since all support for MS Windows 95, 98 and ME has been dropped,
all supported systems
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
You're right, Kristján, sorry for the noise. Shouldn't make claims
before being fully awake
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue3582
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
This patch removes all calls to win32's GetVersion() where they are used
to detect NT. In posixmodule.c it was used by a wrapper function that
cached the result, which then also became obsolete.
--
keywords: +patch
Added file
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
I have a patch here which passes the proposed change to the tests in
trunk. A few notes up front though, since the patch isn't good yet:
1. The handling of the error in internal_close() isn't really good. What
I'm also not sure about
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
You beat me by 10 minutes, Alexander, otherwise I'd have had a similar
patch, except moving the declaration. I agree with your rationale
though, so yours is even better.
Concerning including the extern C in the PyAPI_* macros, I had
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
No, CreateThread() is not a suitable replacement, because it lacks
some initialisations of the C library, as explained in the MSDN:
http://msdn.microsoft.com/en-us/library/ms682453(VS.85).aspx
--
nosy: +eckhardt
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
In _fileio.c, there is the following comment: Returns 0 on success,
errno (which is 0) on failure. The problem here is the claim that
errno ever was less than zero, which is simply wrong.
You can see this being a problem
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
This adds a test that the close() correctly fails with an IOError.
--
keywords: +patch
Added file:
http://bugs.python.org/file12593/python-2.7-fileio-close-test.0.patch
___
Python tracker
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
Actually, providing the patch for PyAPI_Data/PyAPI_Func wouldn't be so
hard, but there are lots of headers that need to be changed, i.e. all
their existing extern C clauses removed. What I would do is build
the Python shared library
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
Specifying the '+' more than once while opening a file results in the
error Must have exactly one of read/write/append mode. The attached
patch extends that with .. and at most one optional plus.
Further, the patch checks these after
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
This is just to record that the above function is wrongly documented,
inconsistently implemented, but fortunately unused, so it can be removed.
In addition to the patch attached, there are two files that can be removed:
Python
New submission from Ulrich Eckhardt eckha...@satorlaser.com:
Note up front: there is a win32 function wsprintf() and an ISO C
function swprintf(), these are different things in case you wonder.
In _winreg.c, there are two functions that use wsprintf on a char
buffer, while the function takes
Changes by Ulrich Eckhardt eckha...@satorlaser.com:
--
nosy: +eckhardt
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue4681
___
___
Python-bugs-list
Ulrich Eckhardt eckha...@satorlaser.com added the comment:
Concerning the SetArgv( int, char**), that one will have to be changed
to a SetArgv( int, char const* const*), i.e. applying the const on both
levels. Otherwise, there is no implicit conversion between the two.
The reason is a bit
Ulrich Eckhardt [EMAIL PROTECTED] added the comment:
If this patch required for CE 5.0?
The patch I created is required for all CEs that I know of. I have
personally worked with 4.20, 5 and now 6, and had some exchange with
others who worked on 3.x variants to get STLport (C++ stdlibrary
Ulrich Eckhardt [EMAIL PROTECTED] added the comment:
PythonCE project use xxxA functions for CE .NET 4.20 platform.
Look again. The PythonCE project adds a header and sourcefile
(wince_compatibility.h/c) which adds these functions. In other words, it
doesn't use the xxxA functions of the win32
Ulrich Eckhardt [EMAIL PROTECTED] added the comment:
http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm
The same recently cropped up on the users mailinglist under the topic
default value in __init__.
--
nosy: +eckhardt
Ulrich Eckhardt [EMAIL PROTECTED] added the comment:
Roumen, just and explanation on the TCHAR/WCHAR/CHAR issue under win32...
In the old days, DOS/Windows was built with 8-bit characters using
codepages. So functions like CreateFile() took a char string that used
the current local codepage
Ulrich Eckhardt [EMAIL PROTECTED] added the comment:
Actually, even _Py_NegativeRefcount() passes a statically sized buffer
with 300 chars. Other than that, there is get_ref_type() which uses one
with 350 chars, but AFAICT, that's the largest one. Attached accordingly
modified patch
New submission from Ulrich Eckhardt [EMAIL PROTECTED]:
The attached patch converts the call to OutputDebugString() with a
'TCHAR' parameter (which boils down to a 'char') to one using a 'WCHAR'
parameter, allowing the code to be compiled under MS Windows CE, which
doesn't have the 'char' version
New submission from Ulrich Eckhardt [EMAIL PROTECTED]:
This patch does two things:
* It removes trailing newlines from the arguments given to
Py_FatalError() because a trailing newline is already added automatically.
* It fixes the declaration in ffi.c to take a 'const char
Ulrich Eckhardt [EMAIL PROTECTED] added the comment:
Add a patch that fixes a warning.
--
keywords: +patch
Added file:
http://bugs.python.org/file11708/Python-unicode-redefine-warning.0.patch
___
Python tracker [EMAIL PROTECTED]
http
53 matches
Mail list logo