hdx-python-country 4.2.5__tar.gz → 4.2.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (48) hide show
  1. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/PKG-INFO +3 -4
  2. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/documentation/index.md +2 -0
  3. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/pyproject.toml +3 -4
  4. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/src/hdx/location/_version.py +2 -2
  5. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/src/hdx/location/currency.py +2 -4
  6. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/src/hdx/location/wfp_exchangerates.py +2 -2
  7. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/uv.lock +47 -666
  8. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/.github/workflows/publish.yaml +0 -0
  9. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/.github/workflows/run-python-tests.yaml +0 -0
  10. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/.gitignore +0 -0
  11. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/.pre-commit-config.yaml +0 -0
  12. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/LICENSE +0 -0
  13. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/README.md +0 -0
  14. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/documentation/.readthedocs.yaml +0 -0
  15. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/documentation/mkdocs.yaml +0 -0
  16. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/src/hdx/location/Countries & Territories Taxonomy MVP - C&T Taxonomy.csv +0 -0
  17. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/src/hdx/location/__init__.py +0 -0
  18. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/src/hdx/location/adminlevel.py +0 -0
  19. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/src/hdx/location/country.py +0 -0
  20. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/src/hdx/location/int_timestamp.py +0 -0
  21. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/src/hdx/location/wfp_api.py +0 -0
  22. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/adminlevel.yaml +0 -0
  23. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/adminlevelparent.yaml +0 -0
  24. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/fixtures-download-global-pcode-lengths.csv +0 -0
  25. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/fixtures-download-global-pcodes-adm-1-2.csv +0 -0
  26. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/secondary_historic_rates.csv +0 -0
  27. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/secondary_rates.json +0 -0
  28. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_List_1.json +0 -0
  29. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_List_2.json +0 -0
  30. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_1.json +0 -0
  31. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_10.json +0 -0
  32. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_2.json +0 -0
  33. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_3.json +0 -0
  34. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_4.json +0 -0
  35. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_5.json +0 -0
  36. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_6.json +0 -0
  37. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_7.json +0 -0
  38. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_8.json +0 -0
  39. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Currency_UsdIndirectQuotation_9.json +0 -0
  40. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Markets_List_AFG_1.json +0 -0
  41. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/fixtures/wfp/Markets_List_AFG_2.json +0 -0
  42. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/hdx/location/Countries_UZB_Deleted.csv +0 -0
  43. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/hdx/location/__init__.py +0 -0
  44. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/hdx/location/conftest.py +0 -0
  45. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/hdx/location/test_adminlevel.py +0 -0
  46. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/hdx/location/test_country.py +0 -0
  47. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/hdx/location/test_currency.py +0 -0
  48. {hdx_python_country-4.2.5 → hdx_python_country-4.2.6}/tests/hdx/location/test_wfp_exchangerates.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: hdx-python-country
3
- Version: 4.2.5
3
+ Version: 4.2.6
4
4
  Summary: HDX Python country code and exchange rate (fx) utilities
5
5
  Project-URL: Homepage, https://github.com/OCHA-DAP/hdx-python-country
6
6
  Project-URL: Repository, https://github.com/OCHA-DAP/hdx-python-country
@@ -20,14 +20,13 @@ Classifier: Operating System :: Unix
20
20
  Classifier: Programming Language :: Python
21
21
  Classifier: Programming Language :: Python :: 3
22
22
  Classifier: Programming Language :: Python :: 3 :: Only
23
- Classifier: Programming Language :: Python :: 3.10
24
23
  Classifier: Programming Language :: Python :: 3.11
25
24
  Classifier: Programming Language :: Python :: 3.12
26
25
  Classifier: Programming Language :: Python :: 3.13
27
26
  Classifier: Programming Language :: Python :: 3.14
28
27
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
29
- Requires-Python: >=3.10
30
- Requires-Dist: hdx-python-utilities<5,>=4.2.4
28
+ Requires-Python: >=3.11
29
+ Requires-Dist: hdx-python-utilities<5,>=4.2.5
31
30
  Requires-Dist: tenacity
32
31
  Provides-Extra: docs
33
32
  Requires-Dist: mkapi; extra == 'docs'
@@ -42,6 +42,8 @@ The code for the library is [here](https://github.com/OCHA-DAP/hdx-python-countr
42
42
  The library has detailed API documentation which can be found in the menu at the top.
43
43
 
44
44
  ## Breaking Changes
45
+ From 4.2.6, Python 3.11 or later and HDX Python Utilities 4.2.5 or later are required.
46
+
45
47
  From 4.2.4, the AdminLevel matcher parameter is removed and HDX Python Utilities
46
48
  4.2.3 or later is required.
47
49
 
@@ -18,7 +18,6 @@ classifiers = [
18
18
  "Programming Language :: Python",
19
19
  "Programming Language :: Python :: 3",
20
20
  "Programming Language :: Python :: 3 :: Only",
21
- "Programming Language :: Python :: 3.10",
22
21
  "Programming Language :: Python :: 3.11",
23
22
  "Programming Language :: Python :: 3.12",
24
23
  "Programming Language :: Python :: 3.13",
@@ -33,10 +32,10 @@ classifiers = [
33
32
  ]
34
33
  readme = "README.md"
35
34
  dynamic = ["version"]
36
- requires-python = ">=3.10"
35
+ requires-python = ">=3.11"
37
36
 
38
37
  dependencies = [
39
- "hdx-python-utilities>=4.2.4,<5",
38
+ "hdx-python-utilities>=4.2.5,<5",
40
39
  "tenacity",
41
40
  ]
42
41
 
@@ -95,7 +94,7 @@ data-bridges-client = { index = "wfp" }
95
94
  # ----------------------------------------------------------------------------
96
95
 
97
96
  [tool.ruff]
98
- target-version = "py310"
97
+ target-version = "py311"
99
98
  src = ["src"]
100
99
  exclude = ["_version.py"]
101
100
 
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
18
18
  commit_id: str | None
19
19
  __commit_id__: str | None
20
20
 
21
- __version__ = version = '4.2.5'
22
- __version_tuple__ = version_tuple = (4, 2, 5)
21
+ __version__ = version = '4.2.6'
22
+ __version_tuple__ = version_tuple = (4, 2, 6)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -2,7 +2,7 @@
2
2
 
3
3
  import logging
4
4
  from copy import deepcopy
5
- from datetime import datetime, timezone
5
+ from datetime import UTC, datetime
6
6
  from pathlib import Path
7
7
 
8
8
  from hdx.utilities.dateparse import (
@@ -484,9 +484,7 @@ class Currency:
484
484
  if currency == "USD":
485
485
  return 1
486
486
  if ignore_timeinfo:
487
- date = date.replace(
488
- hour=0, minute=0, second=0, microsecond=0, tzinfo=timezone.utc
489
- )
487
+ date = date.replace(hour=0, minute=0, second=0, microsecond=0, tzinfo=UTC)
490
488
  timestamp = get_int_timestamp(date)
491
489
  return cls._get_historic_rate(currency, timestamp)
492
490
 
@@ -1,6 +1,6 @@
1
1
  import logging
2
2
  from collections.abc import Sequence
3
- from datetime import timezone
3
+ from datetime import UTC
4
4
 
5
5
  from .int_timestamp import get_int_timestamp
6
6
  from .wfp_api import WFPAPI
@@ -62,7 +62,7 @@ class WFPExchangeRates:
62
62
  # data_bridges_client parses WFP's timezone-less date strings
63
63
  # into naive datetimes; assume UTC to match previous
64
64
  # parse_date-based behaviour
65
- date = date.replace(tzinfo=timezone.utc)
65
+ date = date.replace(tzinfo=UTC)
66
66
  timestamp = get_int_timestamp(date)
67
67
  historic_rates[timestamp] = quote.value
68
68
  return historic_rates