Skip to content

Commit

Permalink
Merge pull request #379 from yozachar/workshop
Browse files Browse the repository at this point in the history
hotfix: ensure `_tld.txt` is in `sdist` and `bdist`
  • Loading branch information
yozachar authored May 25, 2024
2 parents cfa5aa1 + 8cf75e5 commit cdc987d
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 10 deletions.
17 changes: 17 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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**_
Expand All @@ -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)

Expand Down
12 changes: 6 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

| Version | Supported |
| ---------- | ------------------ |
| `>=0.28.2` | :white_check_mark: |
| `>=0.28.3` | :white_check_mark: |

## Reporting a Vulnerability

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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__" }
Expand Down
2 changes: 1 addition & 1 deletion src/validators/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,4 +105,4 @@
"validator",
)

__version__ = "0.28.2"
__version__ = "0.28.3"
2 changes: 1 addition & 1 deletion src/validators/_tld.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 1 addition & 0 deletions src/validators/domain.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit cdc987d

Please sign in to comment.