Skip to content

Commit

Permalink
0.3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
konstin committed Jul 22, 2018
1 parent 897716c commit 2627fa8
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 13 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## 0.3.2

* Replaced `concat_idents` with mashup

## 0.3.1

* Fixed scoping bug in pyobject_native_type that would break rust-numpy
Expand Down
9 changes: 7 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyo3"
version = "0.3.1"
version = "0.3.2"
description = "Bindings to Python interpreter"
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
readme = "README.md"
Expand All @@ -22,7 +22,7 @@ codecov = { repository = "PyO3/pyo3", branch = "master", service = "github" }
libc = "0.2"
spin = "0.4.6"
num-traits = "0.2"
pyo3cls = { path = "pyo3cls", version = "0.3.1" }
pyo3cls = { path = "pyo3cls", version = "0.3.2" }
mashup = "0.1.5"

[dev-dependencies]
Expand All @@ -46,6 +46,11 @@ python3 = []
# so that the module can also be used with statically linked python interpreters.
extension-module = []

# The stable cpython abi as defined in PEP 384. Currently broken with
# many compilation errors. Pull Requests working towards fixing that
# are welcome.
# abi3 = []

[workspace]
members = [
"pyo3cls",
Expand Down
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ FEATURES := python2
endif
ifeq ($(PY),3)
FEATURES := python3
ifdef PEP384
export PEP384=1
FEATURES := $(FEATURES) pep-384
endif
endif

CARGO_FLAGS := --features "$(FEATURES)" --no-default-features
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ fn configure_from_path(expected_version: &PythonVersion) -> Result<(String, Stri
minor: some_minor,
} = interpreter_version
{
if env::var_os("CARGO_FEATURE_PEP_384").is_some() {
if env::var_os("CARGO_FEATURE_ABI3").is_some() {
println!("cargo:rustc-cfg=Py_LIMITED_API");
}
if let Some(minor) = some_minor {
Expand Down
1 change: 1 addition & 0 deletions examples/word-count-cls/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rayon = "0.8"

[dependencies.pyo3]
path = "../../"
features = ["extension-module"]

[lib]
name = "word_count_cls"
Expand Down
2 changes: 1 addition & 1 deletion pyo3-derive-backend/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyo3-derive-backend"
version = "0.3.1"
version = "0.3.2"
description = "Code generation for PyO3 package"
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
keywords = ["pyo3", "python", "cpython", "ffi"]
Expand Down
4 changes: 2 additions & 2 deletions pyo3cls/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "pyo3cls"
version = "0.3.1"
version = "0.3.2"
description = "Proc macros for PyO3 package"
authors = ["PyO3 Project and Contributors <https://github.com/PyO3>"]
keywords = ["pyo3", "python", "cpython", "ffi"]
Expand All @@ -22,7 +22,7 @@ features=["full", "parsing", "printing", "extra-traits"]

[dependencies.pyo3-derive-backend]
path = "../pyo3-derive-backend"
version = "0.3.1"
version = "0.3.2"

[dependencies.proc-macro2]
version = "0.4"
Expand Down
7 changes: 5 additions & 2 deletions src/ffi3/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,9 @@ pub type allocfunc =
unsafe extern "C" fn(arg1: *mut PyTypeObject, arg2: Py_ssize_t) -> *mut PyObject;

#[cfg(Py_LIMITED_API)]
pub enum PyTypeObject { }
mod typeobject {
pub enum PyTypeObject {}
}

#[cfg(not(Py_LIMITED_API))]
mod typeobject {
Expand Down Expand Up @@ -561,7 +563,8 @@ mod typeobject {
) as *mut ffi3::structmember::PyMemberDef
}
}
#[cfg(not(Py_LIMITED_API))]

// The exported types depend on whether Py_LIMITED_API is set
pub use self::typeobject::*;

#[repr(C)]
Expand Down
2 changes: 1 addition & 1 deletion src/typeob.rs
Original file line number Diff line number Diff line change
Expand Up @@ -350,8 +350,8 @@ impl<T> PyTypeObject for T where T: PyObjectAlloc<T> + PyTypeInfo {
}
}


/// Register new type in python object system.
#[cfg(not(Py_LIMITED_API))]
pub fn initialize_type<'p, T>(py: Python<'p>, module_name: Option<&str>) -> PyResult<()>
where T: PyObjectAlloc<T> + PyTypeInfo
{
Expand Down

0 comments on commit 2627fa8

Please sign in to comment.