Commit graph

4655 commits

Author SHA1 Message Date
David Hewitt 2096e30bca opt: fix generic code bloat in LazyStaticType::get_or_init 2022-06-25 22:03:28 +01:00
David Hewitt 1758b5337b
Merge pull request #2480 from davidhewitt/nightly-ui-tests
ci: fix nightly ui tests
2022-06-25 21:36:53 +01:00
David Hewitt 62f27caffe ci: fix nightly ui tests 2022-06-25 21:12:14 +01:00
Andrew Burkett 3fd0c0e142
Fix PyObject_CallNoArgs python version cfg (#2476)
* Fix PyObject_CallNoArgs python version cfg

PyObject_CallNoArgs was added to python 3.9 but not to limited api until 3.10 per https://docs.python.org/3/c-api/call.html#c.PyObject_CallNoArgs

* Update change log

* Fix uses of PyObject_CallNoArgs

Co-authored-by: Andrew Burkett <andrew.burkett@crowdstrike.com>
2022-06-23 21:31:44 +01:00
Ashley Anderson bde5102eb8
Increasing test coverage (#2462)
* cov: src/buffer.rs - add tests for debug and element from format

* cov: src/buffer.rs - add some fortran-specific calls in test_array_buffer

* fix issues in MSRV

* cov: src/types/function.rs - directly call PyCFunction::new and PyCFunction::new_with_keywords

* docs: clarify docs of PyCFunction::new and PyCFunction::new_with_keywords

* revert added rust-version for MSRV in Cargo.toml

* cov: src/types/slice.rs - simple tests for PySliceIndices::new

* fix for multi-platform

* Update src/types/function.rs

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

* cov: src/buffer.rs - a better PyBuffer Debug test

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2022-06-23 21:30:22 +01:00
David Hewitt 3a3a080c7d
Merge pull request #2473 from PyO3/typo-in-changelog
Fix a typo in CHANGELOG
2022-06-23 21:29:09 +01:00
messense 2ee15de6b7
Merge pull request #2475 from PyO3/revert-2474-gh-pages-force-orphan
Revert "CI: Add `force_orphan` to `actions-gh-pages`"
2022-06-23 20:01:34 +08:00
messense a76764b791
Revert "CI: Add force_orphan to actions-gh-pages" 2022-06-23 18:58:06 +08:00
messense bfce3de567
Merge pull request #2474 from messense/gh-pages-force-orphan
CI: Add `force_orphan` to `actions-gh-pages`
2022-06-23 18:46:14 +08:00
messense a7a6118974
CI: Add force_orphan to actions-gh-pages 2022-06-23 17:29:18 +08:00
kngwyu 61e6d684aa Fix a typo in CHANGELOG 2022-06-23 17:45:01 +09:00
messense ef308ffaad
Merge pull request #2471 from jinlow/adding-readme-example
readme: Adding an example to the README
2022-06-23 13:13:11 +08:00
jinlow 22992af328 readme: Adding an example to the README 2022-06-22 21:16:41 -05:00
David Hewitt e8e1729723
Merge pull request #2470 from davidhewitt/monomorphizations
opt: remove some generic code bloat
2022-06-22 23:44:57 +01:00
David Hewitt 3d9b78062e opt: remove some generic code bloat 2022-06-22 22:53:32 +01:00
David Hewitt 510c126f57
Merge pull request #2457 from yodaldevoid/enum_naming_improvements
Enum naming improvements
2022-06-22 22:12:06 +01:00
Gabriel Smith 845be0486a guide: Update with enum naming macro changes 2022-06-22 09:36:40 -04:00
Gabriel Smith 75656949f9 macros: Support #[pyo3(name)] on enum variants 2022-06-22 09:36:40 -04:00
mejrs e4e7e6e51c Add frozen documentation 2022-06-22 01:47:40 +02:00
Sam Vente cdb3b6ff32
remove outdated workaround in module documentation (#2466)
* remove workaround section in module.md that is no longer needed after merging #2081

* update changelong

* revert CHANGELOG
2022-06-21 21:02:10 +00:00
Gabriel Smith 2122faa547 macros: Use macro-defined name for enums in __repr__ 2022-06-21 16:31:23 -04:00
Georg Brandl 53b83cccbf
add CompareOp::matches (#2460) 2022-06-21 15:36:20 +02:00
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