Skip to content

Commit

Permalink
Merge branch 'dev' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
romain-fontugne committed Dec 25, 2020
2 parents 1aa4c3c + 11f7632 commit 72bb764
Show file tree
Hide file tree
Showing 19 changed files with 96 additions and 28 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/python-publish-test.yml
@@ -0,0 +1,26 @@
name: Upload Python Package to Test PyPi

on: workflow_dispatch

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: secynic
TWINE_PASSWORD: ${{ secrets.TEST_PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload --repository testpypi dist/*
28 changes: 28 additions & 0 deletions .github/workflows/python-publish.yml
@@ -0,0 +1,28 @@
name: Upload Python Package to PyPi

on:
release:
types: [created]

jobs:
deploy:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build and publish
env:
TWINE_USERNAME: secynic
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
run: |
python setup.py sdist bdist_wheel
twine upload dist/*
8 changes: 7 additions & 1 deletion CHANGES.rst
@@ -1,7 +1,12 @@
Changelog
=========

1.2.0 (TBD)
1.3.0 (TBD)
-----------

- Fixed deprecated query method of dnspython (#294 - monoidic)

1.2.0 (2020-09-17)
------------------

- Removed deprecated functions: asn.IPASN._parse_fields_http,
Expand All @@ -21,6 +26,7 @@ Changelog
- Fixed deprecation warnings due to invalid escape sequences
(#272 - tirkarthi)
- Fixed bug in root and sub-entities not getting queried/data (#247)
- Fixed NIR datetime parsing issue if only date is returned (#284)
- Added new argument root_ent_check to IPWhois.lookup_rdap and
RDAP.lookup. Set this to False to revert to old functionality - missing data,
but less queries (#247)
Expand Down
2 changes: 1 addition & 1 deletion LICENSE.txt
@@ -1,4 +1,4 @@
Copyright (c) 2013-2019 Philip Hane
Copyright (c) 2013-2020 Philip Hane
All rights reserved.

Redistribution and use in source and binary forms, with or without
Expand Down
4 changes: 2 additions & 2 deletions ipwhois/__init__.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -26,4 +26,4 @@
from .net import Net
from .ipwhois import IPWhois

__version__ = '1.1.0'
__version__ = '1.2.0'
2 changes: 1 addition & 1 deletion ipwhois/asn.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
6 changes: 3 additions & 3 deletions ipwhois/docs/source/conf.py
Expand Up @@ -60,16 +60,16 @@

# General information about the project.
project = 'ipwhois'
copyright = '2013-2019, Philip Hane'
copyright = '2013-2020, Philip Hane'

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '1.1.0'
version = '1.2.0'
# The full version, including alpha/beta/rc tags.
release = '1.1.0'
release = '1.2.0'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down
2 changes: 1 addition & 1 deletion ipwhois/exceptions.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion ipwhois/hr.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion ipwhois/ipwhois.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
6 changes: 3 additions & 3 deletions ipwhois/net.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -245,7 +245,7 @@ def get_asn_dns(self):
try:

log.debug('ASN query for {0}'.format(self.dns_zone))
data = self.dns_resolver.query(self.dns_zone, 'TXT')
data = self.dns_resolver.resolve(self.dns_zone, 'TXT')
return list(data)

except (dns.resolver.NXDOMAIN, dns.resolver.NoNameservers,
Expand Down Expand Up @@ -287,7 +287,7 @@ def get_asn_verbose_dns(self, asn=None):
try:

log.debug('ASN verbose query for {0}'.format(zone))
data = self.dns_resolver.query(zone, 'TXT')
data = self.dns_resolver.resolve(zone, 'TXT')
return str(data[0])

except (dns.resolver.NXDOMAIN, dns.resolver.NoNameservers,
Expand Down
22 changes: 15 additions & 7 deletions ipwhois/nir.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -265,12 +265,20 @@ def parse_fields(self, response, fields_dict, net_start=None,

if field in ['created', 'updated'] and dt_format:

value = (
datetime.strptime(
values[0],
str(dt_format)
) - timedelta(hours=hourdelta)
).isoformat('T')
try:
value = (
datetime.strptime(
values[0],
str(dt_format)
) - timedelta(hours=hourdelta)
).isoformat('T')
except ValueError:
value = (
datetime.strptime(
values[0],
'%Y/%m/%d'
)
).isoformat('T')

elif field in ['nameservers']:

Expand Down
2 changes: 1 addition & 1 deletion ipwhois/rdap.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion ipwhois/scripts/docs/generate_examples.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion ipwhois/scripts/ipwhois_cli.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion ipwhois/scripts/ipwhois_utils_cli.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion ipwhois/utils.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion ipwhois/whois.py
@@ -1,4 +1,4 @@
# Copyright (c) 2013-2019 Philip Hane
# Copyright (c) 2013-2020 Philip Hane
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -4,7 +4,7 @@
import io

NAME = 'ipwhois'
VERSION = '1.1.0'
VERSION = '1.2.0'
AUTHOR = 'Philip Hane'
AUTHOR_EMAIL = 'secynic@gmail.com'
DESCRIPTION = 'Retrieve and parse whois data for IPv4 and IPv6 addresses.'
Expand Down

0 comments on commit 72bb764

Please sign in to comment.