forked from pool/python-flit-core
- Update to 3.10.1:
* flit publish can now use PyPI tokens stored in keyring (PR #649), either project tokens with a ‘username’ like pypi_token:project:project_name (use the normalised form of the name) or user tokens (pypi_token:user:username). * The --python option can now take the path of a virtualenv folder, as an alternative to a Python executable (PR #667). * Flit will work with current development versions of Pythona again (PR #684). * The flit command line package now requires Python 3.8 or above (PR #660). flit_core still works with Python 3.6 or above. * The metadata in packages now has the names of optional dependency groups (“extras”) normalised, complying with version 2.3 of the metadata standard (PR #676, PR #697). * The flit command line package now depends on pip (PR #647). * Fix potential substitution of environment variables into passwords read from .pypirc files (PR #652). * A warning is now shown when building packages which specify the old flit.buildapi backend, which should be replaced by flit_core.buildapi (PR #674). It’s a good idea to always set a maximum version for the build requirement, to protect against changes in future major versions of Flit. * Avoid using the deprecated datetime.utcfromtimestamp() (PR #682). * Flit now has a SECURITY.md file in the Github repository (PR #665). * The tests for flit_core are no longer part of the installed package, reducing the size of the wheels (PR #691). - Drop patches, included upstream: * py312-avoid-using-utcfromtimestamp.patch * py314-avoid-using-ast-str.patch - We no longer need to remove the tests from the install. OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-flit-core?expand=0&rev=48
This commit is contained in:
33
py312-avoid-using-utcfromtimestamp.patch
Normal file
33
py312-avoid-using-utcfromtimestamp.patch
Normal file
@@ -0,0 +1,33 @@
|
||||
From 915fa612e227fb4bf67f8484af5c8a399f108526 Mon Sep 17 00:00:00 2001
|
||||
From: Wim Jeantine-Glenn <hey@wimglenn.com>
|
||||
Date: Mon, 13 May 2024 23:48:47 -0500
|
||||
Subject: [PATCH] datetime.utcfromtimestamp is deprecated in Python 3.12, avoid
|
||||
using it
|
||||
|
||||
https://docs.python.org/3/library/datetime.html#datetime.datetime.utcfromtimestamp
|
||||
---
|
||||
flit_core/flit_core/wheel.py | 4 +++-
|
||||
1 file changed, 3 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/flit_core/flit_core/wheel.py b/flit_core/flit_core/wheel.py
|
||||
index b4a44b0d..dbf77372 100644
|
||||
--- a/flit_core/flit_core/wheel.py
|
||||
+++ b/flit_core/flit_core/wheel.py
|
||||
@@ -2,6 +2,7 @@
|
||||
from base64 import urlsafe_b64encode
|
||||
import contextlib
|
||||
from datetime import datetime
|
||||
+from datetime import timezone
|
||||
import hashlib
|
||||
import io
|
||||
import logging
|
||||
@@ -42,7 +43,8 @@ def zip_timestamp_from_env() -> Optional[tuple]:
|
||||
try:
|
||||
# If SOURCE_DATE_EPOCH is set (e.g. by Debian), it's used for
|
||||
# timestamps inside the zip file.
|
||||
- d = datetime.utcfromtimestamp(int(os.environ['SOURCE_DATE_EPOCH']))
|
||||
+ t = int(os.environ['SOURCE_DATE_EPOCH'])
|
||||
+ d = datetime.fromtimestamp(t, timezone.utc)
|
||||
except (KeyError, ValueError):
|
||||
# Otherwise, we'll use the mtime of files, and generated files will
|
||||
# default to 2016-1-1 00:00:00
|
Reference in New Issue
Block a user