From 8cf75e56f707fa7d5552ec4feb27c4d6a9921ddc Mon Sep 17 00:00:00 2001 From: Yozachar <38415384+yozachar@users.noreply.github.com> Date: Sat, 25 May 2024 08:10:01 +0530 Subject: [PATCH] hotfix: ensure `_tld.txt` is in `sdist` and `bdist` --- CHANGES.md | 17 +++++++++++++++++ CONTRIBUTING.md | 12 ++++++------ SECURITY.md | 2 +- pyproject.toml | 2 +- src/validators/__init__.py | 2 +- src/validators/_tld.txt | 2 +- src/validators/domain.py | 1 + 7 files changed, 28 insertions(+), 10 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 66ab634e..6dfe163a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,22 @@ Note to self: Breaking changes must increment either --> +## 0.28.3 (2024-05-25) + +_**Breaking**_ + +> No breaking changes were introduced in this version. + +_**Features**_ + +> No features were introduced in this version. + +_**Maintenance**_ + +- hotfix: ensure `_tld.txt` is in `sdist` and `bdist` by @yozachar in [#379](https://github.com/python-validators/validators/pull/379) + +**Full Changelog**: [`0.28.2...0.28.3`](https://github.com/python-validators/validators/compare/0.28.2...0.28.3) + ## 0.28.2 (2024-05-24) _**Breaking**_ @@ -26,6 +42,7 @@ _**Maintenance**_ - fix(ip_address): properly handle private is false by @grleblanc in [#374](https://github.com/python-validators/validators/pull/374) - chore(url): allow symbols and pictographs in url by @prousso in [#375](https://github.com/python-validators/validators/pull/375) - build(deps): bump requests from 2.31.0 to 2.32.0 in /package by @dependabot in [#376](https://github.com/python-validators/validators/pull/376) +- chore: fix typo; update dev deps; bump version by @yozachar in [#377](https://github.com/python-validators/validators/pull/377) **Full Changelog**: [`0.28.1...0.28.2`](https://github.com/python-validators/validators/compare/0.28.1...0.28.2) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e7995c27..9a601f55 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ Hi, to start, you need the following installed on your system. 4. (Optional/Recommended) NodeJS for type checking 5. (Optional/Recommended) [mise](https://github.com/jdx/mise) to manage multiple versions of Python & NodeJS. -First [fork this repository](https://github.com/python-validators/validators/fork). Clone it to your system. Install development dependencies. +First [fork this repository](https://github.com/python-validators/validators/fork). Uncheck "fork only `master`", because for versioned docs you'll need `gh-pages` too. Clone it to your system. Install development dependencies. ```sh # clone repository @@ -78,11 +78,11 @@ $ python -m http.server -d docs/_build/web $ git push upstream --tag ``` -4. To update versioned docs, you must track the `gh-pages` onto a local branch. `git checkout --track upstream/gh-pages`, once. -5. Checkout to the tag you want to include in the versioned documentation `git checkout TAG_NAME`. -6. Then using [`mike`](https://github.com/jimporter/mike) (which is already a dev dependency) run `mike deploy -p -u VERSION stable`. -7. Or use `mike deploy -p -u dev master`, which will deploy docs in the CURRENT commit as the `latest` documentation. -8. Run `./package/roll.sh` (or `./package/roll.ps1`) to generate both sdist and bdist. +4. To prevew versioned docs, run `mike serve` (`mike` is already a dev dependency). +5. To update it, checkout to the tag you want to include in the versioned documentation `git checkout TAG_NAME`. +6. Then run `mike deploy -p -u VERSION stable` OR run `mike deploy -p -u dev master`, +7. Which will deploy docs in the CURRENT commit as the `latest` documentation, onto `gh-pages` branch. +8. Run `./package/roll.sh` (or `./package/roll.ps1`) to generate both `sdist` and `bdist`. 9. Install [`twine`](https://pypi.org/project/twine) using [`pipx`](https://pipx.pypa.io) to upload package to PyPI. ```sh diff --git a/SECURITY.md b/SECURITY.md index b39fe0dc..5c9f751e 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -4,7 +4,7 @@ | Version | Supported | | ---------- | ------------------ | -| `>=0.28.2` | :white_check_mark: | +| `>=0.28.3` | :white_check_mark: | ## Reporting a Vulnerability diff --git a/pyproject.toml b/pyproject.toml index fde50c7a..f1faaa87 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -88,7 +88,7 @@ include = ["validators*"] namespaces = false [tool.setuptools.package-data] -validators = ["py.typed"] +validators = ["py.typed", "_tld.txt"] [tool.setuptools.dynamic] version = { attr = "validators.__version__" } diff --git a/src/validators/__init__.py b/src/validators/__init__.py index 6f6506bc..f212d30f 100644 --- a/src/validators/__init__.py +++ b/src/validators/__init__.py @@ -105,4 +105,4 @@ "validator", ) -__version__ = "0.28.2" +__version__ = "0.28.3" diff --git a/src/validators/_tld.txt b/src/validators/_tld.txt index b26d13ad..00e543b2 100644 --- a/src/validators/_tld.txt +++ b/src/validators/_tld.txt @@ -1,4 +1,4 @@ -# Version 2024040300, Last Updated Wed Apr 3 07:07:01 2024 UTC +# Version 2024052400, Last Updated Fri May 24 07:07:01 2024 UTC AAA AARP ABB diff --git a/src/validators/domain.py b/src/validators/domain.py index 43ed981f..ecca605a 100644 --- a/src/validators/domain.py +++ b/src/validators/domain.py @@ -10,6 +10,7 @@ def _iana_tld(): """Load IANA TLDs as a Generator.""" + # source: https://data.iana.org/TLD/tlds-alpha-by-domain.txt with Path(__file__).parent.joinpath("_tld.txt").open() as tld_f: _ = next(tld_f) # ignore the first line for line in tld_f: