@@ -55,12 +55,12 @@ use crate::types::{PyDateAccess, PyDeltaAccess, PyTimeAccess};
5555use crate :: { intern, Borrowed , Bound , FromPyObject , IntoPyObject , PyAny , PyErr , PyResult , Python } ;
5656#[ cfg( feature = "experimental-inspect" ) ]
5757use crate :: { type_hint_identifier, PyTypeInfo } ;
58+ use alloc:: borrow:: Cow ;
5859use jiff:: civil:: { Date , DateTime , ISOWeekDate , Time } ;
5960use jiff:: tz:: { Offset , TimeZone } ;
6061use jiff:: { SignedDuration , Span , Timestamp , Zoned } ;
6162#[ cfg( feature = "jiff-02" ) ]
6263use jiff_02 as jiff;
63- use std:: borrow:: Cow ;
6464
6565fn datetime_to_pydatetime < ' py > (
6666 py : Python < ' py > ,
@@ -604,8 +604,8 @@ impl From<jiff::Error> for PyErr {
604604mod tests {
605605 use super :: * ;
606606 use crate :: { types:: PyTuple , BoundObject } ;
607+ use core:: cmp:: Ordering ;
607608 use jiff:: tz:: Offset ;
608- use std:: cmp:: Ordering ;
609609
610610 #[ test]
611611 // Only Python>=3.9 has the zoneinfo package
@@ -860,7 +860,7 @@ mod tests {
860860 #[ test]
861861 #[ cfg( all( Py_3_9 , not( windows) ) ) ]
862862 fn test_ambiguous_datetime_to_pyobject ( ) {
863- use std :: str:: FromStr ;
863+ use core :: str:: FromStr ;
864864 let dates = [
865865 Zoned :: from_str ( "2020-10-24 23:00:00[UTC]" ) . unwrap ( ) ,
866866 Zoned :: from_str ( "2020-10-25 00:00:00[UTC]" ) . unwrap ( ) ,
@@ -1069,22 +1069,22 @@ mod tests {
10691069 mod proptests {
10701070 use super :: * ;
10711071 use crate :: types:: IntoPyDict ;
1072+ use alloc:: ffi:: CString ;
10721073 use jiff:: tz:: TimeZoneTransition ;
10731074 use jiff:: SpanRelativeTo ;
10741075 use proptest:: prelude:: * ;
1075- use std:: ffi:: CString ;
10761076
10771077 // This is to skip the test if we are creating an invalid date, like February 31.
10781078 #[ track_caller]
10791079 fn try_date ( year : i16 , month : i8 , day : i8 ) -> Result < Date , TestCaseError > {
1080- let location = std :: panic:: Location :: caller ( ) ;
1080+ let location = core :: panic:: Location :: caller ( ) ;
10811081 Date :: new ( year, month, day)
10821082 . map_err ( |err| TestCaseError :: reject ( format ! ( "{location}: {err:?}" ) ) )
10831083 }
10841084
10851085 #[ track_caller]
10861086 fn try_time ( hour : i8 , min : i8 , sec : i8 , micro : i32 ) -> Result < Time , TestCaseError > {
1087- let location = std :: panic:: Location :: caller ( ) ;
1087+ let location = core :: panic:: Location :: caller ( ) ;
10881088 Time :: new ( hour, min, sec, micro * 1000 )
10891089 . map_err ( |err| TestCaseError :: reject ( format ! ( "{location}: {err:?}" ) ) )
10901090 }
@@ -1102,7 +1102,7 @@ mod tests {
11021102 ) -> Result < Zoned , TestCaseError > {
11031103 let date = try_date ( year, month, day) ?;
11041104 let time = try_time ( hour, min, sec, micro) ?;
1105- let location = std :: panic:: Location :: caller ( ) ;
1105+ let location = core :: panic:: Location :: caller ( ) ;
11061106 DateTime :: from_parts ( date, time)
11071107 . to_zoned ( tz)
11081108 . map_err ( |err| TestCaseError :: reject ( format ! ( "{location}: {err:?}" ) ) )
0 commit comments