pyicu issueshttps://gitlab.pyicu.org/main/pyicu/-/issues2017-05-31T08:34:32-07:00https://gitlab.pyicu.org/main/pyicu/-/issues/55testSurrogatePairs failure on Cygwin2017-05-31T08:34:32-07:00Andi VajdatestSurrogatePairs failure on Cygwin*Created by: wilx*
I am seeing the following test failure on Cygwin with Python 3.
```
======================================================================
FAIL: testSurrogatePairs (test.test_Script.TestScript)
-----------------...*Created by: wilx*
I am seeing the following test failure on Cygwin with Python 3.
```
======================================================================
FAIL: testSurrogatePairs (test.test_Script.TestScript)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/cygdrive/c/stuff/PyICU-1.9.7/test/test_Script.py", line 48, in testSurrogatePairs
self.assertEqual(['Latn', 'Deva', 'Hani', 'Hani', 'Hani'], names)
AssertionError: Lists differ: ['Latn', 'Deva', 'Hani', 'Hani', 'Hani'] != ['Latn', 'Deva', 'Hani', 'Zzzz', 'Zzzz']
First differing element 3:
'Hani'
'Zzzz'
- ['Latn', 'Deva', 'Hani', 'Hani', 'Hani']
? ^^^^ ^^^^
+ ['Latn', 'Deva', 'Hani', 'Zzzz', 'Zzzz']
? ^^^^ ^^^^
----------------------------------------------------------------------
Ran 39 tests in 0.428s
FAILED (failures=1)
Test failed: <unittest.runner.TextTestResult run=39 errors=0 failures=1>
error: Test failed: <unittest.runner.TextTestResult run=39 errors=0 failures=1>
```
This is with PyICU 1.9.7 for ICU 58.2, Python 3.6.1.https://gitlab.pyicu.org/main/pyicu/-/issues/32build problem: missing icu/common/unicode/ headers2016-11-04T16:18:21-07:00Andi Vajdabuild problem: missing icu/common/unicode/ headers*Created by: conjugateprior*
Just compiled and installed the most recent ICU (58 http://site.icu-project.org/download/58) on a Centos 5 machine and tried to compile the PyICU 1.9.3 from https://pypi.python.org/pypi/PyICU/ and also the m...*Created by: conjugateprior*
Just compiled and installed the most recent ICU (58 http://site.icu-project.org/download/58) on a Centos 5 machine and tried to compile the PyICU 1.9.3 from https://pypi.python.org/pypi/PyICU/ and also the master from GitHub. Same error for both:
> [iccdb@web80 pyicu-master]$ python setup.py build
running build
running build_py
creating build
creating build/lib.linux-i686-2.7
copying icu.py -> build/lib.linux-i686-2.7
copying PyICU.py -> build/lib.linux-i686-2.7
copying docs.py -> build/lib.linux-i686-2.7
running build_ext
building '_icu' extension
creating build/temp.linux-i686-2.7
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/usr/local/include/python2.7 -c _icu.cpp -o build/temp.linux-i686-2.7/_icu.o -DPYICU_VER="1.9.3"
cc1plus: warning: command line option "-Wstrict-prototypes" is valid for Ada/C/ObjC but not for C++
In file included from _icu.cpp:27:
common.h:102:28: error: unicode/udatpg.h: No such file or directory
common.h:103:30: error: unicode/dtptngen.h: No such file or directory
error: command 'gcc' failed with exit status 1
`udatpg.h` and `dtptngen.h` are in `i18n/unicode/` down in the icu source, but they don't seem to make it into the `make install`ed include directory (below)
For reference, this is python 2.7.12, with a local icu stuff in `/home/me/lib` and `/home/me/include`, which also went into the `setup.py`.
Is there perhaps a less recent ICU that is known to work better?
https://gitlab.pyicu.org/main/pyicu/-/issues/37error when try to run ImportError: /usr/local/lib/python3.5/dist-packages/_ic...2018-08-20T07:33:05-07:00Andi Vajdaerror when try to run ImportError: /usr/local/lib/python3.5/dist-packages/_icu.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZTIN6icu_5714LEFontInstanceE*Created by: bilalbayasut*
I got this error when I tried to run my code
ImportError: /usr/local/lib/python3.5/dist-packages/_icu.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZTIN6icu_5714LEFontInstanceE
any ideas?*Created by: bilalbayasut*
I got this error when I tried to run my code
ImportError: /usr/local/lib/python3.5/dist-packages/_icu.cpython-35m-x86_64-linux-gnu.so: undefined symbol: _ZTIN6icu_5714LEFontInstanceE
any ideas?https://gitlab.pyicu.org/main/pyicu/-/issues/31Can't build on Heroku despite libicu-dev2018-04-26T01:33:32-07:00Andi VajdaCan't build on Heroku despite libicu-dev*Created by: miracle2k*
I want to use PyICU on Heroku.
I installed libicu-dev via heroku-buildpack-apt.
During build, I see this:
```
building '_icu' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -g...*Created by: miracle2k*
I want to use PyICU on Heroku.
I installed libicu-dev via heroku-buildpack-apt.
During build, I see this:
```
building '_icu' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c iterators.cpp -o build/temp.linux-x86_64-2.7/iterators.o -DPYICU_VER="1.9.3"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /usr/include/c++/4.8/clocale:42:0,
from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:41,
from /usr/include/c++/4.8/bits/localefwd.h:40,
from /usr/include/c++/4.8/string:43,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/std_string.h:30,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
from common.h:91,
from iterators.cpp:24:
./locale.h:29:23: error: ‘Locale’ was not declared in this scope
PyObject *wrap_Locale(Locale *locale, int flags);
^
./locale.h:29:31: error: ‘locale’ was not declared in this scope
PyObject *wrap_Locale(Locale *locale, int flags);
^
./locale.h:29:39: error: expected primary-expression before ‘int’
PyObject *wrap_Locale(Locale *locale, int flags);
^
./locale.h:29:48: error: expression list treated as compound expression in initializer [-fpermissive]
PyObject *wrap_Locale(Locale *locale, int flags);
^
./locale.h:30:29: error: ‘Locale’ does not name a type
PyObject *wrap_Locale(const Locale &locale);
^
./locale.h:30:43: error: ‘PyObject* wrap_Locale(const int&)’ redeclared as different kind of symbol
PyObject *wrap_Locale(const Locale &locale);
^
./locale.h:29:11: error: previous declaration of ‘PyObject* wrap_Locale’
PyObject *wrap_Locale(Locale *locale, int flags);
^
In file included from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:41:0,
from /usr/include/c++/4.8/bits/localefwd.h:40,
from /usr/include/c++/4.8/string:43,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/std_string.h:30,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
from common.h:91,
from iterators.cpp:24:
/usr/include/c++/4.8/clocale:53:11: error: ‘::lconv’ has not been declared
using ::lconv;
^
/usr/include/c++/4.8/clocale:54:11: error: ‘::setlocale’ has not been declared
using ::setlocale;
^
/usr/include/c++/4.8/clocale:55:11: error: ‘::localeconv’ has not been declared
using ::localeconv;
^
In file included from /usr/include/c++/4.8/bits/localefwd.h:40:0,
from /usr/include/c++/4.8/string:43,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/std_string.h:30,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
from common.h:91,
from iterators.cpp:24:
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:52:23: error: ‘uselocale’ was not declared in this scope
extern "C" __typeof(uselocale) __uselocale;
^
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:52:45: error: invalid type in declaration before ‘;’ token
extern "C" __typeof(uselocale) __uselocale;
^
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h: In function ‘int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)’:
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:75:53: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
^
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:100:33: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
__gnu_cxx::__uselocale(__old);
^
iterators.cpp: In function ‘PyObject* t_breakiterator_getLocale(t_breakiterator*, PyObject*)’:
iterators.cpp:802:34: error: ‘wrap_Locale’ cannot be used as a function
return wrap_Locale(locale);
^
iterators.cpp:807:38: error: ‘wrap_Locale’ cannot be used as a function
return wrap_Locale(locale);
^
iterators.cpp: In function ‘PyObject* t_breakiterator_getAvailableLocales(PyTypeObject*)’:
iterators.cpp:936:46: error: ‘wrap_Locale’ cannot be used as a function
PyObject *obj = wrap_Locale(locale, 0);
^
error: command 'gcc' failed with exit status 1
```
Environment:
```
~ $ echo $LD_LIBRARY_PATH
/app/.heroku/vendor/lib:/app/.heroku/python/lib:/app/.apt/usr/lib/x86_64-linux-gnu:/app/.apt/usr/lib/i386-linux-gnu:/app/.apt/usr/lib:
```
https://gitlab.pyicu.org/main/pyicu/-/issues/30Wrong UnicodeString to unicode conversion for surrogate pair type characters2016-12-19T17:22:12-08:00Andi VajdaWrong UnicodeString to unicode conversion for surrogate pair type characters*Created by: ohadshany*
If a UnicodeString object contains characters that are UTF16 surrogate pair (i.e u' \U000216d5') then direct conversion to unicode results in an invalid value. For example:
`import icu`
`print unicode(icu.Unicod...*Created by: ohadshany*
If a UnicodeString object contains characters that are UTF16 surrogate pair (i.e u' \U000216d5') then direct conversion to unicode results in an invalid value. For example:
`import icu`
`print unicode(icu.UnicodeString(u'\U000216d5'))`
Results in: u'\ud845\uded5'
Which is wrong since the correct value should be u' \U000216d5'
You can also see that `UnicodeString(unicode(icu.UnicodeString(u' \U000216d5')))` fails because of incorrect value.
A quick fix is to use explicit encoding like this:
`unicode(icu.UnicodeString(u'\U000216d5').encode('utf8'), 'utf8')`
I've encountered this problem on linux python 2.7 with PyICU 1.9.3 and ICU 57 and also with PyICU 1.8 and ICU 53.
https://gitlab.pyicu.org/main/pyicu/-/issues/29Install from Pip3(and pip) failed.2018-01-21T22:27:14-08:00Andi VajdaInstall from Pip3(and pip) failed.*Created by: nemonein*
Hello.
I'm using Ubuntu 16.04(64bit).
I tried to install PyICU(for python3), by using pip3.
```
$ pip3 install pyicu
Collecting pyicu
Using cached PyICU-1.9.3.tar.gz
Building wheels for collected packages: pyic...*Created by: nemonein*
Hello.
I'm using Ubuntu 16.04(64bit).
I tried to install PyICU(for python3), by using pip3.
```
$ pip3 install pyicu
Collecting pyicu
Using cached PyICU-1.9.3.tar.gz
Building wheels for collected packages: pyicu
Running setup.py bdist_wheel for pyicu ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rbi2xozh/pyicu/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d /tmp/tmp4fr3ryutpip-wheel- --python-tag cp35:
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
copying icu.py -> build/lib.linux-x86_64-3.5
copying PyICU.py -> build/lib.linux-x86_64-3.5
copying docs.py -> build/lib.linux-x86_64-3.5
running build_ext
building '_icu' extension
creating build/temp.linux-x86_64-3.5
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c _icu.cpp -o build/temp.linux-x86_64-3.5/_icu.o -DPYICU_VER="1.9.3"
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from _icu.cpp:27:0:
common.h:90:28: fatal error: unicode/utypes.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Failed building wheel for pyicu
Running setup.py clean for pyicu
Failed to build pyicu
Installing collected packages: pyicu
Running setup.py install for pyicu ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rbi2xozh/pyicu/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-uec_n7ii-record/install-record.txt --single-version-externally-managed --compile:
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.5
copying icu.py -> build/lib.linux-x86_64-3.5
copying PyICU.py -> build/lib.linux-x86_64-3.5
copying docs.py -> build/lib.linux-x86_64-3.5
running build_ext
building '_icu' extension
creating build/temp.linux-x86_64-3.5
x86_64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c _icu.cpp -o build/temp.linux-x86_64-3.5/_icu.o -DPYICU_VER="1.9.3"
cc1plus: warning: command line option '-Wstrict-prototypes' is valid for C/ObjC but not for C++
In file included from _icu.cpp:27:0:
common.h:90:28: fatal error: unicode/utypes.h: No such file or directory
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
----------------------------------------
Command "/usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-rbi2xozh/pyicu/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-uec_n7ii-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-rbi2xozh/pyicu/
```
I tried with sudo, but the result was the same.
Can any help me with this?
https://gitlab.pyicu.org/main/pyicu/-/issues/34Can't install pyicu in my mac. Error: library not found for -licule2016-11-07T12:58:22-08:00Andi VajdaCan't install pyicu in my mac. Error: library not found for -licule*Created by: miguelwon*
Hi,
So I'm having some troubles installing pyicu in my mac. I'm running the following command:
CFLAGS='-I/usr/local/opt/icu4c/include -I/opt/local/include' LDFLAGS=-L/usr/local/opt/icu4c/lib pip install pyicu...*Created by: miguelwon*
Hi,
So I'm having some troubles installing pyicu in my mac. I'm running the following command:
CFLAGS='-I/usr/local/opt/icu4c/include -I/opt/local/include' LDFLAGS=-L/usr/local/opt/icu4c/lib pip install pyicu
and it results in the error:
ld: library not found for -licule
Which library is this licule?https://gitlab.pyicu.org/main/pyicu/-/issues/28test failure in TestDateTimePatternGenerator2017-01-01T17:16:08-08:00Andi Vajdatest failure in TestDateTimePatternGenerator*Created by: lfam*
I am trying to build PyICU 1.9.3 (plus the fix for #19 ) using GNU Guix. I get the following test failure.
```
======================================================================
FAIL: testAddPattern (test.test_Da...*Created by: lfam*
I am trying to build PyICU 1.9.3 (plus the fix for #19 ) using GNU Guix. I get the following test failure.
```
======================================================================
FAIL: testAddPattern (test.test_DateTimeParserGenerator.TestDateTimePatternGenerator)
Test overwriting a pattern with the same skeleton.
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/guix-build-python-pyicu-1.9.3.drv-0/PyICU-1.9.3/test/test_DateTimeParserGenerator.py", line 47, in testAddPattern
self.assertEqual(sdf.format(self.date), '09 mai à 17:30')
AssertionError: '09 mai 17:30' != '09 mai à 17:30'
- 09 mai 17:30
+ 09 mai à 17:30
? ++
----------------------------------------------------------------------
Ran 37 tests in 0.637s
FAILED (failures=1)
```
I'm using python-3.4.3, icu4c-55.1, perl-5.22.1. Let me know what other information could help debug this.
https://gitlab.pyicu.org/main/pyicu/-/issues/9ListFormatter tests fail2016-11-04T16:22:50-07:00Andi VajdaListFormatter tests fail*Created by: jnak*
It seems that from icu import \* does not import ListFormatter.
```
EE
======================================================================
ERROR: testDefault (__main__.TestListFormatter)
--------------------------...*Created by: jnak*
It seems that from icu import \* does not import ListFormatter.
```
EE
======================================================================
ERROR: testDefault (__main__.TestListFormatter)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_ListFormatter.py", line 34, in testDefault
formatter = ListFormatter.createInstance()
NameError: global name 'ListFormatter' is not defined
======================================================================
ERROR: testLocale (__main__.TestListFormatter)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test_ListFormatter.py", line 41, in testLocale
formatter = ListFormatter.createInstance(Locale.getFrance())
NameError: global name 'ListFormatter' is not defined
----------------------------------------------------------------------
Ran 2 tests in 0.000s
```
Does it work for you?
https://gitlab.pyicu.org/main/pyicu/-/issues/7compile errors with pyicu 1.9.2 using visual studio community 2015 on window...2017-03-22T04:20:04-07:00Andi Vajdacompile errors with pyicu 1.9.2 using visual studio community 2015 on windows 10*Created by: maveryKearney*
The problem occurs with:
- visual studio community 2015
- windows 10 amd64 4-processor dell
- python 3.5.0 win32 python. Note that vc 2015 compiles amd64 bit code but blocks execution at r...*Created by: maveryKearney*
The problem occurs with:
- visual studio community 2015
- windows 10 amd64 4-processor dell
- python 3.5.0 win32 python. Note that vc 2015 compiles amd64 bit code but blocks execution at run-time.
- icu 55 and 56 win32 builds
The problem does not occur when I use visual C++ 2010 express, I just verified this on my win7 machine. BUT
- unfortunately I no longer have the vs 2010 express install package,
- I can no longer find a means to download visual C++ 2010 express from a credible site. If I can't get it from microsoft directly then I probably don't want it, and MS probably is discouraging use
at this point.
- documentation for VS community 2015 indicates that visual C++ express 2010 is accessible "in" VS community 2015. I have not figured out how at this point.
Regardless it appears that python 3.5.0 is now using VS 2015 in production to compile from source.
Here is my compile output (I tried attaching but git hub declared, "Something went really wrong...")
It occurs to me that I should try installing VS 2015 on my win7 machine to see if by chance the compilation works there.
There are 4 instances of a single type error in a function/method within the pyicu calendar.cpp module
c:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2>C:\Users\xxxxxx\bryllyg\opt\python\Python-3.5.0\PCbuild\win32\python.exe setup.py build --debug
C:\Users\xxxxxx\bryllyg\opt\python\Python-3.5.0\PCbuild\win32\python.exe setup.py build --debug
running build
running build_py
running build_ext
building '_icu' extension
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Od /MDd /Zi /W3 /D_DEBUG -IC:\Users\xxxxxx\bryllyg\opt\icu\56.1\icu\include -IC:\Users\xxxxxx\bryllyg\opt\python\Python-3.5.0\include -IC:\Users\xxxxxx\bryllyg\opt\python\Python-3.5.0\PC "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpc:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\bases.cpp /Fobuild\temp.win32-3.5\Debug\bases.obj /Zc:wchar_t /EHsc /DPYICU_VER=\"1.9.2\" /Od /DDEBUG
bases.cpp
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Od /MDd /Zi /W3 /D_DEBUG -IC:\Users\xxxxxx\bryllyg\opt\icu\56.1\icu\include -IC:\Users\xxxxxx\bryllyg\opt\python\Python-3.5.0\include -IC:\Users\xxxxxx\bryllyg\opt\python\Python-3.5.0\PC "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\ATLMFC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10150.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpc:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\calendar.cpp /Fobuild\temp.win32-3.5\Debug\calendar.obj /Zc:wchar_t /EHsc /DPYICU_VER=\"1.9.2\" /Od /DDEBUG
calendar.cpp
c:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\calendar.cpp(353): error C2664: 'icu_56::UnicodeString &icu_56::TimeZone::getDisplayName(UBool *(__cdecl *)(void),icu_56::TimeZone::EDisplayType,const icu_56::Locale &,icu_56::UnicodeString &) const': cannot convert argument 1 from 'UBool' to 'UBool *(__cdecl *)(void)'
c:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\calendar.cpp(353): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
c:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\calendar.cpp(367): error C2664: 'icu_56::UnicodeString &icu_56::TimeZone::getDisplayName(UBool *(__cdecl *)(void),icu_56::TimeZone::EDisplayType,const icu_56::Locale &,icu_56::UnicodeString &) const': cannot convert argument 1 from 'UBool' to 'UBool *(__cdecl *)(void)'
c:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\calendar.cpp(367): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
c:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\calendar.cpp(372): error C2664: 'icu_56::UnicodeString &icu_56::TimeZone::getDisplayName(UBool *(__cdecl *)(void),icu_56::TimeZone::EDisplayType,const icu_56::Locale &,icu_56::UnicodeString &) const': cannot convert argument 1 from 'UBool' to 'UBool *(__cdecl *)(void)'
c:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\calendar.cpp(372): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
c:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\calendar.cpp(380): error C2664: 'icu_56::UnicodeString &icu_56::TimeZone::getDisplayName(UBool *(__cdecl *)(void),icu_56::TimeZone::EDisplayType,const icu_56::Locale &,icu_56::UnicodeString &) const': cannot convert argument 1 from 'UBool' to 'UBool *(__cdecl *)(void)'
c:\Users\xxxxxx\bryllyg\opt\icu\56.1\pyicu_1.9.2\calendar.cpp(380): note: Conversion from integral type to pointer type requires reinterpret_cast, C-style cast or function-style cast
C:\Users\xxxxxx\bryllyg\opt\python\Python-3.5.0\lib\distutils\dist.py:261: UserWarning: Unknown distribution option: 'test_suite'
warnings.warn(msg)
error: command 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe' failed with exit status
https://gitlab.pyicu.org/main/pyicu/-/issues/15Can't install on Linux2016-11-04T16:25:14-07:00Andi VajdaCan't install on Linux*Created by: mayhewsw*
I'm having trouble installing pyicu. I've tried to install with pip, and install from source, but each time I get this error (run: python setup.py build):
```
shape.cpp: In function ‘void _init_shape(PyObject*)’...*Created by: mayhewsw*
I'm having trouble installing pyicu. I've tried to install with pip, and install from source, but each time I get this error (run: python setup.py build):
```
shape.cpp: In function ‘void _init_shape(PyObject*)’:
shape.cpp:167: error: ‘U_SHAPE_TAIL_NEW_UNICODE’ was not declared in this scope
shape.cpp:168: error: ‘U_SHAPE_TAIL_TYPE_MASK’ was not declared in this scope
/usr/include/unicode/tmutfmt.h: At global scope:
/usr/include/unicode/tmutfmt.h:231: warning: ‘UBool icu_4_2::hashTableValueComparator(UHashTok, UHashTok)’ declared ‘static’ but never defined
error: command 'gcc' failed with exit status 1
```
I'm using Scientific Linux 6.7 (Carbon), python 2.7
https://gitlab.pyicu.org/main/pyicu/-/issues/45Compile error: cannot convert from 'Py_UCS2 *' to 'UChar *'2017-03-08T14:06:50-08:00Andi VajdaCompile error: cannot convert from 'Py_UCS2 *' to 'UChar *'*Created by: amynbe*
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:/icu/include -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual...*Created by: amynbe*
C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\x86_amd64\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD -Ic:/icu/include -IC:\Python36\include -IC:\Python36\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE" "-IC:\Program Files (x86)\Windows Kits\10\include\10.0.10240.0\ucrt" "-IC:\Program Files (x86)\Windows Kits\8.1\include\shared" "-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program Files (x86)\Windows Kits\8.1\include\winrt" /EHsc /Tpcommon.cpp /Fobuild\temp.win-amd64-3.6\Release\common.obj /Zc:wchar_t /EHsc /DPYICU_VER=\"1.9.5\" common.cpp
common.cpp(226): error C2664: 'UChar *u_memcpy_58(UChar *,const UChar *,int32_t)': cannot convert argument 1 from 'Py_UCS2 *' to 'UChar *'
common.cpp(226): note: Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
common.cpp(283): warning C4244: '=': conversion from 'Py_ssize_t' to 'int32_t', possible loss of data
common.cpp(325): warning C4244: 'argument': conversion from '__int64' to 'int32_t', possible loss of data
common.cpp(361): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int32_t', possible loss of data
common.cpp(369): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int32_t', possible loss of data
common.cpp(377): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int32_t', possible loss of data
common.cpp(383): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int32_t', possible loss of data
common.cpp(392): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int32_t', possible loss of data
common.cpp(400): warning C4244: 'argument': conversion from 'Py_ssize_t' to 'int32_t', possible loss of data
common.cpp(619): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
common.cpp(690): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
common.cpp(730): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
common.cpp(765): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
common.cpp(806): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
common.cpp(826): warning C4244: 'initializing': conversion from 'Py_ssize_t' to 'int', possible loss of data
common.cpp(1089): warning C4244: '=': conversion from 'Py_ssize_t' to 'int', possible loss of data
error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\x86_amd64\\cl.exe' failed with exit status 2https://gitlab.pyicu.org/main/pyicu/-/issues/14Documentation is weak2017-03-21T15:03:34-07:00Andi VajdaDocumentation is weak*Created by: ezmiller*
I've been trying to develop a flask-icu version of flask-babel with pyicu, and it's been quite slow going because the API documentation is weak. The readme refers us to the documentation for ICU in general, but in...*Created by: ezmiller*
I've been trying to develop a flask-icu version of flask-babel with pyicu, and it's been quite slow going because the API documentation is weak. The readme refers us to the documentation for ICU in general, but in many cases that API has been selectively implemented here, and the method argument profiles differ. A particularly confusing area is the documentation of how one might load message data into pyicu. So, in general, at least some sort of guidance about how to interpret the icu API for pyicu might be of great help.
https://gitlab.pyicu.org/main/pyicu/-/issues/44setup.py fails on windows du to no icu-config binary2017-03-21T14:59:56-07:00Andi Vajdasetup.py fails on windows du to no icu-config binary*Created by: amynbe*
The following line:
ICU_VERSION = subprocess.check_output(('icu-config', '--version')).strip()
( https://github.com/ovalhub/pyicu/commit/81830b36d85c12bcab959dce4d9f4332cb9ec6bc#diff-2eeaed663bd0d25b7e6088913...*Created by: amynbe*
The following line:
ICU_VERSION = subprocess.check_output(('icu-config', '--version')).strip()
( https://github.com/ovalhub/pyicu/commit/81830b36d85c12bcab959dce4d9f4332cb9ec6bc#diff-2eeaed663bd0d25b7e608891384b7298R11 )
Fails on windows for which an icu-config exe doesn't exist (the icu win binaries include a bunch of dll and exe files but no icu-config).https://gitlab.pyicu.org/main/pyicu/-/issues/41icu5.8 pyicu 1.9.5 integration problem (or maybe just stupid user error)2017-01-17T11:17:58-08:00Andi Vajdaicu5.8 pyicu 1.9.5 integration problem (or maybe just stupid user error)*Created by: maveryKearney*
I am unable to get python 3.6.0/icu 58.2/pyicu 1.9.5 to work as I expect. Specifically the problem is with
word break iteration.
I am running on Linux/mint/rosa (64-bit) and am current with updates.
I c...*Created by: maveryKearney*
I am unable to get python 3.6.0/icu 58.2/pyicu 1.9.5 to work as I expect. Specifically the problem is with
word break iteration.
I am running on Linux/mint/rosa (64-bit) and am current with updates.
I customize word.txt and word_POSIX.txt files for my ICU work.
The "failure" is that I don't see the results of the word_POSIX.txt customizations. It appears as if the default .so are being used rather than that specified in LD_LIBRARY_PATH.
I've attached two files that illustrate the problem:
- word_POSIX.txt with two lines added that have worked on priori versions of ICU and PyICU
(search for XmlMarkup)
[word_POSIX.txt](https://github.com/ovalhub/pyicu/files/711895/word_POSIX.txt)
- icu1.py a short script that demonstrates the problem derived from PyICU tests
[icu1.py.txt](https://github.com/ovalhub/pyicu/files/711907/icu1.py.txt)
At the end of this note I have attached output from icu1.py using ICU 57.1 and pyicu 1.9.3 which show correct execution. And, output from the same script ICU 58.2 and pyicu 1.9.5 which show incorrect
execution.
Python building
---------------
I am confident that python is not the problem. My customizations work with python 3.6.0, icu 57.1, and pyicu 1.9.3, and several versions prior to that.
ICU building
------------
ICU 58.2 builds without error, and passes its own tests. I build with the commands:
make clean
./runConfigureICU
make
and to test:
make check
For reasons I explain below, with 58.2 I also execute "make install" but it doesn't help.
In addition, when I add my customizations, icu 58.2 still builds without error and the icu tests show differences that I expect. For this reason, my "failure" feels more like user error than a genuine bug. My customized data is lurking somewhere. It feels like I am just missing a switch, or environment variable to access it.
PyICU building
--------------
When I start working with pyicu 1.9.5, odd things start to happen. The pyicu build commands I use are
python setup.py build
python setup.py install
The logs below show how I run the icu1.py script which show the results.
Details follow
First, "setup.py build" execution fails. The script reports that it is unable to find the icu *.so files in /usr/local/lib. Specifically the message from setup.py is:
### icu-config: Can't find /usr/local/lib/libicuuc.so - ICU prefix is wrong.
### Try the --prefix= option
### or --detect-prefix
### (If you want to disable this check, use the --noverify option)
### icu-config: Exitting.
Traceback (most recent call last):
File "setup.py", line 11, in <module>
ICU_VERSION = subprocess.check_output(('icu-config', '--version')).strip()
File "/home/mkearney/bryllyg/opt/python_/3_6_0/Lib/subprocess.py", line 336, in check_output
**kwargs).stdout
File "/home/mkearney/bryllyg/opt/python_/3_6_0/Lib/subprocess.py", line 418, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '('icu-config', '--version')' returned non-zero exit status 2.
Indeed they are not there, I have not installed icu yet. I keep normally new versions out of that area until they are proven, and defined LD_LIBRARY_PATH to be .../icu_58_2/source/lib which gets created when ICU is built. This strategy has worked until ICU 58.2
Hoping to isolate the problem, I performed icu "make install" and saw that the icu libraries were installed in
/usr/local/lib. That enable me to run pyicu "setup.py build" and "install" However, when I run my
liveness test for my customizations, the results I get are those of no customizations installed. Perhaps I am getting the default ICU data.
Bottom line, I can proceed for now with python 3.6.0/icu 57.1/pyicu 1.9.3. FYI, I tried icu 58.2 with pyicu 1.9.3, and got undefined symbol errors, and didn't proceed beyond that point.
Expected output --------- with ICU 57.1 and PyIcu 1.9.3
... /opt/python_/3_6_0_x/bin/python icu1.py
DYLD_LIBRARY_PATH not defined.
LD_LIBRARY_PATH: .../opt/icu_/57_1_brl/source/lib
ICU Break Iterator Sample Program
C++ Break Iteration in Python
Examining: <a> bbb ccc. </a>Ddd eee fff.
Word Boundaries...
----- forward: -----------
0 3 |<a>| bbb ccc. </a>Ddd eee fff.
3 4 <a>| |bbb ccc. </a>Ddd eee fff.
4 7 <a> |bbb| ccc. </a>Ddd eee fff.
7 8 <a> bbb| |ccc. </a>Ddd eee fff.
8 11 <a> bbb |ccc|. </a>Ddd eee fff.
11 12 <a> bbb ccc|.| </a>Ddd eee fff.
12 13 <a> bbb ccc.| |</a>Ddd eee fff.
13 17 <a> bbb ccc. |</a>|Ddd eee fff.
17 20 <a> bbb ccc. </a>|Ddd| eee fff.
20 21 <a> bbb ccc. </a>Ddd| |eee fff.
21 24 <a> bbb ccc. </a>Ddd |eee| fff.
24 25 <a> bbb ccc. </a>Ddd eee| |fff.
25 28 <a> bbb ccc. </a>Ddd eee |fff|.
28 29 <a> bbb ccc. </a>Ddd eee fff|.|
End C++ Break Iteration in Python
.
------
Failing output - iterator breaks incorrectly. With ICU 58.2 and PyIcu 1.9.5
... /opt/python_/3_6_0_y/bin/python icu1.py
DYLD_LIBRARY_PATH not defined.
LD_LIBRARY_PATH: .../opt/icu_/58_2_brl/source/lib
ICU Break Iterator Sample Program
C++ Break Iteration in Python
Examining: <a> bbb ccc. </a>Ddd eee fff.
Word Boundaries...
----- forward: -----------
0 1 |<|a> bbb ccc. </a>Ddd eee fff.
1 2 <|a|> bbb ccc. </a>Ddd eee fff.
2 3 <a|>| bbb ccc. </a>Ddd eee fff.
3 4 <a>| |bbb ccc. </a>Ddd eee fff.
4 7 <a> |bbb| ccc. </a>Ddd eee fff.
7 8 <a> bbb| |ccc. </a>Ddd eee fff.
8 11 <a> bbb |ccc|. </a>Ddd eee fff.
11 12 <a> bbb ccc|.| </a>Ddd eee fff.
12 13 <a> bbb ccc.| |</a>Ddd eee fff.
13 14 <a> bbb ccc. |<|/a>Ddd eee fff.
14 15 <a> bbb ccc. <|/|a>Ddd eee fff.
15 16 <a> bbb ccc. </|a|>Ddd eee fff.
16 17 <a> bbb ccc. </a|>|Ddd eee fff.
17 20 <a> bbb ccc. </a>|Ddd| eee fff.
20 21 <a> bbb ccc. </a>Ddd| |eee fff.
21 24 <a> bbb ccc. </a>Ddd |eee| fff.
24 25 <a> bbb ccc. </a>Ddd eee| |fff.
25 28 <a> bbb ccc. </a>Ddd eee |fff|.
28 29 <a> bbb ccc. </a>Ddd eee fff|.|
End C++ Break Iteration in Python
https://gitlab.pyicu.org/main/pyicu/-/issues/8link error : icu56.1, python.3.5.0, pyicu1.9.2 OSX Yosemite.2015-10-28T15:00:59-07:00Andi Vajdalink error : icu56.1, python.3.5.0, pyicu1.9.2 OSX Yosemite.*Created by: maveryKearney*
In the interest of getting a different perspective on the compile problem on Windows 10, I moved to OSX. I've had working the combination icu55.1, python 3.5.0, pyicu 1.9.2 on OSX Yosemite. However, when I ad...*Created by: maveryKearney*
In the interest of getting a different perspective on the compile problem on Windows 10, I moved to OSX. I've had working the combination icu55.1, python 3.5.0, pyicu 1.9.2 on OSX Yosemite. However, when I advanced to icu56.1,
- icu56.1 built and tested w/o error
- Using python 3.5.0 download for MacOSX (generic) from
https://www.python.org/downloads/release/python-350/
- built pyicu 1.9.2 without error via
python3 setup.py build
(i.e. I am trying to be as generic as I can)
- installed without error via
python3 setup.py install
BUT
python3 setup.py test fails
Actually, I encounter the following error, (same as in test) when I just attempt to import icu:
hurst:PyICU-1.9.2 mkearney$ python3
Python 3.5.0 (v3.5.0:374f501f4567, Sep 12 2015, 11:00:19)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
> > > import requests
> > > import icu
> > > Traceback (most recent call last):
> > > File "<stdin>", line 1, in <module>
> > > File "/Users/mkearney/bryllyg/opt/icu/56.1/PyICU-1.9.2/icu.py", line 37, in <module>
> > > from docs import *
> > > File "/Users/mkearney/bryllyg/opt/icu/56.1/PyICU-1.9.2/docs.py", line 23, in <module>
> > > from _icu import *
> > > ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyICU-1.9.2-py3.5-macosx-10.6-intel.egg/_icu.cpython-35m-darwin.so, 2): Library not loaded: libicui18n.56.dylib
> > > Referenced from: /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/PyICU-1.9.2-py3.5-macosx-10.6-intel.egg/_icu.cpython-35m-darwin.so
> > > Reason: image not found
> > > quit
I actually encountered this when I first tried integrating with my built from source python.3.5.0.
So the idea above was to eliminate everything custom at my end except the machine and os
I am running on.
With luck, there is still something obviously wrong that I just am unaware of. It sure looks that way.
I am thinking I need to drop back to 55.1 which I did have working and is good enough for me, though
I have encountered 56.1 has fixed some bugs that I have worked around.
https://gitlab.pyicu.org/main/pyicu/-/issues/40setup.py fails on Python 2.62017-03-21T14:58:44-07:00Andi Vajdasetup.py fails on Python 2.6*Created by: SethMMorton*
I am not sure if PyICU is intended to support Python 2.6; if not please close this issue.
If you do intend to support Python 2.6, the call to `subprocess.check_output` in `setup.py` fails because `check_outp...*Created by: SethMMorton*
I am not sure if PyICU is intended to support Python 2.6; if not please close this issue.
If you do intend to support Python 2.6, the call to `subprocess.check_output` in `setup.py` fails because `check_output` was not added till Python 2.7.
File "/tmp/pip-build-wPhmnv/PyICU/setup.py", line 11, in <module>
ICU_VERSION = subprocess.check_output(('icu-config', '--version')).strip()
AttributeError: 'module' object has no attribute 'check_output'https://gitlab.pyicu.org/main/pyicu/-/issues/4No such file or directory: 'README.md'2015-05-09T21:55:50-07:00Andi VajdaNo such file or directory: 'README.md'*Created by: dsblank*
Our travis just broke on:
```
$ travis_retry sudo pip3 install pyicu
Collecting pyicu
Downloading PyICU-1.9.tar.gz (175kB)
100% |████████████████████████████████| 176kB 1.9MB/s
Complete output from comm...*Created by: dsblank*
Our travis just broke on:
```
$ travis_retry sudo pip3 install pyicu
Collecting pyicu
Downloading PyICU-1.9.tar.gz (175kB)
100% |████████████████████████████████| 176kB 1.9MB/s
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 20, in <module>
File "/tmp/pip-build-8u4vam/pyicu/setup.py", line 88, in <module>
long_description=open('README.md').read(),
IOError: [Errno 2] No such file or directory: 'README.md'
```
https://gitlab.pyicu.org/main/pyicu/-/issues/5segmentation fault on import with OS X2017-04-04T14:46:58-07:00Andi Vajdasegmentation fault on import with OS X*Created by: jinty*
Running this script with the pypy from pypy.org and icu installed from macports:
```
#!/bin/bash
set -e
curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-13.0.1.tar.gz
tar xvfz virtualenv-13....*Created by: jinty*
Running this script with the pypy from pypy.org and icu installed from macports:
```
#!/bin/bash
set -e
curl -O https://pypi.python.org/packages/source/v/virtualenv/virtualenv-13.0.1.tar.gz
tar xvfz virtualenv-13.0.1.tar.gz
cd virtualenv-13.0.1
~/py/pypy/bin/pypy virtualenv.py myVE
cd myVE
export PYICU_INCLUDES=/opt/local/include
export PYICU_LFLAGS=-L/opt/local/lib
./bin/pip install PyICU
./bin/pypy -c 'import icu'
```
results in this:
```
./test.sh: line 14: 73312 Segmentation fault: 11 ./bin/pypy -c 'import icu'
```
Would be happy to provide any more info that might help resolve the issue.
https://gitlab.pyicu.org/main/pyicu/-/issues/6Creation of Collator for Chinese locals fails2016-12-19T17:37:00-08:00Andi VajdaCreation of Collator for Chinese locals fails*Created by: pgammans*
Creating a Collator and rebuilding from its rules fails for Chinese Collator's
The following code works if you change the locale to `Locale("en", "US", "")` , `Locale("da", "DK", "")` and a few others but not `Lo...*Created by: pgammans*
Creating a Collator and rebuilding from its rules fails for Chinese Collator's
The following code works if you change the locale to `Locale("en", "US", "")` , `Locale("da", "DK", "")` and a few others but not `Locale("zh", "hant", "TW")` , `Locale("zh", "hans", "CN")` , `Locale("zh", "CN")`
```
import icu
zh_TWCollator= icu.Collator.createInstance(icu.Locale("zh", "TW"))
zh_TWRules = zh_TWCollator.getRules();
newCollator = icu.RuleBasedCollator(zh_TWRules)
```
Traceback (most recent call last):
File "<input>", line 1, in <module>
ICUError: Character conversion: Unmappable input sequence. In other APIs: Invalid character., error code: 10
ie this line fails.
```
icu.Collator.createInstance(icu.Locale("zh", "TW"))
```
Traceback (most recent call last):
File "<input>", line 1, in <module>
UnicodeEncodeError: 'ascii' codec can't encode character u'\u0101' in position 34: ordinal not in range(128)