From d79700694c33bbc11c123e79143e44029fa53d2e Mon Sep 17 00:00:00 2001 From: mboot-github <130295084+mboot-github@users.noreply.github.com> Date: Thu, 21 Dec 2023 10:43:24 +0100 Subject: [PATCH] update version and readme --- Makefile | 18 ++++++- DONE => Old/DONE | 0 Old/TODO | 23 +++++++-- setup.py => Old/setup.py | 0 README.md | 100 +++------------------------------------ TODO | 20 -------- license | 26 ++++++---- pyproject.toml | 70 +++++++++++++++++++++++++++ whois/version.py | 2 +- work/version | 1 + 10 files changed, 131 insertions(+), 129 deletions(-) rename DONE => Old/DONE (100%) rename setup.py => Old/setup.py (100%) delete mode 100644 TODO create mode 100644 pyproject.toml create mode 100644 work/version diff --git a/Makefile b/Makefile index d089424..d650556 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ -all: reformat test build testwhl +all: reformat version build testwhl test_upload_pypi reformat: ./reformat-code.sh @@ -9,8 +9,22 @@ test: ./test2.py -t 2>2 | tee 1 build: + rm -rf dist python -m build - tar tvf dist/*.tar.gz + tar tvf dist/whois-$$( cat ./work/version ).tar.gz testwhl: ./testwhl.sh 2>2 | tee 1 + +version: + mkdir -p work + grep VERSION ./whois/version.py | awk '{ gsub(/"/, ""); print $$NF }' >./work/version + cat ./work/version + +test_upload_pypi: + ls -l ./dist/*$$( cat ./work/version )* + twine upload -r testpypi dist/whois-$$( cat ./work/version ).tar.gz dist/whois-$$( cat ./work/version )-py3-*.whl + +upload_pypi: + ls -l ./dist/*$$( cat ./work/version )* + twine upload -r pypi dist/whois-$$( cat ./work/version ).tar.gz dist/whois-$$( cat ./work/version )-py3-*.whl diff --git a/DONE b/Old/DONE similarity index 100% rename from DONE rename to Old/DONE diff --git a/Old/TODO b/Old/TODO index 818e207..e4d6222 100644 --- a/Old/TODO +++ b/Old/TODO @@ -1,5 +1,20 @@ -TODO +investigate why adding utf8 based domains creates: + +UnknownTld meta.xn--11b4c The TLD xn--11b4c is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--11b5bs3a The TLD xn--11b5bs3a is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--2scrj The TLD xn--2scrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--31bsy5d The TLD xn--31bsy5d is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--3hcrj The TLD xn--3hcrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--45br5r The TLD xn--45br5r is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--45brj The TLD xn--45brj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--c2br The TLD xn--c2br is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--clchc0ea0b The TLD xn--clchc0ea0b is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--fpcrj The TLD xn--fpcrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--gecrj The TLD xn--gecrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--h2breg The TLD xn--h2breg is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--h2brj The TLD xn--h2brj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--hlcj6aya The TLD xn--hlcj6aya is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--qwcrj The TLD xn--qwcrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--s9brj The TLD xn--s9brj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. +UnknownTld meta.xn--xkc2dl3a The TLD xn--xkc2dl3a is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -# pt is difficult it often gives no data, it works in aws frankfurt though -ERROR: output; missing nameserver 'ns1.dnscpanel.com.' for tld: pt -ERROR: output; missing nameserver 'ns2.dnscpanel.com.' for tld: pt diff --git a/setup.py b/Old/setup.py similarity index 100% rename from setup.py rename to Old/setup.py diff --git a/README.md b/README.md index eb5bc57..48c691d 100644 --- a/README.md +++ b/README.md @@ -1,106 +1,20 @@ -# whoisdomain +# github:python-whois +# pypi: whois * A Python package for retrieving WHOIS information of DOMAIN'S ONLY. - * Python 2.x IS NOT supported. - * Currently no additional python packages need to be installed. ---- +For all further info: -## Notes - - * This package will not support querying ip CIDR ranges or AS information - * This was a copy of the original DanyCork 'whois'. - * Significantly refactored in 2023. - * The output is still compatible with DanyCork 'whois' - -## Versioning - - * I will start versioning at 1.x.x - * the second item will be YYYYMMDD, - * the third item will start from 1 and be only used if more than one update will have to be done in one day. - -Versions `1.x.x` will keep the output compatible with Danny Cork until 2024-02-03 (February 2024) - -## Releases - - * Releases are avalable at: [Pypi](https://pypi.org/project/whoisdomain/) - -Pypi releases can be installed with: - - * `pip install whoisdomain` - -## Features - * See: [Features](docs/Features.md) - -## Dependencies - * please install also the command line "whois" of your distribution as this library parses the output of the "whois" cli command of your operating system + * see [WhoisDomain](https://github.com/mboot-github/WhoisDomain) + * all future development will take place on WhoisDomain ### Notes for Mac users * it has been observed that the default cli whois on Mac is showing each forward step in its output, this makes parsing the result very unreliable. * using a brew install whois will give in general better results. -## Docker release - * See [Docker](docs/Docker.md) - -## Usage example - * See [Usage](docs/Usage.md) - -## whoisdomain - * the cli `whoisdomain` is documented in [whoisdomain-cli](docs/whoisdomain-cli.md) - -## ccTLD & TLD support - -Most `tld's` are now autodetected via IANA root db, see the Analizer directory -and `make suggest`. - - * see the file: [tld_regexpr](./whoisdomain/tldDb/tld_regexpr.py) - * for python use: `whoisdomain.validTlds()` - * for cli use `whoisdomain -S` - ---- - ## Support - * Python 3.x is supported for x >= 9 * Python 2.x IS NOT supported. - -## Author's - * See: [Authors](docs/Authors.md) - ---- + * Python 3.x is supported for x >= 9 ## Updates - * see [Updates](docs/Updates.md) for a full history of changes. - * Only the latest update is mentioned here - -### 1.20230906.1 - * introduce parsing based on functions - * allow contextual search in splitted data and plain data - * allow contextual search based on earlier result - * fix a few tld to return the proper registrant string (not nic handle) - -### 1.20230913.1 - * if you have installed `tld` (pip install tld) you can enable withPublicSuffix=True to process untill you reach the pseudo tld. - * the public_suffix info is added if available (and if requested) - * example case is: ./test2.py -d www.dublin.airport.aero --withPublicSuffix - -### 1.20230913.3 - * fix re.NOFLAGS, it is not compatible with 3.9, it appears in 3.11 - -## 1.20230917.1 - * prepare work on pylint - * switch to logging: all verbose is currently log.debug(); to show set LOGLEVEL=DEBUG before calling, see Makefile: make test - * experimental: add extractServers: bool default False; when true we will try to extract the "redirect info chain" on rcf1036/whois and jwhois for linux/darwin - * add missing option to query(), test in production environment done - -## 1.20231102.1 - * fix from kazet for .pl tld. - -## 1.20231115.1 - New tld's and removal of a few tlds no longer supported at iana - - * abb, bw, bn, crown, crs, fj (does not work), gp (does not work), weir, realtor, post, mw, pf (a strange one), iq (gives timout), mm, int, hm (does not work) - ---- - -## in progress - + * see the Readme at [WhoisDomain](https://github.com/mboot-github/WhoisDomain) diff --git a/TODO b/TODO deleted file mode 100644 index e4d6222..0000000 --- a/TODO +++ /dev/null @@ -1,20 +0,0 @@ -investigate why adding utf8 based domains creates: - -UnknownTld meta.xn--11b4c The TLD xn--11b4c is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--11b5bs3a The TLD xn--11b5bs3a is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--2scrj The TLD xn--2scrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--31bsy5d The TLD xn--31bsy5d is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--3hcrj The TLD xn--3hcrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--45br5r The TLD xn--45br5r is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--45brj The TLD xn--45brj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--c2br The TLD xn--c2br is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--clchc0ea0b The TLD xn--clchc0ea0b is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--fpcrj The TLD xn--fpcrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--gecrj The TLD xn--gecrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--h2breg The TLD xn--h2breg is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--h2brj The TLD xn--h2brj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--hlcj6aya The TLD xn--hlcj6aya is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--qwcrj The TLD xn--qwcrj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--s9brj The TLD xn--s9brj is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. -UnknownTld meta.xn--xkc2dl3a The TLD xn--xkc2dl3a is currently not supported by this package. Use validTlds() to see what toplevel domains are supported. - diff --git a/license b/license index 5c93f45..7bdd1f7 100644 --- a/license +++ b/license @@ -1,13 +1,21 @@ - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - Version 2, December 2004 +MIT License - Copyright (C) 2004 Sam Hocevar +Copyright (c) 2023 Maarten Boot - Everyone is permitted to copy and distribute verbatim or modified - copies of this license document, and changing it is allowed as long - as the name is changed. +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: - DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. - 0. You just DO WHAT THE FUCK YOU WANT TO. +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..b96a659 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,70 @@ +[build-system] + requires = ["hatchling"] + build-backend = "hatchling.build" + +[project] + name = "whois" + dynamic = ['version'] + + authors = [ + { name="mboot-github"}, + ] + + maintainers = [ + { name="Maarten Boot", email="130295084+mboot-github@users.noreply.github.com" }, + ] + + description = "Python package for retrieving WHOIS information of domains." + readme = "README.md" + requires-python = ">=3.9" + + license = "MIT" + + classifiers = [ + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", + "Intended Audience :: Developers", + "Environment :: Console", + "Programming Language :: Python :: 3", + "Topic :: Internet", + "Topic :: Software Development :: Libraries :: Python Modules", + ] + + keywords = [ + "Python", + "whois", + "tld", + "domain", + "expiration", + "registrar", + ] + +[project.urls] + "Bug Tracker" = "https://github.com/mboot-github/WhoisDomain/issues" + "Home Page" = "https://github.com/mboot-github/WhoisDomain/" + "Repository" = "https://github.com/mboot-github/WhoisDomain/" + +[tool.hatch.version] + path = "whois/version.py" + +[tool.hatch.build] + only-packages = true + + include = [ + "whois/", + ] + + exclude = [ + "/Old/*", + "/lib/*", + "/etc/*", + "/bin/*", + "/testdata/*", + "Makefile", + ".gitignore", + "/.gitignore", + ] + +[tool.pylama] + max_line_length = 160 + skip = "*/.pytest_cache/*, */.tox/*, */mypy_cache/*, ./dist, ./docs" diff --git a/whois/version.py b/whois/version.py index c2479ab..3dd1820 100644 --- a/whois/version.py +++ b/whois/version.py @@ -1,2 +1,2 @@ """This module only makes the version available for dynamic versioning""" -VERSION = "1.20231115.1" +VERSION = "0.99.3" diff --git a/work/version b/work/version new file mode 100644 index 0000000..d17274b --- /dev/null +++ b/work/version @@ -0,0 +1 @@ +0.99.3