Commit Graph

4533 Commits

Author SHA1 Message Date
David Hewitt 920fa93fa0
Merge pull request #2448 from davidhewitt/frozen
pyclass: switch from immutable to frozen
2022-06-20 07:27:22 +01:00
David Hewitt 2fd5364646 pycell: add more test coverage 2022-06-19 21:18:15 +01:00
David Hewitt 7725f17c46 pyclass: switch from immutable to frozen 2022-06-19 21:18:15 +01:00
David Hewitt 517f4a87a9
Merge pull request #2450 from mejrs/misc
Fix UB in *_offset functions
2022-06-18 08:53:10 +01:00
David Hewitt 7fb9f326bc
Merge pull request #2458 from davidhewitt/pymethods-order
macros: emit pymethod associated methods as a single block
2022-06-16 23:34:44 +01:00
David Hewitt f81a01b604 macros: emit pymethod associated methods as a single block 2022-06-16 22:15:29 +01:00
David Hewitt 197871245c
Merge pull request #2456 from ikrivosheev/feature/issues-2383_classattribute
Allow #[classattr] take Python argument
2022-06-16 19:25:59 +01:00
Ivan Krivosheev f19561c745 Allow #[classattr] take Python argument 2022-06-16 13:08:53 +03:00
mejrs e19c364fc9 Add changelog entry 2022-06-14 12:53:00 +02:00
Bruno Kolenbrander cbdd2e3b5c
xtask: expand on coverage (#2449)
* Install nightly if it is not installed

* Expand on coverage

* Don't swallow stdout

* Apply suggestions from code review

Co-authored-by: mejrs <>
Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2022-06-14 07:28:25 +00:00
mejrs 2d94cb4a2d use memoffset instead 2022-06-12 18:28:21 +02:00
mejrs 2d3a5852ed Avoid UB in *_offset methods 2022-06-12 15:11:39 +02:00
mejrs 56c218f70e Fix annoying inference errors 2022-06-12 01:39:34 +02:00
David Hewitt 171b38a0a1
Merge pull request #2440 from davidhewitt/frompyobject-fixes
frompyobject: fix `from_py_with` ignored for transparent structs
2022-06-09 21:09:29 +01:00
David Hewitt 7c56a03d64 frompyobject: fix `from_py_with` ignored for transparent structs 2022-06-09 06:49:25 +01:00
David Hewitt 9dfeaa38d4
guide: add contributing page (#2442)
Co-authored-by: messense <messense@icloud.com>
2022-06-08 13:30:11 +00:00
messense 06c09fbb60
Merge pull request #2443 from davidhewitt/unpin-3.11
ci: unpin 3.11
2022-06-08 20:42:41 +08:00
David Hewitt fad5d177f9 ci: unpin 3.11 2022-06-08 08:09:42 +01:00
messense 27ce1a5d18
Merge pull request #2441 from davidhewitt/sponsor-messense
readme: add messense sponsor link
2022-06-08 14:22:53 +08:00
David Hewitt 15b164d45c readme: add messense sponsor link 2022-06-08 06:47:12 +01:00
Hood Chatham da5b9814cc
Set up CI for wasm32-emscripten target (#2436)
* ci: test on emscripten target

This adds CI to build libpython3.11 for wasm32-emscripten and
running tests against it. We need to patch instant to work
around the emscripten_get_now:
https://github.com/sebcrozet/instant/pull/47

We also have to patch emscripten to work aroung the "undefined
symbol gxx_personality_v0" error:
https://github.com/emscripten-core/emscripten/issues/17128

I set up a nox file to download and install emscripten,
download and build cpython, set appropriate environment variables
then run cargo test. The workflow just installs python, rust,
node, and nox and runs the nox session.

I xfailed all the test failures. There are problems with datetime.
iter_dict_nosegv and test_filenotfounderror should probably be
fixable. The tests that involve threads or asyncio probably can't
be fixed.

* Some cleanup

* Remove instant patch

* Add explanations for xfails
2022-06-08 05:59:18 +01:00
David Hewitt 5603fa06b3
Merge pull request #2439 from davidhewitt/ffi-descrobject
ffi: tidy descrobject.rs
2022-06-07 20:44:44 +01:00
David Hewitt 866ddaca8a ffi: tidy descrobject.rs 2022-06-07 19:45:36 +01:00
David Hewitt 330fcccf97
Merge pull request #2434 from alex/ffi-fixes
ffi: fixes for field names/presence
2022-06-05 13:05:49 +01:00
Alex Gaynor 9cfbdeca78 ffi: fixes for field names/presence
pyo3-ffi-check now passes for me on 3.9
2022-06-05 07:39:17 -04:00
David Hewitt 65616d2f17
Merge pull request #2433 from davidhewitt/ffi-fixes
ffi: more pypy fixes
2022-06-05 10:12:31 +01:00
David Hewitt 6f4e84f25f ffi: more pypy fixes 2022-06-05 09:24:46 +01:00
David Hewitt 5b82090005
Merge pull request #2432 from davidhewitt/ffi-fixes
ffi: field fixes from pyo3-ffi-check
2022-06-05 08:54:43 +01:00
David Hewitt 9300bff551 ffi: field fixes from pyo3-ffi-check 2022-06-05 08:17:14 +01:00
David Hewitt f8d58f57c3
Merge pull request #2431 from alex/patch-1
fixed name of initfunc field on _inittab
2022-06-05 07:19:26 +01:00
Alex Gaynor e1c8bda4ee
fixed name of initfunc field on _inittab 2022-06-04 22:15:51 -04:00
Bruno Kolenbrander 7e7e7ffa63
Merge pull request #2430 from alex/patch-1
ob_shash is available on CPython
2022-06-04 22:26:12 +02:00
Alex Gaynor 485994fa90
ob_shash is available on CPython
This struct is opaque on PyPy anyways, so the conditional didn't make sense.
2022-06-04 15:01:54 -04:00
David Hewitt 9777faddc6
Merge pull request #2429 from alex/pyopccache-py311
_PyOpcache does not exist on Python 3.11
2022-06-04 18:22:42 +01:00
Bruno Kolenbrander 728d35aa7d
Expand on the C api definitions (#2409)
* Expand on the C api

* Fix Ci

* Fix PyCodeObject structure

* Add descrobjects

* Add None and NotImplemented type objects

* Update pyo3-ffi/src/cpython/object.rs

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>

* Fix PyPy definitions

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix CI

* Fix CI

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2022-06-04 18:22:18 +01:00
Alex Gaynor 12d38dbcf8 _PyOpcache does not exist on Python 3.11
NB: the definition of PyCodeObject is still quite wrong. This is the minimal change to get pyo3-ffi-check to compile at all!
2022-06-04 10:46:05 -04:00
David Hewitt b2c4c0f48c
Merge pull request #2428 from davidhewitt/ffi-fixes
ffi: another batch of fixes from `pyo3-ffi-check`
2022-06-04 13:52:34 +01:00
David Hewitt cdf86482d8 ffi: many fixes to pypy definitions 2022-06-04 12:47:40 +01:00
David Hewitt 0d78e88b14 ffi: fix PyTypeObject definition on Python 3.8 2022-06-04 08:12:27 +01:00
David Hewitt e9012fed63
Merge pull request #2427 from davidhewitt/pypy-manual-build
guide: document platform tag for pypy
2022-06-03 20:32:07 +01:00
David Hewitt f22a69e223 guide: document platform tag for pypy 2022-06-03 20:10:02 +01:00
David Hewitt 3cd9e3b411
Merge pull request #2424 from davidhewitt/ffi-fixes
ffi: fix PyFrameObject definition
2022-06-02 18:15:52 +01:00
David Hewitt f8a9837c3a ffi: fix PyFrameObject definition 2022-06-02 17:47:23 +01:00
David Hewitt 4f490a01d6
Merge pull request #2423 from davidhewitt/ffi-fixes
ffi: many fixes caught by pyo3-ffi-check
2022-06-02 16:54:08 +01:00
David Hewitt 78cdc6d6ad ffi: many fixes caught by pyo3-ffi-check 2022-06-02 16:32:07 +01:00
David Hewitt 62e110cdcf
Merge pull request #2419 from davidhewitt/more-changelog
CHANGELOG: document #2406 and #2407
2022-06-02 14:33:35 +01:00
David Hewitt a746411b24
Merge pull request #2422 from davidhewitt/frompyobject-fixes
frompyobject: improve error messages of derived impls
2022-06-02 13:30:03 +01:00
David Hewitt f50406a034
Merge pull request #2413 from davidhewitt/simpler-interned
macros: simpler expansion for `intern!`
2022-06-02 12:54:11 +01:00
David Hewitt c7f13a1f10 CHANGELOG: document #2406 and #2407 2022-06-02 12:42:07 +01:00
David Hewitt f34b9a3fc4
Merge pull request #2421 from davidhewitt/ffi-fixes
ffi: small corrections
2022-06-02 12:20:54 +01:00