Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package python-pingparsing for 
openSUSE:Factory checked in at 2021-03-06 21:19:37
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/python-pingparsing (Old)
 and      /work/SRC/openSUSE:Factory/.python-pingparsing.new.2378 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "python-pingparsing"

Sat Mar  6 21:19:37 2021 rev:8 rq:877403 version:1.2.0

Changes:
--------
--- /work/SRC/openSUSE:Factory/python-pingparsing/python-pingparsing.changes    
2020-08-18 15:05:09.535894447 +0200
+++ 
/work/SRC/openSUSE:Factory/.python-pingparsing.new.2378/python-pingparsing.changes
  2021-03-06 21:19:39.357292908 +0100
@@ -1,0 +2,8 @@
+Sat Mar  6 14:07:45 UTC 2021 - Martin Hauke <mar...@gmx.de>
+
+- Update to version 1.2.0
+  * Add support for Python 3.10
+  * Add --timezone option to the CLI
+  * Add time zone support for parser classes
+
+-------------------------------------------------------------------

Old:
----
  pingparsing-1.1.0.tar.gz

New:
----
  pingparsing-1.2.0.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ python-pingparsing.spec ++++++
--- /var/tmp/diff_new_pack.ETM3QI/_old  2021-03-06 21:19:40.001293443 +0100
+++ /var/tmp/diff_new_pack.ETM3QI/_new  2021-03-06 21:19:40.001293443 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package python-pingparsing
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -19,7 +19,7 @@
 %{?!python_module:%define python_module() python-%{**} python3-%{**}}
 %define skip_python2 1
 Name:           python-pingparsing
-Version:        1.1.0
+Version:        1.2.0
 Release:        0
 Summary:        CLI-tool/Python-library for parsing ping command output
 License:        MIT
@@ -32,6 +32,7 @@
 Requires:       python-humanreadable >= 0.1.0
 Requires:       python-loguru >= 0.4.1
 Requires:       python-pyparsing >= 2.0.3
+Requires:       python-pytz >= 2018.9
 Requires:       python-setuptools >= 38.3.0
 Requires:       python-simplejson
 Requires:       python-subprocrunner >= 1.2.1
@@ -43,6 +44,7 @@
 BuildRequires:  %{python_module humanreadable >= 0.1.0}
 BuildRequires:  %{python_module pyparsing >= 2.0.3}
 BuildRequires:  %{python_module pytest}
+BuildRequires:  %{python_module pytz >= 2018.9}
 BuildRequires:  %{python_module simplejson}
 BuildRequires:  %{python_module subprocrunner >= 1.2.1}
 BuildRequires:  %{python_module typepy >= 1.1.0}

++++++ pingparsing-1.1.0.tar.gz -> pingparsing-1.2.0.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/.github/workflows/tests.yml 
new/pingparsing-1.2.0/.github/workflows/tests.yml
--- old/pingparsing-1.1.0/.github/workflows/tests.yml   1970-01-01 
01:00:00.000000000 +0100
+++ new/pingparsing-1.2.0/.github/workflows/tests.yml   2021-01-31 
17:04:33.000000000 +0100
@@ -0,0 +1,52 @@
+name: Tests
+
+on: [push, pull_request]
+
+jobs:
+  build:
+    runs-on: ${{ matrix.os }}
+    strategy:
+      fail-fast: false
+      matrix:
+        python-version: [3.5, 3.6, 3.7, 3.8, 3.9, 3.10.0-alpha.4, pypy3]
+        os: [ubuntu-18.04, macos-latest, windows-latest]
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Set up Python ${{ matrix.python-version }}
+        uses: actions/setup-python@v2
+        with:
+          python-version: ${{ matrix.python-version }}
+
+      - name: Get pip cache dir
+        id: pip-cache
+        run: |
+          python -m pip install --upgrade "pip>=20.1"
+          echo "::set-output name=dir::$(pip cache dir)"
+
+      - name: Cache pip
+        uses: actions/cache@v2
+        with:
+          path: ${{ steps.pip-cache.outputs.dir }}
+          key: ${{ matrix.os }}-${{ matrix.python-version }}-pip-${{ 
hashFiles('**/requirements.txt') }}
+          restore-keys: |
+            ${{ matrix.os }}-${{ matrix.python-version }}-pip-
+
+      - name: Install dependencies
+        run: |
+          python -m pip install --upgrade tox
+
+      - name: Run tox
+        run: |
+          tox -e cov
+        env:
+          PYTEST_DISCORD_WEBHOOK: ${{ secrets.PYTEST_DISCORD_WEBHOOK }}
+
+      - name: Coverage report
+        run: |
+          python -m pip install --upgrade coveralls
+          coveralls --service=github
+        env:
+          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+        if: matrix.os == 'ubuntu-18.04' && matrix.python-version == '3.8'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/.travis/install.sh 
new/pingparsing-1.2.0/.travis/install.sh
--- old/pingparsing-1.1.0/.travis/install.sh    2020-08-09 17:38:47.000000000 
+0200
+++ new/pingparsing-1.2.0/.travis/install.sh    1970-01-01 01:00:00.000000000 
+0100
@@ -1,12 +0,0 @@
-#!/usr/bin/env bash
-
-if [ "$TRAVIS_OS_NAME" = "osx" ]; then
-    if ! type python3 > /dev/null 2>&1; then
-        # Install Python3 on osx
-        brew upgrade python
-    fi
-
-    pip3 install setuptools tox --upgrade
-else
-    pip install setuptools tox --upgrade
-fi
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/.travis.yml 
new/pingparsing-1.2.0/.travis.yml
--- old/pingparsing-1.1.0/.travis.yml   2020-08-09 17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/.travis.yml   1970-01-01 01:00:00.000000000 +0100
@@ -1,55 +0,0 @@
-language: python
-
-cache: pip
-
-jobs:
-  include:
-    - os: linux
-      python: 3.5
-      env: TOXENV=py35
-
-    - os: linux
-      python: 3.6
-      env: TOXENV=py36
-
-    - os: linux
-      python: 3.7
-      env: TOXENV=py37
-
-    - os: linux
-      python: 3.8
-      env: TOXENV=py38
-
-    - os: linux
-      python: 3.9-dev
-      env: TOXENV=py39
-
-    - os: linux
-      python: pypy3
-      env: TOXENV=pypy3
-
-    - os: linux
-      python: 3.7
-      env: TOXENV=cov
-      after_success:
-        - travis_retry pip install coveralls
-        - coveralls
-
-    - os: osx
-      language: generic
-      env: TOXENV=py37
-
-  allow_failures:
-    - os: linux
-      python: 3.9-dev
-      env: TOXENV=py39
-
-install:
-  - travis_retry bash -x .travis/install.sh
-
-script:
-  - tox -- --md-report-color text
-
-notifications:
-  slack:
-    secure: 
GKve91fTPx7OIYn5zZ3X+nqy7OT9Pq7763zIPcvTqcN7ZM9C+q9LKbSk9sWGmp15fCp26Eu4/6/y9ExXmp80f3zF/caCbOlmF4o15ggLmyRb1E55NoPvMfGHz4wnlJN6wczc5/yyKMm0I0IZ5rjN5fPWaoJ4rf1huHAmIbJzS0FNH0gNFAeTDY/a+lRgHnJhSsOv/Ai+nLCL9y8Ilf83THWKW923fGA7ME+rL6t07WzKnIf71ld70eDEF+OnwYVp/7u1+Yxmo14G5Q0T/aXwhZkMTFKog6F186zBqpO+KGxLaM0q1N37DOSx4K6vKvSt60BZVJ0Wq9zUKpAIVNcYGXvj4EYouW2TFJUa1ka3ITToBT2P+/ts9N4vtlAniL4SykoaM1G2Ok8MepLyC+j38LT1ItOFi6OeDBpf5mCAaSaMQO44A6BTpIJmBk5U046GaFTHw+hQPmOyRKrCJCzzgD6RfnKB1U6kknq63lsN8SdrZAe9NcPmG3pTU+wu1uBNX+vkGYRd8bpSajxLktLBLU0DTzbmsJQqNuATe//pBHgxMJYTobjmq6L5/bgK4ePlD6sGud7JJs47G++FBCAMNoQL+X0AHTthYlDC/amlDtpPHaE415KgLR25+vf6PVgQYMyFfZyTH4ECI3zA8UM6aGmD+RyVZUHZl4lDxOreGpk=
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/Makefile 
new/pingparsing-1.2.0/Makefile
--- old/pingparsing-1.1.0/Makefile      2020-08-09 17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/Makefile      2021-01-31 17:04:33.000000000 +0100
@@ -7,7 +7,6 @@
 .PHONY: check
 check:
        @-tox -e lint
-       travis lint
        pip check
 
 .PHONY: clean
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/README.rst 
new/pingparsing-1.2.0/README.rst
--- old/pingparsing-1.1.0/README.rst    2020-08-09 17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/README.rst    2021-01-31 17:04:33.000000000 +0100
@@ -18,13 +18,9 @@
     :target: https://pypi.org/project/pingparsing
     :alt: Supported Python implementations
 
-.. image:: 
https://img.shields.io/travis/thombashi/pingparsing/master.svg?label=Linux/macOS%20CI
-    :target: https://travis-ci.org/thombashi/pingparsing
-    :alt: Linux/macOS CI status
-
-.. image:: 
https://img.shields.io/appveyor/ci/thombashi/pingparsing/master.svg?label=Windows%20CI
-    :target: https://ci.appveyor.com/project/thombashi/pingparsing
-    :alt: Windows CI status
+.. image:: https://github.com/thombashi/pingparsing/workflows/Tests/badge.svg
+    :target: 
https://github.com/thombashi/pingparsing/actions?query=workflow%3ATests
+    :alt: Linux/macOS/Windows CI status
 
 .. image:: 
https://img.shields.io/github/stars/thombashi/pingparsing.svg?style=social&label=Star
     :target: https://github.com/thombashi/pingparsing
@@ -286,8 +282,8 @@
                        [--timestamp {none,epoch,datetime}] [-c COUNT]
                        [-s PACKET_SIZE] [--ttl TTL] [-w DEADLINE]
                        [--timeout TIMEOUT] [-I INTERFACE] [--addopts OPTIONS]
-                       [--indent INDENT] [--icmp-reply] [--no-color]
-                       [--debug | --quiet]
+                       [--indent INDENT] [--icmp-reply] [--timezone TIMEZONE]
+                       [--no-color] [--debug | --quiet]
                        destination_or_file [destination_or_file ...]
 
     positional arguments:
@@ -347,6 +343,7 @@
                             level. (default= 4)
       --icmp-reply, --icmp-replies
                             print results for each ICMP packet reply.
+      --timezone TIMEZONE   Time zone for timestamps.
       --no-color            Turn off colors.
 
     Documentation: https://pingparsing.rtfd.io/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/appveyor.yml 
new/pingparsing-1.2.0/appveyor.yml
--- old/pingparsing-1.1.0/appveyor.yml  2020-08-09 17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/appveyor.yml  1970-01-01 01:00:00.000000000 +0100
@@ -1,28 +0,0 @@
-build: false
-environment:
-    matrix:
-        - PYTHON: "C:/Python35-x64"
-        - PYTHON: "C:/Python36-x64"
-        - PYTHON: "C:/Python37-x64"
-        - PYTHON: "C:/Python38-x64"
-
-init:
-    - "ECHO %PYTHON%"
-    - ps: "ls C:/Python*"
-
-install:
-    - ps: "[Net.ServicePointManager]::SecurityProtocol = 'Ssl3, Tls, Tls11, 
Tls12'"
-    - ps: (new-object 
net.webclient).DownloadFile('https://bootstrap.pypa.io/get-pip.py', 
'C:/get-pip.py')
-    - "%PYTHON%/python.exe C:/get-pip.py"
-    - "%PYTHON%/Scripts/pip.exe --version"
-    - "%PYTHON%/Scripts/pip.exe install setuptools --upgrade"
-    - "%PYTHON%/Scripts/pip.exe install .[test]"
-
-test_script:
-    - "%PYTHON%/python.exe invoke_pytest.py"
-
-notifications:
-    - provider: Slack
-      auth_token:
-          secure: 
JyTQAtBzpPYiWK3eRTz/U+rvmAKopqIWE19ti4vSL/IRygV3jUVUkwET1VyTlrqOeYfNx3Kfcp7eUmHCHxFCgw==
-      channel: notifications
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/docs/pages/introduction/badges.txt 
new/pingparsing-1.2.0/docs/pages/introduction/badges.txt
--- old/pingparsing-1.1.0/docs/pages/introduction/badges.txt    2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/docs/pages/introduction/badges.txt    2021-01-31 
17:04:33.000000000 +0100
@@ -10,13 +10,9 @@
     :target: https://pypi.org/project/pingparsing
     :alt: Supported Python implementations
 
-.. image:: 
https://img.shields.io/travis/thombashi/pingparsing/master.svg?label=Linux/macOS%20CI
-    :target: https://travis-ci.org/thombashi/pingparsing
-    :alt: Linux/macOS CI status
-
-.. image:: 
https://img.shields.io/appveyor/ci/thombashi/pingparsing/master.svg?label=Windows%20CI
-    :target: https://ci.appveyor.com/project/thombashi/pingparsing
-    :alt: Windows CI status
+.. image:: https://github.com/thombashi/pingparsing/workflows/Tests/badge.svg
+    :target: 
https://github.com/thombashi/pingparsing/actions?query=workflow%3ATests
+    :alt: Linux/macOS/Windows CI status
 
 .. image:: 
https://img.shields.io/github/stars/thombashi/pingparsing.svg?style=social&label=Star
     :target: https://github.com/thombashi/pingparsing
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/docs/pages/usage/cli_help.txt 
new/pingparsing-1.2.0/docs/pages/usage/cli_help.txt
--- old/pingparsing-1.1.0/docs/pages/usage/cli_help.txt 2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/docs/pages/usage/cli_help.txt 2021-01-31 
17:04:33.000000000 +0100
@@ -6,8 +6,8 @@
                        [--timestamp {none,epoch,datetime}] [-c COUNT]
                        [-s PACKET_SIZE] [--ttl TTL] [-w DEADLINE]
                        [--timeout TIMEOUT] [-I INTERFACE] [--addopts OPTIONS]
-                       [--indent INDENT] [--icmp-reply] [--no-color]
-                       [--debug | --quiet]
+                       [--indent INDENT] [--icmp-reply] [--timezone TIMEZONE]
+                       [--no-color] [--debug | --quiet]
                        destination_or_file [destination_or_file ...]
 
     positional arguments:
@@ -67,6 +67,7 @@
                             level. (default= 4)
       --icmp-reply, --icmp-replies
                             print results for each ICMP packet reply.
+      --timezone TIMEZONE   Time zone for timestamps.
       --no-color            Turn off colors.
 
     Documentation: https://pingparsing.rtfd.io/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/pingparsing/__main__.py 
new/pingparsing-1.2.0/pingparsing/__main__.py
--- old/pingparsing-1.1.0/pingparsing/__main__.py       2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/pingparsing/__main__.py       2021-01-31 
17:04:33.000000000 +0100
@@ -13,6 +13,7 @@
 from typing import Any, Dict, Optional, Tuple
 
 import humanreadable as hr
+from pytz import timezone
 from subprocrunner import CommandError
 
 from .__version__ import __version__
@@ -101,10 +102,15 @@
         """,
     )
     group.add_argument(
-        "-s", "--packet-size", type=int, help="Specifies the number of data 
bytes to be sent.",
+        "-s",
+        "--packet-size",
+        type=int,
+        help="Specifies the number of data bytes to be sent.",
     )
     group.add_argument(
-        "--ttl", type=int, help="Specifies the Time to Live.",
+        "--ttl",
+        type=int,
+        help="Specifies the Time to Live.",
     )
     group.add_argument(
         "-w",
@@ -157,7 +163,14 @@
         help="print results for each ICMP packet reply.",
     )
     group.add_argument(
-        "--no-color", action="store_true", default=False, help="Turn off 
colors.",
+        "--timezone",
+        help="Time zone for timestamps.",
+    )
+    group.add_argument(
+        "--no-color",
+        action="store_true",
+        default=False,
+        help="Turn off colors.",
     )
 
     loglevel_dest = "log_level"
@@ -228,6 +241,7 @@
     timeout: TimeArg,
     is_parse_icmp_reply: bool,
     timestamp: str,
+    timezone_name: str,
     addopts: str,
 ) -> Tuple[str, Any]:
     if os.path.isfile(dest_or_file):
@@ -257,7 +271,11 @@
             if result.stderr:
                 logger.error(result.stderr)
 
-    ping_parser = PingParsing()
+    if timezone_name:
+        ping_parser = PingParsing(timezone=timezone(timezone_name))
+    else:
+        ping_parser = PingParsing()
+
     stats = ping_parser.parse(ping_result_text)
     output = stats.as_dict(include_icmp_replies=is_parse_icmp_reply)
 
@@ -367,6 +385,7 @@
                             timeout,
                             options.icmp_reply,
                             options.timestamp,
+                            options.timezone,
                             options.addopts,
                         )
                     )
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/pingparsing/__version__.py 
new/pingparsing-1.2.0/pingparsing/__version__.py
--- old/pingparsing-1.1.0/pingparsing/__version__.py    2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/pingparsing/__version__.py    2021-01-31 
17:04:33.000000000 +0100
@@ -1,6 +1,6 @@
 __author__ = "Tsuyoshi Hombashi"
 __copyright__ = "Copyright 2016, {}".format(__author__)
 __license__ = "MIT License"
-__version__ = "1.1.0"
+__version__ = "1.2.0"
 __maintainer__ = __author__
 __email__ = "tsuyoshi.homba...@gmail.com"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/pingparsing/_parser.py 
new/pingparsing-1.2.0/pingparsing/_parser.py
--- old/pingparsing-1.1.0/pingparsing/_parser.py        2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/pingparsing/_parser.py        2021-01-31 
17:04:33.000000000 +0100
@@ -4,7 +4,7 @@
 
 import abc
 import re
-from datetime import datetime  # noqa
+from datetime import datetime, tzinfo
 from typing import Dict, List, Optional, Pattern, Sequence, Tuple, Union  # 
noqa
 
 import pyparsing as pp
@@ -35,6 +35,9 @@
     _TTL_PATTERN = r"ttl=(?P<ttl>\d+)"
     _TIME_PATTERN = r"time=(?P<time>[0-9\.]+)"
 
+    def __init__(self, timezone: Optional[tzinfo] = None) -> None:
+        self.__timezone = timezone
+
     @abc.abstractproperty
     def _parser_name(self) -> str:  # pragma: no cover
         pass
@@ -128,7 +131,7 @@
         return i
 
     def __timestamp_to_datetime(self, timestamp: str) -> datetime:
-        return DateTime(timestamp.lstrip("[").rstrip("]")).force_convert()
+        return DateTime(timestamp.lstrip("[").rstrip("]"), 
timezone=self.__timezone).force_convert()
 
     def __validate_stats_body(self, body_line_list: Sequence[str]) -> None:
         if typepy.is_empty_sequence(body_line_list):
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/pingparsing/_pingparsing.py 
new/pingparsing-1.2.0/pingparsing/_pingparsing.py
--- old/pingparsing-1.1.0/pingparsing/_pingparsing.py   2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/pingparsing/_pingparsing.py   2021-01-31 
17:04:33.000000000 +0100
@@ -2,7 +2,8 @@
 .. codeauthor:: Tsuyoshi Hombashi <tsuyoshi.homba...@gmail.com>
 """
 
-from typing import Union
+from datetime import tzinfo
+from typing import Optional, Union
 
 import pyparsing as pp
 import typepy
@@ -25,10 +26,15 @@
 class PingParsing:
     """
     Parser class to parsing ping command output.
+
+    Args:
+        timezone (Optional[tzinfo]):
+            Time zone for parsing timestamps.
     """
 
-    def __init__(self) -> None:
+    def __init__(self, timezone: Optional[tzinfo] = None) -> None:
         self.__parser = NullPingParser()  # type: PingParser
+        self.__timezone = timezone
 
     @property
     def parser_name(self) -> str:
@@ -73,7 +79,7 @@
         )
 
         for parser_class in parser_class_list:
-            self.__parser = parser_class()  # type: ignore
+            self.__parser = parser_class(timezone=self.__timezone)  # type: 
ignore
             try:
                 return self.__parser.parse(ping_lines)
             except ParseError as e:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/pingparsing/_pingtransmitter.py 
new/pingparsing-1.2.0/pingparsing/_pingtransmitter.py
--- old/pingparsing-1.1.0/pingparsing/_pingtransmitter.py       2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/pingparsing/_pingtransmitter.py       2021-01-31 
17:04:33.000000000 +0100
@@ -173,7 +173,6 @@
         """
         Timeout before ping exits.
         You can specify either a number or a string (e.g. ``"1sec"``).
-        If both :py:attr:`~.deadline` and :py:attr:`~.count` are |None|,
         If only a number is specified and a unit not found, the unit will be 
considered as seconds.
 
             
+------------+----------------------------------------------------------+
@@ -192,7 +191,8 @@
             
|microseconds|``us``/``usec``/``usecs``/``microsecond``/``microseconds``|
             
+------------+----------------------------------------------------------+
 
-        :py:attr:`~.deadline` automatically set to the default value (``3 
seconds``).
+        If both :py:attr:`~.deadline` and :py:attr:`~.count` are |None|,
+        :py:attr:`~.deadline` is automatically set to the default value (``3 
seconds``).
         Defaults to |None|.
 
         Returns:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/requirements/docs_requirements.txt 
new/pingparsing-1.2.0/requirements/docs_requirements.txt
--- old/pingparsing-1.1.0/requirements/docs_requirements.txt    2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/requirements/docs_requirements.txt    2021-01-31 
17:04:33.000000000 +0100
@@ -1,2 +1,3 @@
 sphinx_rtd_theme
 Sphinx>=2.4
+subprocrunner
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/requirements/requirements.txt 
new/pingparsing-1.2.0/requirements/requirements.txt
--- old/pingparsing-1.1.0/requirements/requirements.txt 2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/requirements/requirements.txt 2021-01-31 
17:04:33.000000000 +0100
@@ -1,4 +1,4 @@
 humanreadable>=0.1.0,<1
 pyparsing>=2.0.3,<3
 subprocrunner>=1.2.1,<2
-typepy>=1.1.0,<2
+typepy[datetime]>=1.1.0,<2
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/requirements/test_requirements.txt 
new/pingparsing-1.2.0/requirements/test_requirements.txt
--- old/pingparsing-1.1.0/requirements/test_requirements.txt    2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/requirements/test_requirements.txt    2021-01-31 
17:04:33.000000000 +0100
@@ -1,2 +1,3 @@
 pytest>=6.0.1
+pytest-discord>=0.0.5;python_version<="3.9"
 pytest-md-report>=0.0.12
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/setup.py 
new/pingparsing-1.2.0/setup.py
--- old/pingparsing-1.1.0/setup.py      2020-08-09 17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/setup.py      2021-01-31 17:04:33.000000000 +0100
@@ -82,6 +82,7 @@
         "Programming Language :: Python :: 3.7",
         "Programming Language :: Python :: 3.8",
         "Programming Language :: Python :: 3.9",
+        "Programming Language :: Python :: 3.10",
         "Programming Language :: Python :: 3 :: Only",
         "Programming Language :: Python :: Implementation :: CPython",
         "Programming Language :: Python :: Implementation :: PyPy",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/test/common.py 
new/pingparsing-1.2.0/test/common.py
--- old/pingparsing-1.1.0/test/common.py        2020-08-09 17:38:47.000000000 
+0200
+++ new/pingparsing-1.2.0/test/common.py        2021-01-31 17:04:33.000000000 
+0100
@@ -5,13 +5,14 @@
 from collections import namedtuple
 
 import pytest
+import pytz
 
 from pingparsing import PingParsing
 
 
 @pytest.fixture
 def ping_parser():
-    return PingParsing()
+    return PingParsing(timezone=pytz.UTC)
 
 
 PingTestData = namedtuple("PingTestData", "value expected replies")
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/test/data.py 
new/pingparsing-1.2.0/test/data.py
--- old/pingparsing-1.1.0/test/data.py  2020-08-09 17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/test/data.py  2021-01-31 17:04:33.000000000 +0100
@@ -5,6 +5,8 @@
 from datetime import datetime
 from textwrap import dedent
 
+import pytz
+
 from .common import PingTestData
 
 
@@ -105,35 +107,35 @@
     },
     [
         {
-            "timestamp": datetime(2018, 4, 29, 0, 55, 37, 3555),
+            "timestamp": datetime(2018, 4, 28, 15, 55, 37, 3555, 
tzinfo=pytz.UTC),
             "icmp_seq": 1,
             "ttl": 39,
             "time": 148.0,
             "duplicate": False,
         },
         {
-            "timestamp": datetime(2018, 4, 29, 0, 55, 37, 787175),
+            "timestamp": datetime(2018, 4, 28, 15, 55, 37, 787175, 
tzinfo=pytz.UTC),
             "icmp_seq": 2,
             "ttl": 39,
             "time": 137.0,
             "duplicate": False,
         },
         {
-            "timestamp": datetime(2018, 4, 29, 0, 55, 38, 787642),
+            "timestamp": datetime(2018, 4, 28, 15, 55, 38, 787642, 
tzinfo=pytz.UTC),
             "icmp_seq": 3,
             "ttl": 39,
             "time": 137.0,
             "duplicate": False,
         },
         {
-            "timestamp": datetime(2018, 4, 29, 0, 55, 39, 787653),
+            "timestamp": datetime(2018, 4, 28, 15, 55, 39, 787653, 
tzinfo=pytz.UTC),
             "icmp_seq": 4,
             "ttl": 39,
             "time": 136.0,
             "duplicate": False,
         },
         {
-            "timestamp": datetime(2018, 4, 29, 0, 55, 40, 788365),
+            "timestamp": datetime(2018, 4, 28, 15, 55, 40, 788365, 
tzinfo=pytz.UTC),
             "icmp_seq": 5,
             "ttl": 39,
             "time": 136.0,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/test/test_cli.py 
new/pingparsing-1.2.0/test/test_cli.py
--- old/pingparsing-1.1.0/test/test_cli.py      2020-08-09 17:38:47.000000000 
+0200
+++ new/pingparsing-1.2.0/test/test_cli.py      2021-01-31 17:04:33.000000000 
+0100
@@ -9,7 +9,7 @@
 import pytest
 from subprocrunner import SubprocessRunner
 
-from .data import DEBIAN_SUCCESS_0, UBUNTU_SUCCESS_2, WINDOWS7SP1_SUCCESS
+from .data import DEBIAN_SUCCESS_0, UBUNTU_SUCCESS_1, UBUNTU_SUCCESS_2, 
WINDOWS7SP1_SUCCESS
 
 
 def print_result(stdout, stderr, expected=None):
@@ -63,6 +63,77 @@
         assert parsed_result[tmp_ping_path_deb] == DEBIAN_SUCCESS_0.expected
         assert parsed_result[tmp_ping_path_win] == WINDOWS7SP1_SUCCESS.expected
 
+    def test_normal_timezone(self, tmpdir):
+        tmp_ping_file = tmpdir.join("ping_timezone.txt")
+        tmp_ping_file.write(UBUNTU_SUCCESS_1.value)
+        tmp_ping_path = str(tmp_ping_file)
+
+        runner = SubprocessRunner(
+            [
+                sys.executable,
+                "-m",
+                "pingparsing",
+                "--icmp-reply",
+                "--timezone",
+                "UTC",
+                "--no-color",
+                tmp_ping_path,
+            ]
+        )
+        runner.run()
+        print_result(stdout=runner.stdout, stderr=runner.stderr)
+        assert runner.returncode == 0
+        assert json.loads(runner.stdout)[tmp_ping_path] == {
+            "destination": "google.com",
+            "packet_transmit": 5,
+            "packet_receive": 5,
+            "packet_loss_count": 0,
+            "packet_loss_rate": 0.0,
+            "rtt_min": 136.537,
+            "rtt_avg": 139.174,
+            "rtt_max": 148.006,
+            "rtt_mdev": 4.425,
+            "packet_duplicate_count": 0,
+            "packet_duplicate_rate": 0.0,
+            "icmp_replies": [
+                {
+                    "timestamp": "2018-04-28T15:55:37.003555+00:00",
+                    "icmp_seq": 1,
+                    "ttl": 39,
+                    "time": 148.0,
+                    "duplicate": False,
+                },
+                {
+                    "timestamp": "2018-04-28T15:55:37.787175+00:00",
+                    "icmp_seq": 2,
+                    "ttl": 39,
+                    "time": 137.0,
+                    "duplicate": False,
+                },
+                {
+                    "timestamp": "2018-04-28T15:55:38.787642+00:00",
+                    "icmp_seq": 3,
+                    "ttl": 39,
+                    "time": 137.0,
+                    "duplicate": False,
+                },
+                {
+                    "timestamp": "2018-04-28T15:55:39.787653+00:00",
+                    "icmp_seq": 4,
+                    "ttl": 39,
+                    "time": 136.0,
+                    "duplicate": False,
+                },
+                {
+                    "timestamp": "2018-04-28T15:55:40.788365+00:00",
+                    "icmp_seq": 5,
+                    "ttl": 39,
+                    "time": 136.0,
+                    "duplicate": False,
+                },
+            ],
+        }
+
 
 @pytest.mark.xfail(run=False)
 class Test_cli_pipe:
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/test/test_cmd_maker.py 
new/pingparsing-1.2.0/test/test_cmd_maker.py
--- old/pingparsing-1.1.0/test/test_cmd_maker.py        2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/test/test_cmd_maker.py        2021-01-31 
17:04:33.000000000 +0100
@@ -23,7 +23,9 @@
 
     @pytest.mark.parametrize(
         ["maker_class", "host", "deadline", "expected"],
-        [[LinuxPingCmdMaker, "localhost", "1sec", "ping -w 1 localhost"],],
+        [
+            [LinuxPingCmdMaker, "localhost", "1sec", "ping -w 1 localhost"],
+        ],
     )
     def test_normal_deadline(self, maker_class, host, deadline, expected):
         assert maker_class(deadline=Time(deadline)).make_cmd(destination=host) 
== expected
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/test/test_pingparsing.py 
new/pingparsing-1.2.0/test/test_pingparsing.py
--- old/pingparsing-1.1.0/test/test_pingparsing.py      2020-08-09 
17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/test/test_pingparsing.py      2021-01-31 
17:04:33.000000000 +0100
@@ -6,6 +6,7 @@
 from textwrap import dedent
 
 import pytest
+import pytz
 
 from pingparsing import ParseError, PingResult
 
@@ -97,26 +98,42 @@
         "packet_duplicate_rate": 0.0,
     },
     [
-        {"timestamp": datetime(2020, 8, 8, 10, 5, 33, 81556), "icmp_seq": 1, 
"duplicate": False,},
         {
-            "timestamp": datetime(2020, 8, 8, 10, 5, 33, 81898),
+            "timestamp": datetime(2020, 8, 8, 10, 5, 33, 81556, 
tzinfo=pytz.UTC),
+            "icmp_seq": 1,
+            "duplicate": False,
+        },
+        {
+            "timestamp": datetime(2020, 8, 8, 10, 5, 33, 81898, 
tzinfo=pytz.UTC),
             "icmp_seq": 2,
             "ttl": 64,
             "time": 0.262,
             "duplicate": False,
         },
-        {"timestamp": datetime(2020, 8, 8, 10, 5, 35, 129517), "icmp_seq": 3, 
"duplicate": False,},
-        {"timestamp": datetime(2020, 8, 8, 10, 5, 36, 153055), "icmp_seq": 4, 
"duplicate": False,},
-        {"timestamp": datetime(2020, 8, 8, 10, 5, 37, 180056), "icmp_seq": 5, 
"duplicate": False,},
         {
-            "timestamp": datetime(2020, 8, 8, 10, 5, 37, 180326),
+            "timestamp": datetime(2020, 8, 8, 10, 5, 35, 129517, 
tzinfo=pytz.UTC),
+            "icmp_seq": 3,
+            "duplicate": False,
+        },
+        {
+            "timestamp": datetime(2020, 8, 8, 10, 5, 36, 153055, 
tzinfo=pytz.UTC),
+            "icmp_seq": 4,
+            "duplicate": False,
+        },
+        {
+            "timestamp": datetime(2020, 8, 8, 10, 5, 37, 180056, 
tzinfo=pytz.UTC),
+            "icmp_seq": 5,
+            "duplicate": False,
+        },
+        {
+            "timestamp": datetime(2020, 8, 8, 10, 5, 37, 180326, 
tzinfo=pytz.UTC),
             "icmp_seq": 6,
             "ttl": 64,
             "time": 0.221,
             "duplicate": False,
         },
         {
-            "timestamp": datetime(2020, 8, 8, 10, 5, 38, 201538),
+            "timestamp": datetime(2020, 8, 8, 10, 5, 38, 201538, 
tzinfo=pytz.UTC),
             "icmp_seq": 7,
             "ttl": 64,
             "time": 0.257,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/pingparsing-1.1.0/tox.ini 
new/pingparsing-1.2.0/tox.ini
--- old/pingparsing-1.1.0/tox.ini       2020-08-09 17:38:47.000000000 +0200
+++ new/pingparsing-1.2.0/tox.ini       2021-01-31 17:04:33.000000000 +0100
@@ -1,6 +1,6 @@
 [tox]
 envlist =
-    py{35,36,37,38,39}
+    py{35,36,37,38,39,310}
     pypy3
     build
     clean
@@ -8,7 +8,6 @@
     docs
     fmt
     readme
-    release
 
 [testenv]
 deps =
@@ -17,7 +16,7 @@
     pytest {posargs}
 
 [testenv:build]
-basepython = python3.7
+basepython = python3.8
 deps =
     twine
     wheel
@@ -27,6 +26,7 @@
     python setup.py clean --all
 
 [testenv:clean]
+skip_install = true
 deps =
     cleanpy
 commands =
@@ -41,14 +41,15 @@
     pytest --cov {posargs:-vv}
 
 [testenv:docs]
-basepython = python3.7
+basepython = python3.8
 deps =
     -r{toxinidir}/requirements/docs_requirements.txt
 commands =
     python setup.py build_sphinx --source-dir=docs/ --build-dir=docs/_build 
--all-files
 
 [testenv:fmt]
-basepython = python3.7
+basepython = python3.8
+skip_install = true
 deps =
     autoflake
     black
@@ -59,7 +60,8 @@
     black invoke_pytest.py setup.py test pingparsing
 
 [testenv:lint]
-basepython = python3.7
+basepython = python3.8
+skip_install = true
 deps =
     codespell
     mypy>=0.761
@@ -79,9 +81,3 @@
     readmemaker>=1.0.0
 commands =
     python make_readme.py
-
-[testenv:release]
-deps =
-    releasecmd>=0.3.1,<1
-commands =
-    python setup.py release --sign {posargs}

Reply via email to