pyicu merge requestshttps://gitlab.pyicu.org/main/pyicu/-/merge_requests2023-12-22T04:48:32-08:00https://gitlab.pyicu.org/main/pyicu/-/merge_requests/148Bugfix: Don't use DECLARE_TYPE() with NULL dealloc2023-12-22T04:48:32-08:00Fredrik Roubertroubert@google.comBugfix: Don't use DECLARE_TYPE() with NULL deallocUsing a `NULL` dealloc will result in calling the wrong destructor, the base class destructor (which isn't virtual) instead of the actual one.
In the ICU4C default configuration (`U_OVERRIDE_CXX_ALLOCATION=1`) this isn't immediately not...Using a `NULL` dealloc will result in calling the wrong destructor, the base class destructor (which isn't virtual) instead of the actual one.
In the ICU4C default configuration (`U_OVERRIDE_CXX_ALLOCATION=1`) this isn't immediately noticeable as the operator delete implementation there simply calls `uprv_free()` without caring about what is being deleted, but other implementations (`U_OVERRIDE_CXX_ALLOCATION=0`) aren't always as cavalier about this.
To resolve this, a new macro that declares a type appropriate dealloc is introduced and used to replace `DECLARE_TYPE()` with `NULL` dealloc for all ICU4C types with public destructors.
Tested using `U_OVERRIDE_CXX_ALLOCATION=0` and TCMalloc.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/147Fix build with Python 3.132023-11-03T21:34:57-07:00Gwyn CieslaFix build with Python 3.13<unistd.h> needs to be explicitly included in locale.cpp<unistd.h> needs to be explicitly included in locale.cpphttps://gitlab.pyicu.org/main/pyicu/-/merge_requests/146Add ICU 4.4 TimeZone display name types.2023-05-23T08:02:48-07:00Fredrik Roubertroubert@google.comAdd ICU 4.4 TimeZone display name types.I noticed that these were missing.I noticed that these were missing.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/145Add support for all comparison operators to Locale2023-04-14T11:39:41-07:00Fredrik Roubertroubert@google.comAdd support for all comparison operators to LocaleWhile the C++ implementation only overloads operators == and != I think that a lot of Python programmers would expect all comparison operators to be implemented (at least it surprised me when I couldn't simply sort a list of Locale objec...While the C++ implementation only overloads operators == and != I think that a lot of Python programmers would expect all comparison operators to be implemented (at least it surprised me when I couldn't simply sort a list of Locale objects).https://gitlab.pyicu.org/main/pyicu/-/merge_requests/144Bugfix: Only call _init_displayoptions() for ICU 72 and greater.2022-10-24T08:39:20-07:00Fredrik Roubertroubert@google.comBugfix: Only call _init_displayoptions() for ICU 72 and greater.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/143Make parameter names in declarations consistent with definitions.2022-04-19T19:35:52-07:00Fredrik Roubertroubert@google.comMake parameter names in declarations consistent with definitions.This is autogenerated using clang-tidy:
https://clang.llvm.org/extra/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.htmlThis is autogenerated using clang-tidy:
https://clang.llvm.org/extra/clang-tidy/checks/readability-inconsistent-declaration-parameter-name.htmlhttps://gitlab.pyicu.org/main/pyicu/-/merge_requests/142Delete unused file.2022-04-13T14:16:06-07:00Fredrik Roubertroubert@google.comDelete unused file.Having an unused file in the repository is just confusing.Having an unused file in the repository is just confusing.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/141Update explanations about strings to reflect Python 3.2021-04-05T17:44:27-07:00Andi VajdaUpdate explanations about strings to reflect Python 3.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/136Fix build error on Python 3.9 for Windows2020-07-31T11:32:44-07:00Andi VajdaFix build error on Python 3.9 for Windows*Created by: cgohlke*
Fixes
```
_icu.cpp(209): error C2017: illegal escape sequence
_icu.cpp(209): error C2001: newline in constant
_icu.cpp(210): error C2146: syntax error: missing ')' before identifier 'PyObject_SetAttrString'
_i...*Created by: cgohlke*
Fixes
```
_icu.cpp(209): error C2017: illegal escape sequence
_icu.cpp(209): error C2001: newline in constant
_icu.cpp(210): error C2146: syntax error: missing ')' before identifier 'PyObject_SetAttrString'
_icu.cpp(210): error C2146: syntax error: missing ';' before identifier 'PyObject_SetAttrString'
_icu.cpp(212): error C2017: illegal escape sequence
_icu.cpp(212): error C2001: newline in constant
_icu.cpp(213): error C2146: syntax error: missing ')' before identifier 'PyObject_SetAttrString'
_icu.cpp(213): error C2146: syntax error: missing ';' before identifier 'PyObject_SetAttrString'
```https://gitlab.pyicu.org/main/pyicu/-/merge_requests/132Remove deprecated API usage2020-06-16T10:03:05-07:00Andi VajdaRemove deprecated API usage*Created by: methane*
`PyUnicode_FromStringAndSize(NULL, size)` usage is also deprecated.*Created by: methane*
`PyUnicode_FromStringAndSize(NULL, size)` usage is also deprecated.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/112Fix runtime `dlopen` crash on macos2019-11-12T16:40:29-08:00Andi VajdaFix runtime `dlopen` crash on macos*Created by: yursha*
Without this change `otool -L build/lib.macosx-10.14-x86_64-3.7/_icu.cpython-37m-darwin.so` doesn't show ICU system libraries as dependencies. As a result `pyicu` crashes at runtime on `dlopen`. With this change eve...*Created by: yursha*
Without this change `otool -L build/lib.macosx-10.14-x86_64-3.7/_icu.cpython-37m-darwin.so` doesn't show ICU system libraries as dependencies. As a result `pyicu` crashes at runtime on `dlopen`. With this change everything works just fine.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/138Try to build wheels2021-04-01T14:51:24-07:00Andi VajdaTry to build wheels*Created by: abitrolly*
https://pypi.org/project/cibuildwheel/*Created by: abitrolly*
https://pypi.org/project/cibuildwheel/https://gitlab.pyicu.org/main/pyicu/-/merge_requests/118Expand Travis-CI scope2019-12-04T15:54:23-08:00Andi VajdaExpand Travis-CI scope*Created by: SethMMorton*
This is intended to address and close issue #117.
This PR will take many iterations to get correct, so I have prefixed the title with WIP to indicate it is a work-in-progress. I will remove WIP when I think ...*Created by: SethMMorton*
This is intended to address and close issue #117.
This PR will take many iterations to get correct, so I have prefixed the title with WIP to indicate it is a work-in-progress. I will remove WIP when I think it is read to merge.
- [x] Testing against multiple `icu4c` versions
- [x] Testing against multiple Python versions
- [x] Testing on Linux
- [x] Testing on macos
- [ ] Testing on Windows
- ~~On Linux, testing against both clang and GCC (not sure if this is needed?)~~
https://gitlab.pyicu.org/main/pyicu/-/merge_requests/113Move native extension inside module2022-01-24T18:22:45-08:00Andi VajdaMove native extension inside module*Created by: wyattanderson*
The goal here is to address this issue with `delocate`, so that we can internally distribute relocatable binary wheels for OS X:
https://github.com/matthew-brett/delocate/issues/12#issuecomment-246536098
...*Created by: wyattanderson*
The goal here is to address this issue with `delocate`, so that we can internally distribute relocatable binary wheels for OS X:
https://github.com/matthew-brett/delocate/issues/12#issuecomment-246536098
I've tested a little bit locally, but would love assistance testing more substantially. I'm not very familiar with Python packaging when it comes to native extensions.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/46Compile error on Windows2017-03-21T15:15:59-07:00Andi VajdaCompile error on Windows*Created by: amynbe*
*Created by: amynbe*
https://gitlab.pyicu.org/main/pyicu/-/merge_requests/109resolve compiler error in visual c++.2019-10-03T08:58:43-07:00Andi Vajdaresolve compiler error in visual c++.*Created by: kochelmonster*
This pull request contains the changes discussed in #98.
Also if it is perfect standard c++, the fact is: msvc does not compile it, and I don't assume Microsoft will change their compiler.
For those who...*Created by: kochelmonster*
This pull request contains the changes discussed in #98.
Also if it is perfect standard c++, the fact is: msvc does not compile it, and I don't assume Microsoft will change their compiler.
For those who are interested: I was able to compile pyicu with the following conda packages:
- icu=64.2=he025d50_1
- vs2017_win-64=19.16.27032.1=hb4161e2_0https://gitlab.pyicu.org/main/pyicu/-/merge_requests/121Adding arm64 Travis Support2020-01-17T10:28:28-08:00Andi VajdaAdding arm64 Travis Support*Created by: ossdev07*
Travis-CI has added support for ARM64. Added ARM64 job in Travis-CI.*Created by: ossdev07*
Travis-CI has added support for ARM64. Added ARM64 job in Travis-CI.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/36Added missing conditionals around use of uscript features from newer ICU vers...2016-11-09T14:34:14-08:00Andi VajdaAdded missing conditionals around use of uscript features from newer ICU versions*Created by: kdparker*
Fixes #35 (I can run the full install with these changes active). Moved the uscript features up as the oldest version I could find them in was 51. Moved the codes down to 4.6 as the code within libicu states they ...*Created by: kdparker*
Fixes #35 (I can run the full install with these changes active). Moved the uscript features up as the oldest version I could find them in was 51. Moved the codes down to 4.6 as the code within libicu states they were added in 4.6https://gitlab.pyicu.org/main/pyicu/-/merge_requests/130Update samples to Python 32020-06-12T17:49:53-07:00Andi VajdaUpdate samples to Python 3*Created by: wannaphong*
I have changed `print` to `print()` in samples.*Created by: wannaphong*
I have changed `print` to `print()` in samples.https://gitlab.pyicu.org/main/pyicu/-/merge_requests/52Fix str exception on setup.py for Python 32017-05-03T13:03:57-07:00Andi VajdaFix str exception on setup.py for Python 3*Created by: cenkalti*
In Python 3, `os.environ` values are already in `str` type. There is no need to wrap them with `str` function again.
When you do `str(s, 'ascii')` on a string it raises an exception:
```
TypeError: decoding s...*Created by: cenkalti*
In Python 3, `os.environ` values are already in `str` type. There is no need to wrap them with `str` function again.
When you do `str(s, 'ascii')` on a string it raises an exception:
```
TypeError: decoding str is not supported
```
I have removed the `str()` wrapper to fix this issue.