Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implemented backward-compatible
subdiv
as per #597, #374 and addressing #548.A few notes:
prov
andstate
are deprecated but still work.subdiv
argument that is not supported, a NotImplementedError is raised.holidays.country_holidays('XX')
method and the argument has a country code that is not supported, a NotImplementedError is raised (note: it used to raise KeyError, which is an incorrect Exception in this instance).list_supported_countries
now returns a dict with all the ISO 3166-1 Alpha-2 country codes of the countries supported as keys and a list of that country's supported subdivision codes as values. This is backward-compatible with existing code that iterates over countries.subdivisions
variable listing all the subdivisions its supports. It replacesPROVINCES
, which was initialized quite inconsistently (fixed)._deprecated_subdivisions
variable listing all deprecated and/or aliases of subdivisions that are supported. This variable is private and used only to avoid triggering NotImplementedError.Open issues discovered: