Releases: swoole/phpy
Releases · swoole/phpy
1.0.11
- Added PyCore::raise() to throw exceptions to the Python layer.
- Added PyClass to convert PHP classes into Python classes.
- Introduced the PyNamedFn function, which converts PHP functions into Python functions, complete with annotations, parameters, and return type information.
- Added the PyEnum function to transform PHP classes containing only constants into Python Enums.
- Introduced the bin/phpy tool.
- Added the argument_as_object option.
- Fixed a bug in PyTuple::offsetExists where it returned false for negative input parameters.
- Only exact tuples, sets, lists, and dicts are converted to PyTuple, PySet, PyList, and PyDict subtypes; otherwise, they are treated as PyObject.
- Resolved the issue with --with-python-dir not working.
- Fixed PyObject::offsetExists to no longer use PyMapping::hasKey.
- Added a PyClass::__init() callback, which is invoked within the init method of Python classes.
1.0.6
1.0.5
中文
- 增加了 PyCore::fileno($fp) 用于获取 PHP Stream 的文件描述符,以转为 Python Socket 对象
- 增加了 PyCore::setOptions 修改设置内部选项的值
- 增加了 numeric_as_object 选项,可使对象调用返回值返回的数字类型,包括整数和浮点数作为 PyObject 对象
- 修复了默认字符集与
python-cli存在差异的问题 - 修复了 PyFn 构造方法不可用的问题
- 修复了被 Python 引用后的资源类型、引用类型对象在 php-fpm 未在请求结束后销毁的问题
English
- Added PyCore::fileno($fp) to obtain the file descriptor of a PHP Stream for conversion to a Python Socket object
- Added PyCore::setOptions to modify the value of internal options
- Added numeric_as_object option, allowing numeric return types, including integers and floats, to be returned as PyObject objects
- Fixed the issue with the default character set differing from python-cli
- Fixed the issue where the PyFn constructor was not usable
- Fixed the issue where resource and reference type objects referenced by Python were not destroyed after the request ended in php-fpm