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.

classification
Title: #include in Objects/unicodetype_db.h and Objects/unicodectype.c
Type: compile error Stage: resolved
Components: Build Versions: Python 2.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: amaury.forgeotdarc, christian.heimes, dilyan.palauzov, lemburg, serhiy.storchaka
Priority: normal Keywords: patch

Created on 2011-02-24 14:51 by dilyan.palauzov, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
11309_wctype.patch christian.heimes, 2013-07-06 00:30
Messages (5)
msg129266 - (view) Author: Дилян Палаузов (dilyan.palauzov) Date: 2011-02-24 14:51
As of python 2.7.1 configured with "--enable-ipv6 --enable-unicode --with-system-expat --with-system-ffi --with-signal-module --with-threads --with-wctype-functions --enable-shared":

Please #include <wctype.h> in Objects/unicodetype_db.h and Objects/unicodectype.c

compilation produces the warnings:

In file included from Objects/unicodectype.c:34:0:
Objects/unicodetype_db.h: In function '_PyUnicodeUCS2_IsWhitespace':
Objects/unicodetype_db.h:3277:5: warning: implicit declaration of function 'iswspace'
Objects/unicodectype.c: In function '_PyUnicodeUCS2_IsLowercase':
Objects/unicodectype.c:192:5: warning: implicit declaration of function 'iswlower'
Objects/unicodectype.c: In function '_PyUnicodeUCS2_IsUppercase':
Objects/unicodectype.c:197:5: warning: implicit declaration of function 'iswupper'
Objects/unicodectype.c: In function '_PyUnicodeUCS2_ToLowercase':
Objects/unicodectype.c:202:5: warning: implicit declaration of function 'towlower'
Objects/unicodectype.c:202:12: warning: incompatible implicit declaration of built-in function 'towlower'
Objects/unicodectype.c: In function '_PyUnicodeUCS2_ToUppercase':
Objects/unicodectype.c:207:5: warning: implicit declaration of function 'towupper'
Objects/unicodectype.c:207:12: warning: incompatible implicit declaration of built-in function 'towupper'
Objects/unicodectype.c: In function '_PyUnicodeUCS2_IsAlpha':
Objects/unicodectype.c:212:5: warning: implicit declaration of function 'iswalpha'
msg129267 - (view) Author: Marc-Andre Lemburg (lemburg) * (Python committer) Date: 2011-02-24 15:01
Дилян Палаузов wrote:
> 
> New submission from Дилян Палаузов <dilyan.palauzov@aegee.org>:
> 
> As of python 2.7.1 configured with "--enable-ipv6 --enable-unicode --with-system-expat --with-system-ffi --with-signal-module --with-threads --with-wctype-functions --enable-shared":
> 
> Please #include <wctype.h> in Objects/unicodetype_db.h and Objects/unicodectype.c
> 
> compilation produces the warnings:
> 
> In file included from Objects/unicodectype.c:34:0:
> Objects/unicodetype_db.h: In function '_PyUnicodeUCS2_IsWhitespace':
> Objects/unicodetype_db.h:3277:5: warning: implicit declaration of function 'iswspace'
> Objects/unicodectype.c: In function '_PyUnicodeUCS2_IsLowercase':
> Objects/unicodectype.c:192:5: warning: implicit declaration of function 'iswlower'
> Objects/unicodectype.c: In function '_PyUnicodeUCS2_IsUppercase':
> Objects/unicodectype.c:197:5: warning: implicit declaration of function 'iswupper'
> Objects/unicodectype.c: In function '_PyUnicodeUCS2_ToLowercase':
> Objects/unicodectype.c:202:5: warning: implicit declaration of function 'towlower'
> Objects/unicodectype.c:202:12: warning: incompatible implicit declaration of built-in function 'towlower'
> Objects/unicodectype.c: In function '_PyUnicodeUCS2_ToUppercase':
> Objects/unicodectype.c:207:5: warning: implicit declaration of function 'towupper'
> Objects/unicodectype.c:207:12: warning: incompatible implicit declaration of built-in function 'towupper'
> Objects/unicodectype.c: In function '_PyUnicodeUCS2_IsAlpha':
> Objects/unicodectype.c:212:5: warning: implicit declaration of function 'iswalpha'

