This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: winerror module
Type: Stage:
Components: Library (Lib) Versions: Python 2.6
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: loewis Nosy List: giampaolo.rodola, lemburg, loewis, mhammond
Priority: normal Keywords: patch

Created on 2006-06-13 08:57 by lemburg, last changed 2022-04-11 14:56 by admin. This issue is now closed.

File name Uploaded Description Edit lemburg, 2006-06-13 08:57 lemburg, 2006-06-13 08:58
Messages (8)
msg50460 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2006-06-13 08:57
Hi Martin,

unfortunately I haven't found time to work on a C based
winerror module. 

Here's a generator and the generated Python module
which defines the interface. This can then later be
replaced by  a more efficient C implementation.
msg50461 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2006-06-14 05:15
Logged In: YES 

As discussed before, I am uncomfortable with a lookup
object, instead of just two dicts or dict-like objects: it's
inconsistent with the errno module, and I don't see the need
for it.

Also, can you please provide documentation?
msg50462 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2006-06-16 07:43
Logged In: YES 

It's a new module, so it may also come with a new interface. 

Note that there's not much difference between the errno
module and winerror, except that you can't write
winerror.ERROR, but have to do one more indirection:

The reason for having a lookup object is that the number of
error symbols is huge and you'd ideally only want those
symbols being loaded into the process that actually need
(typically only a few). The C implementation of the lookup
object will make this possible by storing the data in a
static C array.

I will add documentation for the module based on the errno
module documentation, but not before next week - no time. I
still think that the module should go in before beta1 is
msg50463 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2006-06-18 18:50
Logged In: YES 

This will have to wait until Python 2.6... (see python-dev
for discussion).
msg55680 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-09-06 07:54
Marc-Andre, what should we do about this patch?
msg55683 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2007-09-06 09:35
The winerror module should really be coded in C. Otherwise you don't
benefit from the lookup object approach.

The files I uploaded only server as basis for such a C module. Would be
great if you could find someone to write such a module - preferably
using a generator that creates it from the header files.

I'm not interested in this anymore, so feel free to drop the whole idea.
msg55684 - (view) Author: Martin v. Löwis (loewis) * (Python committer) Date: 2007-09-06 10:04
Ok rejecting it.
msg67803 - (view) Author: Mark Hammond (mhammond) * (Python committer) Date: 2008-06-07 12:05
pywin32 has a 'winerror' module, which is (basically) a h2py generated
module from the same header (although initially generated roughly a
decade ago and hand-tweaked since then).  Its unfortunate pywin32 still
hasn't adopted a package approach, but it would be nice to find
something compatible with pywin32 should a winerror module ever be adopted.
Date User Action Args
2022-04-11 14:56:18adminsetgithub: 43494
2008-06-07 18:39:08giampaolo.rodolasetnosy: + giampaolo.rodola
2008-06-07 12:05:44mhammondsetnosy: + mhammond
messages: + msg67803
2007-09-06 10:04:47loewissetstatus: open -> closed
resolution: rejected
messages: + msg55684
2007-09-06 09:35:59lemburgsetmessages: + msg55683
2007-09-06 07:54:43loewissetmessages: + msg55680
2006-06-13 08:57:17lemburgcreate