Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Version 2.0 (2024-??-??)

- Update `marisa-trie` for compatibility with Python 3.11+
- **This update changes the minimum compatible Python version of this package to Python 3.7**
- Replace usage of `pkg_resources.resource_filename` with `importlib_resources.files` as `pkg_resources` has been deprecated.

# Version 1.1 (2021-??-??)

- Updated to CLDR v40.
Expand Down
7 changes: 2 additions & 5 deletions language_data/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,11 @@
Used for locating a file in the data directory.
"""

from pkg_resources import resource_filename
DATA_ROOT = resource_filename('language_data', 'data')
import os

from importlib.resources import files

def data_filename(filename):
"""
Given a relative filename, get the full path to that file in the data
directory.
"""
return os.path.join(DATA_ROOT, filename)
return files('language_data') / 'data' / filename
6 changes: 3 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "language_data"
version = "1.1"
version = "2.0"
description = "Supplementary data about languages used by the langcodes module"
authors = ["Elia Robyn Speer <[email protected]>"]
license = "MIT"
Expand All @@ -10,8 +10,8 @@ include = ["language_data/data", "CHANGELOG.md"]
exclude = ["language_data/data/cldr", "language_data/data/cldr-json"]

[tool.poetry.dependencies]
python = ">= 3.6"
marisa-trie = "^0.7.7"
python = ">= 3.7"
marisa-trie = ">=1.1.0"

[tool.poetry.dev-dependencies]

Expand Down