Bump apscheduler from 3.10.1 to 3.10.4 (#2133)

* Bump apscheduler from 3.10.1 to 3.10.4

Bumps [apscheduler](https://github.com/agronholm/apscheduler) from 3.10.1 to 3.10.4.
- [Changelog](https://github.com/agronholm/apscheduler/blob/3.10.4/docs/versionhistory.rst)
- [Commits](https://github.com/agronholm/apscheduler/compare/3.10.1...3.10.4)

---
updated-dependencies:
- dependency-name: apscheduler
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* Update apscheduler==3.10.4

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: JonnyWong16 <9099342+JonnyWong16@users.noreply.github.com>

[skip ci]
This commit is contained in:
dependabot[bot] 2023-08-24 12:10:08 -07:00 committed by GitHub
parent 3debeada2a
commit 2c42150799
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 855 additions and 825 deletions

View file

@ -1,17 +1,24 @@
import logging
from datetime import datetime
import pytz_deprecation_shim as pds
try:
import _winreg as winreg
except ImportError:
import winreg
try:
import zoneinfo # pragma: no cover
except ImportError:
from backports import zoneinfo # pragma: no cover
from tzlocal.windows_tz import win_tz
from tzlocal import utils
_cache_tz = None
_cache_tz_name = None
log = logging.getLogger("tzlocal")
def valuestodict(key):
"""Convert a registry key's values to a dictionary."""
@ -48,6 +55,7 @@ def _get_localzone_name():
if tzenv:
return tzenv
log.debug("Looking up time zone info from registry")
handle = winreg.ConnectRegistry(None, winreg.HKEY_LOCAL_MACHINE)
TZLOCALKEYNAME = r"SYSTEM\CurrentControlSet\Control\TimeZoneInformation"
@ -74,13 +82,13 @@ def _get_localzone_name():
# Return what we have.
if timezone is None:
raise utils.ZoneInfoNotFoundError(tzkeyname)
raise zoneinfo.ZoneInfoNotFoundError(tzkeyname)
if keyvalues.get("DynamicDaylightTimeDisabled", 0) == 1:
# DST is disabled, so don't return the timezone name,
# instead return Etc/GMT+offset
tz = pds.timezone(timezone)
tz = zoneinfo.ZoneInfo(timezone)
has_dst, std_offset, dst_offset = _get_dst_info(tz)
if not has_dst:
# The DST is turned off in the windows configuration,
@ -88,13 +96,15 @@ def _get_localzone_name():
return timezone
if std_offset is None:
raise utils.ZoneInfoNotFoundError(
f"{tzkeyname} claims to not have a non-DST time!?")
raise zoneinfo.ZoneInfoNotFoundError(
f"{tzkeyname} claims to not have a non-DST time!?"
)
if std_offset % 3600:
# I can't convert this to an hourly offset
raise utils.ZoneInfoNotFoundError(
f"tzlocal can't support disabling DST in the {timezone} zone.")
raise zoneinfo.ZoneInfoNotFoundError(
f"tzlocal can't support disabling DST in the {timezone} zone."
)
# This has whole hours as offset, return it as Etc/GMT
return f"Etc/GMT{-std_offset//3600:+.0f}"
@ -116,13 +126,13 @@ def get_localzone():
global _cache_tz
if _cache_tz is None:
_cache_tz = pds.timezone(get_localzone_name())
_cache_tz = zoneinfo.ZoneInfo(get_localzone_name())
if not utils._tz_name_from_env():
# If the timezone does NOT come from a TZ environment variable,
# verify that it's correct. If it's from the environment,
# we accept it, this is so you can run tests with different timezones.
utils.assert_tz_offset(_cache_tz)
utils.assert_tz_offset(_cache_tz, error=False)
return _cache_tz
@ -132,6 +142,6 @@ def reload_localzone():
global _cache_tz
global _cache_tz_name
_cache_tz_name = _get_localzone_name()
_cache_tz = pds.timezone(_cache_tz_name)
utils.assert_tz_offset(_cache_tz)
_cache_tz = zoneinfo.ZoneInfo(_cache_tz_name)
utils.assert_tz_offset(_cache_tz, error=False)
return _cache_tz