Commit graph

3992 commits

Author SHA1 Message Date
David Hewitt d520961b3f xtask: add coverage command 2021-12-21 22:28:36 +00:00
David Hewitt 3858a63b80
Merge pull request #2064 from davidhewitt/test-hygiene-coverage-try-2
ci: ignore coverage for test_hygiene, try 2
2021-12-20 22:37:33 +00:00
David Hewitt 8a989eeb6a
Merge pull request #2062 from davidhewitt/more-pointer-casts
misc: remove some more *const -> *mut pointer casts
2021-12-20 21:14:45 +00:00
David Hewitt 75fe8e50ed ci: ignore coverage for test_hygiene, try 2 2021-12-20 21:13:42 +00:00
David Hewitt 5cab5d4da3 misc: remove some more *const -> *mut pointer casts 2021-12-20 20:36:46 +00:00
David Hewitt 6033d696b1
Merge pull request #2061 from Amanieu/fix_indices
Avoid UB in PySlice::indices
2021-12-20 19:53:37 +00:00
Amanieu d'Antras ed0a6b710a Add changelog entry 2021-12-20 18:34:14 +01:00
Amanieu d'Antras 1fb20dab91 Avoid UB in PySlice::indices
Mutating a variables that is not declared with `mut` is undefined
behavior.
2021-12-20 18:28:36 +01:00
David Hewitt c7ca8bb017
Merge pull request #2057 from davidhewitt/rust-cache
ci: try rust-cache action
2021-12-18 11:01:27 +00:00
David Hewitt c36dff3cf0
Merge pull request #2056 from davidhewitt/hygiene-no-coverage
ci: no coverage necessary for hygiene tests
2021-12-18 09:37:07 +00:00
David Hewitt 8f402f31da ci: try rust-cache action 2021-12-18 09:05:05 +00:00
David Hewitt 4cec3a2ecf ci: no coverage necessary for hygiene tests 2021-12-18 08:56:22 +00:00
David Hewitt 777a607b47
Merge pull request #2054 from aganders3/fix-changelog
Move changelog entry for #1996.
2021-12-16 18:41:17 +00:00
Ashley Anderson a6c70164cd Move changelog entry for #1996. 2021-12-16 13:12:03 -05:00
Ashley Anderson c30ca03b60
Expose cross compiling configuration from pyo3-build-config (#1996)
* Initial refactor - expose cross-compiling functions and add necessary fields to InterpreterConfig

* Refactor cross_compiling to take arch/vendor/os separately.

* Address review comments.

* Update changelog with note about pyo3-build-config APIs.

* Fix panic when parsing ABI tag on Windows.

* Update parse_sysconfigdata test to best-guess values for linux.

* Revert added fields in InterpreterConfig.

* Refactor parse_sysconfigdata to return Sysconfigdata (HashMap). Add InterpreterConfig::from_sysconfigdata.

* Update BuildFlags test to use from_sysconfigdata.

* Add tests for from_sysconfigdata. Refactor Sysconfigdata API to be more open.

* Add basic tests for not cross compiling. Add some error handling.

* Address review comments.

* Update search_lib_dir to recurse into lib and pypy dirs.

* Look even harder for sysconfigdata.

* Add skip-build-config feature.

* Revert skip-build-config feature.

* Suppress cargo:rerun-if-env-changed without resolve-config feature.
2021-12-16 00:18:37 +00:00
David Hewitt 233a14fa1e
Merge pull request #2051 from davidhewitt/generate-examples
examples: add cargo-generate configuration
2021-12-15 21:58:10 +00:00
David Hewitt bd3c3adf46 examples: make Cargo.toml files more uniform 2021-12-15 08:28:25 +00:00
David Hewitt 888b10c373 examples: add links to cargo-generate
Co-authored-by: Adam Reichold <adamreichold@users.noreply.github.com>
2021-12-15 08:12:43 +00:00
David Hewitt ce7e17c0e6 examples: add cargo-generate configuration 2021-12-15 08:11:46 +00:00
Bruno Kolenbrander 39cac9075b
Organize examples + add __call__ example (#2043)
* Add decorator example crate and split off chapter

* Move not-examples to their own folder

* Add some readme's

* Make black happy

* Make clippy happy

* Add decorator example crate and split off chapter

* Fix ci

* Add empty workspace key

* Try fix ci

* fix ci

* reuse target dir for examples CI

* add pytests folder to makefile recipes

* fix ci, try 2

* add missing pyproject.toml

* remove TOX_TESTENV_PASSENV from Makefile

Co-authored-by: David Hewitt <1939362+davidhewitt@users.noreply.github.com>
2021-12-15 00:45:26 +00:00
David Hewitt 397555fd67
Merge pull request #2027 from mejrs/exception_docstring
Allow user defined exceptions to have docstrings
2021-12-14 20:40:06 +00:00
mejrs bbe478db81 Update changelog 2021-12-14 19:19:31 +01:00
Bruno Kolenbrander 24d761d267
Merge branch 'PyO3:main' into exception_docstring 2021-12-14 17:13:24 +01:00
David Hewitt 415e12cb3c
Merge pull request #2047 from davidhewitt/clippy-workspace
ci: clippy whole workspace
2021-12-14 07:22:19 +00:00
David Hewitt 469d72a001
Merge pull request #2022 from PyO3/pyo3_path
Hygiene: offer a way to set path to pyo3 crate
2021-12-09 20:27:48 +00:00
David Hewitt bf2cd10701
Merge pull request #2041 from StarryInternet/parsons20/optional-parameters-must-be-last
Disallow positional arguments after optional arguments
2021-12-09 20:04:07 +00:00
Juniper Parsons 47cf13239f
Disallow positional args after optional args 2021-12-09 10:01:59 -05:00
David Hewitt cbe2b2a361 ci: use makefile for fmt 2021-12-09 08:17:08 +00:00
David Hewitt a5ef9ff64a ci: clippy whole workspace 2021-12-09 08:11:28 +00:00
Georg Brandl d0381c25e5 pyo3_path: rename internal types/variables to Crate/krate 2021-12-09 09:06:58 +01:00
Daniel Henry-Mantilla 2d49dc33b7 Fix the #[macro_export] absolute path within the same crate issue 2021-12-09 07:36:48 +01:00
Georg Brandl a5b76bc365 pyo3_path, part 4: rename to crate to keep consistent with serde 2021-12-09 07:36:48 +01:00
Georg Brandl 681217d8d9 pyo3_path, part 3: move test_hygiene into lib crate
This removes the crate-root `pyo3` item to ensure that our
selected pyo3_path needs to be taken into account.
2021-12-09 07:36:48 +01:00
Georg Brandl e4f608f605 pyo3_path, part 2: add pyo3_path options and use them. 2021-12-09 07:24:18 +01:00
Georg Brandl e2c0e34837 pyo3_path, part 1: mechanical replacement ::pyo3 -> _pyo3 2021-12-09 07:24:18 +01:00
Bruno Kolenbrander 7dbbf7194a
Fix the main branch (#2046) 2021-12-09 01:03:50 +01:00
David Hewitt 0f02d45334
Merge pull request #2039 from davidhewitt/no-self-dev-dep
dev: remove self dev dependency
2021-12-08 08:24:45 +00:00
David Hewitt 6433d884fc dev: remove self dev dependency 2021-12-08 07:48:58 +00:00
David Hewitt 2705a9247e
Merge pull request #2040 from davidhewitt/rust-1.57
rust: support 1.57
2021-12-08 07:30:03 +00:00
David Hewitt 4c8abd1426 rust: support 1.57 2021-12-08 07:10:16 +00:00
David Hewitt 43c99559eb
Merge pull request #2038 from davidhewitt/maturin-new-readme
readme: recommend maturin init
2021-12-06 18:46:01 +00:00
mejrs 0ee13c1c1b Make new_type return Py<PyType> instead 2021-12-04 12:52:19 +01:00
David Hewitt 6ffa508ad3 readme: recommend maturin init 2021-12-02 08:23:07 +00:00
David Hewitt 8a03778ca3
Merge pull request #2014 from b05902132/default_impl
Support default method implementation
2021-11-29 23:21:11 +00:00
b05902132 aac0e566b0 Allow default implementation of slots. Add default __repr__ for enums. 2021-11-29 17:35:18 +08:00
David Hewitt 745551841e
Merge pull request #2031 from davidhewitt/resurrect-type-is-instance
pytype: resurrect (deprecated) PyType::is_instance
2021-11-29 07:31:06 +00:00
David Hewitt b56d492c3b pytype: resurrect (deprecated) PyType::is_instance 2021-11-27 09:05:58 +00:00
David Hewitt 770c02e93c
Merge pull request #2026 from davidhewitt/err-method-names
err: tweak names, inlining and docs
2021-11-27 09:00:26 +00:00
David Hewitt 2ac30ec411 err: tweak names, inlining and docs 2021-11-27 08:26:04 +00:00
David Hewitt b2bbf972d0
Merge pull request #2025 from ghuls/pypy_hasattr
Pypy hasattr
2021-11-25 19:54:33 +00:00