Skip to content

CI failing MSRV cargo check with new chrono 0.4.25 #3193

@jakelishman

Description

@jakelishman

Bug Description

chrono 0.4.25 released yesterday, and it looks like it's causing problems in cargo check on Rust 1.48. I bumped into this on #3185. Looks like chrono's MSRV is 1.56.1 (implied by their CI), so they technically haven't made a breaking change in their patch release. I'm not familiar enough with PyO3 or Rust's packaging practices to propose a "fix" to CI.

Fwiw, the offending i32::rem_euclid was stabilised as const fn in 1.52.

Steps to Reproduce

Copied from CI logs:

nox > cargo check '--features=abi3 full' --all-targets --workspace --exclude=pyo3-ffi-check
  warning: /home/runner/work/pyo3/pyo3/examples/Cargo.toml: unused manifest key: example.0.doc-scrape-examples
      Checking chrono v0.4.25
      Checking pyo3-build-config v0.18.3 (/home/runner/work/pyo3/pyo3/pyo3-build-config)
     Compiling cssparser v0.27.2
  error: `core::num::<impl i32>::rem_euclid` is not yet stable as a const fn
     --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/chrono-0.4.25/src/naive/internals.rs:118:20
      |
  118 |         let year = year.rem_euclid(400);
      |                    ^^^^^^^^^^^^^^^^^^^^
  
  error: aborting due to previous error
  
  error: could not compile `chrono`
  
  To learn more, run the command again with --verbose.
  warning: build failed, waiting for other jobs to finish...
  error: build failed
  nox > Command cargo check '--features=abi3 full' --all-targets --workspace --exclude=pyo3-ffi-check failed with exit code 101

Backtrace

No response

Your operating system and version

macOS 13.3.1

Your Python version (python --version)

3.10.6

Your Rust version (rustc --version)

1.48

Your PyO3 version

0.18.3 (main)

How did you install python? Did you use a virtualenv?

from source, active venv

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions