Commit graph

1501 commits

Author SHA1 Message Date
kngwyu a6438ebb10 Handle a corner case in which a getter takes multiple Python 2019-07-14 14:35:50 +09:00
kngwyu 383d0d3bac Do not execute test_compule_error in kcov 2019-07-13 15:00:19 +09:00
kngwyu 721e746585 Allow py: Python as an argument of getter 2019-07-12 23:41:13 +09:00
kngwyu fc5cdc1031 [derive-backend] Add utils::if_type_is_python 2019-07-12 22:22:56 +09:00
Yuji Kanagawa 5d85ea7fdc
Merge pull request #513 from kngwyu/pinbox
Refactoring around Box usages
2019-07-10 11:43:10 +09:00
Yuji Kanagawa 83d0ac4e70
Merge pull request #523 from ijl/fix-deprecation
Fix deprecation warnings on sync and mem
2019-07-09 20:03:12 +09:00
kngwyu 9f827f024c Update MIN_DATE/VERSION in build.rs 2019-07-09 19:06:50 +09:00
kngwyu 27f6abddba Do not use tox-venv in travis 2019-07-09 18:48:45 +09:00
ijl c27d9947a8 Fix deprecation warnings on sync and mem 2019-07-07 09:52:25 +00:00
konstin 9669edbfe3
Merge pull request #515 from kngwyu/guide-str-arg
Add arg=string example in the method arguments section in the guide
2019-06-21 20:54:26 +02:00
kngwyu c12836edcf Add arg=string example in the method arguments section in the guide 2019-06-21 17:07:51 +09:00
kngwyu 2fa017a508 Refactor type_object::initialize_type 2019-06-16 21:54:06 +09:00
kngwyu 02d93346c2 Use Pin<Box> for PyBuffer 2019-06-16 21:53:02 +09:00
Yuji Kanagawa 3e69389e68
Merge pull request #512 from kngwyu/expose-py-run
Expose py_run! macro
2019-06-15 23:50:14 +09:00
kngwyu 9073956da6 Edit CHANGELOG 2019-06-15 23:12:22 +09:00
kngwyu 503ec1a061 Use unindent crate instead of _indoc_runtime 2019-06-15 01:10:18 +09:00
kngwyu f642dbccb2 Refactor py_run! 2019-06-14 18:58:00 +09:00
Yuji Kanagawa 05b0cb66f8
Merge pull request #506 from PyO3/more_error_information
Print error before on class init panic
2019-06-14 14:16:47 +09:00
kngwyu 8dbb388372 Change add_wrapped to take &impl Fn 2019-06-14 12:42:32 +09:00
kngwyu 0f9a3b1194 Expose py_run macro 2019-06-13 18:18:06 +09:00
Yuji Kanagawa 787f5d305e
Merge pull request #509 from Alexander-N/coverage
Ignore return code of coverage script
2019-06-09 12:55:16 +09:00
Yuji Kanagawa 1d05de8546
Merge pull request #508 from Alexander-N/patch-1
Add python-ext-wasm as example
2019-06-09 12:54:24 +09:00
Alexander Niederbühl c416e0ef8e Ignore return code of coverage script
A failure in the coverage script should not cause the whole build to
fail.
2019-06-08 17:08:37 +02:00
Alexander-N c66a95d355
Add python-ext-wasm as example 2019-06-08 16:35:24 +02:00
Yuji Kanagawa f2a7c64365
Merge pull request #503 from kngwyu/reject-generics
Reject generics explicitly for #[pyclass]
2019-06-06 19:02:26 +09:00
konstin 45f23c08de
Merge pull request #507 from thedrow/patch-2
Added fastuuid as an example
2019-06-05 21:06:23 +02:00
Omer Katz 9c3b4b7d37
Added fastuuid as an example. 2019-06-05 20:54:26 +03:00
konstin dfd5a2abb8 Print error before on class init panic
Inspired by https://github.com/rust-numpy/rust-numpy/issues/97, also fixes some warnings from the latest nightly
2019-06-05 12:01:09 +02:00
kngwyu 35f5301675 Reject generics explicitly for #[pyclass] 2019-06-05 18:46:17 +09:00
konstin c76399e73d
Merge pull request #491 from PyO3/less_horrible_build_rs
build.rs configuration as struct instead of strings
2019-06-05 11:26:33 +02:00
konstin ed2ec48a58
Merge pull request #504 from kngwyu/upd-readme
Add Rogue-Gym to example
2019-06-05 11:22:11 +02:00
kngwyu e58ad71734 Add Rogue-Gym to example 2019-06-05 15:51:25 +09:00
Martin Larralde 99fdafbb88 Allow setting the module name for a pyclass (#499)
* Add `MODULE` const value to `PyTypeInfo` trait

* Allow setting module name in `pyclass` macro arguments

* Add `$module` argument to `pyobject_native_type` macro in `pyo3::types`

* Set the right module for builtin types in `pyo3::types`

* Add `module` argument to example `word_count.WordCounter` class

* Add `module` argument of `pyclass` macro to guide

* Reformat code using `rustfmt`

* Add tests and entry in CHANGELOG.md for `module` argument in `pyclass`

* Make `$module` parameter in `pyobject_native_type` optional

* Make `pyobject_native_type` declare module as `Some("builtins")` by default
2019-06-03 12:18:44 +09:00
Yuji Kanagawa ed52d57c6f
Merge pull request #485 from PyO3/release_0_7_0
Release 0.7.0
2019-05-26 18:05:31 +09:00
konstin 0279b3d69f Release 0.7.0 2019-05-26 17:27:14 +09:00
Yuji Kanagawa 4d7ca3a450
Merge pull request #447 from birkenfeld/tuple_new
Make PyTuple constructors return &PyTuple
2019-05-26 01:07:14 +09:00
kngwyu e4287e4e47 Fix datetime example 2019-05-26 00:39:06 +09:00
kngwyu 4bf448ecaa Complete the PR 2019-05-25 23:19:07 +09:00
Georg Brandl 39d3ceb551 Make PyTuple constructors return &PyTuple 2019-05-25 22:40:32 +09:00
konstin 9eda9e9f80 build.rs configuration as struct instead of strings
Changes the configuration system from passing around a Vec<String> where each entry was a value for a different part of the configuration (with different types, all wrapped in strings) with a `InterpreterConfig` struct.

Also removes some outdated code.
2019-05-16 23:24:55 +02:00
Yuji Kanagawa a5a2059691
Merge pull request #490 from Alexander-N/clippy
Fix some clippy lints
2019-05-16 10:56:31 +09:00
Yuji Kanagawa 89ba9f52ae
Merge pull request #489 from Alexander-N/attribute-error
build.rs: Handle `python` being Python 2
2019-05-16 10:54:47 +09:00
Alexander Niederbühl 6a7090c0b0 Fix some clippy lints 2019-05-16 00:16:23 +02:00
Alexander Niederbühl 21a2f816fc build.rs: Handle python being Python 2
If `python` refers to Python 2 (as recommended in [1]) the build fails
with:
  AttributeError: 'module' object has no attribute 'base_prefix'

Since there is no `base_prefix` in Python 2, simply use `exec_prefix` if
the AttributeError is raised.

[1] https://www.python.org/dev/peps/pep-0394/
2019-05-15 23:57:01 +02:00
Azat Ibrakov 134c129edc Fix installing in 'venv' and datetime tests on Windows (#472)
* Add failing test

* Complete formatting

* Fix commands execution

* Fix commands execution for Linux

* Extract virtual environment creation/removing into separate functions

* Complete error messages

* Complete examples building

* Use 'venv' independent path

* Call script by dotted path instead of 'source' call

* Add Travis CI script

* Rename variable: 'exec_prefix' -> 'base_prefix'

* Add AppVeyor script

* Remove Rust test

* Complete shell script mode

* Complete path to powershell script

* Use 'pushd'/'popd' instead of 'cd'

* Complete powershell script

* Complete shell script

* Fix setup

* Use 'tox-venv' plugin for 'venv' stdlib module support

* Remove additional 'venv' testing

* Use global environment instead of calling 'set'

* Use 'tox' for AppVeyor, extract commands into 'setup' & 'test' scripts

* Add updating of 'pip' & 'setuptools'

* Add moving in/back from examples directories

* Complete 'pip'/'setuptools' updating

* Complete requirements

* Complete 'word-count' example configuration

* Simplify 'setup' script

* Complete 'rustapi_module' example tests

* Revert formatting

* Complete examples configuration

* Remove redundant annotations

* Add entry in changelog
2019-05-12 22:20:17 +09:00
konstin eeeee236fd
Merge pull request #478 from kngwyu/run_returns_empty
Change Python::run to return PyResult<()>
2019-05-12 15:16:17 +02:00
konstin 9525e58eda
Merge pull request #477 from Alexander-N/module-name
Enable setting the module name of a class
2019-05-12 15:05:56 +02:00
konstin f48295c7ac
Merge pull request #476 from Alexander-N/sync-readme
Bring README.md and get_started.md back in sync
2019-05-12 15:02:25 +02:00
konstin e7287bcf9a
Merge pull request #484 from PyO3/konstin-patch-1
Add inline-python as example
2019-05-12 14:50:43 +02:00
konstin b0bbe74ff2
Add inline-python as example 2019-05-12 14:41:01 +02:00