cylc-flow icon indicating copy to clipboard operation
cylc-flow copied to clipboard

Address some warnings

Open MetRonnie opened this issue 1 year ago • 2 comments

Spotted in pytest output

datetime.utcnow()

Deprecated since version 3.12: Use datetime.now() with UTC instead.

[!NOTE] There is a risk with this because using comparison operators (e.g. <) between timezone-aware and naive (timezone-unaware) datetimes results in a type error. However I do not think we are doing any such comparisons, and all the tests are passing.

sqlite3.connect():

Changed in version 3.13: Positional use of the parameters timeout, detect_types, isolation_level, check_same_thread, factory, cached_statements, and uri is deprecated. They will become keyword-only parameters in Python 3.15.

Check List

  • [x] I have read CONTRIBUTING.md and added my name as a Code Contributor.
  • [x] Contains logically grouped changes (else tidy your branch by rebase).
  • [x] Does not contain off-topic changes (use other PRs for other changes).
  • [x] No dependency changes
  • [x] No tests/docs/changelog needed
  • [x] If this is a bug fix, PR should be raised against the relevant ?.?.x branch.

MetRonnie avatar Feb 27 '25 15:02 MetRonnie

@hjoliver, this PR removes a code block that isn't used any more. Can you have a quick look at it and merge if ok.

oliver-sanders avatar Mar 04 '25 15:03 oliver-sanders

@hjoliver ping

MetRonnie avatar Apr 16 '25 13:04 MetRonnie

(bumped to 8.5.0 as this is non-critical, bump back if merged in time)

oliver-sanders avatar Jul 11 '25 10:07 oliver-sanders

Python 3.15 is out next year, hence I think this ought to go in soon (8.7.0 at the latest)

MetRonnie avatar Sep 29 '25 15:09 MetRonnie