44 lines
1.8 KiB
Python
44 lines
1.8 KiB
Python
# holidays
|
|
# --------
|
|
# A fast, efficient Python library for generating country, province and state
|
|
# specific sets of holidays on the fly. It aims to make determining whether a
|
|
# specific date is a holiday as fast and flexible as possible.
|
|
#
|
|
# Authors: Vacanza Team and individual contributors (see CONTRIBUTORS file)
|
|
# dr-prodigy <dr.prodigy.github@gmail.com> (c) 2017-2023
|
|
# ryanss <ryanssdev@icloud.com> (c) 2014-2017
|
|
# Website: https://github.com/vacanza/holidays
|
|
# License: MIT (see LICENSE file)
|
|
|
|
import warnings
|
|
|
|
from holidays.version import __version__
|
|
|
|
FUTURE_INCOMPATIBILITY_WARNING_TEMPLATE = """
|
|
|
|
This is a future version incompatibility warning from Holidays v{version}
|
|
to inform you about an upcoming change in our API versioning strategy that may affect your
|
|
project's dependencies. Starting from version 1.0 onwards, we will be following a loose form of
|
|
Semantic Versioning (SemVer, https://semver.org/) to provide clearer communication regarding any
|
|
potential breaking changes.
|
|
|
|
This means that while we strive to maintain backward compatibility, there might be occasional
|
|
updates that introduce breaking changes to our API. To ensure the stability of your projects,
|
|
we highly recommend pinning the version of our API that you rely on. You can pin your current
|
|
holidays v0.x dependency (e.g., holidays=={version}) or limit it (e.g., holidays<1.0) in order to
|
|
avoid potentially unwanted upgrade to the version 1.0 when it's released (ETA 2025Q1-Q2).
|
|
|
|
If you have any questions or concerns regarding this change, please don't hesitate to reach out
|
|
to us via https://github.com/vacanza/holidays/discussions/1800.
|
|
"""
|
|
|
|
|
|
class FutureIncompatibilityWarning(DeprecationWarning):
|
|
pass
|
|
|
|
|
|
warnings.warn(
|
|
FUTURE_INCOMPATIBILITY_WARNING_TEMPLATE.format(version=__version__),
|
|
FutureIncompatibilityWarning,
|
|
)
|