Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix py3.12 warnings for datetime usage, non-raw regex strings #632

Merged
merged 2 commits into from
Sep 13, 2024

Commits on Aug 24, 2024

  1. Use raw python strings for regex escapes in test summary

    Python warns about "\d" and friends that aren't in raw quotes, so we add
    the 'r'aw string-qualifier.
    
    Signed-off-by: Scott Mcdermott <[email protected]>
    smemsh committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    0afc3ab View commit details
    Browse the repository at this point in the history
  2. Make python tests use timezone, py3.12 deprecated tz-less utcnow()

    Python upstream is trying to eliminate tz-naive date functions that
    imply anything to do with a timezone, even UTC.  They have deprecated
    datetime.datetime.utcnow() in Python 3.12 and thus running tests emits
    many warnings for us.
    
    We switch to instantiate datetime objects taht are intended to reflect
    UTC to have a timezone, or if we instantiate naive ones and then later
    convert, we do the full conversion.
    
    After the changes, the tests still work on Python 3.9, but now also on
    Python 3.12 without warnings.
    
    See PR description for GothenburgBitFactory#632 for more details.
    
    Signed-off-by: Scott Mcdermott <[email protected]>
    smemsh committed Aug 24, 2024
    Configuration menu
    Copy the full SHA
    3a1729f View commit details
    Browse the repository at this point in the history