Commit Graph

417 Commits

Author SHA1 Message Date
Nicholas Sim 67e1755f9c ffi cleanup: deprecate some nonexistent functions 2021-02-14 20:44:55 +08:00
David Hewitt 442a04efdd
Merge pull request #1397 from kangalioo/get_fold_bool
Make PyTimeAccess::get_fold() return bool instead of u8
2021-02-14 12:17:38 +00:00
messense ebc52c4aea Don't require PYO3_CROSS_LIB_DIR when compiling for x86_64 from macOS arm64 and reverse 2021-02-14 16:43:50 +08:00
kangalioo 87ee51fb86 Make PyTimeAccess::get_fold return bool 2021-02-13 20:28:28 +00:00
kangalioo fe9b4625d1 Implement conversions for Path/PathBuf 2021-02-13 20:22:16 +00:00
David Hewitt 1196cbd396 0.14: deprecations 2021-02-13 20:03:39 +00:00
Nicholas Sim aaddb20a22 CHANGELOG: update as requested 2021-02-13 17:07:03 +08:00
Nicholas Sim d34856ba59 CHANGELOG: add PR number 2021-02-13 15:43:12 +08:00
Nicholas Sim d84d0de604 ffi cleanup: methodobject to moduleobject 2021-02-13 15:36:59 +08:00
David Hewitt 190eb72803 release: 0.13.2 2021-02-12 21:34:29 +00:00
Christoph Reiter e067b32521 Support building with Mingw Python
The DLL of the mingw Python in MSYS2 is named libpython3.8.dll:

$ python3 -m sysconfig | grep LIBPYTHON
        LIBPYTHON = "-lpython3.8"

Add another special case to in get_rustc_link_lib() to handle that case.
Afaik the mingw build doesn't support the limited ABI, so skipt that as well.

