Skip to content

Commit

Permalink
Re-added dropped header
Browse files Browse the repository at this point in the history
  • Loading branch information
alex committed Oct 18, 2020
1 parent ee61ec3 commit e8dc226
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [Unreleased]
### Added
- Add support for building for CPython limited API. This required a few minor changes to runtime behaviour of of pyo3 `#[pyclass]` types. See the migration guide for full details. [#1152](https://github.com/PyO3/pyo3/pull/1152)
- Add argument names to `TypeError` messages generated by pymethod wrappers. [#1212](https://github.com/PyO3/pyo3/pull/1212)

Expand Down
8 changes: 5 additions & 3 deletions src/types/iterator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
//
// based on Daniel Grunwald's https://github.com/dgrunwald/rust-cpython

use crate::{
ffi, AsPyPointer, PyAny, PyDowncastError, PyErr, PyNativeType, PyResult, PyTryFrom, Python,
};
use crate::{ffi, AsPyPointer, PyAny, PyErr, PyNativeType, PyResult, Python};
#[cfg(any(not(Py_LIMITED_API), Py_3_8))]
use crate::{PyDowncastError, PyTryFrom};

/// A Python iterator object.
///
Expand All @@ -28,6 +28,7 @@ use crate::{
#[repr(transparent)]
pub struct PyIterator(PyAny);
pyobject_native_type_named!(PyIterator);
#[cfg(any(not(Py_LIMITED_API), Py_3_8))]
pyobject_native_type_extract!(PyIterator);

impl PyIterator {
Expand Down Expand Up @@ -202,6 +203,7 @@ mod tests {
}

#[test]
#[cfg(any(not(Py_LIMITED_API), Py_3_8))]
fn iterator_try_from() {
let gil_guard = Python::acquire_gil();
let py = gil_guard.python();
Expand Down

0 comments on commit e8dc226

Please sign in to comment.