--with-wctype-functions will only work if you have configured Python
to use the Unicode variant which is used by wchar_t on your platform.

Given the warnings you are seeing, this appears to be UCS4,
so you have to add --enable-unicode=ucs4 to your configure line.

Please note that support for wctype functions is not being
actively supported in Python anymore. I'd suggest you remove
the --with-wctype-functions option altogether.
msg129301 - (view) Author: Amaury Forgeot d'Arc (amaury.forgeotdarc) * (Python committer) Date: 2011-02-24 19:33
--with-wctype-functions was removed in 3.2 (see issue9210, r84752)
msg192379 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-06 00:30
Python 2.7 fails even with --enable-unicode=ucs4:

$ ./configure --with-wctype-functions --enable-unicode=ucs4
$ make 
...
In file included from Objects/unicodectype.c:34:0:
Objects/unicodetype_db.h: In function '_PyUnicodeUCS4_IsWhitespace':
Objects/unicodetype_db.h:3277:5: warning: implicit declaration of function 'iswspace' [-Wimplicit-function-declaration]
Objects/unicodectype.c: In function '_PyUnicodeUCS4_IsLowercase':
Objects/unicodectype.c:192:5: warning: implicit declaration of function 'iswlower' [-Wimplicit-function-declaration]
Objects/unicodectype.c: In function '_PyUnicodeUCS4_IsUppercase':
Objects/unicodectype.c:197:5: warning: implicit declaration of function 'iswupper' [-Wimplicit-function-declaration]
Objects/unicodectype.c: In function '_PyUnicodeUCS4_ToLowercase':
Objects/unicodectype.c:202:5: warning: implicit declaration of function 'towlower' [-Wimplicit-function-declaration]
Objects/unicodectype.c:202:12: warning: incompatible implicit declaration of built-in function 'towlower' [enabled by default]
Objects/unicodectype.c: In function '_PyUnicodeUCS4_ToUppercase':
Objects/unicodectype.c:207:5: warning: implicit declaration of function 'towupper' [-Wimplicit-function-declaration]
Objects/unicodectype.c:207:12: warning: incompatible implicit declaration of built-in function 'towupper' [enabled by default]
Objects/unicodectype.c: In function '_PyUnicodeUCS4_IsAlpha':
Objects/unicodectype.c:212:5: warning: implicit declaration of function 'iswalpha' [-Wimplicit-function-declaration]

I have attached a patch that checks for wctype.h and includes it for WANT_WCTYPE_FUNCTIONS.
msg370462 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2020-05-31 14:28
In Python 3.3+ functions like iswlower() are no longer used for Py_UNICODE_ISLOWER etc. And Python 2.7 is no longer supported.
History
Date User Action Args
2022-04-11 14:57:13adminsetgithub: 55518
2020-05-31 14:28:52serhiy.storchakasetstatus: open -> closed

nosy: + serhiy.storchaka
messages: + msg370462

resolution: out of date
stage: patch review -> resolved
2013-07-06 00:30:06christian.heimessetfiles: + 11309_wctype.patch

nosy: + christian.heimes
messages: + msg192379

keywords: + patch
stage: patch review
2011-02-24 19:33:42amaury.forgeotdarcsetnosy: + amaury.forgeotdarc
messages: + msg129301
2011-02-24 15:01:49lemburgsetnosy: + lemburg
title: #include <wctype.h> in Objects/unicodetype_db.h and Objects/unicodectype.c -> #include <wctype.h> in Objects/unicodetype_db.h and Objects/unicodectype.c
messages: + msg129267
2011-02-24 14:51:43dilyan.palauzovcreate