This makes all tests pass in an MSYS2 environment and lets us build
python-cryptography.
2021-02-12 12:31:20 +00:00
David Hewitt 59dac57689 build: fix support for non-utf8 systems 2021-01-26 23:16:47 +00:00
David Hewitt 3a627587f6
Merge pull request #1404 from nw0/mark-safe
Remove `unsafe` for some safe functions
2021-01-26 21:57:49 +00:00
Nicholas Sim 7dddb8b0c0 Remove `unsafe` for some safe functions 2021-01-26 17:52:26 +08:00
Matthew Neeley d92f22a7fc Add CHANGELOG entry 2021-01-25 11:49:20 -08:00
kangalioo f135bb046e Add changelog entry 2021-01-21 09:55:32 +01:00
David Hewitt 3de51d59df
Merge pull request #1384 from ijl/pycfunctionfastwithkeyboards
Define _PyCFunctionFastWithKeywords() on CPython 3.7+
2021-01-15 14:50:35 +00:00
David Hewitt 2ada44b7e0
Apply suggestions from review
Co-authored-by: Nicholas Sim <nsim+github@posteo.net>
2021-01-15 12:58:06 +00:00
Nicholas Sim d023338ed5 speculatively add PR number 2021-01-15 18:26:26 +08:00
Nicholas Sim a460f7d287 ffi module cleanup: listobject.h to memoryobject.h 2021-01-15 18:24:45 +08:00
ijl d0145bb4ee Define _PyCFunctionFastWithKeywords() on CPython 3.7+ 2021-01-13 15:44:36 +00:00
David Hewitt 9807ef8ed4 macros-backend: fix raw idents in pymethods 2021-01-12 22:01:11 +00:00
David Hewitt dc7bcdaf9b gil: move finalization from prepare_freethreaded_python to
with_embedded_python_interpreter
2021-01-12 07:44:37 +00:00
David Hewitt 7c61c9b7f9 gil: tidy ups to finalization 2021-01-12 07:42:47 +00:00
Daniil Konovalenko abb5829e9c implement Serialize, Deserialize for Py<T> 2021-01-11 22:19:10 +00:00
David Hewitt d2e87d95f3 release: 0.13.1 2021-01-10 12:20:10 +00:00
konstin 02f3d5cc90 Deprecate functions from PEP 623 2021-01-10 10:18:08 +00:00
David Hewitt 0257acfd08 changelog: add Deprecated sections 2021-01-09 08:45:02 +00:00
David Hewitt b92441cd7c pyclass: fix reference count issue in subclass new 2021-01-08 00:13:49 +00:00
David Hewitt e0c35d17dd auto-initialize: add CHANGELOG and docs 2021-01-04 21:08:08 +00:00
David Hewitt a350dd2c20 build: make include dir optional when targeting Windows 2020-12-31 22:02:29 +00:00
David Hewitt b1012ebb68 build: update for Rust 1.49 2020-12-31 18:16:02 +00:00
Nicholas Sim 05812d5f55 ffi module cleanup: update CHANGELOG 2020-12-29 18:21:11 +08:00
Nicholas Sim 717050af4b
Merge branch 'master' into ffi-1 2020-12-28 21:22:42 +08:00
Nicholas Sim aadb58621c fix errors in PR 2020-12-28 21:18:27 +08:00
David Hewitt 1e5e93d458
Merge pull request #1342 from davidhewitt/abi3-dict-weakref
abi3: add support for dict and weakref from Python 3.9
2020-12-28 13:00:59 +00:00
Nicholas Sim 1fd86132e0 CHANGELOG: update as requested 2020-12-28 20:54:56 +08:00
Nicholas Sim 55a602462d
Apply suggestions from code review
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-12-28 20:51:08 +08:00
Nicholas Sim f2ddea9dba
Merge branch 'master' into ffi-1 2020-12-28 19:44:09 +08:00
David Hewitt 7572962828 abi3: add support for dict and weakref from Python 3.9 2020-12-28 10:22:46 +00:00
Nicholas Sim 3518ac3c3f Update changelog, allow use of deprecated PyGetSetDef_DICT 2020-12-28 18:17:10 +08:00
David Hewitt 600466e12f pyclass: fix deprecation warning for no __module__ attribute 2020-12-27 19:42:47 +00:00
Nicholas Sim 83739e60f7 ffi module cleanup: context.h to frameobject.h 2020-12-27 14:00:50 +08:00
Nicholas Sim 3f093d9e59
ffi module cleanup (#1338)
* initial work to clean up ffi module

* ffi: mirror cpython Includes

* ffi: start to alphebetise, note skipped headers

* ffi: temporarily move _PyFrameEvalFunction back

* ffi cleanup: fix pypy compilation

* Update src/ffi/mod.rs

Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>

* add suggested changes

* ffi cleanup: remove unnecessary use stmt

* ffi cleanup: add deprecation warning

* ffi cleanup: transitively deprecate, update changelog

Co-authored-by: Yuji Kanagawa <yuji.kngw.80s.revive@gmail.com>
2020-12-27 11:53:18 +09:00
David Hewitt 51d1996218 ci: deny warnings using RUSTFLAGS 2020-12-26 08:27:08 +00:00
cecini c780aa931d Fix the pydebug with trace refs and count_allocs for python > 3.7 2020-12-23 16:20:19 +00:00
David Hewitt 26ca1f5bca Release 0.13 2020-12-22 15:42:04 +00:00
David Hewitt a689ab42c6 macros: rename crates for consistency 2020-12-20 06:39:28 +00:00
David Hewitt 2616d3de76 python: add version() to get running version 2020-12-19 19:13:59 +00:00
David Hewitt 3d9f660e21
CHANGELOG: remove unneeded entry 2020-12-18 23:48:11 +00:00
David Hewitt fa8c93cfd1 pyclass #[new]: allow using custom error type 2020-12-13 23:50:03 +00:00
Yuji Kanagawa 22359e9097
Merge pull request #1310 from PyO3/abi3-128bit-integer
Implement 128bit integer conversion for limited API
2020-12-12 22:30:15 +09:00
Yuji Kanagawa 560fb4883d
Merge pull request #1312 from birkenfeld/fix-1311
ffi: use recommended stable way to represent an opaque C struct
2020-12-12 22:29:45 +09:00
Yuji Kanagawa 2a3a730db5
Merge pull request #1303 from scalexm/lit
Do not include the double quotes in `#[pyclass(name = "literal")]`
2020-12-12 22:28:56 +09:00
David Hewitt 5133f81e6d deprecate pyclass name without quotes 2020-12-12 11:11:11 +00:00
Yuji Kanagawa 7a0542d44e
Update CHANGELOG.md
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-12-12 19:38:49 +09:00
kngwyu 8c4cba25b7 Implement 128bit integer conversion for limited API 2020-12-12 19:13:53 +09:00
Georg Brandl 7d5ff2d768 ffi: use recommended stable way to represent an opaque C struct
After `extern { type ... }` has stabilized for a while, this can
be replaced.  For now, I used a macro since it is much easier to
spot the locations to touch at that time.

fixes #1311
2020-12-12 10:59:36 +01:00
Yuji Kanagawa 9aa70f7c89
Merge pull request #1263 from PyO3/abi3-min-python
Add abi3-py* features
2020-12-08 12:52:00 +09:00
Yuji Kanagawa 6da6bc9461
Apply suggestions from @davidhewitt
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-12-06 16:06:10 +09:00
Patrick Chieppe d5767b8921 Fix typo 2020-11-30 11:46:26 +11:00
Patrick Chieppe cda46cbe40 Add CHANGELOG.md entry 2020-11-30 11:43:01 +11:00
David Hewitt afa5ed3ba2 Release notes for backported 0.12.4 2020-11-28 20:21:52 +00:00
scalexm 649b439463 Allow `#[pyclass(name = "string literal")]`
This is also more in line with the `#[name = "..."]` attribute on
methods.
2020-11-27 18:45:07 +01:00
David Hewitt 87bacf1be5 performance: use vectorcall for call0 and call_method0 2020-11-25 20:59:11 +00:00
David Hewitt fc6fa9ead6 ffi: correct vectorcall bindings 2020-11-25 20:54:12 +00:00
David Hewitt 7ca126cc5b python: deprecate some redundant methods 2020-11-22 20:04:45 +00:00
David Hewitt fc34e41163 pyany: add is_instance 2020-11-22 19:24:59 +00:00
David Hewitt 53ce423424 anaconda: fix for building in a virtualenv 2020-11-21 08:56:07 +00:00
kngwyu a2490e32ce Add a CHANGELOG entry for char support 2020-11-20 16:39:05 +09:00
roblabla d479b54b94 Fix #1285, text_signature and raw ident interaction 2020-11-19 17:21:02 +00:00
David Hewitt 1ce14d77e4 pytypeinfo: rename is_instance to is_type_of 2020-11-15 18:35:16 +00:00
David Hewitt 45599620b5 pyerr: improve debug & display impls 2020-11-15 16:22:45 +00:00
kngwyu 93282e9a70 Note abi3-py* features in the guide and Add CHANGELOG 2020-11-16 00:47:24 +09:00
David Hewitt 9617edfca9 msrv: bump to 1.45 2020-11-12 11:33:08 +00:00
David Hewitt fb02a582b8
Merge pull request #1267 from davidhewitt/build-for-musl
build: not cross-compiling when musl from gnu
2020-11-12 08:10:42 +00:00
David Hewitt cfa586c034 build: not cross-compiling when musl from gnu 2020-11-10 08:31:39 +00:00
David Hewitt cd75895cd0 ffi: add bindings for PEP 587 2020-11-10 07:44:59 +00:00
Yuji Kanagawa 3b3ba4e3ab
Merge pull request #1152 from PyO3/abi3
Complete abi3 support
2020-10-27 23:30:36 +09:00
Aviram Hassan c982639503 Added missing field to PyCodeObject. 2020-10-25 06:54:04 +02:00
Aviram Hassan 0fd500fb0f Add context.h functions (PyContext_New, PyContext*)
Formatting
2020-10-22 10:18:17 +03:00
Aviram Hassan 7baa89e8d9 Add PyEval_SetProfile, PyEval_SetTrace
add changelog
2020-10-21 10:46:46 +03:00
Alex Gaynor 90a825d0c2 Merge branch 'master' into abi3-merge-master 2020-10-19 14:32:49 -04:00
David Hewitt afd9b823d2 Drop support for Python 3.5 2020-10-18 19:02:27 +01:00
Alex Gaynor 265db337c2 Fixes for PyIterator 2020-10-18 11:31:42 -04:00
Alex Gaynor ba6f0ecdfa Merge branch 'master' into abi3-merge-master 2020-10-18 10:47:06 -04:00
Askaholic 1d7034478c
Add entries to changelog 2020-10-15 12:02:58 -08:00
David Hewitt 95cebd8fee
Merge pull request #1217 from PyO3/remove-python-3-10-removals
Remove symbols that are removed in python 3.10
2020-10-13 00:48:45 +01:00
Alex Gaynor 5060379185 Fix changelog 2020-10-12 18:11:38 -04:00
Alex Gaynor 9e34835b76 Merge branch 'master' into abi3-merge-master 2020-10-12 18:03:14 -04:00
konstin 2c3ee2c97a Update CHANGELOG.md
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2020-10-12 17:39:14 +01:00
konstin 5f109743a7 Remove symbols that are removed in python 3.10
Those functions and variable are listed in https://docs.python.org/3.10/whatsnew/3.10.html#id4
2020-10-12 17:38:16 +01:00
David Hewitt 482ee3a8b2 Add changelog entry and test 2020-10-12 17:37:53 +01:00
David Hewitt 1539db762b Remove unused `python3` feature 2020-10-12 16:53:49 +01:00
David Hewitt 38af32e33e Release 0.12.3 2020-10-12 16:18:25 +01:00
David Hewitt 7b3dd68bfb Fix support for MSRV
Co-authored-by: Alex Gaynor <alex.gaynor@gmail.com>
2020-10-12 15:46:40 +01:00
David Hewitt 1cecad884a Release 0.12.2 2020-10-12 12:56:46 +01:00
Alex Gaynor 877667a1c6 Improved documentation 2020-10-11 15:18:05 -04:00
Yuji Kanagawa cb90c5171d
Merge pull request #1169 from PyO3/doc-null-check
Add null-check for function's documents
2020-10-10 14:35:44 +09:00
kngwyu ff644316d7 Add a CHANGELOG entry 2020-10-08 23:31:17 +09:00