New issue 2986: cpyext missing FromTimestamp methods in PyDatetime_CAPI
https://bitbucket.org/pypy/pypy/issues/2986/cpyext-missing-fromtimestamp-methods-in

Paul G:

The [current implementation of 
cpyext](https://bitbucket.org/pypy/pypy/src/3c18b70c56bdf83522557872bd49e1f81dde36a5/pypy/module/cpyext/parse/cpyext_datetime.h?at=default&fileviewer=file-view-default#cpyext_datetime.h-2)
 is missing two constructors in the `PyDatetime_CAPI` struct that were present 
[in Python 
3.5](https://github.com/python/cpython/blob/3.5/Include/datetime.h#L146):

- `PyDateTime_CAPI->DateTime_FromTimestamp`
- `PyDateTime_CAPI->Date_FromTimestamp`

The [relevant "macro" 
implementations](https://bitbucket.org/pypy/pypy/src/3c18b70c56bdf83522557872bd49e1f81dde36a5/pypy/module/cpyext/cdatetime.py?at=default#lines-240)
 are present, they just need to be added to the struct.

This came up [when adding PyPy support to 
PyO3](https://github.com/PyO3/pyo3/pull/393/files#r268716309).


_______________________________________________
pypy-issue mailing list
pypy-issue@python.org
https://mail.python.org/mailman/listinfo/pypy-issue

Reply via email to