Skip to content

Commit

Permalink
Remove redundant use statements and add missing calls to add_function…
Browse files Browse the repository at this point in the history
… in datetime test.
  • Loading branch information
adamreichold committed Apr 13, 2022
1 parent a1f97f1 commit 0d0089e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Add an experimental `generate-abi3-import-lib` feature to auto-generate `python3.dll` import libraries for Windows. [#2282](https://github.com/PyO3/pyo3/pull/2282)
- Add FFI definitions for `PyDateTime_BaseTime` and `PyDateTime_BaseDateTime`. [#2294](https://github.com/PyO3/pyo3/pull/2294)
- Added `PyTzInfoAccess`. [#2263](https://github.com/PyO3/pyo3/pull/2263)
- Added `PyTzInfoAccess` for safe access to time zone information. [#2263](https://github.com/PyO3/pyo3/pull/2263)

### Changed

Expand Down
2 changes: 2 additions & 0 deletions pytests/src/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,8 @@ pub fn datetime(_py: Python<'_>, m: &PyModule) -> PyResult<()> {
m.add_function(wrap_pyfunction!(make_datetime, m)?)?;
m.add_function(wrap_pyfunction!(get_datetime_tuple, m)?)?;
m.add_function(wrap_pyfunction!(datetime_from_timestamp, m)?)?;
m.add_function(wrap_pyfunction!(get_datetime_tzinfo, m)?)?;
m.add_function(wrap_pyfunction!(get_time_tzinfo, m)?)?;

// Functions not supported by PyPy
#[cfg(not(PyPy))]
Expand Down
5 changes: 1 addition & 4 deletions src/types/datetime.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,8 @@
//! documentation](https://docs.python.org/3/library/datetime.html)

use crate::err::PyResult;
use crate::ffi;
#[cfg(PyPy)]
use crate::ffi::datetime::{PyDateTime_FromTimestamp, PyDate_FromTimestamp};
use crate::ffi::{
PyDateTime_CAPI, PyDateTime_FromTimestamp, PyDateTime_IMPORT, PyDate_FromTimestamp,
self, PyDateTime_CAPI, PyDateTime_FromTimestamp, PyDateTime_IMPORT, PyDate_FromTimestamp,
};
#[cfg(not(PyPy))]
use crate::ffi::{PyDateTime_DATE_GET_FOLD, PyDateTime_TIME_GET_FOLD};
Expand Down

0 comments on commit 0d0089e

Please sign in to comment.