Commit Graph

1622 Commits

Author SHA1 Message Date
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
kngwyu 7e6e4a923e Refactor derive_utils 2019-05-26 01:11:32 +09:00
Georg Brandl ab05a843b7 Document and test argument parsing annotations for pyfunctions 2019-05-26 01:11:25 +09:00
Georg Brandl 3878bd7acd Adjust the varargs/kwds objects to remove arguments consumed by parameters
Also fix some other validation issues and add more tests.

fixes #420
2019-05-26 01:11:25 +09:00
Georg Brandl faaf1777e4 Fix the argument parsing TypeError message
- parens are already added by the _LOCATION at call site
- fix plural-"s" logic
2019-05-26 01:10:55 +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
Alexander Niederbühl 299d325375 Enable setting the module name of a class
This is relevant for pickling objects.
2019-05-08 23:39:22 +02:00
kngwyu 803f18e61d Change Python::run to return PyResult<()> 2019-05-08 15:49:24 +09:00
Alexander Niederbühl d64ba9fa3a Bring README.md and get_started.md back in sync 2019-05-07 21:04:37 +02:00
konstin c4c75bbf81
Merge pull request #470 from PyO3/fix_minimal_versions
Fix compilation with -Z minimal versions
2019-05-06 16:54:28 +02:00
konstin ee10a02a24
Merge pull request #438 from birkenfeld/guide_fix
Make tons of small fixes in the guide
2019-05-06 16:54:11 +02:00
konstin 71b635e80a
Merge pull request #446 from birkenfeld/other_new
Make more constructors return &PyX instead of Py<PyX>
2019-05-06 12:46:00 +02:00
Georg Brandl cdabf9e1a5 Make more constructors return &PyX instead of Py<PyX>
fixes #405
2019-05-06 10:33:31 +02:00
Georg Brandl b289a75c16 Make tons of small fixes in the guide
- spelling/grammar
- update docs.rs links and Cargo.toml examples to 0.6.0
- fix a few factual mistakes I found in the process
2019-05-06 09:46:47 +02:00
konstin 74600f5f05
Merge pull request #473 from Alexander-N/clippy
Fix more clippy lints
2019-05-04 15:58:52 +02:00
Alexander Niederbühl c68333c5c2 Fix clippy::len_without_is_empty
Also remove obsolete Python 2 comment and add some punctuation for
consistency.
2019-05-04 15:36:10 +02:00
Alexander Niederbühl d174c6ed23 Fix clippy::type_complexity
Don't use PyResult since no error is returned.
2019-05-04 14:03:24 +02:00
Yuji Kanagawa be10800ea6
Merge pull request #461 from kngwyu/pymethod-with-lifetime
Allow #[pymethods] to use lifetime
2019-04-29 13:12:51 +09:00
konstin b5e23b4a32
Merge branch 'master' into fix_minimal_versions 2019-04-28 18:30:07 +02:00
konstin c6a5c054e1
Merge pull request #469 from PyO3/remove_doc_comment
Remove doc-comment
2019-04-28 18:26:51 +02:00
konstin 6dbcd3cdc0
Merge pull request #456 from PyO3/unraw
Use syn::ext::IdentExt::unraw
2019-04-28 13:55:53 +02:00
konstin e966c1cd1d Fix compilation with -Z minimal versions
This pulls in the fix from https://github.com/dtolnay/indoc/pull/29
2019-04-28 13:05:07 +02:00
konstin 5a63bdd964
Merge branch 'master' into pymethod-with-lifetime 2019-04-28 11:08:36 +02:00
konstin b5bf17f47a
Merge pull request #460 from dronesforwork-forks/marshal
Add PyMarshal_* functions to ffi interface.
2019-04-28 10:46:51 +02:00
konstin cd15719765 Remove doc-comment 2019-04-28 10:36:32 +02:00
Yuji Kanagawa f005bbfbb3
Merge pull request #467 from twilco/master
Fix link to rust-cpython comparison
2019-04-28 17:33:58 +09:00
konstin aeae195cb4 [WIP] Use syn::ext::IdentExt::unraw 2019-04-28 10:09:55 +02:00
Tyler Wilcock a494d17847
Fix link to rust-cpython comparison 2019-04-27 15:14:34 -05:00
Maarten de Vries 556e7ba029 Add marshal module to CHANGELOG.md 2019-04-26 13:13:51 +02:00
Maarten de Vries 651e28ccbb marshal: Remove unwrapped ffi functions. 2019-04-26 10:10:50 +02:00
Maarten de Vries caa5c7f88a marshal: Add example to documentation of `dumps`. 2019-04-26 10:10:50 +02:00
Maarten de Vries 739efb1b54 marshal: Use PyAny and PyBytes in safe interface. 2019-04-26 10:10:50 +02:00
Maarten de Vries 35168883b2 Add safe marshal module wrapping unsafe ffi::PyMarhshal_*. 2019-04-26 10:10:50 +02:00
Maarten de Vries 1ebdb9f364 Move marshal module from ffi3 to ffi. 2019-04-26 10:10:50 +02:00
Maarten de Vries 0a5edcb74e Add PyMarshal_* functions to ffi modules. 2019-04-26 10:10:50 +02:00