From 4bd629024456dca15c44b0e1fa306e2207badbb0 Mon Sep 17 00:00:00 2001 From: Jad Chaar Date: Wed, 23 Jun 2021 22:24:57 -0400 Subject: [PATCH 001/177] Remove 'why not arrow' section from docs since it is outdated. --- README.rst | 49 ------------------------------------------------- 1 file changed, 49 deletions(-) diff --git a/README.rst b/README.rst index 313d4c92..aaf8f438 100644 --- a/README.rst +++ b/README.rst @@ -73,55 +73,6 @@ and by default in ``UTC`` for ease of use. Pendulum also improves the standard ``timedelta`` class by providing more intuitive methods and properties. - -Why not Arrow? -============== - -Arrow is the most popular datetime library for Python right now, however its behavior -and API can be erratic and unpredictable. The ``get()`` method can receive pretty much anything -and it will try its best to return something while silently failing to handle some cases: - -.. code-block:: python - - arrow.get('2016-1-17') - # - - pendulum.parse('2016-1-17') - # - - arrow.get('20160413') - # - - pendulum.parse('20160413') - # - - arrow.get('2016-W07-5') - # - - pendulum.parse('2016-W07-5') - # - - # Working with DST - just_before = arrow.Arrow(2013, 3, 31, 1, 59, 59, 999999, 'Europe/Paris') - just_after = just_before.replace(microseconds=1) - '2013-03-31T02:00:00+02:00' - # Should be 2013-03-31T03:00:00+02:00 - - (just_after.to('utc') - just_before.to('utc')).total_seconds() - -3599.999999 - # Should be 1e-06 - - just_before = pendulum.datetime(2013, 3, 31, 1, 59, 59, 999999, 'Europe/Paris') - just_after = just_before.add(microseconds=1) - '2013-03-31T03:00:00+02:00' - - (just_after.in_timezone('utc') - just_before.in_timezone('utc')).total_seconds() - 1e-06 - -Those are a few examples showing that Arrow cannot always be trusted to have a consistent -behavior with the data you are passing to it. - - Limitations =========== From c9467a8b1bec3794bece2a8ef7e9fd0cd3d91dd9 Mon Sep 17 00:00:00 2001 From: Andrey Golovizin Date: Tue, 3 Aug 2021 23:22:13 +0200 Subject: [PATCH 002/177] Fix memory leaks on exceptions in parse_iso8601 --- pendulum/parsing/_iso8601.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pendulum/parsing/_iso8601.c b/pendulum/parsing/_iso8601.c index 41c66fae..ec9f9e80 100644 --- a/pendulum/parsing/_iso8601.c +++ b/pendulum/parsing/_iso8601.c @@ -1229,6 +1229,7 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) { PyErr_SetString( PyExc_ValueError, "Invalid parameters" ); + free(parsed); return NULL; } @@ -1239,6 +1240,7 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) { PyExc_ValueError, PARSER_ERRORS[parsed->error] ); + free(parsed); return NULL; } } else if (_parse_iso8601_datetime(str, parsed) == NULL) { @@ -1246,6 +1248,7 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) { PyExc_ValueError, PARSER_ERRORS[parsed->error] ); + free(parsed); return NULL; } @@ -1295,6 +1298,7 @@ PyObject* parse_iso8601(PyObject *self, PyObject *args) { parsed->hours, parsed->minutes, parsed->seconds, parsed->microseconds ); } else { + free(parsed); return NULL; } From 0621ac49c34f7ae4e96dc8c4fa1a675c284a698e Mon Sep 17 00:00:00 2001 From: Andrey Golovizin Date: Tue, 3 Aug 2021 23:26:44 +0200 Subject: [PATCH 003/177] Fix potential null pointer dereference in new_fixed_offset_ex --- pendulum/parsing/_iso8601.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pendulum/parsing/_iso8601.c b/pendulum/parsing/_iso8601.c index 41c66fae..16f7a435 100644 --- a/pendulum/parsing/_iso8601.c +++ b/pendulum/parsing/_iso8601.c @@ -306,9 +306,10 @@ static PyTypeObject FixedOffset_type = { static PyObject *new_fixed_offset_ex(int offset, char *name, PyTypeObject *type) { FixedOffset *self = (FixedOffset *) (type->tp_alloc(type, 0)); - if (self != NULL) + if (self != NULL) { self->offset = offset; self->tzname = name; + } return (PyObject *) self; } From 520a42b6d53dabfe74b984bd6c64957f5d0ad2bf Mon Sep 17 00:00:00 2001 From: Andrey Golovizin Date: Tue, 3 Aug 2021 23:25:20 +0200 Subject: [PATCH 004/177] Use PyUnicode_FromFormat instead of sprintf --- pendulum/_extensions/_helpers.c | 7 +------ pendulum/parsing/_iso8601.c | 13 ++----------- 2 files changed, 3 insertions(+), 17 deletions(-) diff --git a/pendulum/_extensions/_helpers.c b/pendulum/_extensions/_helpers.c index b9310f25..854aee25 100644 --- a/pendulum/_extensions/_helpers.c +++ b/pendulum/_extensions/_helpers.c @@ -238,10 +238,7 @@ static int Diff_init(Diff *self, PyObject *args, PyObject *kwargs) */ static PyObject *Diff_repr(Diff *self) { - char repr[82] = {0}; - - sprintf( - repr, + return PyUnicode_FromFormat( "%d years %d months %d days %d hours %d minutes %d seconds %d microseconds", self->years, self->months, @@ -250,8 +247,6 @@ static PyObject *Diff_repr(Diff *self) self->minutes, self->seconds, self->microseconds); - - return PyUnicode_FromString(repr); } /* diff --git a/pendulum/parsing/_iso8601.c b/pendulum/parsing/_iso8601.c index 41c66fae..354e34ac 100644 --- a/pendulum/parsing/_iso8601.c +++ b/pendulum/parsing/_iso8601.c @@ -228,7 +228,6 @@ static PyObject *FixedOffset_tzname(FixedOffset *self, PyObject *args) { return PyUnicode_FromString(self->tzname); } - char tzname_[7] = {0}; char sign = '+'; int offset = self->offset; @@ -237,15 +236,12 @@ static PyObject *FixedOffset_tzname(FixedOffset *self, PyObject *args) { offset *= -1; } - sprintf( - tzname_, + return PyUnicode_FromFormat( "%c%02d:%02d", sign, offset / SECS_PER_HOUR, offset / SECS_PER_MIN % SECS_PER_MIN ); - - return PyUnicode_FromString(tzname_); } /* @@ -368,10 +364,7 @@ static int Duration_init(Duration *self, PyObject *args, PyObject *kwargs) { * ) */ static PyObject *Duration_repr(Duration *self) { - char repr[82] = {0}; - - sprintf( - repr, + return PyUnicode_FromFormat( "%d years %d months %d weeks %d days %d hours %d minutes %d seconds %d microseconds", self->years, self->months, @@ -382,8 +375,6 @@ static PyObject *Duration_repr(Duration *self) { self->seconds, self->microseconds ); - - return PyUnicode_FromString(repr); } /* From 369b4f1ff4868f41113f8cd73ed0f4360eb348ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Tue, 19 Oct 2021 21:14:12 +0200 Subject: [PATCH 005/177] Fix linting --- pendulum/__init__.py | 5 ++++- tests/datetime/test_from_format.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/pendulum/__init__.py b/pendulum/__init__.py index bb1e0ca7..b19f87d5 100644 --- a/pendulum/__init__.py +++ b/pendulum/__init__.py @@ -251,7 +251,10 @@ def yesterday(tz="local"): # type: (Union[str, _Timezone]) -> DateTime def from_format( - string, fmt, tz=UTC, locale=None, # noqa + string, + fmt, + tz=UTC, + locale=None, # noqa ): # type: (str, str, Union[str, _Timezone], Optional[str]) -> DateTime """ Creates a DateTime instance from a specific format. diff --git a/tests/datetime/test_from_format.py b/tests/datetime/test_from_format.py index 0949332c..398b68da 100644 --- a/tests/datetime/test_from_format.py +++ b/tests/datetime/test_from_format.py @@ -39,7 +39,8 @@ def test_from_format_with_timezone(): def test_from_format_with_square_bracket_in_timezone(): with pytest.raises(ValueError, match="^String does not match format"): pendulum.from_format( - "1975-05-21 22:32:11 Eu[rope/London", "YYYY-MM-DD HH:mm:ss z", + "1975-05-21 22:32:11 Eu[rope/London", + "YYYY-MM-DD HH:mm:ss z", ) From 67671eeca2394cdfd5b2df7022476412f8d0e59c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Tue, 19 Oct 2021 21:14:30 +0200 Subject: [PATCH 006/177] Update tests workflow --- .github/workflows/release.yml | 6 +++--- .github/workflows/tests.yml | 18 ++++++++++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3dc1bf57..01e87075 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -44,7 +44,7 @@ jobs: - name: Install and set up Poetry run: | curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py - python get-poetry.py --preview -y + python get-poetry.py -y - name: Build distributions run: | source $HOME/.poetry/env @@ -75,7 +75,7 @@ jobs: - name: Install and setup Poetry run: | Invoke-WebRequest https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -O get-poetry.py - python get-poetry.py --preview -y + python get-poetry.py -y - name: Build distributions run: | $env:Path += ";$env:Userprofile\.poetry\bin" @@ -105,7 +105,7 @@ jobs: - name: Install and set up Poetry run: | curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py - python get-poetry.py --preview -y + python get-poetry.py -y - name: Set up cache uses: actions/cache@v1 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2e8b58e7..b51b90a3 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,16 @@ name: Tests -on: [push, pull_request] +on: + push: + paths-ignore: + - 'docs/**' + branches: + - master + pull_request: + paths-ignore: + - 'docs/**' + branches: + - '**' jobs: Linting: @@ -36,7 +46,7 @@ jobs: - name: Install and set up Poetry run: | curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py - python get-poetry.py --preview -y + python get-poetry.py -y source $HOME/.poetry/env poetry config virtualenvs.in-project true - name: Set up cache @@ -82,7 +92,7 @@ jobs: - name: Install and set up Poetry run: | curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py - python get-poetry.py --preview -y + python get-poetry.py -y source $HOME/.poetry/env poetry config virtualenvs.in-project true - name: Set up cache @@ -127,7 +137,7 @@ jobs: - name: Install and setup Poetry run: | Invoke-WebRequest https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -O get-poetry.py - python get-poetry.py --preview -y + python get-poetry.py -y $env:Path += ";$env:Userprofile\.poetry\bin" poetry config virtualenvs.in-project true - name: Set up cache From c0d1f4981bfc94f04940972376487c6bf016d926 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Mon, 8 Nov 2021 12:17:04 +0200 Subject: [PATCH 007/177] README: Fix build badge --- README.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 313d4c92..9735ed7d 100644 --- a/README.rst +++ b/README.rst @@ -10,9 +10,10 @@ Pendulum .. image:: https://img.shields.io/codecov/c/github/sdispater/pendulum/master.svg :target: https://codecov.io/gh/sdispater/pendulum/branch/master -.. image:: https://travis-ci.org/sdispater/pendulum.svg +.. image:: https://github.com/sdispater/pendulum/actions/workflows/tests.yml/badge.svg :alt: Pendulum Build status - :target: https://travis-ci.org/sdispater/pendulum + :target: https://github.com/sdispater/pendulum/actions + Python datetimes made easy. From 0184f50dc8a48b5c5783f53fc3a21f3bd4d82a40 Mon Sep 17 00:00:00 2001 From: Aidan Holland Date: Wed, 17 Nov 2021 00:34:30 -0500 Subject: [PATCH 008/177] Update README.rst --- README.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.rst b/README.rst index 313d4c92..c10af7bb 100644 --- a/README.rst +++ b/README.rst @@ -36,7 +36,7 @@ Supports Python **2.7** and **3.4+**. >>> past = pendulum.now().subtract(minutes=2) >>> past.diff_for_humans() - >>> '2 minutes ago' + '2 minutes ago' >>> delta = past - last_week >>> delta.hours From 3020cef5bc42ca84517d2e906e6c65c70a718b6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Alloza=20Gonz=C3=A1lez?= Date: Tue, 21 Dec 2021 20:36:58 +0100 Subject: [PATCH 009/177] fix: duration float division raises ValueError --- pendulum/duration.py | 4 ++++ tests/duration/test_arithmetic.py | 12 ++++++++++++ 2 files changed, 16 insertions(+) diff --git a/pendulum/duration.py b/pendulum/duration.py index 45df13da..96ee32a2 100644 --- a/pendulum/duration.py +++ b/pendulum/duration.py @@ -23,6 +23,10 @@ def _divide_and_round(a, b): # Based on the reference implementation for divmod_near # in Objects/longobject.c. q, r = divmod(a, b) + + if isinstance(q, float) and q == int(q): + q = int(q) + # round up if either r / b > 0.5, or r / b == 0.5 and q is odd. # The expression r / b > 0.5 is equivalent to 2 * r > b if b is # positive, 2 * r < b if b negative. diff --git a/tests/duration/test_arithmetic.py b/tests/duration/test_arithmetic.py index fad38b6e..0f3283a5 100644 --- a/tests/duration/test_arithmetic.py +++ b/tests/duration/test_arithmetic.py @@ -38,12 +38,24 @@ def test_divide(): assert isinstance(mul, pendulum.Duration) assert_duration(mul, 0, 0, 0, 1, 0, 0, 17, 761111) + it = pendulum.duration(days=2, seconds=35, microseconds=522222) + mul = it / 1.1 + + assert isinstance(mul, pendulum.Duration) + assert_duration(mul, 0, 0, 0, 1, 19, 38, 43, 202020) + it = pendulum.duration(years=2, months=4, days=2, seconds=35, microseconds=522222) mul = it / 2 assert isinstance(mul, pendulum.Duration) assert_duration(mul, 1, 2, 0, 1, 0, 0, 17, 761111) + it = pendulum.duration(years=2, months=4, days=2, seconds=35, microseconds=522222) + mul = it / 2.0 + + assert isinstance(mul, pendulum.Duration) + assert_duration(mul, 1, 2, 0, 1, 0, 0, 17, 761111) + def test_floor_divide(): it = pendulum.duration(days=2, seconds=34, microseconds=522222) From 3e2e16894e8f32c9f08cc5e022a89e40b21d8da2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Alloza=20Gonz=C3=A1lez?= Date: Wed, 22 Dec 2021 08:41:13 +0100 Subject: [PATCH 010/177] chore: simplify extra code according to @NickFabry --- pendulum/duration.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pendulum/duration.py b/pendulum/duration.py index 96ee32a2..47a6a38b 100644 --- a/pendulum/duration.py +++ b/pendulum/duration.py @@ -24,7 +24,7 @@ def _divide_and_round(a, b): # in Objects/longobject.c. q, r = divmod(a, b) - if isinstance(q, float) and q == int(q): + if isinstance(q, float): q = int(q) # round up if either r / b > 0.5, or r / b == 0.5 and q is odd. From 496140ba56e11b9bb234fd1ab613d983b85e0969 Mon Sep 17 00:00:00 2001 From: Bela Lakatos Date: Sun, 2 Jan 2022 15:46:53 +0100 Subject: [PATCH 011/177] Fix: before load a timezone related file, check the file existence instead of check path exists (which can be valid for folders too). --- pendulum/tz/local_timezone.py | 10 +++++----- pendulum/tz/zoneinfo/reader.py | 2 +- tests/fixtures/tz/timezone_dir/etc/localtime | 1 + .../tz/timezone_dir/etc/timezone/blank.md | 5 +++++ .../timezone_dir/usr/share/zoneinfo/Europe/Paris | Bin 0 -> 2971 bytes tests/tz/test_local_timezone.py | 12 ++++++++++++ 6 files changed, 24 insertions(+), 6 deletions(-) create mode 120000 tests/fixtures/tz/timezone_dir/etc/localtime create mode 100644 tests/fixtures/tz/timezone_dir/etc/timezone/blank.md create mode 100644 tests/fixtures/tz/timezone_dir/usr/share/zoneinfo/Europe/Paris diff --git a/pendulum/tz/local_timezone.py b/pendulum/tz/local_timezone.py index 08a6e4fa..59b61e5a 100644 --- a/pendulum/tz/local_timezone.py +++ b/pendulum/tz/local_timezone.py @@ -161,7 +161,7 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone # Now look for distribution specific configuration files # that contain the timezone name. tzpath = os.path.join(_root, "etc/timezone") - if os.path.exists(tzpath): + if os.path.isfile(tzpath): with open(tzpath, "rb") as tzfile: data = tzfile.read() @@ -187,7 +187,7 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone for filename in ("etc/sysconfig/clock", "etc/conf.d/clock"): tzpath = os.path.join(_root, filename) - if not os.path.exists(tzpath): + if not os.path.isfile(tzpath): continue with open(tzpath, "rt") as tzfile: @@ -218,7 +218,7 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone # systemd distributions use symlinks that include the zone name, # see manpage of localtime(5) and timedatectl(1) tzpath = os.path.join(_root, "etc", "localtime") - if os.path.exists(tzpath) and os.path.islink(tzpath): + if os.path.isfile(tzpath) and os.path.islink(tzpath): parts = list( reversed(os.path.realpath(tzpath).replace(" ", "_").split(os.path.sep)) ) @@ -234,7 +234,7 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone for filename in ("etc/localtime", "usr/local/etc/localtime"): tzpath = os.path.join(_root, filename) - if not os.path.exists(tzpath): + if not os.path.isfile(tzpath): continue return TimezoneFile(tzpath) @@ -247,7 +247,7 @@ def _tz_from_env(tzenv): # type: (str) -> Timezone tzenv = tzenv[1:] # TZ specifies a file - if os.path.exists(tzenv): + if os.path.isfile(tzenv): return TimezoneFile(tzenv) # TZ specifies a zoneinfo zone. diff --git a/pendulum/tz/zoneinfo/reader.py b/pendulum/tz/zoneinfo/reader.py index f4c1fa60..e8fa686f 100644 --- a/pendulum/tz/zoneinfo/reader.py +++ b/pendulum/tz/zoneinfo/reader.py @@ -59,7 +59,7 @@ def read(self, file_path): # type: (str) -> Timezone :param file_path: The path of a zoneinfo file. """ - if not os.path.exists(file_path): + if not os.path.isfile(file_path): raise InvalidZoneinfoFile("The tzinfo file does not exist") with open(file_path, "rb") as fd: diff --git a/tests/fixtures/tz/timezone_dir/etc/localtime b/tests/fixtures/tz/timezone_dir/etc/localtime new file mode 120000 index 00000000..d9726efc --- /dev/null +++ b/tests/fixtures/tz/timezone_dir/etc/localtime @@ -0,0 +1 @@ +../usr/share/zoneinfo/Europe/Paris \ No newline at end of file diff --git a/tests/fixtures/tz/timezone_dir/etc/timezone/blank.md b/tests/fixtures/tz/timezone_dir/etc/timezone/blank.md new file mode 100644 index 00000000..a3a93207 --- /dev/null +++ b/tests/fixtures/tz/timezone_dir/etc/timezone/blank.md @@ -0,0 +1,5 @@ +# Blank file + +Necessary for environments, which not handle empty folder synchronization well, to be sure the parent folder is created. + +The `/etc/timezone` folder is necessary to ensure that the package not fail if that folder exists. diff --git a/tests/fixtures/tz/timezone_dir/usr/share/zoneinfo/Europe/Paris b/tests/fixtures/tz/timezone_dir/usr/share/zoneinfo/Europe/Paris new file mode 100644 index 0000000000000000000000000000000000000000..cf6e2e2ee95355039a90146a7f77d14224551b65 GIT binary patch literal 2971 zcmeIzeN0t#9LMo{6$BCSi-wq>n1rYy&ybp=hDa(P>P<;SFcCG$j${r^Lzgq3=Ds#( z8JehwPl#5i82J2zOUY_xS}x0_Jd&eK_zCWJP zQwrlqy(PdGVh?UVbkdG=*Re)iI`^b%8cKFV5CzrtF3=uz|9;-9T`<=str{wA}2 zp1;`;-P&xNonb1H=9^99!mY}PB(piP%xuZ&Vr})AYqnlbw6 zP4(t*v$K4twd+N1^ZMec<_)W}^=9!Rt0vpa+C3=7?1{N*?Tyc{YFjl}wRiVf`@Y>~ zz4bx9sr&GRsc+b8_SbGP2iE0T2VYrY4!vs3;gTYAWOA-Knv-RY_4T%n_lz|sdap7k zbE>S97n_$i6h&S>eQk)G*&3{k8&c(+mlEad&`&R)UHqMSx45mmm(@>O)b(=tZx1mo zD<){b()QA7L7K{pWDP8c)YhJM+9q>=+>`L528DmEZQFdT!A;L-@Qnl7?#fQR_x*Bh ze{_Y0)bE$js%q)5W}S3grV=)1zH}-omixv|kj@z%3Gb68_eUj5L};XR@oy)Q-l-aS zGf}&K9--aNwbky&ee{8v+Zt8zrS@2PQKJ{UtuZs|HMU@f#^qj+_~IH#NU4*=;j1L6 z!&*s>FOlRsrP4EGrS`luUV8mBQ+w}Em4`mc(LR-Vno`$WA70pB`<8`jzrt|szo3^q zGSFL73qoW-#5GMzy(0s?PicDiCz5{sstjs+SOzsV$lxm*Wk~fl$vAybGnX%utg7`o zblNn@UiN|x8?{7-7fsX=4;HB>BV8X0&eD-l-E`!wSj`C*F`O%IH1c>zH$X zGPXQWa%;YkaiupTZ)Kz8=be-BbHCCj`tFqpxu>-tY_&{Gsn$Z@-8!j*>ZC7T*2#B@ zbxOl5ee#k=r*0XeMJJ}qQ;Sk`TIC3NdUBXr3zKB}us%{;7%b1kb(9%tKghFzE}0n< zq%+NDQW9`WOU@pXS=TS<>|K@eTw|TiS$#z3R(|2nzk0b`P2%jICRZ<)D?r@7yyG|f=X+P6%N5$m9rTB5dp`5~bM7-TJ+5r~ z9F;bLi^rAfoX#8jvCHLl|9Uz%&R^o^j=% zMe>Uz7|Ae_VkE~%l94PUX-4vlBpS&yl4>N^NV1V^Bk6Xu^Nl1N$vBd7B36jAk4%80Jp;%TAaj6B0x}E8G$8YUOaw9$$W$P6flLN6 z8_0AZ^MOo=qdg Date: Thu, 6 Jan 2022 14:53:41 -0500 Subject: [PATCH 012/177] Removed unnecessary "if isinstance" check for speed. --- pendulum/duration.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pendulum/duration.py b/pendulum/duration.py index 47a6a38b..b3ccf94a 100644 --- a/pendulum/duration.py +++ b/pendulum/duration.py @@ -24,8 +24,9 @@ def _divide_and_round(a, b): # in Objects/longobject.c. q, r = divmod(a, b) - if isinstance(q, float): - q = int(q) + # The output of divmod() is either a float or an int, + # but we always want it to be an int. + q = int(q) # round up if either r / b > 0.5, or r / b == 0.5 and q is odd. # The expression r / b > 0.5 is equivalent to 2 * r > b if b is From 745a036f7cacf57d0e086481b0340f89a5915dea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Tue, 14 Jul 2020 13:16:32 +0200 Subject: [PATCH 013/177] Modernize codebase and drop support for Python 2.7 and 3.5 --- .github/workflows/release.yml | 4 +- .github/workflows/tests.yml | 185 ++---- build-wheels.sh | 3 + pendulum/__init__.py | 108 ++-- pendulum/datetime.py | 629 +++++--------------- pendulum/duration.py | 3 +- pendulum/formatting/difference_formatter.py | 6 +- pendulum/formatting/formatter.py | 5 +- pendulum/locales/locale.py | 35 +- pendulum/period.py | 73 +-- pendulum/tz/timezone.py | 63 +- pendulum/tz/zoneinfo/reader.py | 5 - pendulum/tz/zoneinfo/transition_type.py | 6 - pendulum/utils/_compat.py | 50 -- poetry.lock | 342 ++++------- pyproject.toml | 11 +- tests/datetime/test_construct.py | 5 - tests/datetime/test_from_format.py | 7 - tests/datetime/test_getters.py | 18 +- tests/tz/test_timezone.py | 14 - tox.ini | 2 +- 21 files changed, 463 insertions(+), 1111 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 01e87075..c8dd2596 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -29,7 +29,7 @@ jobs: runs-on: macos-latest strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + python-version: [3.6, 3.7, 3.8] steps: - uses: actions/checkout@v2 @@ -59,7 +59,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + python-version: [3.6, 3.7, 3.8] steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index b51b90a3..11f14865 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -26,139 +26,66 @@ jobs: run: | pip install pre-commit pre-commit run --all-files - Linux: + + Tests: needs: Linting - runs-on: ubuntu-latest + name: ${{ matrix.os }} / ${{ matrix.python-version }} + runs-on: ${{ matrix.os }}-latest strategy: matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy3] - + os: [Ubuntu, MacOS, Windows] + python-version: [3.6, 3.7, 3.8, pypy3] steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Get full python version - id: full-python-version - run: | - echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - - name: Install and set up Poetry - run: | - curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py - python get-poetry.py -y - source $HOME/.poetry/env - poetry config virtualenvs.in-project true - - name: Set up cache - uses: actions/cache@v1 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} - - name: Upgrade pip - run: | - source $HOME/.poetry/env - poetry run python -m pip install pip -U - - name: Install dependencies - run: | - source $HOME/.poetry/env - poetry install -vvv - - name: Test Pure Python - run: | - source $HOME/.poetry/env - PENDULUM_EXTENSIONS=0 poetry run pytest -q tests - - name: Test - run: | - source $HOME/.poetry/env - poetry run pytest -q tests - poetry install + - uses: actions/checkout@v2 - MacOS: - needs: Linting - runs-on: macos-latest - strategy: - matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8, pypy3] + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v1 + with: + python-version: ${{ matrix.python-version }} - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Get full python version - id: full-python-version - run: | - echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - - name: Install and set up Poetry - run: | - curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py - python get-poetry.py -y - source $HOME/.poetry/env - poetry config virtualenvs.in-project true - - name: Set up cache - uses: actions/cache@v1 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-fix-${{ hashFiles('**/poetry.lock') }} - - name: Upgrade pip - run: | - source $HOME/.poetry/env - poetry run python -m pip install pip -U - - name: Install dependencies - run: | - source $HOME/.poetry/env - poetry install -vvv - - name: Test Pure Python - run: | - source $HOME/.poetry/env - PENDULUM_EXTENSIONS=0 poetry run pytest -q tests - - name: Test - run: | - source $HOME/.poetry/env - poetry run pytest -q tests - Windows: - needs: Linting - runs-on: windows-latest - strategy: - matrix: - python-version: [2.7, 3.5, 3.6, 3.7, 3.8] + - name: Get full Python version + id: full-python-version + shell: bash + run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - steps: - - uses: actions/checkout@v2 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 - with: - python-version: ${{ matrix.python-version }} - - name: Get full python version - id: full-python-version - shell: bash - run: | - echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - - name: Install and setup Poetry - run: | - Invoke-WebRequest https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -O get-poetry.py - python get-poetry.py -y - $env:Path += ";$env:Userprofile\.poetry\bin" - poetry config virtualenvs.in-project true - - name: Set up cache - uses: actions/cache@v1 - with: - path: .venv - key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} - - name: Upgrade pip - run: | - $env:Path += ";$env:Userprofile\.poetry\bin" - poetry run python -m pip install pip -U - - name: Install dependencies - run: | - $env:Path += ";$env:Userprofile\.poetry\bin" - poetry install -vvv - - name: Test Pure Python - run: | - $env:Path += ";$env:Userprofile\.poetry\bin" - $env:PENDULUM_EXTENSIONS = "0" - poetry run pytest -q tests - - name: Test - run: | - $env:Path += ";$env:Userprofile\.poetry\bin" - poetry run pytest -q tests + - name: Install poetry + shell: bash + run: | + curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py + python get-poetry.py --preview -y + echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH" + + - name: Configure poetry + shell: bash + run: poetry config virtualenvs.in-project true + + - name: Set up cache + uses: actions/cache@v2 + id: cache + with: + path: .venv + key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} + + - name: Ensure cache is healthy + if: steps.cache.outputs.cache-hit == 'true' + shell: bash + run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv + + - name: Upgrade pip + shell: bash + run: | + poetry run python -m pip install pip -U + + - name: Install dependencies + shell: bash + run: poetry install -vvv + + - name: Test Pure Python + shell: bash + run: | + PENDULUM_EXTENSIONS=0 poetry run pytest -q tests + + - name: Test + shell: bash + run: | + poetry run pytest -q tests diff --git a/build-wheels.sh b/build-wheels.sh index af63d1b1..1c8f1cb5 100755 --- a/build-wheels.sh +++ b/build-wheels.sh @@ -13,6 +13,9 @@ for PYBIN in /opt/python/cp3*/bin; do if [ "$PYBIN" == "/opt/python/cp34-cp34m/bin" ]; then continue fi + if [ "$PYBIN" == "/opt/python/cp35-cp35m/bin" ]; then + continue + fi rm -rf build "${PYBIN}/python" $HOME/.poetry/bin/poetry build -vvv done diff --git a/pendulum/__init__.py b/pendulum/__init__.py index b19f87d5..275ea4e6 100644 --- a/pendulum/__init__.py +++ b/pendulum/__init__.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import datetime as _datetime from typing import Optional @@ -50,7 +48,6 @@ from .tz import timezone from .tz import timezones from .tz.timezone import Timezone as _Timezone -from .utils._compat import _HAS_FOLD _TEST_NOW = None # type: Optional[DateTime] @@ -61,8 +58,9 @@ _formatter = Formatter() -def _safe_timezone(obj): - # type: (Optional[Union[str, float, _datetime.tzinfo, _Timezone]]) -> _Timezone +def _safe_timezone( + obj: Optional[Union[str, float, _datetime.tzinfo, _Timezone]] +) -> _Timezone: """ Creates a timezone instance from a string, Timezone, TimezoneInfo or integer offset. @@ -94,26 +92,24 @@ def _safe_timezone(obj): # Public API def datetime( - year, # type: int - month, # type: int - day, # type: int - hour=0, # type: int - minute=0, # type: int - second=0, # type: int - microsecond=0, # type: int - tz=UTC, # type: Optional[Union[str, float, _Timezone]] - dst_rule=POST_TRANSITION, # type: str -): # type: (...) -> DateTime + year: int, + month: int, + day: int, + hour: int = 0, + minute: int = 0, + second: int = 0, + microsecond: int = 0, + tz: Optional[Union[str, float, _Timezone]] = UTC, + dst_rule: str = POST_TRANSITION, +) -> DateTime: """ Creates a new DateTime instance from a specific date and time. """ if tz is not None: tz = _safe_timezone(tz) - if not _HAS_FOLD: - dt = naive(year, month, day, hour, minute, second, microsecond) - else: - dt = _datetime.datetime(year, month, day, hour, minute, second, microsecond) + dt = _datetime.datetime(year, month, day, hour, minute, second, microsecond) + if tz is not None: dt = tz.convert(dt, dst_rule=dst_rule) @@ -131,8 +127,14 @@ def datetime( def local( - year, month, day, hour=0, minute=0, second=0, microsecond=0 -): # type: (int, int, int, int, int, int, int) -> DateTime + year: int, + month: int, + day: int, + hour: int = 0, + minute: int = 0, + second: int = 0, + microsecond: int = 0, +) -> DateTime: """ Return a DateTime in the local timezone. """ @@ -142,22 +144,28 @@ def local( def naive( - year, month, day, hour=0, minute=0, second=0, microsecond=0 -): # type: (int, int, int, int, int, int, int) -> DateTime + year: int, + month: int, + day: int, + hour: int = 0, + minute: int = 0, + second: int = 0, + microsecond: int = 0, +) -> DateTime: """ Return a naive DateTime. """ return DateTime(year, month, day, hour, minute, second, microsecond) -def date(year, month, day): # type: (int, int, int) -> Date +def date(year: int, month: int, day: int) -> Date: """ Create a new Date instance. """ return Date(year, month, day) -def time(hour, minute=0, second=0, microsecond=0): # type: (int, int, int, int) -> Time +def time(hour: int, minute: int = 0, second: int = 0, microsecond: int = 0) -> Time: """ Create a new Time instance. """ @@ -165,8 +173,8 @@ def time(hour, minute=0, second=0, microsecond=0): # type: (int, int, int, int) def instance( - dt, tz=UTC -): # type: (_datetime.datetime, Optional[Union[str, _Timezone]]) -> DateTime + dt: _datetime.datetime, tz: Optional[Union[str, _Timezone]] = UTC +) -> DateTime: """ Create a DateTime instance from a datetime one. """ @@ -194,7 +202,7 @@ def instance( ) -def now(tz=None): # type: (Optional[Union[str, _Timezone]]) -> DateTime +def now(tz: Optional[Union[str, _Timezone]] = None) -> DateTime: """ Get a DateTime instance for the current date and time. """ @@ -225,25 +233,25 @@ def now(tz=None): # type: (Optional[Union[str, _Timezone]]) -> DateTime dt.second, dt.microsecond, tzinfo=dt.tzinfo, - fold=dt.fold if _HAS_FOLD else 0, + fold=dt.fold, ) -def today(tz="local"): # type: (Union[str, _Timezone]) -> DateTime +def today(tz: Union[str, _Timezone] = "local") -> DateTime: """ Create a DateTime instance for today. """ return now(tz).start_of("day") -def tomorrow(tz="local"): # type: (Union[str, _Timezone]) -> DateTime +def tomorrow(tz: Union[str, _Timezone] = "local") -> DateTime: """ Create a DateTime instance for today. """ return today(tz).add(days=1) -def yesterday(tz="local"): # type: (Union[str, _Timezone]) -> DateTime +def yesterday(tz: Union[str, _Timezone] = "local") -> DateTime: """ Create a DateTime instance for today. """ @@ -251,11 +259,11 @@ def yesterday(tz="local"): # type: (Union[str, _Timezone]) -> DateTime def from_format( - string, - fmt, - tz=UTC, - locale=None, # noqa -): # type: (str, str, Union[str, _Timezone], Optional[str]) -> DateTime + string: str, + fmt: str, + tz: Union[str, _Timezone] = UTC, + locale: Optional[str] = None, # noqa +) -> DateTime: """ Creates a DateTime instance from a specific format. """ @@ -267,8 +275,8 @@ def from_format( def from_timestamp( - timestamp, tz=UTC -): # type: (Union[int, float], Union[str, _Timezone]) -> DateTime + timestamp: Union[int, float], tz: Union[str, _Timezone] = UTC +) -> DateTime: """ Create a DateTime instance from a timestamp. """ @@ -285,16 +293,16 @@ def from_timestamp( def duration( - days=0, # type: float - seconds=0, # type: float - microseconds=0, # type: float - milliseconds=0, # type: float - minutes=0, # type: float - hours=0, # type: float - weeks=0, # type: float - years=0, # type: float - months=0, # type: float -): # type: (...) -> Duration + days: float = 0, + seconds: float = 0, + microseconds: float = 0, + milliseconds: float = 0, + minutes: float = 0, + hours: float = 0, + weeks: float = 0, + years: float = 0, + months: float = 0, +) -> Duration: """ Create a Duration instance. """ @@ -311,7 +319,7 @@ def duration( ) -def period(start, end, absolute=False): # type: (DateTime, DateTime, bool) -> Period +def period(start: DateTime, end: DateTime, absolute: bool = False) -> Period: """ Create a Period instance. """ diff --git a/pendulum/datetime.py b/pendulum/datetime.py index feb140fe..d277446b 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -5,8 +5,11 @@ import calendar import datetime +from typing import Callable +from typing import Dict +from typing import List from typing import Optional -from typing import TypeVar +from typing import Tuple from typing import Union import pendulum @@ -31,24 +34,19 @@ from .date import Date from .exceptions import PendulumException from .helpers import add_duration -from .helpers import timestamp from .period import Period from .time import Time from .tz import UTC from .tz.timezone import Timezone -from .utils._compat import _HAS_FOLD - - -_D = TypeVar("_D", bound="DateTime") class DateTime(datetime.datetime, Date): - EPOCH = None # type: DateTime + EPOCH: Optional["DateTime"] = None # Formats - _FORMATS = { + _FORMATS: Dict[str, Union[str, Callable]] = { "atom": ATOM, "cookie": COOKIE, "iso8601": lambda dt: dt.isoformat(), @@ -62,9 +60,9 @@ class DateTime(datetime.datetime, Date): "w3c": W3C, } - _EPOCH = datetime.datetime(1970, 1, 1, tzinfo=UTC) + _EPOCH: datetime.datetime = datetime.datetime(1970, 1, 1, tzinfo=UTC) - _MODIFIERS_VALID_UNITS = [ + _MODIFIERS_VALID_UNITS: List[str] = [ "second", "minute", "hour", @@ -76,48 +74,26 @@ class DateTime(datetime.datetime, Date): "century", ] - if not _HAS_FOLD: - - def __new__( - cls, - year, - month, - day, - hour=0, - minute=0, - second=0, - microsecond=0, - tzinfo=None, - fold=0, - ): - self = datetime.datetime.__new__( - cls, year, month, day, hour, minute, second, microsecond, tzinfo=tzinfo - ) - - self._fold = fold - - return self - @classmethod - def now(cls, tz=None): # type: (Optional[Union[str, Timezone]]) -> DateTime + def now(cls, tz: Optional[Union[str, Timezone]] = None) -> "DateTime": """ Get a DateTime instance for the current date and time. """ return pendulum.now(tz) @classmethod - def utcnow(cls): # type: () -> DateTime + def utcnow(cls) -> "DateTime": """ Get a DateTime instance for the current date and time in UTC. """ return pendulum.now(UTC) @classmethod - def today(cls): # type: () -> DateTime + def today(cls) -> "DateTime": return pendulum.now() @classmethod - def strptime(cls, time, fmt): # type: (str, str) -> DateTime + def strptime(cls, time: str, fmt: str) -> "DateTime": return pendulum.instance(datetime.datetime.strptime(time, fmt)) # Getters/Setters @@ -154,48 +130,14 @@ def set( year, month, day, hour, minute, second, microsecond, tz=tz ) - if not _HAS_FOLD: - - @property - def fold(self): - return self._fold - - def timestamp(self): - if self.tzinfo is None: - s = timestamp(self) - - return s + self.microsecond / 1e6 - else: - kwargs = {"tzinfo": self.tzinfo} - - if _HAS_FOLD: - kwargs["fold"] = self.fold - - dt = datetime.datetime( - self.year, - self.month, - self.day, - self.hour, - self.minute, - self.second, - self.microsecond, - **kwargs - ) - return (dt - self._EPOCH).total_seconds() - @property - def float_timestamp(self): + def float_timestamp(self) -> float: return self.timestamp() @property - def int_timestamp(self): + def int_timestamp(self) -> int: # Workaround needed to avoid inaccuracy # for far into the future datetimes - kwargs = {"tzinfo": self.tzinfo} - - if _HAS_FOLD: - kwargs["fold"] = self.fold - dt = datetime.datetime( self.year, self.month, @@ -204,7 +146,8 @@ def int_timestamp(self): self.minute, self.second, self.microsecond, - **kwargs + tzinfo=self.tzinfo, + fold=self.fold, ) delta = dt - self._EPOCH @@ -212,26 +155,26 @@ def int_timestamp(self): return delta.days * SECONDS_PER_DAY + delta.seconds @property - def offset(self): + def offset(self) -> int: return self.get_offset() @property - def offset_hours(self): + def offset_hours(self) -> int: return self.get_offset() / SECONDS_PER_MINUTE / MINUTES_PER_HOUR @property - def timezone(self): # type: () -> Optional[Timezone] + def timezone(self) -> Optional[Timezone]: if not isinstance(self.tzinfo, Timezone): return return self.tzinfo @property - def tz(self): # type: () -> Optional[Timezone] + def tz(self) -> Optional[Timezone]: return self.timezone @property - def timezone_name(self): # type: () -> Optional[str] + def timezone_name(self) -> str: tz = self.timezone if tz is None: @@ -240,28 +183,28 @@ def timezone_name(self): # type: () -> Optional[str] return tz.name @property - def age(self): + def age(self) -> int: return self.date().diff(self.now(self.tz).date(), abs=False).in_years() - def is_local(self): + def is_local(self) -> bool: return self.offset == self.in_timezone(pendulum.local_timezone()).offset - def is_utc(self): + def is_utc(self) -> bool: return self.offset == UTC.offset - def is_dst(self): + def is_dst(self) -> bool: return self.dst() != datetime.timedelta() - def get_offset(self): + def get_offset(self) -> int: return int(self.utcoffset().total_seconds()) - def date(self): + def date(self) -> Date: return Date(self.year, self.month, self.day) - def time(self): + def time(self) -> Time: return Time(self.hour, self.minute, self.second, self.microsecond) - def naive(self): # type: (_D) -> _D + def naive(self) -> "DateTime": """ Return the DateTime without timezone information. """ @@ -275,46 +218,23 @@ def naive(self): # type: (_D) -> _D self.microsecond, ) - def on(self, year, month, day): + def on(self, year: int, month: int, day: int) -> "DateTime": """ Returns a new instance with the current date set to a different date. - - :param year: The year - :type year: int - - :param month: The month - :type month: int - - :param day: The day - :type day: int - - :rtype: DateTime """ return self.set(year=int(year), month=int(month), day=int(day)) - def at(self, hour, minute=0, second=0, microsecond=0): + def at( + self, hour: int, minute: int = 0, second: int = 0, microsecond: int = 0 + ) -> "DateTime": """ Returns a new instance with the current time to a different time. - - :param hour: The hour - :type hour: int - - :param minute: The minute - :type minute: int - - :param second: The second - :type second: int - - :param microsecond: The microsecond - :type microsecond: int - - :rtype: DateTime """ return self.set( hour=hour, minute=minute, second=second, microsecond=microsecond ) - def in_timezone(self, tz): # type: (Union[str, Timezone]) -> DateTime + def in_timezone(self, tz: Union[str, Timezone]) -> "DateTime": """ Set the instance's timezone from a string or object. """ @@ -322,7 +242,7 @@ def in_timezone(self, tz): # type: (Union[str, Timezone]) -> DateTime return tz.convert(self, dst_rule=pendulum.POST_TRANSITION) - def in_tz(self, tz): # type: (Union[str, Timezone]) -> DateTime + def in_tz(self, tz: Union[str, Timezone]) -> "DateTime": """ Set the instance's timezone from a string or object. """ @@ -330,51 +250,39 @@ def in_tz(self, tz): # type: (Union[str, Timezone]) -> DateTime # STRING FORMATTING - def to_time_string(self): + def to_time_string(self) -> str: """ Format the instance as time. - - :rtype: str """ return self.format("HH:mm:ss") - def to_datetime_string(self): + def to_datetime_string(self) -> str: """ Format the instance as date and time. - - :rtype: str """ return self.format("YYYY-MM-DD HH:mm:ss") - def to_day_datetime_string(self): + def to_day_datetime_string(self) -> str: """ Format the instance as day, date and time (in english). - - :rtype: str """ return self.format("ddd, MMM D, YYYY h:mm A", locale="en") - def to_atom_string(self): + def to_atom_string(self) -> str: """ Format the instance as ATOM. - - :rtype: str """ return self._to_string("atom") - def to_cookie_string(self): + def to_cookie_string(self) -> str: """ Format the instance as COOKIE. - - :rtype: str """ return self._to_string("cookie", locale="en") - def to_iso8601_string(self): + def to_iso8601_string(self) -> str: """ Format the instance as ISO 8601. - - :rtype: str """ string = self._to_string("iso8601") @@ -383,81 +291,57 @@ def to_iso8601_string(self): return string - def to_rfc822_string(self): + def to_rfc822_string(self) -> str: """ Format the instance as RFC 822. - - :rtype: str """ return self._to_string("rfc822") - def to_rfc850_string(self): + def to_rfc850_string(self) -> str: """ Format the instance as RFC 850. - - :rtype: str """ return self._to_string("rfc850") - def to_rfc1036_string(self): + def to_rfc1036_string(self) -> str: """ Format the instance as RFC 1036. - - :rtype: str """ return self._to_string("rfc1036") - def to_rfc1123_string(self): + def to_rfc1123_string(self) -> str: """ Format the instance as RFC 1123. - - :rtype: str """ return self._to_string("rfc1123") - def to_rfc2822_string(self): + def to_rfc2822_string(self) -> str: """ Format the instance as RFC 2822. - - :rtype: str """ return self._to_string("rfc2822") - def to_rfc3339_string(self): + def to_rfc3339_string(self) -> str: """ Format the instance as RFC 3339. - - :rtype: str """ return self._to_string("rfc3339") - def to_rss_string(self): + def to_rss_string(self) -> str: """ Format the instance as RSS. - - :rtype: str """ return self._to_string("rss") - def to_w3c_string(self): + def to_w3c_string(self) -> str: """ Format the instance as W3C. - - :rtype: str """ return self._to_string("w3c") - def _to_string(self, fmt, locale=None): + def _to_string(self, fmt: str, locale: Optional[str] = None) -> str: """ Format the instance to a common string format. - - :param fmt: The name of the string format - :type fmt: string - - :param locale: The locale to use - :type locale: str or None - - :rtype: str """ if fmt not in self._FORMATS: raise ValueError("Format [{}] is not supported".format(fmt)) @@ -468,10 +352,10 @@ def _to_string(self, fmt, locale=None): return self.format(fmt, locale=locale) - def __str__(self): + def __str__(self) -> str: return self.isoformat("T") - def __repr__(self): + def __repr__(self) -> str: us = "" if self.microsecond: us = ", {}".format(self.microsecond) @@ -496,15 +380,11 @@ def __repr__(self): ) # Comparisons - def closest(self, dt1, dt2, *dts): + def closest( + self, dt1: datetime.datetime, dt2: datetime.datetime, *dts: datetime.datetime + ) -> "DateTime": """ Get the farthest date from the instance. - - :type dt1: datetime.datetime - :type dt2: datetime.datetime - :type dts: list[datetime.datetime,] - - :rtype: DateTime """ dt1 = pendulum.instance(dt1) dt2 = pendulum.instance(dt2) @@ -513,15 +393,11 @@ def closest(self, dt1, dt2, *dts): return min(dts)[1] - def farthest(self, dt1, dt2, *dts): + def farthest( + self, dt1: datetime.datetime, dt2: datetime.datetime, *dts: datetime.datetime + ) -> "DateTime": """ Get the farthest date from the instance. - - :type dt1: datetime.datetime - :type dt2: datetime.datetime - :type dts: list[datetime.datetime,] - - :rtype: DateTime """ dt1 = pendulum.instance(dt1) dt2 = pendulum.instance(dt2) @@ -531,54 +407,42 @@ def farthest(self, dt1, dt2, *dts): return max(dts)[1] - def is_future(self): + def is_future(self) -> bool: """ Determines if the instance is in the future, ie. greater than now. - - :rtype: bool """ return self > self.now(self.timezone) - def is_past(self): + def is_past(self) -> bool: """ Determines if the instance is in the past, ie. less than now. - - :rtype: bool """ return self < self.now(self.timezone) - def is_long_year(self): + def is_long_year(self) -> bool: """ Determines if the instance is a long year See link `https://en.wikipedia.org/wiki/ISO_8601#Week_dates`_ - - :rtype: bool """ return ( pendulum.datetime(self.year, 12, 28, 0, 0, 0, tz=self.tz).isocalendar()[1] == 53 ) - def is_same_day(self, dt): + def is_same_day(self, dt: datetime.datetime) -> bool: """ Checks if the passed in date is the same day as the instance current day. - - :type dt: DateTime or datetime or str or int - - :rtype: bool """ dt = pendulum.instance(dt) return self.to_date_string() == dt.to_date_string() - def is_anniversary(self, dt=None): + def is_anniversary(self, dt: Optional[datetime.datetime] = None) -> bool: """ Check if its the anniversary. Compares the date/month values of the two dates. - - :rtype: bool """ if dt is None: dt = self.now(self.tz) @@ -587,24 +451,19 @@ def is_anniversary(self, dt=None): return (self.month, self.day) == (instance.month, instance.day) - # the additional method for checking if today is the anniversary day - # the alias is provided to start using a new name and keep the backward compatibility - # the old name can be completely replaced with the new in one of the future versions - is_birthday = is_anniversary - # ADDITIONS AND SUBSTRACTIONS def add( self, - years=0, - months=0, - weeks=0, - days=0, - hours=0, - minutes=0, - seconds=0, - microseconds=0, - ): # type: (_D, int, int, int, int, int, int, int, int) -> _D + years: int = 0, + months: int = 0, + weeks: int = 0, + days: int = 0, + hours: int = 0, + minutes: int = 0, + seconds: int = 0, + microseconds: int = 0, + ) -> "DateTime": """ Add a duration to the instance. @@ -680,43 +539,17 @@ def add( def subtract( self, - years=0, - months=0, - weeks=0, - days=0, - hours=0, - minutes=0, - seconds=0, - microseconds=0, - ): + years: int = 0, + months: int = 0, + weeks: int = 0, + days: int = 0, + hours: int = 0, + minutes: int = 0, + seconds: int = 0, + microseconds: int = 0, + ) -> "DateTime": """ Remove duration from the instance. - - :param years: The number of years - :type years: int - - :param months: The number of months - :type months: int - - :param weeks: The number of weeks - :type weeks: int - - :param days: The number of days - :type days: int - - :param hours: The number of hours - :type hours: int - - :param minutes: The number of minutes - :type minutes: int - - :param seconds: The number of seconds - :type seconds: int - - :param microseconds: The number of microseconds - :type microseconds: int - - :rtype: DateTime """ return self.add( years=-years, @@ -732,14 +565,9 @@ def subtract( # Adding a final underscore to the method name # to avoid errors for PyPy which already defines # a _add_timedelta method - def _add_timedelta_(self, delta): + def _add_timedelta_(self, delta: datetime.timedelta) -> "DateTime": """ Add timedelta duration to the instance. - - :param delta: The timedelta instance - :type delta: pendulum.Duration or datetime.timedelta - - :rtype: DateTime """ if isinstance(delta, pendulum.Period): return self.add( @@ -759,14 +587,9 @@ def _add_timedelta_(self, delta): return self.add(seconds=delta.total_seconds()) - def _subtract_timedelta(self, delta): + def _subtract_timedelta(self, delta: datetime.timedelta) -> "DateTime": """ Remove timedelta duration from the instance. - - :param delta: The timedelta instance - :type delta: pendulum.Duration or datetime.timedelta - - :rtype: DateTime """ if isinstance(delta, pendulum.Duration): return self.subtract( @@ -777,16 +600,9 @@ def _subtract_timedelta(self, delta): # DIFFERENCES - def diff(self, dt=None, abs=True): + def diff(self, dt: Optional["DateTime"] = None, abs: bool = True) -> Period: """ - Returns the difference between two DateTime objects represented as a Duration. - - :type dt: DateTime or None - - :param abs: Whether to return an absolute interval or not - :type abs: bool - - :rtype: Period + Returns the difference between two DateTime objects represented as a Period. """ if dt is None: dt = self.now(self.tz) @@ -795,10 +611,10 @@ def diff(self, dt=None, abs=True): def diff_for_humans( self, - other=None, # type: Optional[DateTime] - absolute=False, # type: bool - locale=None, # type: Optional[str] - ): # type: (...) -> str + other: Optional["DateTime"] = None, + absolute: bool = False, + locale: Optional[str] = None, + ) -> str: """ Get the difference in a human readable format in the current locale. @@ -828,7 +644,7 @@ def diff_for_humans( return pendulum.format_diff(diff, is_now, absolute, locale) # Modifiers - def start_of(self, unit): + def start_of(self, unit: str) -> "DateTime": """ Returns a copy of the instance with the time reset with the following rules: @@ -842,18 +658,13 @@ def start_of(self, unit): * year: date to first day of the year and time to 00:00:00 * decade: date to first day of the decade and time to 00:00:00 * century: date to first day of century and time to 00:00:00 - - :param unit: The unit to reset to - :type unit: str - - :rtype: DateTime """ if unit not in self._MODIFIERS_VALID_UNITS: raise ValueError('Invalid unit "{}" for start_of()'.format(unit)) return getattr(self, "_start_of_{}".format(unit))() - def end_of(self, unit): + def end_of(self, unit: str) -> "DateTime": """ Returns a copy of the instance with the time reset with the following rules: @@ -867,164 +678,125 @@ def end_of(self, unit): * year: date to last day of the year and time to 23:59:59.999999 * decade: date to last day of the decade and time to 23:59:59.999999 * century: date to last day of century and time to 23:59:59.999999 - - :param unit: The unit to reset to - :type unit: str - - :rtype: DateTime """ if unit not in self._MODIFIERS_VALID_UNITS: raise ValueError('Invalid unit "%s" for end_of()' % unit) return getattr(self, "_end_of_%s" % unit)() - def _start_of_second(self): + def _start_of_second(self) -> "DateTime": """ Reset microseconds to 0. - - :rtype: DateTime """ return self.set(microsecond=0) - def _end_of_second(self): + def _end_of_second(self) -> "DateTime": """ Set microseconds to 999999. - - :rtype: DateTime """ return self.set(microsecond=999999) - def _start_of_minute(self): + def _start_of_minute(self) -> "DateTime": """ Reset seconds and microseconds to 0. - - :rtype: DateTime """ return self.set(second=0, microsecond=0) - def _end_of_minute(self): + def _end_of_minute(self) -> "DateTime": """ Set seconds to 59 and microseconds to 999999. - - :rtype: DateTime """ return self.set(second=59, microsecond=999999) - def _start_of_hour(self): + def _start_of_hour(self) -> "DateTime": """ Reset minutes, seconds and microseconds to 0. - - :rtype: DateTime """ return self.set(minute=0, second=0, microsecond=0) - def _end_of_hour(self): + def _end_of_hour(self) -> "DateTime": """ Set minutes and seconds to 59 and microseconds to 999999. - - :rtype: DateTime """ return self.set(minute=59, second=59, microsecond=999999) - def _start_of_day(self): + def _start_of_day(self) -> "DateTime": """ - Reset the time to 00:00:00 - - :rtype: DateTime + Reset the time to 00:00:00. """ return self.at(0, 0, 0, 0) - def _end_of_day(self): + def _end_of_day(self) -> "DateTime": """ - Reset the time to 23:59:59.999999 - - :rtype: DateTime + Reset the time to 23:59:59.999999. """ return self.at(23, 59, 59, 999999) - def _start_of_month(self): + def _start_of_month(self) -> "DateTime": """ Reset the date to the first day of the month and the time to 00:00:00. - - :rtype: DateTime """ return self.set(self.year, self.month, 1, 0, 0, 0, 0) - def _end_of_month(self): + def _end_of_month(self) -> "DateTime": """ Reset the date to the last day of the month and the time to 23:59:59.999999. - - :rtype: DateTime """ return self.set(self.year, self.month, self.days_in_month, 23, 59, 59, 999999) - def _start_of_year(self): + def _start_of_year(self) -> "DateTime": """ Reset the date to the first day of the year and the time to 00:00:00. - - :rtype: DateTime """ return self.set(self.year, 1, 1, 0, 0, 0, 0) - def _end_of_year(self): + def _end_of_year(self) -> "DateTime": """ Reset the date to the last day of the year - and the time to 23:59:59.999999 - - :rtype: DateTime + and the time to 23:59:59.999999. """ return self.set(self.year, 12, 31, 23, 59, 59, 999999) - def _start_of_decade(self): + def _start_of_decade(self) -> "DateTime": """ Reset the date to the first day of the decade and the time to 00:00:00. - - :rtype: DateTime """ year = self.year - self.year % YEARS_PER_DECADE return self.set(year, 1, 1, 0, 0, 0, 0) - def _end_of_decade(self): + def _end_of_decade(self) -> "DateTime": """ Reset the date to the last day of the decade and the time to 23:59:59.999999. - - :rtype: DateTime """ year = self.year - self.year % YEARS_PER_DECADE + YEARS_PER_DECADE - 1 return self.set(year, 12, 31, 23, 59, 59, 999999) - def _start_of_century(self): + def _start_of_century(self) -> "DateTime": """ Reset the date to the first day of the century and the time to 00:00:00. - - :rtype: DateTime """ year = self.year - 1 - (self.year - 1) % YEARS_PER_CENTURY + 1 return self.set(year, 1, 1, 0, 0, 0, 0) - def _end_of_century(self): + def _end_of_century(self) -> "DateTime": """ Reset the date to the last day of the century and the time to 23:59:59.999999. - - :rtype: DateTime """ year = self.year - 1 - (self.year - 1) % YEARS_PER_CENTURY + YEARS_PER_CENTURY return self.set(year, 12, 31, 23, 59, 59, 999999) - def _start_of_week(self): + def _start_of_week(self) -> "DateTime": """ Reset the date to the first day of the week and the time to 00:00:00. - - :rtype: DateTime """ dt = self @@ -1033,12 +805,10 @@ def _start_of_week(self): return dt.start_of("day") - def _end_of_week(self): + def _end_of_week(self) -> "DateTime": """ Reset the date to the last day of the week and the time to 23:59:59. - - :rtype: DateTime """ dt = self @@ -1047,20 +817,14 @@ def _end_of_week(self): return dt.end_of("day") - def next(self, day_of_week=None, keep_time=False): + def next( + self, day_of_week: Optional[int] = None, keep_time: bool = False + ) -> "DateTime": """ Modify to the next occurrence of a given day of the week. If no day_of_week is provided, modify to the next occurrence of the current day of the week. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :param day_of_week: The next day of week to reset to. - :type day_of_week: int or None - - :param keep_time: Whether to keep the time information or not. - :type keep_time: bool - - :rtype: DateTime """ if day_of_week is None: day_of_week = self.day_of_week @@ -1079,20 +843,14 @@ def next(self, day_of_week=None, keep_time=False): return dt - def previous(self, day_of_week=None, keep_time=False): + def previous( + self, day_of_week: Optional[int] = None, keep_time: bool = False + ) -> "DateTime": """ Modify to the previous occurrence of a given day of the week. If no day_of_week is provided, modify to the previous occurrence of the current day of the week. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :param day_of_week: The previous day of week to reset to. - :type day_of_week: int or None - - :param keep_time: Whether to keep the time information or not. - :type keep_time: bool - - :rtype: DateTime """ if day_of_week is None: day_of_week = self.day_of_week @@ -1111,7 +869,7 @@ def previous(self, day_of_week=None, keep_time=False): return dt - def first_of(self, unit, day_of_week=None): + def first_of(self, unit: str, day_of_week: Optional[int] = None) -> "DateTime": """ Returns an instance set to the first occurrence of a given day of the week in the current unit. @@ -1119,20 +877,13 @@ def first_of(self, unit, day_of_week=None): Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. Supported units are month, quarter and year. - - :param unit: The unit to use - :type unit: str - - :type day_of_week: int or None - - :rtype: DateTime """ if unit not in ["month", "quarter", "year"]: raise ValueError('Invalid unit "{}" for first_of()'.format(unit)) return getattr(self, "_first_of_{}".format(unit))(day_of_week) - def last_of(self, unit, day_of_week=None): + def last_of(self, unit: str, day_of_week: Optional[int] = None) -> "DateTime": """ Returns an instance set to the last occurrence of a given day of the week in the current unit. @@ -1140,20 +891,13 @@ def last_of(self, unit, day_of_week=None): Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. Supported units are month, quarter and year. - - :param unit: The unit to use - :type unit: str - - :type day_of_week: int or None - - :rtype: DateTime """ if unit not in ["month", "quarter", "year"]: raise ValueError('Invalid unit "{}" for first_of()'.format(unit)) return getattr(self, "_last_of_{}".format(unit))(day_of_week) - def nth_of(self, unit, nth, day_of_week): + def nth_of(self, unit: str, nth: int, day_of_week: int) -> "DateTime": """ Returns a new instance set to the given occurrence of a given day of the week in the current unit. @@ -1162,15 +906,6 @@ def nth_of(self, unit, nth, day_of_week): to indicate the desired day_of_week, ex. DateTime.MONDAY. Supported units are month, quarter and year. - - :param unit: The unit to use - :type unit: str - - :type nth: int - - :type day_of_week: int or None - - :rtype: DateTime """ if unit not in ["month", "quarter", "year"]: raise ValueError('Invalid unit "{}" for first_of()'.format(unit)) @@ -1185,16 +920,12 @@ def nth_of(self, unit, nth, day_of_week): return dt - def _first_of_month(self, day_of_week): + def _first_of_month(self, day_of_week: Optional[int] = None) -> "DateTime": """ Modify to the first occurrence of a given day of the week in the current month. If no day_of_week is provided, modify to the first day of the month. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :type day_of_week: int - - :rtype: DateTime """ dt = self.start_of("day") @@ -1212,16 +943,12 @@ def _first_of_month(self, day_of_week): return dt.set(day=day_of_month) - def _last_of_month(self, day_of_week=None): + def _last_of_month(self, day_of_week: Optional[int] = None) -> "DateTime": """ Modify to the last occurrence of a given day of the week in the current month. If no day_of_week is provided, modify to the last day of the month. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :type day_of_week: int or None - - :rtype: DateTime """ dt = self.start_of("day") @@ -1239,19 +966,13 @@ def _last_of_month(self, day_of_week=None): return dt.set(day=day_of_month) - def _nth_of_month(self, nth, day_of_week): + def _nth_of_month(self, nth: int, day_of_week: Optional[int] = None) -> "DateTime": """ Modify to the given occurrence of a given day of the week in the current month. If the calculated occurrence is outside, the scope of the current month, then return False and no modifications are made. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :type nth: int - - :type day_of_week: int or None - - :rtype: DateTime """ if nth == 1: return self.first_of("month", day_of_week) @@ -1266,35 +987,29 @@ def _nth_of_month(self, nth, day_of_week): return False - def _first_of_quarter(self, day_of_week=None): + def _first_of_quarter(self, day_of_week: Optional[int] = None) -> "DateTime": """ Modify to the first occurrence of a given day of the week in the current quarter. If no day_of_week is provided, modify to the first day of the quarter. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :type day_of_week: int or None - - :rtype: DateTime """ return self.on(self.year, self.quarter * 3 - 2, 1).first_of( "month", day_of_week ) - def _last_of_quarter(self, day_of_week=None): + def _last_of_quarter(self, day_of_week: Optional[int] = None) -> "DateTime": """ Modify to the last occurrence of a given day of the week in the current quarter. If no day_of_week is provided, modify to the last day of the quarter. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :type day_of_week: int or None - - :rtype: DateTime """ return self.on(self.year, self.quarter * 3, 1).last_of("month", day_of_week) - def _nth_of_quarter(self, nth, day_of_week): + def _nth_of_quarter( + self, nth: int, day_of_week: Optional[int] = None + ) -> "DateTime": """ Modify to the given occurrence of a given day of the week in the current quarter. If the calculated occurrence is outside, @@ -1323,45 +1038,31 @@ def _nth_of_quarter(self, nth, day_of_week): return self.on(self.year, dt.month, dt.day).start_of("day") - def _first_of_year(self, day_of_week=None): + def _first_of_year(self, day_of_week: Optional[int] = None) -> "DateTime": """ Modify to the first occurrence of a given day of the week in the current year. If no day_of_week is provided, modify to the first day of the year. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :type day_of_week: int or None - - :rtype: DateTime """ return self.set(month=1).first_of("month", day_of_week) - def _last_of_year(self, day_of_week=None): + def _last_of_year(self, day_of_week: Optional[int] = None) -> "DateTime": """ Modify to the last occurrence of a given day of the week in the current year. If no day_of_week is provided, modify to the last day of the year. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :type day_of_week: int or None - - :rtype: DateTime """ return self.set(month=MONTHS_PER_YEAR).last_of("month", day_of_week) - def _nth_of_year(self, nth, day_of_week): + def _nth_of_year(self, nth: int, day_of_week: Optional[int] = None) -> "DateTime": """ Modify to the given occurrence of a given day of the week in the current year. If the calculated occurrence is outside, the scope of the current year, then return False and no modifications are made. Use the supplied consts to indicate the desired day_of_week, ex. DateTime.MONDAY. - - :type nth: int - - :type day_of_week: int or None - - :rtype: DateTime """ if nth == 1: return self.first_of("year", day_of_week) @@ -1376,7 +1077,7 @@ def _nth_of_year(self, nth, day_of_week): return self.on(self.year, dt.month, dt.day).start_of("day") - def average(self, dt=None): + def average(self, dt: Optional[datetime.datetime] = None) -> "DateTime": """ Modify the current instance to the average of a given instance (default now) and the current instance. @@ -1393,7 +1094,9 @@ def average(self, dt=None): microseconds=(diff.in_seconds() * 1000000 + diff.microseconds) // 2 ) - def __sub__(self, other): + def __sub__( + self, other: Union[datetime.datetime, datetime.timedelta] + ) -> Union["DateTime", Period]: if isinstance(other, datetime.timedelta): return self._subtract_timedelta(other) @@ -1416,7 +1119,7 @@ def __sub__(self, other): return other.diff(self, False) - def __rsub__(self, other): + def __rsub__(self, other: datetime.datetime) -> Period: if not isinstance(other, datetime.datetime): return NotImplemented @@ -1436,47 +1139,49 @@ def __rsub__(self, other): return self.diff(other, False) - def __add__(self, other): + def __add__(self, other: datetime.timedelta) -> "DateTime": if not isinstance(other, datetime.timedelta): return NotImplemented return self._add_timedelta_(other) - def __radd__(self, other): + def __radd__(self, other: datetime.timedelta) -> "DateTime": return self.__add__(other) # Native methods override @classmethod - def fromtimestamp(cls, t, tz=None): + def fromtimestamp( + cls, t: float, tz: Optional[datetime.tzinfo] = None + ) -> "DateTime": return pendulum.instance(datetime.datetime.fromtimestamp(t, tz=tz), tz=tz) @classmethod - def utcfromtimestamp(cls, t): + def utcfromtimestamp(cls, t: float) -> "DateTime": return pendulum.instance(datetime.datetime.utcfromtimestamp(t), tz=None) @classmethod - def fromordinal(cls, n): + def fromordinal(cls, n) -> "DateTime": return pendulum.instance(datetime.datetime.fromordinal(n), tz=None) @classmethod - def combine(cls, date, time): + def combine(cls, date: datetime.date, time: datetime.time) -> "DateTime": return pendulum.instance(datetime.datetime.combine(date, time), tz=None) - def astimezone(self, tz=None): + def astimezone(self, tz: Optional[datetime.tzinfo] = None) -> "DateTime": return pendulum.instance(super(DateTime, self).astimezone(tz)) def replace( self, - year=None, - month=None, - day=None, - hour=None, - minute=None, - second=None, - microsecond=None, - tzinfo=True, - fold=None, + year: Optional[int] = None, + month: Optional[int] = None, + day: Optional[int] = None, + hour: Optional[int] = None, + minute: Optional[int] = None, + second: Optional[int] = None, + microsecond: Optional[int] = None, + tzinfo: Optional[Union[bool, datetime.tzinfo]] = True, + fold: Optional[int] = None, ): if year is None: year = self.year @@ -1515,10 +1220,10 @@ def replace( dst_rule=transition_rule, ) - def __getnewargs__(self): + def __getnewargs__(self) -> Tuple: return (self,) - def _getstate(self, protocol=3): + def _getstate(self, protocol: int = 3) -> Tuple: return ( self.year, self.month, @@ -1530,20 +1235,15 @@ def _getstate(self, protocol=3): self.tzinfo, ) - def __reduce__(self): + def __reduce__(self) -> Tuple: return self.__reduce_ex__(2) - def __reduce_ex__(self, protocol): + def __reduce_ex__(self, protocol: int) -> Tuple: return self.__class__, self._getstate(protocol) - def _cmp(self, other, **kwargs): + def _cmp(self, other: datetime.datetime, **kwargs) -> int: # Fix for pypy which compares using this method # which would lead to infinite recursion if we didn't override - kwargs = {"tzinfo": self.tz} - - if _HAS_FOLD: - kwargs["fold"] = self.fold - dt = datetime.datetime( self.year, self.month, @@ -1552,12 +1252,13 @@ def _cmp(self, other, **kwargs): self.minute, self.second, self.microsecond, - **kwargs + tzinfo=self.tz, + fold=self.fold, ) return 0 if dt == other else 1 if dt > other else -1 -DateTime.min = DateTime(1, 1, 1, 0, 0, tzinfo=UTC) -DateTime.max = DateTime(9999, 12, 31, 23, 59, 59, 999999, tzinfo=UTC) -DateTime.EPOCH = DateTime(1970, 1, 1) +DateTime.min: DateTime = DateTime(1, 1, 1, 0, 0, tzinfo=UTC) +DateTime.max: DateTime = DateTime(9999, 12, 31, 23, 59, 59, 999999, tzinfo=UTC) +DateTime.EPOCH: DateTime = DateTime(1970, 1, 1) diff --git a/pendulum/duration.py b/pendulum/duration.py index b3ccf94a..c7d875df 100644 --- a/pendulum/duration.py +++ b/pendulum/duration.py @@ -6,7 +6,6 @@ import pendulum from pendulum.utils._compat import PYPY -from pendulum.utils._compat import decode from .constants import SECONDS_PER_DAY from .constants import SECONDS_PER_HOUR @@ -261,7 +260,7 @@ def in_words(self, locale=None, separator=" "): translation = locale.translation(unit) parts.append(translation.format(count)) - return decode(separator.join(parts)) + return separator.join(parts) def _sign(self, value): if value < 0: diff --git a/pendulum/formatting/difference_formatter.py b/pendulum/formatting/difference_formatter.py index 9be4b962..6455fe3d 100644 --- a/pendulum/formatting/difference_formatter.py +++ b/pendulum/formatting/difference_formatter.py @@ -2,8 +2,6 @@ import pendulum -from pendulum.utils._compat import decode - from ..locales.locale import Locale @@ -146,8 +144,8 @@ def format( else: key += ".before" - return locale.get(key).format(decode(time)) + return locale.get(key).format(time) key += ".{}".format(locale.plural(count)) - return decode(locale.get(key).format(count)) + return locale.get(key).format(count) diff --git a/pendulum/formatting/formatter.py b/pendulum/formatting/formatter.py index 9b64fcd6..b05b263b 100644 --- a/pendulum/formatting/formatter.py +++ b/pendulum/formatting/formatter.py @@ -8,7 +8,6 @@ import pendulum from pendulum.locales.locale import Locale -from pendulum.utils._compat import decode _MATCH_1 = r"\d" @@ -260,7 +259,7 @@ def format( fmt, ) - return decode(result) + return result def _format_token( self, dt, token, locale @@ -680,6 +679,6 @@ def _replace_tokens(self, token, locale): # type: (str, Locale) -> str if not isinstance(candidates, tuple): candidates = (candidates,) - pattern = "(?P<{}>{})".format(token, "|".join([decode(p) for p in candidates])) + pattern = "(?P<{}>{})".format(token, "|".join(candidates)) return pattern diff --git a/pendulum/locales/locale.py b/pendulum/locales/locale.py index de4cd82e..4e22290d 100644 --- a/pendulum/locales/locale.py +++ b/pendulum/locales/locale.py @@ -6,12 +6,10 @@ from importlib import import_module from typing import Any +from typing import Dict from typing import Optional from typing import Union -from pendulum.utils._compat import basestring -from pendulum.utils._compat import decode - class Locale: """ @@ -20,13 +18,13 @@ class Locale: _cache = {} - def __init__(self, locale, data): # type: (str, Any) -> None + def __init__(self, locale: str, data: Any) -> None: self._locale = locale self._data = data self._key_cache = {} @classmethod - def load(cls, locale): # type: (Union[str, Locale]) -> Locale + def load(cls, locale: Union[str, "Locale"]) -> "Locale": if isinstance(locale, Locale): return locale @@ -50,14 +48,14 @@ def load(cls, locale): # type: (Union[str, Locale]) -> Locale return cls._cache[locale] @classmethod - def normalize_locale(cls, locale): # type: (str) -> str + def normalize_locale(cls, locale: str) -> str: m = re.match("([a-z]{2})[-_]([a-z]{2})", locale, re.I) if m: return "{}_{}".format(m.group(1).lower(), m.group(2).lower()) else: return locale.lower() - def get(self, key, default=None): # type: (str, Optional[Any]) -> Any + def get(self, key: str, default: Optional[Any] = None) -> Any: if key in self._key_cache: return self._key_cache[key] @@ -69,36 +67,33 @@ def get(self, key, default=None): # type: (str, Optional[Any]) -> Any except KeyError: result = default - if isinstance(result, basestring): - result = decode(result) - self._key_cache[key] = result return self._key_cache[key] - def translation(self, key): # type: (str) -> Any + def translation(self, key: str) -> Any: return self.get("translations.{}".format(key)) - def plural(self, number): # type: (int) -> str - return decode(self._data["plural"](number)) + def plural(self, number: int) -> str: + return self._data["plural"](number) - def ordinal(self, number): # type: (int) -> str - return decode(self._data["ordinal"](number)) + def ordinal(self, number: int) -> str: + return self._data["ordinal"](number) - def ordinalize(self, number): # type: (int) -> str + def ordinalize(self, number: int) -> str: ordinal = self.get("custom.ordinal.{}".format(self.ordinal(number))) if not ordinal: - return decode("{}".format(number)) + return "{}".format(number) - return decode("{}{}".format(number, ordinal)) + return "{}{}".format(number, ordinal) - def match_translation(self, key, value): + def match_translation(self, key: str, value: Any) -> Optional[Dict]: translations = self.translation(key) if value not in translations.values(): return None return {v: k for k, v in translations.items()}[value] - def __repr__(self): + def __repr__(self) -> str: return "{}('{}')".format(self.__class__.__name__, self._locale) diff --git a/pendulum/period.py b/pendulum/period.py index c66c6b9d..de0bd39f 100644 --- a/pendulum/period.py +++ b/pendulum/period.py @@ -8,9 +8,6 @@ import pendulum -from pendulum.utils._compat import _HAS_FOLD -from pendulum.utils._compat import decode - from .constants import MONTHS_PER_YEAR from .duration import Duration from .helpers import precise_diff @@ -38,56 +35,32 @@ def __new__(cls, start, end, absolute=False): _start = start _end = end if isinstance(start, pendulum.DateTime): - if _HAS_FOLD: - _start = datetime( - start.year, - start.month, - start.day, - start.hour, - start.minute, - start.second, - start.microsecond, - tzinfo=start.tzinfo, - fold=start.fold, - ) - else: - _start = datetime( - start.year, - start.month, - start.day, - start.hour, - start.minute, - start.second, - start.microsecond, - tzinfo=start.tzinfo, - ) + _start = datetime( + start.year, + start.month, + start.day, + start.hour, + start.minute, + start.second, + start.microsecond, + tzinfo=start.tzinfo, + fold=start.fold, + ) elif isinstance(start, pendulum.Date): _start = date(start.year, start.month, start.day) if isinstance(end, pendulum.DateTime): - if _HAS_FOLD: - _end = datetime( - end.year, - end.month, - end.day, - end.hour, - end.minute, - end.second, - end.microsecond, - tzinfo=end.tzinfo, - fold=end.fold, - ) - else: - _end = datetime( - end.year, - end.month, - end.day, - end.hour, - end.minute, - end.second, - end.microsecond, - tzinfo=end.tzinfo, - ) + _end = datetime( + end.year, + end.month, + end.day, + end.hour, + end.minute, + end.second, + end.microsecond, + tzinfo=end.tzinfo, + fold=end.fold, + ) elif isinstance(end, pendulum.Date): _end = date(end.year, end.month, end.day) @@ -279,7 +252,7 @@ def in_words(self, locale=None, separator=" "): translation = locale.translation(unit) parts.append(translation.format(count)) - return decode(separator.join(parts)) + return separator.join(parts) def range(self, unit, amount=1): method = "add" diff --git a/pendulum/tz/timezone.py b/pendulum/tz/timezone.py index 62810130..04b46e59 100644 --- a/pendulum/tz/timezone.py +++ b/pendulum/tz/timezone.py @@ -5,11 +5,8 @@ from typing import TypeVar from typing import overload -import pendulum - from pendulum.helpers import local_time from pendulum.helpers import timestamp -from pendulum.utils._compat import _HAS_FOLD from .exceptions import AmbiguousTime from .exceptions import NonExistingTime @@ -79,14 +76,8 @@ def datetime( """ Return a normalized datetime for the current timezone. """ - if _HAS_FOLD: - return self.convert( - datetime(year, month, day, hour, minute, second, microsecond, fold=1) - ) - return self.convert( - datetime(year, month, day, hour, minute, second, microsecond), - dst_rule=POST_TRANSITION, + datetime(year, month, day, hour, minute, second, microsecond, fold=1) ) def _normalize(self, dt, dst_rule=None): # type: (_D, Optional[str]) -> _D @@ -94,9 +85,6 @@ def _normalize(self, dt, dst_rule=None): # type: (_D, Optional[str]) -> _D fold = 0 transition = self._lookup_transition(sec) - if not _HAS_FOLD and dst_rule is None: - dst_rule = POST_TRANSITION - if dst_rule is None: dst_rule = PRE_TRANSITION if dt.fold == 1: @@ -135,11 +123,7 @@ def _normalize(self, dt, dst_rule=None): # type: (_D, Optional[str]) -> _D else: sec -= transition.fix - kwargs = {"tzinfo": self} - if _HAS_FOLD or isinstance(dt, pendulum.DateTime): - kwargs["fold"] = fold - - return dt.__class__(*local_time(sec, 0, dt.microsecond), **kwargs) + return dt.__class__(*local_time(sec, 0, dt.microsecond), tzinfo=self, fold=fold) def _convert(self, dt): # type: (_D) -> _D if dt.tzinfo is self: @@ -175,12 +159,9 @@ def _convert(self, dt): # type: (_D) -> _D stamp += offset fold = int(not transition.ttype.is_dst()) - kwargs = {"tzinfo": self} - - if _HAS_FOLD or isinstance(dt, pendulum.DateTime): - kwargs["fold"] = fold - - return dt.__class__(*local_time(stamp, 0, dt.microsecond), **kwargs) + return dt.__class__( + *local_time(stamp, 0, dt.microsecond), tzinfo=self, fold=fold + ) def _lookup_transition( self, stamp, is_utc=False @@ -316,29 +297,17 @@ def offset(self): # type: () -> int return self._offset def _normalize(self, dt, dst_rule=None): # type: (_D, Optional[str]) -> _D - if _HAS_FOLD: - dt = dt.__class__( - dt.year, - dt.month, - dt.day, - dt.hour, - dt.minute, - dt.second, - dt.microsecond, - tzinfo=self, - fold=0, - ) - else: - dt = dt.__class__( - dt.year, - dt.month, - dt.day, - dt.hour, - dt.minute, - dt.second, - dt.microsecond, - tzinfo=self, - ) + dt = dt.__class__( + dt.year, + dt.month, + dt.day, + dt.hour, + dt.minute, + dt.second, + dt.microsecond, + tzinfo=self, + fold=0, + ) return dt diff --git a/pendulum/tz/zoneinfo/reader.py b/pendulum/tz/zoneinfo/reader.py index e8fa686f..42fbc60b 100644 --- a/pendulum/tz/zoneinfo/reader.py +++ b/pendulum/tz/zoneinfo/reader.py @@ -13,8 +13,6 @@ from pytzdata.exceptions import TimezoneNotFound -from pendulum.utils._compat import PY2 - from .exceptions import InvalidTimezone from .exceptions import InvalidZoneinfoFile from .posix_timezone import PosixTimezone @@ -78,9 +76,6 @@ def _check_read(self, fd, nbytes): # type: (...) -> bytes "but got {}".format(nbytes, fd.name, len(result) if result else 0) ) - if PY2: - return bytearray(result) - return result def _parse(self, fd): # type: (...) -> Timezone diff --git a/pendulum/tz/zoneinfo/transition_type.py b/pendulum/tz/zoneinfo/transition_type.py index c2c33c67..a1e79dcc 100644 --- a/pendulum/tz/zoneinfo/transition_type.py +++ b/pendulum/tz/zoneinfo/transition_type.py @@ -1,8 +1,5 @@ from datetime import timedelta -from pendulum.utils._compat import PY2 -from pendulum.utils._compat import encode - class TransitionType: def __init__(self, offset, is_dst, abbr): @@ -18,9 +15,6 @@ def offset(self): # type: () -> int @property def abbreviation(self): # type: () -> str - if PY2: - return encode(self._abbr) - return self._abbr def is_dst(self): # type: () -> bool diff --git a/pendulum/utils/_compat.py b/pendulum/utils/_compat.py index 4893979b..11b36acf 100644 --- a/pendulum/utils/_compat.py +++ b/pendulum/utils/_compat.py @@ -1,54 +1,4 @@ import sys -PY2 = sys.version_info < (3, 0) -PY36 = sys.version_info >= (3, 6) PYPY = hasattr(sys, "pypy_version_info") - -_HAS_FOLD = PY36 - - -try: # Python 2 - long = long - unicode = unicode - basestring = basestring -except NameError: # Python 3 - long = int - unicode = str - basestring = str - - -def decode(string, encodings=None): - if not PY2 and not isinstance(string, bytes): - return string - - if PY2 and isinstance(string, unicode): - return string - - encodings = encodings or ["utf-8", "latin1", "ascii"] - - for encoding in encodings: - try: - return string.decode(encoding) - except (UnicodeEncodeError, UnicodeDecodeError): - pass - - return string.decode(encodings[0], errors="ignore") - - -def encode(string, encodings=None): - if not PY2 and isinstance(string, bytes): - return string - - if PY2 and isinstance(string, str): - return string - - encodings = encodings or ["utf-8", "latin1", "ascii"] - - for encoding in encodings: - try: - return string.encode(encoding) - except (UnicodeEncodeError, UnicodeDecodeError): - pass - - return string.encode(encodings[0], errors="ignore") diff --git a/poetry.lock b/poetry.lock index b9120f42..d04fcf70 100644 --- a/poetry.lock +++ b/poetry.lock @@ -50,18 +50,6 @@ version = "2.8.0" [package.dependencies] pytz = ">=2015.7" -[[package]] -category = "dev" -description = "Backport of functools.lru_cache" -name = "backports.functools-lru-cache" -optional = false -python-versions = ">=2.6" -version = "1.6.1" - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2.3)", "pytest-flake8", "pytest-black-multipy", "pytest-cov"] - [[package]] category = "dev" description = "The uncompromising code formatter." @@ -87,11 +75,8 @@ category = "dev" description = "Validate configuration and produce human readable error messages." name = "cfgv" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.0.1" - -[package.dependencies] -six = "*" +python-versions = ">=3.6" +version = "3.0.0" [[package]] category = "dev" @@ -124,9 +109,6 @@ version = "0.6.2" pastel = ">=0.2.0,<0.3.0" pylev = ">=1.3,<2.0" crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} -enum34 = {version = ">=1.1,<2.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\""} -typing = {version = ">=3.6,<4.0", markers = "python_version >= \"2.7\" and python_version < \"2.8\" or python_version >= \"3.4\" and python_version < \"3.5\""} -typing-extensions = {version = ">=3.6,<4.0", markers = "python_version >= \"3.5\" and python_full_version < \"3.5.4\""} [[package]] category = "dev" @@ -136,26 +118,6 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" version = "0.4.3" -[[package]] -category = "dev" -description = "Updated configparser from Python 3.7 for Python 2.6+." -name = "configparser" -optional = false -python-versions = ">=2.6" -version = "4.0.2" - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=3.5,<3.7.3 || >3.7.3)", "pytest-checkdocs (>=1.2)", "pytest-flake8", "pytest-black-multipy"] - -[[package]] -category = "dev" -description = "Backports and enhancements for the contextlib module" -name = "contextlib2" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.6.0.post1" - [[package]] category = "dev" description = "Code coverage measurement for Python" @@ -183,14 +145,6 @@ optional = false python-versions = "*" version = "0.3.1" -[[package]] -category = "dev" -description = "Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4" -name = "enum34" -optional = false -python-versions = "*" -version = "1.1.10" - [[package]] category = "dev" description = "A platform independent file lock." @@ -213,19 +167,11 @@ six = "*" [[package]] category = "dev" -description = "Python function signatures from PEP362 for Python 2.6, 2.7 and 3.2+" -name = "funcsigs" -optional = false -python-versions = "*" -version = "1.0.2" - -[[package]] -category = "dev" -description = "Backport of the concurrent.futures package from Python 3.2" -name = "futures" +description = "Clean single-source support for Python 3 and 2" +name = "future" optional = false -python-versions = "*" -version = "3.1.1" +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +version = "0.18.2" [[package]] category = "dev" @@ -248,9 +194,6 @@ version = "1.7.0" [package.dependencies] zipp = ">=0.5" -configparser = {version = ">=3.5", markers = "python_version < \"3\""} -contextlib2 = {version = "*", markers = "python_version < \"3\""} -pathlib2 = {version = "*", markers = "python_version < \"3\""} [package.extras] docs = ["sphinx", "rst.linker"] @@ -265,10 +208,6 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" version = "3.0.0" [package.dependencies] -contextlib2 = {version = "*", markers = "python_version < \"3\""} -pathlib2 = {version = "*", markers = "python_version < \"3\""} -singledispatch = {version = "*", markers = "python_version < \"3.4\""} -typing = {version = "*", markers = "python_version < \"3.5\""} zipp = {version = ">=0.4", markers = "python_version < \"3.8\""} [package.extras] @@ -302,6 +241,14 @@ MarkupSafe = ">=0.23" [package.extras] i18n = ["Babel (>=0.8)"] +[[package]] +category = "dev" +description = "Lightweight pipelining: using Python functions as pipeline jobs." +name = "joblib" +optional = false +python-versions = ">=3.6" +version = "0.16.0" + [[package]] category = "dev" description = "Python LiveReload is an awesome tool for web developers" @@ -314,13 +261,32 @@ version = "2.6.2" six = "*" tornado = {version = "*", markers = "python_version > \"2.7\""} +[[package]] +category = "dev" +description = "A Python implementation of Lunr.js" +name = "lunr" +optional = false +python-versions = "*" +version = "0.5.8" + +[package.dependencies] +future = ">=0.16.0" +six = ">=1.11.0" +nltk = {version = ">=3.2.5", optional = true, markers = "python_version > \"2.7\" and extra == \"languages\""} + +[package.extras] +languages = ["nltk (>=3.2.5,<3.5)", "nltk (>=3.2.5)"] + [[package]] category = "dev" description = "Python implementation of Markdown." name = "markdown" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" -version = "3.1.1" +python-versions = ">=3.5" +version = "3.2.2" + +[package.dependencies] +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [package.extras] testing = ["coverage", "pyyaml"] @@ -349,27 +315,47 @@ category = "dev" description = "Project documentation with Markdown." name = "mkdocs" optional = false -python-versions = ">=2.7.9,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" -version = "1.0.4" +python-versions = ">=3.5" +version = "1.1.2" [package.dependencies] -Jinja2 = ">=2.7.1" -Markdown = ">=2.3.1" +Jinja2 = ">=2.10.1" +Markdown = ">=3.2.1" PyYAML = ">=3.10" click = ">=3.3" livereload = ">=2.5.1" tornado = ">=5.0" +lunr = {version = "0.5.8", extras = ["languages"]} [[package]] category = "dev" description = "More routines for operating on iterables, beyond itertools" name = "more-itertools" optional = false +python-versions = ">=3.5" +version = "8.4.0" + +[[package]] +category = "dev" +description = "Natural Language Toolkit" +name = "nltk" +optional = false python-versions = "*" -version = "5.0.0" +version = "3.5" [package.dependencies] -six = ">=1.0.0,<2.0.0" +click = "*" +joblib = "*" +regex = "*" +tqdm = "*" + +[package.extras] +all = ["requests", "numpy", "python-crfsuite", "scikit-learn", "twython", "pyparsing", "scipy", "matplotlib", "gensim"] +corenlp = ["requests"] +machine_learning = ["gensim", "numpy", "python-crfsuite", "scikit-learn", "scipy"] +plot = ["matplotlib"] +tgrep = ["pyparsing"] +twitter = ["twython"] [[package]] category = "dev" @@ -399,18 +385,6 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" version = "0.2.0" -[[package]] -category = "dev" -description = "Object-oriented filesystem paths" -name = "pathlib2" -optional = false -python-versions = "*" -version = "2.3.5" - -[package.dependencies] -six = "*" -scandir = {version = "*", markers = "python_version < \"3.5\""} - [[package]] category = "dev" description = "Utility library for gitignore style pattern matching of file paths." @@ -419,14 +393,6 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" version = "0.8.0" -[[package]] -category = "dev" -description = "Backport of PEP 562." -name = "pep562" -optional = false -python-versions = "*" -version = "1.0" - [[package]] category = "dev" description = "plugin and hook calling mechanisms for python" @@ -458,7 +424,6 @@ pyyaml = "*" six = "*" toml = "*" virtualenv = ">=15.2" -futures = {version = "*", markers = "python_version < \"3.2\""} importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} importlib-resources = {version = "*", markers = "python_version < \"3.7\""} @@ -475,8 +440,8 @@ category = "dev" description = "Pygments is a syntax highlighting package written in Python." name = "pygments" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.5.2" +python-versions = ">=3.5" +version = "2.6.1" [[package]] category = "dev" @@ -492,11 +457,10 @@ description = "Extension pack for Python Markdown." name = "pymdown-extensions" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" -version = "6.2.1" +version = "6.3" [package.dependencies] -Markdown = ">=3.0.1" -pep562 = "*" +Markdown = ">=3.2" [[package]] category = "dev" @@ -523,17 +487,8 @@ py = ">=1.5.0" six = ">=1.10.0" wcwidth = "*" colorama = {version = "*", markers = "sys_platform == \"win32\" and python_version != \"3.4\""} -funcsigs = {version = ">=1.0", markers = "python_version < \"3.0\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -pathlib2 = {version = ">=2.2.0", markers = "python_version < \"3.6\""} - -[[package.dependencies.more-itertools]] -markers = "python_version <= \"2.7\"" -version = ">=4.0.0,<6.0.0" - -[[package.dependencies.more-itertools]] -markers = "python_version > \"2.7\"" -version = ">=4.0.0" +more-itertools = {version = ">=4.0.0", markers = "python_version > \"2.7\""} [package.extras] testing = ["argcomplete", "hypothesis (>=3.56)", "nose", "requests", "mock"] @@ -596,25 +551,6 @@ optional = false python-versions = "*" version = "2020.6.8" -[[package]] -category = "dev" -description = "scandir, a better directory iterator and faster os.walk()" -name = "scandir" -optional = false -python-versions = "*" -version = "1.10.0" - -[[package]] -category = "dev" -description = "This library brings functools.singledispatch from Python 3.4 to Python 2.6-3.3." -name = "singledispatch" -optional = false -python-versions = "*" -version = "3.4.0.3" - -[package.dependencies] -six = "*" - [[package]] category = "main" description = "Python 2 and 3 compatibility utilities" @@ -664,27 +600,22 @@ testing = ["freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "pytest (>=4.0.0)", "py [[package]] category = "dev" -description = "a fork of Python 2 and 3 ast modules with type comment support" -name = "typed-ast" +description = "Fast, Extensible Progress Meter" +name = "tqdm" optional = false -python-versions = "*" -version = "1.4.1" +python-versions = ">=2.6, !=3.0.*, !=3.1.*" +version = "4.47.0" -[[package]] -category = "main" -description = "Type Hints for Python" -name = "typing" -optional = false -python-versions = "*" -version = "3.7.4.1" +[package.extras] +dev = ["py-make (>=0.1.0)", "twine", "argopt", "pydoc-markdown"] [[package]] category = "dev" -description = "Backported and Experimental Type Hints for Python 3.5+" -name = "typing-extensions" +description = "a fork of Python 2 and 3 ast modules with type comment support" +name = "typed-ast" optional = false python-versions = "*" -version = "3.7.4.2" +version = "1.4.1" [[package]] category = "dev" @@ -701,7 +632,6 @@ filelock = ">=3.0.0,<4" six = ">=1.9.0,<2" importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} importlib-resources = {version = ">=1.0", markers = "python_version < \"3.7\""} -pathlib2 = {version = ">=2.3.3,<3", markers = "python_version < \"3.4\" and sys_platform != \"win32\""} [package.extras] docs = ["sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)", "proselint (>=0.10.2)"] @@ -715,27 +645,21 @@ optional = false python-versions = "*" version = "0.2.5" -[package.dependencies] -"backports.functools-lru-cache" = {version = ">=1.2.1", markers = "python_version < \"3.2\""} - [[package]] category = "dev" description = "Backport of pathlib-compatible object wrapper for zip files" name = "zipp" optional = false -python-versions = ">=2.7" -version = "1.2.0" - -[package.dependencies] -contextlib2 = {version = "*", markers = "python_version < \"3.4\""} +python-versions = ">=3.6" +version = "3.1.0" [package.extras] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] -testing = ["pathlib2", "unittest2", "jaraco.itertools", "func-timeout"] +testing = ["jaraco.itertools", "func-timeout"] [metadata] -content-hash = "9a0542f32380e0fef3eb8d37b90903742a3fcad3b7e6b22f6ea8e4faac269e28" -python-versions = "~2.7 || ^3.5" +content-hash = "1803c93a845e7514237fbc9dc9afe73360a072dbd2c0df1107a5d41ae252baa4" +python-versions = "^3.6" [metadata.files] appdirs = [ @@ -758,17 +682,13 @@ babel = [ {file = "Babel-2.8.0-py2.py3-none-any.whl", hash = "sha256:d670ea0b10f8b723672d3a6abeb87b565b244da220d76b4dba1b66269ec152d4"}, {file = "Babel-2.8.0.tar.gz", hash = "sha256:1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38"}, ] -"backports.functools-lru-cache" = [ - {file = "backports.functools_lru_cache-1.6.1-py2.py3-none-any.whl", hash = "sha256:0bada4c2f8a43d533e4ecb7a12214d9420e66eb206d54bf2d682581ca4b80848"}, - {file = "backports.functools_lru_cache-1.6.1.tar.gz", hash = "sha256:8fde5f188da2d593bd5bc0be98d9abc46c95bb8a9dde93429570192ee6cc2d4a"}, -] black = [ {file = "black-19.10b0-py36-none-any.whl", hash = "sha256:1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b"}, {file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, ] cfgv = [ - {file = "cfgv-2.0.1-py2.py3-none-any.whl", hash = "sha256:fbd93c9ab0a523bf7daec408f3be2ed99a980e20b2d19b50fc184ca6b820d289"}, - {file = "cfgv-2.0.1.tar.gz", hash = "sha256:edb387943b665bf9c434f717bf630fa78aecd53d5900d2e05da6ad6048553144"}, + {file = "cfgv-3.0.0-py2.py3-none-any.whl", hash = "sha256:f22b426ed59cd2ab2b54ff96608d846c33dfb8766a67f0b4a6ce130ce244414f"}, + {file = "cfgv-3.0.0.tar.gz", hash = "sha256:04b093b14ddf9fd4d17c53ebfd55582d27b76ed30050193c14e560770c5360eb"}, ] cleo = [ {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, @@ -786,14 +706,6 @@ colorama = [ {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, ] -configparser = [ - {file = "configparser-4.0.2-py2.py3-none-any.whl", hash = "sha256:254c1d9c79f60c45dfde850850883d5aaa7f19a23f13561243a050d5a7c3fe4c"}, - {file = "configparser-4.0.2.tar.gz", hash = "sha256:c7d282687a5308319bf3d2e7706e575c635b0a470342641c93bea0ea3b5331df"}, -] -contextlib2 = [ - {file = "contextlib2-0.6.0.post1-py2.py3-none-any.whl", hash = "sha256:3355078a159fbb44ee60ea80abd0d87b80b78c248643b49aa6d94673b413609b"}, - {file = "contextlib2-0.6.0.post1.tar.gz", hash = "sha256:01f490098c18b19d2bd5bb5dc445b2054d2fa97f09a4280ba2c5f3c394c8162e"}, -] coverage = [ {file = "coverage-5.2-cp27-cp27m-macosx_10_13_intel.whl", hash = "sha256:d9ad0a988ae20face62520785ec3595a5e64f35a21762a57d115dae0b8fb894a"}, {file = "coverage-5.2-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:4bb385a747e6ae8a65290b3df60d6c8a692a5599dc66c9fa3520e667886f2e10"}, @@ -838,11 +750,6 @@ distlib = [ {file = "distlib-0.3.1-py2.py3-none-any.whl", hash = "sha256:8c09de2c67b3e7deef7184574fc060ab8a793e7adbb183d942c389c8b13c52fb"}, {file = "distlib-0.3.1.zip", hash = "sha256:edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1"}, ] -enum34 = [ - {file = "enum34-1.1.10-py2-none-any.whl", hash = "sha256:a98a201d6de3f2ab3db284e70a33b0f896fbf35f8086594e8c9e74b909058d53"}, - {file = "enum34-1.1.10-py3-none-any.whl", hash = "sha256:c3858660960c984d6ab0ebad691265180da2b43f07e061c0f8dca9ef3cffd328"}, - {file = "enum34-1.1.10.tar.gz", hash = "sha256:cce6a7477ed816bd2542d03d53db9f0db935dd013b70f336a95c73979289f248"}, -] filelock = [ {file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"}, {file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"}, @@ -851,14 +758,8 @@ freezegun = [ {file = "freezegun-0.3.15-py2.py3-none-any.whl", hash = "sha256:82c757a05b7c7ca3e176bfebd7d6779fd9139c7cb4ef969c38a28d74deef89b2"}, {file = "freezegun-0.3.15.tar.gz", hash = "sha256:e2062f2c7f95cc276a834c22f1a17179467176b624cc6f936e8bc3be5535ad1b"}, ] -funcsigs = [ - {file = "funcsigs-1.0.2-py2.py3-none-any.whl", hash = "sha256:330cc27ccbf7f1e992e69fef78261dc7c6569012cf397db8d3de0234e6c937ca"}, - {file = "funcsigs-1.0.2.tar.gz", hash = "sha256:a7bb0f2cf3a3fd1ab2732cb49eba4252c2af4240442415b4abce3b87022a8f50"}, -] -futures = [ - {file = "futures-3.1.1-py2-none-any.whl", hash = "sha256:c4884a65654a7c45435063e14ae85280eb1f111d94e542396717ba9828c4337f"}, - {file = "futures-3.1.1-py3-none-any.whl", hash = "sha256:3a44f286998ae64f0cc083682fcfec16c406134a81a589a5de445d7bb7c2751b"}, - {file = "futures-3.1.1.tar.gz", hash = "sha256:51ecb45f0add83c806c68e4b06106f90db260585b25ef2abfcda0bd95c0132fd"}, +future = [ + {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, ] identify = [ {file = "identify-1.4.23-py2.py3-none-any.whl", hash = "sha256:882c4b08b4569517b5f2257ecca180e01f38400a17f429f5d0edff55530c41c7"}, @@ -880,12 +781,20 @@ jinja2 = [ {file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"}, {file = "Jinja2-2.11.2.tar.gz", hash = "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"}, ] +joblib = [ + {file = "joblib-0.16.0-py3-none-any.whl", hash = "sha256:d348c5d4ae31496b2aa060d6d9b787864dd204f9480baaa52d18850cb43e9f49"}, + {file = "joblib-0.16.0.tar.gz", hash = "sha256:8f52bf24c64b608bf0b2563e0e47d6fcf516abc8cfafe10cfd98ad66d94f92d6"}, +] livereload = [ {file = "livereload-2.6.2.tar.gz", hash = "sha256:d1eddcb5c5eb8d2ca1fa1f750e580da624c0f7fcb734aa5780dc81b7dcbd89be"}, ] +lunr = [ + {file = "lunr-0.5.8-py2.py3-none-any.whl", hash = "sha256:aab3f489c4d4fab4c1294a257a30fec397db56f0a50273218ccc3efdbf01d6ca"}, + {file = "lunr-0.5.8.tar.gz", hash = "sha256:c4fb063b98eff775dd638b3df380008ae85e6cb1d1a24d1cd81a10ef6391c26e"}, +] markdown = [ - {file = "Markdown-3.1.1-py2.py3-none-any.whl", hash = "sha256:56a46ac655704b91e5b7e6326ce43d5ef72411376588afa1dd90e881b83c7e8c"}, - {file = "Markdown-3.1.1.tar.gz", hash = "sha256:2e50876bcdd74517e7b71f3e7a76102050edec255b3983403f1a63e7c8a41e7a"}, + {file = "Markdown-3.2.2-py3-none-any.whl", hash = "sha256:c467cd6233885534bf0fe96e62e3cf46cfc1605112356c4f9981512b8174de59"}, + {file = "Markdown-3.2.2.tar.gz", hash = "sha256:1fafe3f1ecabfb514a5285fca634a53c1b32a81cb0feb154264d55bf2ff22c17"}, ] markdown-include = [ {file = "markdown-include-0.5.1.tar.gz", hash = "sha256:72a45461b589489a088753893bc95c5fa5909936186485f4ed55caa57d10250f"}, @@ -926,13 +835,15 @@ markupsafe = [ {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, ] mkdocs = [ - {file = "mkdocs-1.0.4-py2.py3-none-any.whl", hash = "sha256:8cc8b38325456b9e942c981a209eaeb1e9f3f77b493ad755bfef889b9c8d356a"}, - {file = "mkdocs-1.0.4.tar.gz", hash = "sha256:17d34329aad75d5de604b9ed4e31df3a4d235afefdc46ce7b1964fddb2e1e939"}, + {file = "mkdocs-1.1.2-py3-none-any.whl", hash = "sha256:096f52ff52c02c7e90332d2e53da862fde5c062086e1b5356a6e392d5d60f5e9"}, + {file = "mkdocs-1.1.2.tar.gz", hash = "sha256:f0b61e5402b99d7789efa032c7a74c90a20220a9c81749da06dbfbcbd52ffb39"}, ] more-itertools = [ - {file = "more-itertools-5.0.0.tar.gz", hash = "sha256:38a936c0a6d98a38bcc2d03fdaaedaba9f412879461dd2ceff8d37564d6522e4"}, - {file = "more_itertools-5.0.0-py2-none-any.whl", hash = "sha256:c0a5785b1109a6bd7fac76d6837fd1feca158e54e521ccd2ae8bfe393cc9d4fc"}, - {file = "more_itertools-5.0.0-py3-none-any.whl", hash = "sha256:fe7a7cae1ccb57d33952113ff4fa1bc5f879963600ed74918f1236e212ee50b9"}, + {file = "more-itertools-8.4.0.tar.gz", hash = "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5"}, + {file = "more_itertools-8.4.0-py3-none-any.whl", hash = "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2"}, +] +nltk = [ + {file = "nltk-3.5.zip", hash = "sha256:845365449cd8c5f9731f7cb9f8bd6fd0767553b9d53af9eb1b3abf7700936b35"}, ] nodeenv = [ {file = "nodeenv-1.4.0-py2.py3-none-any.whl", hash = "sha256:4b0b77afa3ba9b54f4b6396e60b0c83f59eaeb2d63dc3cc7a70f7f4af96c82bc"}, @@ -945,18 +856,10 @@ pastel = [ {file = "pastel-0.2.0-py2.py3-none-any.whl", hash = "sha256:18b559dc3ad4ba9b8bd5baebe6503f25f36d21460f021cf27a8d889cb5d17840"}, {file = "pastel-0.2.0.tar.gz", hash = "sha256:46155fc523bdd4efcd450bbcb3f2b94a6e3b25edc0eb493e081104ad09e1ca36"}, ] -pathlib2 = [ - {file = "pathlib2-2.3.5-py2.py3-none-any.whl", hash = "sha256:0ec8205a157c80d7acc301c0b18fbd5d44fe655968f5d947b6ecef5290fc35db"}, - {file = "pathlib2-2.3.5.tar.gz", hash = "sha256:6cd9a47b597b37cc57de1c05e56fb1a1c9cc9fab04fe78c29acd090418529868"}, -] pathspec = [ {file = "pathspec-0.8.0-py2.py3-none-any.whl", hash = "sha256:7d91249d21749788d07a2d0f94147accd8f845507400749ea19c1ec9054a12b0"}, {file = "pathspec-0.8.0.tar.gz", hash = "sha256:da45173eb3a6f2a5a487efba21f050af2b41948be6ab52b6a1e3ff22bb8b7061"}, ] -pep562 = [ - {file = "pep562-1.0-py2.py3-none-any.whl", hash = "sha256:d2a48b178ebf5f8dd31709cc26a19808ef794561fa2fe50ea01ea2bad4d667ef"}, - {file = "pep562-1.0.tar.gz", hash = "sha256:58cb1cc9ee63d93e62b4905a50357618d526d289919814bea1f0da8f53b79395"}, -] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, @@ -970,16 +873,16 @@ py = [ {file = "py-1.9.0.tar.gz", hash = "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342"}, ] pygments = [ - {file = "Pygments-2.5.2-py2.py3-none-any.whl", hash = "sha256:2a3fe295e54a20164a9df49c75fa58526d3be48e14aceba6d6b1e8ac0bfd6f1b"}, - {file = "Pygments-2.5.2.tar.gz", hash = "sha256:98c8aa5a9f778fcd1026a17361ddaf7330d1b7c62ae97c3bb0ae73e0b9b6b0fe"}, + {file = "Pygments-2.6.1-py3-none-any.whl", hash = "sha256:ff7a40b4860b727ab48fad6360eb351cc1b33cbf9b15a0f689ca5353e9463324"}, + {file = "Pygments-2.6.1.tar.gz", hash = "sha256:647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44"}, ] pylev = [ {file = "pylev-1.3.0-py2.py3-none-any.whl", hash = "sha256:1d29a87beb45ebe1e821e7a3b10da2b6b2f4c79b43f482c2df1a1f748a6e114e"}, {file = "pylev-1.3.0.tar.gz", hash = "sha256:063910098161199b81e453025653ec53556c1be7165a9b7c50be2f4d57eae1c3"}, ] pymdown-extensions = [ - {file = "pymdown-extensions-6.2.1.tar.gz", hash = "sha256:3bbe6048275f8a0d13a0fe44e0ea201e67268aa7bb40c2544eef16abbf168f7b"}, - {file = "pymdown_extensions-6.2.1-py2.py3-none-any.whl", hash = "sha256:dce5e17b93be0572322b7d06c9a13c13a9d98694d6468277911d50ca87d26f29"}, + {file = "pymdown-extensions-6.3.tar.gz", hash = "sha256:cb879686a586b22292899771f5e5bc3382808e92aa938f71b550ecdea709419f"}, + {file = "pymdown_extensions-6.3-py2.py3-none-any.whl", hash = "sha256:66fae2683c7a1dac53184f7de57f51f8dad73f9ead2f453e94e85096cb811335"}, ] pyparsing = [ {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, @@ -1041,23 +944,6 @@ regex = [ {file = "regex-2020.6.8-cp38-cp38-win_amd64.whl", hash = "sha256:6ad8663c17db4c5ef438141f99e291c4d4edfeaacc0ce28b5bba2b0bf273d9b5"}, {file = "regex-2020.6.8.tar.gz", hash = "sha256:e9b64e609d37438f7d6e68c2546d2cb8062f3adb27e6336bc129b51be20773ac"}, ] -scandir = [ - {file = "scandir-1.10.0-cp27-cp27m-win32.whl", hash = "sha256:92c85ac42f41ffdc35b6da57ed991575bdbe69db895507af88b9f499b701c188"}, - {file = "scandir-1.10.0-cp27-cp27m-win_amd64.whl", hash = "sha256:cb925555f43060a1745d0a321cca94bcea927c50114b623d73179189a4e100ac"}, - {file = "scandir-1.10.0-cp34-cp34m-win32.whl", hash = "sha256:2c712840c2e2ee8dfaf36034080108d30060d759c7b73a01a52251cc8989f11f"}, - {file = "scandir-1.10.0-cp34-cp34m-win_amd64.whl", hash = "sha256:2586c94e907d99617887daed6c1d102b5ca28f1085f90446554abf1faf73123e"}, - {file = "scandir-1.10.0-cp35-cp35m-win32.whl", hash = "sha256:2b8e3888b11abb2217a32af0766bc06b65cc4a928d8727828ee68af5a967fa6f"}, - {file = "scandir-1.10.0-cp35-cp35m-win_amd64.whl", hash = "sha256:8c5922863e44ffc00c5c693190648daa6d15e7c1207ed02d6f46a8dcc2869d32"}, - {file = "scandir-1.10.0-cp36-cp36m-win32.whl", hash = "sha256:2ae41f43797ca0c11591c0c35f2f5875fa99f8797cb1a1fd440497ec0ae4b022"}, - {file = "scandir-1.10.0-cp36-cp36m-win_amd64.whl", hash = "sha256:7d2d7a06a252764061a020407b997dd036f7bd6a175a5ba2b345f0a357f0b3f4"}, - {file = "scandir-1.10.0-cp37-cp37m-win32.whl", hash = "sha256:67f15b6f83e6507fdc6fca22fedf6ef8b334b399ca27c6b568cbfaa82a364173"}, - {file = "scandir-1.10.0-cp37-cp37m-win_amd64.whl", hash = "sha256:b24086f2375c4a094a6b51e78b4cf7ca16c721dcee2eddd7aa6494b42d6d519d"}, - {file = "scandir-1.10.0.tar.gz", hash = "sha256:4d4631f6062e658e9007ab3149a9b914f3548cb38bfb021c64f39a025ce578ae"}, -] -singledispatch = [ - {file = "singledispatch-3.4.0.3-py2.py3-none-any.whl", hash = "sha256:833b46966687b3de7f438c761ac475213e53b306740f1abfaa86e1d1aae56aa8"}, - {file = "singledispatch-3.4.0.3.tar.gz", hash = "sha256:5b06af87df13818d14f08a028e42f566640aef80805c3b50c5056b086e3c2b9c"}, -] six = [ {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, @@ -1081,6 +967,10 @@ tox = [ {file = "tox-3.16.1-py2.py3-none-any.whl", hash = "sha256:60c3793f8ab194097ec75b5a9866138444f63742b0f664ec80be1222a40687c5"}, {file = "tox-3.16.1.tar.gz", hash = "sha256:9a746cda9cadb9e1e05c7ab99f98cfcea355140d2ecac5f97520be94657c3bc7"}, ] +tqdm = [ + {file = "tqdm-4.47.0-py2.py3-none-any.whl", hash = "sha256:7810e627bcf9d983a99d9ff8a0c09674400fd2927eddabeadf153c14a2ec8656"}, + {file = "tqdm-4.47.0.tar.gz", hash = "sha256:63ef7a6d3eb39f80d6b36e4867566b3d8e5f1fe3d6cb50c5e9ede2b3198ba7b7"}, +] typed-ast = [ {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3"}, {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb"}, @@ -1104,16 +994,6 @@ typed-ast = [ {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34"}, {file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"}, ] -typing = [ - {file = "typing-3.7.4.1-py2-none-any.whl", hash = "sha256:c8cabb5ab8945cd2f54917be357d134db9cc1eb039e59d1606dc1e60cb1d9d36"}, - {file = "typing-3.7.4.1-py3-none-any.whl", hash = "sha256:f38d83c5a7a7086543a0f649564d661859c5146a85775ab90c0d2f93ffaa9714"}, - {file = "typing-3.7.4.1.tar.gz", hash = "sha256:91dfe6f3f706ee8cc32d38edbbf304e9b7583fb37108fef38229617f8b3eba23"}, -] -typing-extensions = [ - {file = "typing_extensions-3.7.4.2-py2-none-any.whl", hash = "sha256:f8d2bd89d25bc39dabe7d23df520442fa1d8969b82544370e03d88b5a591c392"}, - {file = "typing_extensions-3.7.4.2-py3-none-any.whl", hash = "sha256:6e95524d8a547a91e08f404ae485bbb71962de46967e1b71a0cb89af24e761c5"}, - {file = "typing_extensions-3.7.4.2.tar.gz", hash = "sha256:79ee589a3caca649a9bfd2a8de4709837400dfa00b6cc81962a1e6a1815969ae"}, -] virtualenv = [ {file = "virtualenv-20.0.26-py2.py3-none-any.whl", hash = "sha256:c11a475400e98450403c0364eb3a2d25d42f71cf1493da64390487b666de4324"}, {file = "virtualenv-20.0.26.tar.gz", hash = "sha256:e10cc66f40cbda459720dfe1d334c4dc15add0d80f09108224f171006a97a172"}, @@ -1123,6 +1003,6 @@ wcwidth = [ {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, ] zipp = [ - {file = "zipp-1.2.0-py2.py3-none-any.whl", hash = "sha256:e0d9e63797e483a30d27e09fffd308c59a700d365ec34e93cc100844168bf921"}, - {file = "zipp-1.2.0.tar.gz", hash = "sha256:c70410551488251b0fee67b460fb9a536af8d6f9f008ad10ac51f615b6a521b1"}, + {file = "zipp-3.1.0-py3-none-any.whl", hash = "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b"}, + {file = "zipp-3.1.0.tar.gz", hash = "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"}, ] diff --git a/pyproject.toml b/pyproject.toml index e7e461fe..b251d385 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pendulum" -version = "2.1.1" +version = "3.0.0a0" description = "Python datetimes made easy" authors = ["Sébastien Eustace "] license = "MIT" @@ -25,13 +25,10 @@ include = [ [tool.poetry.dependencies] -python = "~2.7 || ^3.5" +python = "^3.6" python-dateutil = "^2.6" pytzdata = ">=2020.1" -# typing is needed for Python < 3.5 -typing = { version = "^3.6", python = "<3.5" } - [tool.poetry.dev-dependencies] pytest = "^4.6" pytest-cov = "^2.5" @@ -39,8 +36,8 @@ pytz = ">=2018.3" babel = "^2.5" cleo = "^0.8.1" tox = "^3.0" -black = { version = "^19.3b0", markers = "python_version >= '3.6' and python_version < '4.0' and implementation_name != 'pypy'" } -isort = { version = "^4.3.21", markers = "python_version >= '3.6' and python_version < '4.0'" } +black = { version = "^19.3b0", markers = "implementation_name != 'pypy'" } +isort = "^4.3.21" pre-commit = "^1.10" mkdocs = { version = "^1.0", python = "^3.5" } pymdown-extensions = "^6.0" diff --git a/tests/datetime/test_construct.py b/tests/datetime/test_construct.py index 2e45ead9..0bb8f0e5 100644 --- a/tests/datetime/test_construct.py +++ b/tests/datetime/test_construct.py @@ -11,7 +11,6 @@ from pendulum import DateTime from pendulum.tz import timezone -from pendulum.utils._compat import PY36 from ..conftest import assert_datetime @@ -104,7 +103,6 @@ def test_now(): assert now.hour != in_paris.hour -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") @freeze_time("2016-03-27 00:30:00") def test_now_dst_off(): utc = pendulum.now("UTC") @@ -115,7 +113,6 @@ def test_now_dst_off(): assert in_paris.isoformat() == in_paris_from_utc.isoformat() -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") @freeze_time("2016-03-27 01:30:00") def test_now_dst_transitioning_on(): utc = pendulum.now("UTC") @@ -126,7 +123,6 @@ def test_now_dst_transitioning_on(): assert in_paris.isoformat() == in_paris_from_utc.isoformat() -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") @freeze_time("2016-10-30 00:30:00") def test_now_dst_on(): utc = pendulum.now("UTC") @@ -137,7 +133,6 @@ def test_now_dst_on(): assert in_paris.isoformat() == in_paris_from_utc.isoformat() -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") @freeze_time("2016-10-30 01:30:00") def test_now_dst_transitioning_off(): utc = pendulum.now("UTC") diff --git a/tests/datetime/test_from_format.py b/tests/datetime/test_from_format.py index 398b68da..c079c120 100644 --- a/tests/datetime/test_from_format.py +++ b/tests/datetime/test_from_format.py @@ -1,8 +1,6 @@ import pendulum import pytest -from pendulum.utils._compat import PY2 - from ..conftest import assert_datetime @@ -154,11 +152,6 @@ def test_from_format(text, fmt, expected, now): else: now = pendulum.parse(now) - # Python 2.7 loses precision for x timestamps - # so we don't test - if fmt == "x" and PY2: - return - with pendulum.test(now): assert pendulum.from_format(text, fmt).isoformat() == expected diff --git a/tests/datetime/test_getters.py b/tests/datetime/test_getters.py index 264f4da5..70488d23 100644 --- a/tests/datetime/test_getters.py +++ b/tests/datetime/test_getters.py @@ -5,7 +5,6 @@ from pendulum import DateTime from pendulum.tz import timezone -from pendulum.utils._compat import _HAS_FOLD from ..conftest import assert_date from ..conftest import assert_time @@ -103,19 +102,10 @@ def test_timestamp_with_transition(): 2012, 10, 28, 2, 0, tz="Europe/Warsaw", dst_rule=pendulum.POST_TRANSITION ) - if _HAS_FOLD: - # the difference between the timestamps before and after is equal to one hour - assert d_post.timestamp() - d_pre.timestamp() == pendulum.SECONDS_PER_HOUR - assert d_post.float_timestamp - d_pre.float_timestamp == ( - pendulum.SECONDS_PER_HOUR - ) - assert d_post.int_timestamp - d_pre.int_timestamp == pendulum.SECONDS_PER_HOUR - else: - # when the transition is not recognizable - # then the difference should be equal to zero hours - assert d_post.timestamp() - d_pre.timestamp() == 0 - assert d_post.float_timestamp - d_pre.float_timestamp == 0 - assert d_post.int_timestamp - d_pre.int_timestamp == 0 + # the difference between the timestamps before and after is equal to one hour + assert d_post.timestamp() - d_pre.timestamp() == pendulum.SECONDS_PER_HOUR + assert d_post.float_timestamp - d_pre.float_timestamp == (pendulum.SECONDS_PER_HOUR) + assert d_post.int_timestamp - d_pre.int_timestamp == pendulum.SECONDS_PER_HOUR def test_age(): diff --git a/tests/tz/test_timezone.py b/tests/tz/test_timezone.py index 303a5fc9..8efae423 100644 --- a/tests/tz/test_timezone.py +++ b/tests/tz/test_timezone.py @@ -8,7 +8,6 @@ from pendulum.tz import fixed_timezone from pendulum.tz.exceptions import AmbiguousTime from pendulum.tz.exceptions import NonExistingTime -from pendulum.utils._compat import PY36 from ..conftest import assert_datetime @@ -22,7 +21,6 @@ def setup(): pendulum.tz._tz_cache = {} -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_basic_convert(): dt = datetime(2016, 6, 1, 12, 34, 56, 123456, fold=1) tz = timezone("Europe/Paris") @@ -40,7 +38,6 @@ def test_basic_convert(): assert dt.tzinfo.dst(dt) == timedelta(seconds=3600) -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_skipped_time_with_pre_rule(): dt = datetime(2013, 3, 31, 2, 30, 45, 123456, fold=0) tz = timezone("Europe/Paris") @@ -58,7 +55,6 @@ def test_skipped_time_with_pre_rule(): assert dt.tzinfo.dst(dt) == timedelta() -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_skipped_time_with_post_rule(): dt = datetime(2013, 3, 31, 2, 30, 45, 123456, fold=1) tz = timezone("Europe/Paris") @@ -117,7 +113,6 @@ def test_skipped_time_with_error(): tz.convert(dt, dst_rule=pendulum.TRANSITION_ERROR) -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_repeated_time(): dt = datetime(2013, 10, 27, 2, 30, 45, 123456, fold=1) tz = timezone("Europe/Paris") @@ -135,7 +130,6 @@ def test_repeated_time(): assert dt.tzinfo.dst(dt) == timedelta() -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_repeated_time_explicit_post_rule(): dt = datetime(2013, 10, 27, 2, 30, 45, 123456) tz = timezone("Europe/Paris") @@ -153,7 +147,6 @@ def test_repeated_time_explicit_post_rule(): assert dt.tzinfo.dst(dt) == timedelta() -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_repeated_time_pre_rule(): dt = datetime(2013, 10, 27, 2, 30, 45, 123456, fold=0) tz = timezone("Europe/Paris") @@ -171,7 +164,6 @@ def test_repeated_time_pre_rule(): assert dt.tzinfo.dst(dt) == timedelta(seconds=3600) -@pytest.mark.skipif(not PY36, reason="Disambiguation is not available in Python 2.7") def test_repeated_time_explicit_pre_rule(): dt = datetime(2013, 10, 27, 2, 30, 45, 123456) tz = timezone("Europe/Paris") @@ -389,7 +381,6 @@ def test_on_last_transition(): assert dt.utcoffset().total_seconds() == 7200 -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_convert_fold_attribute_is_honored(): tz = pendulum.timezone("US/Eastern") dt = datetime(2014, 11, 2, 1, 30) @@ -401,7 +392,6 @@ def test_convert_fold_attribute_is_honored(): assert new.strftime("%z") == "-0500" -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_utcoffset_fold_attribute_is_honored(): tz = pendulum.timezone("US/Eastern") dt = datetime(2014, 11, 2, 1, 30) @@ -415,7 +405,6 @@ def test_utcoffset_fold_attribute_is_honored(): assert offset.total_seconds() == -5 * 3600 -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_dst_fold_attribute_is_honored(): tz = pendulum.timezone("US/Eastern") dt = datetime(2014, 11, 2, 1, 30) @@ -429,7 +418,6 @@ def test_dst_fold_attribute_is_honored(): assert offset.total_seconds() == 0 -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_tzname_fold_attribute_is_honored(): tz = pendulum.timezone("US/Eastern") dt = datetime(2014, 11, 2, 1, 30) @@ -443,7 +431,6 @@ def test_tzname_fold_attribute_is_honored(): assert name == "EST" -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_constructor_fold_attribute_is_honored(): tz = pendulum.timezone("US/Eastern") dt = datetime(2014, 11, 2, 1, 30, tzinfo=tz) @@ -455,7 +442,6 @@ def test_constructor_fold_attribute_is_honored(): assert dt.strftime("%z") == "-0500" -@pytest.mark.skipif(not PY36, reason="fold attribute only present in Python 3.6+") def test_convert_sets_fold_attribute_properly(): tz = pendulum.timezone("US/Eastern") diff --git a/tox.ini b/tox.ini index 12d63c9b..38c59819 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py27, py35, py36, py37, py38, pypy, pypy3 +envlist = py36, py37, py38, pypy3 [testenv] whitelist_externals = poetry From ae2c9f59beface872ec54c30b943a0bc3ad77273 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Thu, 30 Jul 2020 12:37:17 +0200 Subject: [PATCH 014/177] Use zoneinfo as a base Timezone implementation --- pendulum/__init__.py | 27 +- pendulum/_extensions/_helpers.c | 8 +- pendulum/_extensions/helpers.py | 10 +- pendulum/datetime.py | 3 +- pendulum/tz/__init__.py | 39 +-- pendulum/tz/exceptions.py | 5 + pendulum/tz/local_timezone.py | 27 +- pendulum/tz/timezone.py | 353 ++++++----------------- pendulum/tz/zoneinfo/__init__.py | 16 - pendulum/tz/zoneinfo/exceptions.py | 18 -- pendulum/tz/zoneinfo/posix_timezone.py | 270 ----------------- pendulum/tz/zoneinfo/reader.py | 219 -------------- pendulum/tz/zoneinfo/timezone.py | 128 -------- pendulum/tz/zoneinfo/transition.py | 77 ----- pendulum/tz/zoneinfo/transition_type.py | 29 -- pendulum/utils/_compat.py | 9 + poetry.lock | 99 +++++-- pyproject.toml | 5 +- tests/tz/test_helpers.py | 2 +- tests/tz/test_timezone.py | 2 +- tests/tz/test_timezones.py | 4 +- tests/tz/zoneinfo/__init__.py | 0 tests/tz/zoneinfo/test_posix_timezone.py | 65 ----- tests/tz/zoneinfo/test_reader.py | 46 --- 24 files changed, 259 insertions(+), 1202 deletions(-) delete mode 100644 pendulum/tz/zoneinfo/__init__.py delete mode 100644 pendulum/tz/zoneinfo/exceptions.py delete mode 100644 pendulum/tz/zoneinfo/posix_timezone.py delete mode 100644 pendulum/tz/zoneinfo/reader.py delete mode 100644 pendulum/tz/zoneinfo/timezone.py delete mode 100644 pendulum/tz/zoneinfo/transition.py delete mode 100644 pendulum/tz/zoneinfo/transition_type.py delete mode 100644 tests/tz/zoneinfo/__init__.py delete mode 100644 tests/tz/zoneinfo/test_posix_timezone.py delete mode 100644 tests/tz/zoneinfo/test_reader.py diff --git a/pendulum/__init__.py b/pendulum/__init__.py index 275ea4e6..aa63c908 100644 --- a/pendulum/__init__.py +++ b/pendulum/__init__.py @@ -47,7 +47,8 @@ from .tz import test_local_timezone from .tz import timezone from .tz import timezones -from .tz.timezone import Timezone as _Timezone +from .tz.timezone import FixedTimezone +from .tz.timezone import Timezone _TEST_NOW = None # type: Optional[DateTime] @@ -59,13 +60,13 @@ def _safe_timezone( - obj: Optional[Union[str, float, _datetime.tzinfo, _Timezone]] -) -> _Timezone: + obj: Optional[Union[str, float, _datetime.tzinfo, Timezone]] +) -> Timezone: """ Creates a timezone instance from a string, Timezone, TimezoneInfo or integer offset. """ - if isinstance(obj, _Timezone): + if isinstance(obj, (Timezone, FixedTimezone)): return obj if obj is None or obj == "local": @@ -99,7 +100,7 @@ def datetime( minute: int = 0, second: int = 0, microsecond: int = 0, - tz: Optional[Union[str, float, _Timezone]] = UTC, + tz: Optional[Union[str, float, Timezone]] = UTC, dst_rule: str = POST_TRANSITION, ) -> DateTime: """ @@ -173,7 +174,7 @@ def time(hour: int, minute: int = 0, second: int = 0, microsecond: int = 0) -> T def instance( - dt: _datetime.datetime, tz: Optional[Union[str, _Timezone]] = UTC + dt: _datetime.datetime, tz: Optional[Union[str, Timezone]] = UTC ) -> DateTime: """ Create a DateTime instance from a datetime one. @@ -187,7 +188,7 @@ def instance( tz = dt.tzinfo or tz # Checking for pytz/tzinfo - if isinstance(tz, _datetime.tzinfo) and not isinstance(tz, _Timezone): + if isinstance(tz, _datetime.tzinfo) and not isinstance(tz, Timezone): # pytz if hasattr(tz, "localize") and tz.zone: tz = tz.zone @@ -202,7 +203,7 @@ def instance( ) -def now(tz: Optional[Union[str, _Timezone]] = None) -> DateTime: +def now(tz: Optional[Union[str, Timezone]] = None) -> DateTime: """ Get a DateTime instance for the current date and time. """ @@ -237,21 +238,21 @@ def now(tz: Optional[Union[str, _Timezone]] = None) -> DateTime: ) -def today(tz: Union[str, _Timezone] = "local") -> DateTime: +def today(tz: Union[str, Timezone] = "local") -> DateTime: """ Create a DateTime instance for today. """ return now(tz).start_of("day") -def tomorrow(tz: Union[str, _Timezone] = "local") -> DateTime: +def tomorrow(tz: Union[str, Timezone] = "local") -> DateTime: """ Create a DateTime instance for today. """ return today(tz).add(days=1) -def yesterday(tz: Union[str, _Timezone] = "local") -> DateTime: +def yesterday(tz: Union[str, Timezone] = "local") -> DateTime: """ Create a DateTime instance for today. """ @@ -261,7 +262,7 @@ def yesterday(tz: Union[str, _Timezone] = "local") -> DateTime: def from_format( string: str, fmt: str, - tz: Union[str, _Timezone] = UTC, + tz: Union[str, Timezone] = UTC, locale: Optional[str] = None, # noqa ) -> DateTime: """ @@ -275,7 +276,7 @@ def from_format( def from_timestamp( - timestamp: Union[int, float], tz: Union[str, _Timezone] = UTC + timestamp: Union[int, float], tz: Union[str, Timezone] = UTC ) -> DateTime: """ Create a DateTime instance from a timestamp. diff --git a/pendulum/_extensions/_helpers.c b/pendulum/_extensions/_helpers.c index 854aee25..a3114d9d 100644 --- a/pendulum/_extensions/_helpers.c +++ b/pendulum/_extensions/_helpers.c @@ -165,7 +165,13 @@ char *_get_tz_name(PyObject *dt) if (tzinfo != Py_None) { - if (PyObject_HasAttrString(tzinfo, "name")) + if (PyObject_HasAttrString(tzinfo, "key")) + { + // zoneinfo timezone + tz = (char *)PyUnicode_AsUTF8( + PyObject_GetAttrString(tzinfo, "name")); + } + else if (PyObject_HasAttrString(tzinfo, "name")) { // Pendulum timezone tz = (char *)PyUnicode_AsUTF8( diff --git a/pendulum/_extensions/helpers.py b/pendulum/_extensions/helpers.py index 0132c0c9..e1eff814 100644 --- a/pendulum/_extensions/helpers.py +++ b/pendulum/_extensions/helpers.py @@ -197,6 +197,7 @@ def precise_diff( :rtype: PreciseDiff """ + print("DT", d1, d2) sign = 1 if d1 == d2: @@ -234,14 +235,19 @@ def precise_diff( # Trying to figure out the timezone names # If we can't find them, we assume different timezones if tzinfo1 and tzinfo2: - if hasattr(tzinfo1, "name"): + if hasattr(tzinfo1, "key"): + # zoneinfo timezone + tz1 = tzinfo1.key + elif hasattr(tzinfo1, "name"): # Pendulum timezone tz1 = tzinfo1.name elif hasattr(tzinfo1, "zone"): # pytz timezone tz1 = tzinfo1.zone - if hasattr(tzinfo2, "name"): + if hasattr(tzinfo2, "key"): + tz2 = tzinfo2.key + elif hasattr(tzinfo2, "name"): tz2 = tzinfo2.name elif hasattr(tzinfo2, "zone"): tz2 = tzinfo2.zone diff --git a/pendulum/datetime.py b/pendulum/datetime.py index d277446b..3b254396 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -37,6 +37,7 @@ from .period import Period from .time import Time from .tz import UTC +from .tz.timezone import FixedTimezone from .tz.timezone import Timezone @@ -164,7 +165,7 @@ def offset_hours(self) -> int: @property def timezone(self) -> Optional[Timezone]: - if not isinstance(self.tzinfo, Timezone): + if not isinstance(self.tzinfo, (Timezone, FixedTimezone)): return return self.tzinfo diff --git a/pendulum/tz/__init__.py b/pendulum/tz/__init__.py index e45a6cde..ba4af1b1 100644 --- a/pendulum/tz/__init__.py +++ b/pendulum/tz/__init__.py @@ -1,27 +1,38 @@ -from typing import Tuple +import os + from typing import Union -import pytzdata +import tzdata from .local_timezone import get_local_timezone from .local_timezone import set_local_timezone from .local_timezone import test_local_timezone from .timezone import UTC -from .timezone import FixedTimezone as _FixedTimezone -from .timezone import Timezone as _Timezone +from .timezone import FixedTimezone +from .timezone import Timezone PRE_TRANSITION = "pre" POST_TRANSITION = "post" TRANSITION_ERROR = "error" -timezones = pytzdata.timezones # type: Tuple[str, ...] +_timezones = None _tz_cache = {} -def timezone(name, extended=True): # type: (Union[str, int], bool) -> _Timezone +def timezones(): + global _timezones + + if _timezones is None: + with open(os.path.join(os.path.dirname(tzdata.__file__), "zones")) as f: + _timezones = tuple(tz.strip() for tz in f.readlines()) + + return _timezones + + +def timezone(name: Union[str, int]) -> Union[Timezone, FixedTimezone]: """ Return a Timezone instance given its name. """ @@ -31,29 +42,23 @@ def timezone(name, extended=True): # type: (Union[str, int], bool) -> _Timezone if name.lower() == "utc": return UTC - if name in _tz_cache: - return _tz_cache[name] - - tz = _Timezone(name, extended=extended) - _tz_cache[name] = tz - - return tz + return Timezone(name) -def fixed_timezone(offset): # type: (int) -> _FixedTimezone +def fixed_timezone(offset: int) -> FixedTimezone: """ Return a Timezone instance given its offset in seconds. """ if offset in _tz_cache: - return _tz_cache[offset] # type: ignore + return _tz_cache[offset] - tz = _FixedTimezone(offset) + tz = FixedTimezone(offset) _tz_cache[offset] = tz return tz -def local_timezone(): # type: () -> _Timezone +def local_timezone() -> Timezone: """ Return the local timezone. """ diff --git a/pendulum/tz/exceptions.py b/pendulum/tz/exceptions.py index b91fa062..7e77022d 100644 --- a/pendulum/tz/exceptions.py +++ b/pendulum/tz/exceptions.py @@ -3,6 +3,11 @@ class TimezoneError(ValueError): pass +class InvalidTimezone(TimezoneError): + + pass + + class NonExistingTime(TimezoneError): message = "The datetime {} does not exist." diff --git a/pendulum/tz/local_timezone.py b/pendulum/tz/local_timezone.py index 59b61e5a..9b2856e7 100644 --- a/pendulum/tz/local_timezone.py +++ b/pendulum/tz/local_timezone.py @@ -7,9 +7,10 @@ from typing import Optional from typing import Union +from pendulum.utils._compat import zoneinfo + +from .timezone import FixedTimezone from .timezone import Timezone -from .timezone import TimezoneFile -from .zoneinfo.exceptions import InvalidTimezone try: @@ -25,7 +26,7 @@ _local_timezone = None -def get_local_timezone(): # type: () -> Timezone +def get_local_timezone() -> Union[Timezone, FixedTimezone]: global _local_timezone if _mock_local_timezone is not None: @@ -46,7 +47,7 @@ def set_local_timezone(mock=None): # type: (Optional[Union[str, Timezone]]) -> @contextmanager -def test_local_timezone(mock): # type: (Timezone) -> Iterator[None] +def test_local_timezone(mock: Timezone) -> Iterator[None]: set_local_timezone(mock) yield @@ -54,7 +55,7 @@ def test_local_timezone(mock): # type: (Timezone) -> Iterator[None] set_local_timezone() -def _get_system_timezone(): # type: () -> Timezone +def _get_system_timezone() -> Timezone: if sys.platform == "win32": return _get_windows_timezone() elif "darwin" in sys.platform: @@ -63,7 +64,7 @@ def _get_system_timezone(): # type: () -> Timezone return _get_unix_timezone() -def _get_windows_timezone(): # type: () -> Timezone +def _get_windows_timezone() -> Timezone: from .data.windows import windows_timezones # Windows is special. It has unique time zone names (in several @@ -142,7 +143,7 @@ def _get_windows_timezone(): # type: () -> Timezone return Timezone(timezone) -def _get_darwin_timezone(): # type: () -> Timezone +def _get_darwin_timezone() -> Timezone: # link will be something like /usr/share/zoneinfo/America/Los_Angeles. link = os.readlink("/etc/localtime") tzname = link[link.rfind("zoneinfo/") + 9 :] @@ -212,7 +213,7 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone try: return Timezone(os.path.join(*tzpath)) - except InvalidTimezone: + except zoneinfo.ZoneInfoNotFoundError: pass # systemd distributions use symlinks that include the zone name, @@ -227,7 +228,7 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone tzpath.insert(0, parts.pop(0)) try: return Timezone(os.path.join(*tzpath)) - except InvalidTimezone: + except zoneinfo.ZoneInfoNotFoundError: pass # No explicit setting existed. Use localtime @@ -237,18 +238,20 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone if not os.path.isfile(tzpath): continue - return TimezoneFile(tzpath) + with open(tzpath, "rb") as f: + return Timezone.from_file(f) raise RuntimeError("Unable to find any timezone configuration") -def _tz_from_env(tzenv): # type: (str) -> Timezone +def _tz_from_env(tzenv: str) -> Timezone: if tzenv[0] == ":": tzenv = tzenv[1:] # TZ specifies a file if os.path.isfile(tzenv): - return TimezoneFile(tzenv) + with open(tzenv, "rb") as f: + return Timezone.from_file(f) # TZ specifies a zoneinfo zone. try: diff --git a/pendulum/tz/timezone.py b/pendulum/tz/timezone.py index 04b46e59..ff68a4c6 100644 --- a/pendulum/tz/timezone.py +++ b/pendulum/tz/timezone.py @@ -1,18 +1,12 @@ +from abc import ABC +from abc import abstractmethod from datetime import datetime from datetime import timedelta from datetime import tzinfo from typing import Optional from typing import TypeVar -from typing import overload -from pendulum.helpers import local_time -from pendulum.helpers import timestamp - -from .exceptions import AmbiguousTime -from .exceptions import NonExistingTime -from .zoneinfo import read -from .zoneinfo import read_file -from .zoneinfo.transition import Transition +from pendulum.utils._compat import zoneinfo POST_TRANSITION = "post" @@ -23,7 +17,31 @@ _D = TypeVar("_D", bound=datetime) -class Timezone(tzinfo): +class PendulumTimezone(ABC): + @property + @abstractmethod + def name(self) -> str: + raise NotImplementedError + + @abstractmethod + def convert(self, dt: datetime, dst_rule: Optional[str] = None) -> datetime: + raise NotImplementedError + + @abstractmethod + def datetime( + self, + year: int, + month: int, + day: int, + hour: int = 0, + minute: int = 0, + second: int = 0, + microsecond: int = 0, + ) -> datetime: + raise NotImplementedError + + +class Timezone(zoneinfo.ZoneInfo, PendulumTimezone): """ Represents a named timezone. @@ -33,18 +51,11 @@ class Timezone(tzinfo): >>> tz = Timezone('Europe/Paris') """ - def __init__(self, name, extended=True): # type: (str, bool) -> None - tz = read(name, extend=extended) - - self._name = name - self._transitions = tz.transitions - self._hint = {True: None, False: None} - @property - def name(self): # type: () -> str - return self._name + def name(self) -> str: + return self.key - def convert(self, dt, dst_rule=None): # type: (_D, Optional[str]) -> _D + def convert(self, dt: datetime, dst_rule: Optional[str] = None) -> datetime: """ Converts a datetime in the current timezone. @@ -65,221 +76,37 @@ def convert(self, dt, dst_rule=None): # type: (_D, Optional[str]) -> _D >>> in_new_york.isoformat() '2013-03-30T21:30:00-04:00' """ + if dst_rule is not None: + if dst_rule == PRE_TRANSITION and dt.fold != 0: + dt = dt.replace(fold=0) + elif dst_rule == POST_TRANSITION and dt.fold != 1: + dt = dt.replace(fold=1) + if dt.tzinfo is None: - return self._normalize(dt, dst_rule=dst_rule) + dt = dt.replace(tzinfo=self) - return self._convert(dt) + return dt.astimezone(self) def datetime( - self, year, month, day, hour=0, minute=0, second=0, microsecond=0 - ): # type: (int, int, int, int, int, int, int) -> _datetime + self, + year: int, + month: int, + day: int, + hour: int = 0, + minute: int = 0, + second: int = 0, + microsecond: int = 0, + ) -> _datetime: """ Return a normalized datetime for the current timezone. """ - return self.convert( - datetime(year, month, day, hour, minute, second, microsecond, fold=1) + return datetime( + year, month, day, hour, minute, second, microsecond, tzinfo=self, fold=1 ) - def _normalize(self, dt, dst_rule=None): # type: (_D, Optional[str]) -> _D - sec = timestamp(dt) - fold = 0 - transition = self._lookup_transition(sec) - - if dst_rule is None: - dst_rule = PRE_TRANSITION - if dt.fold == 1: - dst_rule = POST_TRANSITION - - if sec < transition.local: - if transition.is_ambiguous(sec): - # Ambiguous time - if dst_rule == TRANSITION_ERROR: - raise AmbiguousTime(dt) - - # We set the fold attribute for later - if dst_rule == POST_TRANSITION: - fold = 1 - elif transition.previous is not None: - transition = transition.previous - - if transition: - if transition.is_ambiguous(sec): - # Ambiguous time - if dst_rule == TRANSITION_ERROR: - raise AmbiguousTime(dt) - - # We set the fold attribute for later - if dst_rule == POST_TRANSITION: - fold = 1 - elif transition.is_missing(sec): - # Skipped time - if dst_rule == TRANSITION_ERROR: - raise NonExistingTime(dt) - - # We adjust accordingly - if dst_rule == POST_TRANSITION: - sec += transition.fix - fold = 1 - else: - sec -= transition.fix - - return dt.__class__(*local_time(sec, 0, dt.microsecond), tzinfo=self, fold=fold) - - def _convert(self, dt): # type: (_D) -> _D - if dt.tzinfo is self: - return self._normalize(dt, dst_rule=POST_TRANSITION) - - if not isinstance(dt.tzinfo, Timezone): - return dt.astimezone(self) - - stamp = timestamp(dt) - - if isinstance(dt.tzinfo, FixedTimezone): - offset = dt.tzinfo.offset - else: - transition = dt.tzinfo._lookup_transition(stamp) - offset = transition.ttype.offset - - if stamp < transition.local and transition.previous is not None: - if ( - transition.previous.is_ambiguous(stamp) - and getattr(dt, "fold", 1) == 0 - ): - pass - else: - offset = transition.previous.ttype.offset - - stamp -= offset - - transition = self._lookup_transition(stamp, is_utc=True) - if stamp < transition.at and transition.previous is not None: - transition = transition.previous - - offset = transition.ttype.offset - stamp += offset - fold = int(not transition.ttype.is_dst()) - - return dt.__class__( - *local_time(stamp, 0, dt.microsecond), tzinfo=self, fold=fold - ) - - def _lookup_transition( - self, stamp, is_utc=False - ): # type: (int, bool) -> Transition - lo, hi = 0, len(self._transitions) - hint = self._hint[is_utc] - if hint: - if stamp == hint[0]: - return self._transitions[hint[1]] - elif stamp < hint[0]: - hi = hint[1] - else: - lo = hint[1] - - if not is_utc: - while lo < hi: - mid = (lo + hi) // 2 - if stamp < self._transitions[mid].to: - hi = mid - else: - lo = mid + 1 - else: - while lo < hi: - mid = (lo + hi) // 2 - if stamp < self._transitions[mid].at: - hi = mid - else: - lo = mid + 1 - - if lo >= len(self._transitions): - # Beyond last transition - lo = len(self._transitions) - 1 - - self._hint[is_utc] = (stamp, lo) - - return self._transitions[lo] - - @overload - def utcoffset(self, dt): # type: (None) -> None - pass - - @overload - def utcoffset(self, dt): # type: (_datetime) -> timedelta - pass - - def utcoffset(self, dt): - if dt is None: - return - - transition = self._get_transition(dt) - - return transition.utcoffset() - - def dst( - self, dt # type: Optional[_datetime] - ): # type: (...) -> Optional[timedelta] - if dt is None: - return - - transition = self._get_transition(dt) - - if not transition.ttype.is_dst(): - return timedelta() - - return timedelta(seconds=transition.fix) - - def tzname(self, dt): # type: (Optional[_datetime]) -> Optional[str] - if dt is None: - return - - transition = self._get_transition(dt) - return transition.ttype.abbreviation - - def _get_transition(self, dt): # type: (_datetime) -> Transition - if dt.tzinfo is not None and dt.tzinfo is not self: - dt = dt - dt.utcoffset() - - stamp = timestamp(dt) - - transition = self._lookup_transition(stamp, is_utc=True) - else: - stamp = timestamp(dt) - - transition = self._lookup_transition(stamp) - - if stamp < transition.local and transition.previous is not None: - fold = getattr(dt, "fold", 1) - if transition.is_ambiguous(stamp): - if fold == 0: - transition = transition.previous - elif transition.previous.is_ambiguous(stamp) and fold == 0: - pass - else: - transition = transition.previous - - return transition - - def fromutc(self, dt): # type: (_D) -> _D - stamp = timestamp(dt) - - transition = self._lookup_transition(stamp, is_utc=True) - if stamp < transition.at and transition.previous is not None: - transition = transition.previous - - stamp += transition.ttype.offset - - return dt.__class__(*local_time(stamp, 0, dt.microsecond), tzinfo=self) - - def __repr__(self): # type: () -> str - return "Timezone('{}')".format(self._name) - - def __getinitargs__(self): # type: () -> tuple - return (self._name,) - - -class FixedTimezone(Timezone): - def __init__(self, offset, name=None): +class FixedTimezone(tzinfo, PendulumTimezone): + def __init__(self, offset: int, name: Optional[str] = None) -> None: sign = "-" if offset < 0 else "+" minutes = offset / 60 @@ -293,54 +120,64 @@ def __init__(self, offset, name=None): self._utcoffset = timedelta(seconds=offset) @property - def offset(self): # type: () -> int - return self._offset - - def _normalize(self, dt, dst_rule=None): # type: (_D, Optional[str]) -> _D - dt = dt.__class__( - dt.year, - dt.month, - dt.day, - dt.hour, - dt.minute, - dt.second, - dt.microsecond, - tzinfo=self, - fold=0, - ) + def name(self) -> str: + return self._name - return dt + def convert(self, dt: datetime, dst_rule: Optional[str] = None) -> datetime: + if dt.tzinfo is None: + return dt.__class__( + dt.year, + dt.month, + dt.day, + dt.hour, + dt.minute, + dt.second, + dt.microsecond, + tzinfo=self, + fold=0, + ) + + if dst_rule is not None: + if dst_rule == PRE_TRANSITION and dt.fold != 0: + dt = dt.replace(fold=0) + elif dst_rule == POST_TRANSITION and dt.fold != 1: + dt = dt.replace(fold=1) + + return dt.astimezone(self) - def _convert(self, dt): # type: (_D) -> _D - if dt.tzinfo is not self: - return dt.astimezone(self) + def datetime( + self, + year: int, + month: int, + day: int, + hour: int = 0, + minute: int = 0, + second: int = 0, + microsecond: int = 0, + ) -> datetime: + return self.convert( + datetime(year, month, day, hour, minute, second, microsecond, fold=1) + ) - return dt + @property + def offset(self) -> int: + return self._offset - def utcoffset(self, dt): # type: (Optional[_datetime]) -> timedelta + def utcoffset(self, dt: Optional[datetime]) -> timedelta: return self._utcoffset - def dst(self, dt): # type: (Optional[_datetime]) -> timedelta + def dst(self, dt: Optional[_datetime]): return timedelta() - def fromutc(self, dt): # type: (_D) -> _D + def fromutc(self, dt: datetime) -> datetime: # Use the stdlib datetime's add method to avoid infinite recursion return (datetime.__add__(dt, self._utcoffset)).replace(tzinfo=self) - def tzname(self, dt): # type: (Optional[_datetime]) -> Optional[str] + def tzname(self, dt: Optional[datetime]) -> Optional[str]: return self._name def __getinitargs__(self): # type: () -> tuple return self._offset, self._name -class TimezoneFile(Timezone): - def __init__(self, path): - tz = read_file(path) - - self._name = "" - self._transitions = tz.transitions - self._hint = {True: None, False: None} - - UTC = FixedTimezone(0, "UTC") diff --git a/pendulum/tz/zoneinfo/__init__.py b/pendulum/tz/zoneinfo/__init__.py deleted file mode 100644 index c1833650..00000000 --- a/pendulum/tz/zoneinfo/__init__.py +++ /dev/null @@ -1,16 +0,0 @@ -from .reader import Reader -from .timezone import Timezone - - -def read(name, extend=True): # type: (str, bool) -> Timezone - """ - Read the zoneinfo structure for a given timezone name. - """ - return Reader(extend=extend).read_for(name) - - -def read_file(path, extend=True): # type: (str, bool) -> Timezone - """ - Read the zoneinfo structure for a given path. - """ - return Reader(extend=extend).read(path) diff --git a/pendulum/tz/zoneinfo/exceptions.py b/pendulum/tz/zoneinfo/exceptions.py deleted file mode 100644 index 54121815..00000000 --- a/pendulum/tz/zoneinfo/exceptions.py +++ /dev/null @@ -1,18 +0,0 @@ -class ZoneinfoError(Exception): - - pass - - -class InvalidZoneinfoFile(ZoneinfoError): - - pass - - -class InvalidTimezone(ZoneinfoError): - def __init__(self, name): - super(InvalidTimezone, self).__init__('Invalid timezone "{}"'.format(name)) - - -class InvalidPosixSpec(ZoneinfoError): - def __init__(self, spec): - super(InvalidPosixSpec, self).__init__("Invalid POSIX spec: {}".format(spec)) diff --git a/pendulum/tz/zoneinfo/posix_timezone.py b/pendulum/tz/zoneinfo/posix_timezone.py deleted file mode 100644 index 74a32eba..00000000 --- a/pendulum/tz/zoneinfo/posix_timezone.py +++ /dev/null @@ -1,270 +0,0 @@ -""" -Parsing of a POSIX zone spec as described in the TZ part of section 8.3 in -http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap08.html. -""" -import re - -from typing import Optional - -from pendulum.constants import MONTHS_OFFSETS -from pendulum.constants import SECS_PER_DAY - -from .exceptions import InvalidPosixSpec - - -_spec = re.compile( - "^" - r"(?P<.*?>|[^-+,\d]{3,})" - r"(?P([+-])?(\d{1,2})(:\d{2}(:\d{2})?)?)" - r"(?P" - r" (?P<.*?>|[^-+,\d]{3,})" - r" (?P([+-])?(\d{1,2})(:\d{2}(:\d{2})?)?)?" - r")?" - r"(?:,(?P" - r" (?P" - r" (?:J\d+|\d+|M\d{1,2}.\d.[0-6])" - r" (?:/(?P([+-])?(\d+)(:\d{2}(:\d{2})?)?))?" - " )" - " ," - r" (?P" - r" (?:J\d+|\d+|M\d{1,2}.\d.[0-6])" - r" (?:/(?P([+-])?(\d+)(:\d{2}(:\d{2})?)?))?" - " )" - "))?" - "$", - re.VERBOSE, -) - - -def posix_spec(spec): # type: (str) -> PosixTimezone - try: - return _posix_spec(spec) - except ValueError: - raise InvalidPosixSpec(spec) - - -def _posix_spec(spec): # type: (str) -> PosixTimezone - m = _spec.match(spec) - if not m: - raise ValueError("Invalid posix spec") - - std_abbr = _parse_abbr(m.group("std_abbr")) - std_offset = _parse_offset(m.group("std_offset")) - - dst_abbr = None - dst_offset = None - if m.group("dst_info"): - dst_abbr = _parse_abbr(m.group("dst_abbr")) - if m.group("dst_offset"): - dst_offset = _parse_offset(m.group("dst_offset")) - else: - dst_offset = std_offset + 3600 - - dst_start = None - dst_end = None - if m.group("rules"): - dst_start = _parse_rule(m.group("dst_start")) - dst_end = _parse_rule(m.group("dst_end")) - - return PosixTimezone(std_abbr, std_offset, dst_abbr, dst_offset, dst_start, dst_end) - - -def _parse_abbr(text): # type: (str) -> str - return text.lstrip("<").rstrip(">") - - -def _parse_offset(text, sign=-1): # type: (str, int) -> int - if text.startswith(("+", "-")): - if text.startswith("-"): - sign *= -1 - - text = text[1:] - - minutes = 0 - seconds = 0 - - parts = text.split(":") - hours = int(parts[0]) - - if len(parts) > 1: - minutes = int(parts[1]) - - if len(parts) > 2: - seconds = int(parts[2]) - - return sign * ((((hours * 60) + minutes) * 60) + seconds) - - -def _parse_rule(rule): # type: (str) -> PosixTransition - klass = NPosixTransition - args = () - - if rule.startswith("M"): - rule = rule[1:] - parts = rule.split(".") - month = int(parts[0]) - week = int(parts[1]) - day = int(parts[2].split("/")[0]) - - args += (month, week, day) - klass = MPosixTransition - elif rule.startswith("J"): - rule = rule[1:] - args += (int(rule.split("/")[0]),) - klass = JPosixTransition - else: - args += (int(rule.split("/")[0]),) - - # Checking offset - parts = rule.split("/") - if len(parts) > 1: - offset = _parse_offset(parts[-1], sign=1) - else: - offset = 7200 - - args += (offset,) - - return klass(*args) - - -class PosixTransition(object): - def __init__(self, offset): # type: (int) -> None - self._offset = offset - - @property - def offset(self): # type: () -> int - return self._offset - - def trans_offset(self, is_leap, jan1_weekday): # type: (bool, int) -> int - raise NotImplementedError() - - -class JPosixTransition(PosixTransition): - def __init__(self, day, offset): # type: (int, int) -> None - self._day = day - - super(JPosixTransition, self).__init__(offset) - - @property - def day(self): # type: () -> int - """ - day of non-leap year [1:365] - """ - return self._day - - def trans_offset(self, is_leap, jan1_weekday): # type: (bool, int) -> int - days = self._day - if not is_leap or days < MONTHS_OFFSETS[1][3]: - days -= 1 - - return (days * SECS_PER_DAY) + self._offset - - -class NPosixTransition(PosixTransition): - def __init__(self, day, offset): # type: (int, int) -> None - self._day = day - - super(NPosixTransition, self).__init__(offset) - - @property - def day(self): # type: () -> int - """ - day of year [0:365] - """ - return self._day - - def trans_offset(self, is_leap, jan1_weekday): # type: (bool, int) -> int - days = self._day - - return (days * SECS_PER_DAY) + self._offset - - -class MPosixTransition(PosixTransition): - def __init__(self, month, week, weekday, offset): - # type: (int, int, int, int) -> None - self._month = month - self._week = week - self._weekday = weekday - - super(MPosixTransition, self).__init__(offset) - - @property - def month(self): # type: () -> int - """ - month of year [1:12] - """ - return self._month - - @property - def week(self): # type: () -> int - """ - week of month [1:5] (5==last) - """ - return self._week - - @property - def weekday(self): # type: () -> int - """ - 0==Sun, ..., 6=Sat - """ - return self._weekday - - def trans_offset(self, is_leap, jan1_weekday): # type: (bool, int) -> int - last_week = self._week == 5 - days = MONTHS_OFFSETS[is_leap][self._month + int(last_week)] - weekday = (jan1_weekday + days) % 7 - if last_week: - days -= (weekday + 7 - 1 - self._weekday) % 7 + 1 - else: - days += (self._weekday + 7 - weekday) % 7 - days += (self._week - 1) * 7 - - return (days * SECS_PER_DAY) + self._offset - - -class PosixTimezone: - """ - The entirety of a POSIX-string specified time-zone rule. - - The standard abbreviation and offset are always given. - """ - - def __init__( - self, - std_abbr, # type: str - std_offset, # type: int - dst_abbr, # type: Optional[str] - dst_offset, # type: Optional[int] - dst_start=None, # type: Optional[PosixTransition] - dst_end=None, # type: Optional[PosixTransition] - ): - self._std_abbr = std_abbr - self._std_offset = std_offset - self._dst_abbr = dst_abbr - self._dst_offset = dst_offset - self._dst_start = dst_start - self._dst_end = dst_end - - @property - def std_abbr(self): # type: () -> str - return self._std_abbr - - @property - def std_offset(self): # type: () -> int - return self._std_offset - - @property - def dst_abbr(self): # type: () -> Optional[str] - return self._dst_abbr - - @property - def dst_offset(self): # type: () -> Optional[int] - return self._dst_offset - - @property - def dst_start(self): # type: () -> Optional[PosixTransition] - return self._dst_start - - @property - def dst_end(self): # type: () -> Optional[PosixTransition] - return self._dst_end diff --git a/pendulum/tz/zoneinfo/reader.py b/pendulum/tz/zoneinfo/reader.py deleted file mode 100644 index 42fbc60b..00000000 --- a/pendulum/tz/zoneinfo/reader.py +++ /dev/null @@ -1,219 +0,0 @@ -import os - -from collections import namedtuple -from struct import unpack -from typing import IO -from typing import Any -from typing import Dict -from typing import List -from typing import Optional -from typing import Tuple - -import pytzdata - -from pytzdata.exceptions import TimezoneNotFound - -from .exceptions import InvalidTimezone -from .exceptions import InvalidZoneinfoFile -from .posix_timezone import PosixTimezone -from .posix_timezone import posix_spec -from .timezone import Timezone -from .transition import Transition -from .transition_type import TransitionType - - -_offset = namedtuple("offset", "utc_total_offset is_dst abbr_idx") - -header = namedtuple( - "header", - "version " "utclocals " "stdwalls " "leaps " "transitions " "types " "abbr_size", -) - - -class Reader: - """ - Reads compiled zoneinfo TZif (\0, 2 or 3) files. - """ - - def __init__(self, extend=True): # type: (bool) -> None - self._extend = extend - - def read_for(self, timezone): # type: (str) -> Timezone - """ - Read the zoneinfo structure for a given timezone name. - - :param timezone: The timezone. - """ - try: - file_path = pytzdata.tz_path(timezone) - except TimezoneNotFound: - raise InvalidTimezone(timezone) - - return self.read(file_path) - - def read(self, file_path): # type: (str) -> Timezone - """ - Read a zoneinfo structure from the given path. - - :param file_path: The path of a zoneinfo file. - """ - if not os.path.isfile(file_path): - raise InvalidZoneinfoFile("The tzinfo file does not exist") - - with open(file_path, "rb") as fd: - return self._parse(fd) - - def _check_read(self, fd, nbytes): # type: (...) -> bytes - """ - Reads the given number of bytes from the given file - and checks that the correct number of bytes could be read. - """ - result = fd.read(nbytes) - - if (not result and nbytes > 0) or len(result) != nbytes: - raise InvalidZoneinfoFile( - "Expected {} bytes reading {}, " - "but got {}".format(nbytes, fd.name, len(result) if result else 0) - ) - - return result - - def _parse(self, fd): # type: (...) -> Timezone - """ - Parse a zoneinfo file. - """ - hdr = self._parse_header(fd) - - if hdr.version in (2, 3): - # We're skipping the entire v1 file since - # at least the same data will be found in TZFile 2. - fd.seek( - hdr.transitions * 5 - + hdr.types * 6 - + hdr.abbr_size - + hdr.leaps * 4 - + hdr.stdwalls - + hdr.utclocals, - 1, - ) - - # Parse the second header - hdr = self._parse_header(fd) - - if hdr.version != 2 and hdr.version != 3: - raise InvalidZoneinfoFile( - "Header versions mismatch for file {}".format(fd.name) - ) - - # Parse the v2 data - trans = self._parse_trans_64(fd, hdr.transitions) - type_idx = self._parse_type_idx(fd, hdr.transitions) - types = self._parse_types(fd, hdr.types) - abbrs = self._parse_abbrs(fd, hdr.abbr_size, types) - - fd.seek(hdr.leaps * 8 + hdr.stdwalls + hdr.utclocals, 1) - - trule = self._parse_posix_tz(fd) - else: - # TZFile v1 - trans = self._parse_trans_32(fd, hdr.transitions) - type_idx = self._parse_type_idx(fd, hdr.transitions) - types = self._parse_types(fd, hdr.types) - abbrs = self._parse_abbrs(fd, hdr.abbr_size, types) - trule = None - - types = [ - TransitionType(off, is_dst, abbrs[abbr]) for off, is_dst, abbr in types - ] - - transitions = [] - previous = None - for trans, idx in zip(trans, type_idx): - transition = Transition(trans, types[idx], previous) - transitions.append(transition) - - previous = transition - - if not transitions: - transitions.append(Transition(0, types[0], None)) - - return Timezone(transitions, posix_rule=trule, extended=self._extend) - - def _parse_header(self, fd): # type: (...) -> header - buff = self._check_read(fd, 44) - - if buff[:4] != b"TZif": - raise InvalidZoneinfoFile( - 'The file "{}" has an invalid header.'.format(fd.name) - ) - - version = {0x00: 1, 0x32: 2, 0x33: 3}.get(buff[4]) - - if version is None: - raise InvalidZoneinfoFile( - 'The file "{}" has an invalid version.'.format(fd.name) - ) - - hdr = header(version, *unpack(">6l", buff[20:44])) - - return hdr - - def _parse_trans_64(self, fd, n): # type: (IO[Any], int) -> List[int] - trans = [] - for _ in range(n): - buff = self._check_read(fd, 8) - trans.append(unpack(">q", buff)[0]) - - return trans - - def _parse_trans_32(self, fd, n): # type: (IO[Any], int) -> List[int] - trans = [] - for _ in range(n): - buff = self._check_read(fd, 4) - trans.append(unpack(">i", buff)[0]) - - return trans - - def _parse_type_idx(self, fd, n): # type: (IO[Any], int) -> List[int] - buff = self._check_read(fd, n) - - return list(unpack("{}B".format(n), buff)) - - def _parse_types( - self, fd, n - ): # type: (IO[Any], int) -> List[Tuple[Any, bool, int]] - types = [] - - for _ in range(n): - buff = self._check_read(fd, 6) - offset = unpack(">l", buff[:4])[0] - is_dst = buff[4] == 1 - types.append((offset, is_dst, buff[5])) - - return types - - def _parse_abbrs( - self, fd, n, types - ): # type: (IO[Any], int, List[Tuple[Any, bool, int]]) -> Dict[int, str] - abbrs = {} - buff = self._check_read(fd, n) - - for offset, is_dst, idx in types: - if idx not in abbrs: - abbr = buff[idx : buff.find(b"\0", idx)].decode("utf-8") - abbrs[idx] = abbr - - return abbrs - - def _parse_posix_tz(self, fd): # type: (...) -> Optional[PosixTimezone] - s = fd.read().decode("utf-8") - - if not s.startswith("\n") or not s.endswith("\n"): - raise InvalidZoneinfoFile('Invalid posix rule in file "{}"'.format(fd.name)) - - s = s.strip() - - if not s: - return - - return posix_spec(s) diff --git a/pendulum/tz/zoneinfo/timezone.py b/pendulum/tz/zoneinfo/timezone.py deleted file mode 100644 index abdb0ec4..00000000 --- a/pendulum/tz/zoneinfo/timezone.py +++ /dev/null @@ -1,128 +0,0 @@ -from datetime import datetime -from typing import List -from typing import Optional - -from pendulum.constants import DAYS_PER_YEAR -from pendulum.constants import SECS_PER_YEAR -from pendulum.helpers import is_leap -from pendulum.helpers import local_time -from pendulum.helpers import timestamp -from pendulum.helpers import week_day - -from .posix_timezone import PosixTimezone -from .transition import Transition -from .transition_type import TransitionType - - -class Timezone: - def __init__( - self, - transitions, # type: List[Transition] - posix_rule=None, # type: Optional[PosixTimezone] - extended=True, # type: bool - ): - self._posix_rule = posix_rule - self._transitions = transitions - - if extended: - self._extends() - - @property - def transitions(self): # type: () -> List[Transition] - return self._transitions - - @property - def posix_rule(self): - return self._posix_rule - - def _extends(self): - if not self._posix_rule: - return - - posix = self._posix_rule - - if not posix.dst_abbr: - # std only - # The future specification should match the last/default transition - ttype = self._transitions[-1].ttype - if not self._check_ttype(ttype, posix.std_offset, False, posix.std_abbr): - raise ValueError("Posix spec does not match last transition") - - return - - if len(self._transitions) < 2: - raise ValueError("Too few transitions for POSIX spec") - - # Extend the transitions for an additional 400 years - # using the future specification - - # The future specification should match the last two transitions, - # and those transitions should have different is_dst flags. - tr0 = self._transitions[-1] - tr1 = self._transitions[-2] - tt0 = tr0.ttype - tt1 = tr1.ttype - if tt0.is_dst(): - dst = tt0 - std = tt1 - else: - dst = tt1 - std = tt0 - - self._check_ttype(dst, posix.dst_offset, True, posix.dst_abbr) - self._check_ttype(std, posix.std_offset, False, posix.std_abbr) - - # Add the transitions to tr1 and back to tr0 for each extra year. - last_year = local_time(tr0.local, 0, 0)[0] - leap_year = is_leap(last_year) - jan1 = datetime(last_year, 1, 1) - jan1_time = timestamp(jan1) - jan1_weekday = week_day(jan1.year, jan1.month, jan1.day) % 7 - - if local_time(tr1.local, 0, 0)[0] != last_year: - # Add a single extra transition to align to a calendar year. - if tt0.is_dst(): - pt1 = posix.dst_end - else: - pt1 = posix.dst_start - - tr1_offset = pt1.trans_offset(leap_year, jan1_weekday) - tr = Transition(jan1_time + tr1_offset - tt0.offset, tr1.ttype, tr0) - tr0 = tr - tr1 = tr0 - tt0 = tr0.ttype - tt1 = tr1.ttype - - if tt0.is_dst(): - pt1 = posix.dst_end - pt0 = posix.dst_start - else: - pt1 = posix.dst_start - pt0 = posix.dst_end - - tr = tr0 - for year in range(last_year + 1, last_year + 401): - jan1_time += SECS_PER_YEAR[leap_year] - jan1_weekday = (jan1_weekday + DAYS_PER_YEAR[leap_year]) % 7 - leap_year = not leap_year and is_leap(year) - - tr1_offset = pt1.trans_offset(leap_year, jan1_weekday) - tr = Transition(jan1_time + tr1_offset - tt0.offset, tt1, tr) - self._transitions.append(tr) - - tr0_offset = pt0.trans_offset(leap_year, jan1_weekday) - tr = Transition(jan1_time + tr0_offset - tt1.offset, tt0, tr) - self._transitions.append(tr) - - def _check_ttype( - self, - ttype, # type: TransitionType - offset, # type: int - is_dst, # type: bool - abbr, # type: str - ): # type: (...) -> bool - return ( - ttype.offset == offset - and ttype.is_dst() == is_dst - and ttype.abbreviation == abbr - ) diff --git a/pendulum/tz/zoneinfo/transition.py b/pendulum/tz/zoneinfo/transition.py deleted file mode 100644 index dcbd5d31..00000000 --- a/pendulum/tz/zoneinfo/transition.py +++ /dev/null @@ -1,77 +0,0 @@ -from datetime import timedelta -from typing import Optional - -from .transition_type import TransitionType - - -class Transition: - def __init__( - self, - at, # type: int - ttype, # type: TransitionType - previous, # type: Optional[Transition] - ): - self._at = at - - if previous: - self._local = at + previous.ttype.offset - else: - self._local = at + ttype.offset - - self._ttype = ttype - self._previous = previous - - if self.previous: - self._fix = self._ttype.offset - self.previous.ttype.offset - else: - self._fix = 0 - - self._to = self._local + self._fix - self._to_utc = self._at + self._fix - self._utcoffset = timedelta(seconds=ttype.offset) - - @property - def at(self): # type: () -> int - return self._at - - @property - def local(self): # type: () -> int - return self._local - - @property - def to(self): # type: () -> int - return self._to - - @property - def to_utc(self): # type: () -> int - return self._to - - @property - def ttype(self): # type: () -> TransitionType - return self._ttype - - @property - def previous(self): # type: () -> Optional[Transition] - return self._previous - - @property - def fix(self): # type: () -> int - return self._fix - - def is_ambiguous(self, stamp): # type: (int) -> bool - return self._to <= stamp < self._local - - def is_missing(self, stamp): # type: (int) -> bool - return self._local <= stamp < self._to - - def utcoffset(self): # type: () -> timedelta - return self._utcoffset - - def __contains__(self, stamp): # type: (int) -> bool - if self.previous is None: - return stamp < self.local - - return self.previous.local <= stamp < self.local - - def __repr__(self): # type: () -> str - return "Transition({} -> {}, {})".format(self._local, self._to, self._ttype) diff --git a/pendulum/tz/zoneinfo/transition_type.py b/pendulum/tz/zoneinfo/transition_type.py deleted file mode 100644 index a1e79dcc..00000000 --- a/pendulum/tz/zoneinfo/transition_type.py +++ /dev/null @@ -1,29 +0,0 @@ -from datetime import timedelta - - -class TransitionType: - def __init__(self, offset, is_dst, abbr): - self._offset = offset - self._is_dst = is_dst - self._abbr = abbr - - self._utcoffset = timedelta(seconds=offset) - - @property - def offset(self): # type: () -> int - return self._offset - - @property - def abbreviation(self): # type: () -> str - return self._abbr - - def is_dst(self): # type: () -> bool - return self._is_dst - - def utcoffset(self): # type: () -> timedelta - return self._utcoffset - - def __repr__(self): # type: () -> str - return "TransitionType({}, {}, {})".format( - self._offset, self._is_dst, self._abbr - ) diff --git a/pendulum/utils/_compat.py b/pendulum/utils/_compat.py index 11b36acf..4f009988 100644 --- a/pendulum/utils/_compat.py +++ b/pendulum/utils/_compat.py @@ -2,3 +2,12 @@ PYPY = hasattr(sys, "pypy_version_info") + + +try: + from backports import zoneinfo +except ImportError: + import zoneinfo + + +__all__ = ["zoneinfo"] diff --git a/poetry.lock b/poetry.lock index d04fcf70..ddc92ebd 100644 --- a/poetry.lock +++ b/poetry.lock @@ -50,6 +50,20 @@ version = "2.8.0" [package.dependencies] pytz = ">=2015.7" +[[package]] +category = "main" +description = "Backport of the standard library zoneinfo module" +name = "backports.zoneinfo" +optional = false +python-versions = ">=3.6" +version = "0.2.1" + +[package.dependencies] +importlib-resources = {version = "*", markers = "python_version < \"3.7\""} + +[package.extras] +tzdata = ["tzdata"] + [[package]] category = "dev" description = "The uncompromising code formatter." @@ -70,6 +84,24 @@ typed-ast = ">=1.4.0" [package.extras] d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] +[[package]] +category = "dev" +description = "" +develop = true +name = "celest" +optional = false +python-versions = "^3.6" +version = "0.1.0" + +[package.dependencies] +clikit = ">=0.6.2,<0.7.0" +pytest = ">=5.4.1,<6.0.0" + +[package.source] +reference = "" +type = "directory" +url = "../celest" + [[package]] category = "dev" description = "Validate configuration and produce human readable error messages." @@ -200,7 +232,7 @@ docs = ["sphinx", "rst.linker"] testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] [[package]] -category = "dev" +category = "main" description = "Read resources from Python packages" name = "importlib-resources" optional = false @@ -475,23 +507,23 @@ category = "dev" description = "pytest: simple powerful testing with Python" name = "pytest" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -version = "4.6.11" +python-versions = ">=3.5" +version = "5.4.3" [package.dependencies] -atomicwrites = ">=1.0" attrs = ">=17.4.0" +more-itertools = ">=4.0.0" packaging = "*" pluggy = ">=0.12,<1.0" py = ">=1.5.0" -six = ">=1.10.0" wcwidth = "*" -colorama = {version = "*", markers = "sys_platform == \"win32\" and python_version != \"3.4\""} +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} +colorama = {version = "*", markers = "sys_platform == \"win32\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -more-itertools = {version = ">=4.0.0", markers = "python_version > \"2.7\""} [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "nose", "requests", "mock"] +checkqa-mypy = ["mypy (v0.761)"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] category = "dev" @@ -527,14 +559,6 @@ optional = false python-versions = "*" version = "2020.1" -[[package]] -category = "main" -description = "The Olson timezone database for Python." -name = "pytzdata" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2020.1" - [[package]] category = "dev" description = "YAML parser and emitter for Python" @@ -617,6 +641,14 @@ optional = false python-versions = "*" version = "1.4.1" +[[package]] +category = "main" +description = "Provider of IANA time zone data" +name = "tzdata" +optional = false +python-versions = ">=2" +version = "2020.1" + [[package]] category = "dev" description = "Virtual Python Environment builder" @@ -646,7 +678,7 @@ python-versions = "*" version = "0.2.5" [[package]] -category = "dev" +category = "main" description = "Backport of pathlib-compatible object wrapper for zip files" name = "zipp" optional = false @@ -658,7 +690,7 @@ docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["jaraco.itertools", "func-timeout"] [metadata] -content-hash = "1803c93a845e7514237fbc9dc9afe73360a072dbd2c0df1107a5d41ae252baa4" +content-hash = "a72f5f4313061b0420acb03cfbf7627ab9f04e3c547788692de12fdd5924fd08" python-versions = "^3.6" [metadata.files] @@ -682,10 +714,29 @@ babel = [ {file = "Babel-2.8.0-py2.py3-none-any.whl", hash = "sha256:d670ea0b10f8b723672d3a6abeb87b565b244da220d76b4dba1b66269ec152d4"}, {file = "Babel-2.8.0.tar.gz", hash = "sha256:1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38"}, ] +"backports.zoneinfo" = [ + {file = "backports.zoneinfo-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc"}, + {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:89a48c0d158a3cc3f654da4c2de1ceba85263fafb861b98b59040a5086259722"}, + {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:1c5742112073a563c81f786e77514969acb58649bcdf6cdf0b4ed31a348d4546"}, + {file = "backports.zoneinfo-0.2.1-cp36-cp36m-win32.whl", hash = "sha256:e8236383a20872c0cdf5a62b554b27538db7fa1bbec52429d8d106effbaeca08"}, + {file = "backports.zoneinfo-0.2.1-cp36-cp36m-win_amd64.whl", hash = "sha256:8439c030a11780786a2002261569bdf362264f605dfa4d65090b64b05c9f79a7"}, + {file = "backports.zoneinfo-0.2.1-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:f04e857b59d9d1ccc39ce2da1021d196e47234873820cbeaad210724b1ee28ac"}, + {file = "backports.zoneinfo-0.2.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:17746bd546106fa389c51dbea67c8b7c8f0d14b5526a579ca6ccf5ed72c526cf"}, + {file = "backports.zoneinfo-0.2.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5c144945a7752ca544b4b78c8c41544cdfaf9786f25fe5ffb10e838e19a27570"}, + {file = "backports.zoneinfo-0.2.1-cp37-cp37m-win32.whl", hash = "sha256:e55b384612d93be96506932a786bbcde5a2db7a9e6a4bb4bffe8b733f5b9036b"}, + {file = "backports.zoneinfo-0.2.1-cp37-cp37m-win_amd64.whl", hash = "sha256:a76b38c52400b762e48131494ba26be363491ac4f9a04c1b7e92483d169f6582"}, + {file = "backports.zoneinfo-0.2.1-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:8961c0f32cd0336fb8e8ead11a1f8cd99ec07145ec2931122faaac1c8f7fd987"}, + {file = "backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:e81b76cace8eda1fca50e345242ba977f9be6ae3945af8d46326d776b4cf78d1"}, + {file = "backports.zoneinfo-0.2.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7b0a64cda4145548fed9efc10322770f929b944ce5cee6c0dfe0c87bf4c0c8c9"}, + {file = "backports.zoneinfo-0.2.1-cp38-cp38-win32.whl", hash = "sha256:1b13e654a55cd45672cb54ed12148cd33628f672548f373963b0bff67b217328"}, + {file = "backports.zoneinfo-0.2.1-cp38-cp38-win_amd64.whl", hash = "sha256:4a0f800587060bf8880f954dbef70de6c11bbe59c673c3d818921f042f9954a6"}, + {file = "backports.zoneinfo-0.2.1.tar.gz", hash = "sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2"}, +] black = [ {file = "black-19.10b0-py36-none-any.whl", hash = "sha256:1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b"}, {file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, ] +celest = [] cfgv = [ {file = "cfgv-3.0.0-py2.py3-none-any.whl", hash = "sha256:f22b426ed59cd2ab2b54ff96608d846c33dfb8766a67f0b4a6ce130ce244414f"}, {file = "cfgv-3.0.0.tar.gz", hash = "sha256:04b093b14ddf9fd4d17c53ebfd55582d27b76ed30050193c14e560770c5360eb"}, @@ -889,8 +940,8 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-4.6.11-py2.py3-none-any.whl", hash = "sha256:a00a7d79cbbdfa9d21e7d0298392a8dd4123316bfac545075e6f8f24c94d8c97"}, - {file = "pytest-4.6.11.tar.gz", hash = "sha256:50fa82392f2120cc3ec2ca0a75ee615be4c479e66669789771f1758332be4353"}, + {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, + {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, ] pytest-cov = [ {file = "pytest-cov-2.10.0.tar.gz", hash = "sha256:1a629dc9f48e53512fcbfda6b07de490c374b0c83c55ff7a1720b3fccff0ac87"}, @@ -904,10 +955,6 @@ pytz = [ {file = "pytz-2020.1-py2.py3-none-any.whl", hash = "sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed"}, {file = "pytz-2020.1.tar.gz", hash = "sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048"}, ] -pytzdata = [ - {file = "pytzdata-2020.1-py2.py3-none-any.whl", hash = "sha256:e1e14750bcf95016381e4d472bad004eef710f2d6417240904070b3d6654485f"}, - {file = "pytzdata-2020.1.tar.gz", hash = "sha256:3efa13b335a00a8de1d345ae41ec78dd11c9f8807f522d39850f2dd828681540"}, -] pyyaml = [ {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, {file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"}, @@ -994,6 +1041,10 @@ typed-ast = [ {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34"}, {file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"}, ] +tzdata = [ + {file = "tzdata-2020.1-py2.py3-none-any.whl", hash = "sha256:02aa27fe896fbd4d3b530fa1c8a28602dfd890b0c1c8710f3911167c18d4b7ba"}, + {file = "tzdata-2020.1.tar.gz", hash = "sha256:5e0a01117b3dfc9be27ef727e8f39e355e29bbc788bcd8fe2110871df5f9a935"}, +] virtualenv = [ {file = "virtualenv-20.0.26-py2.py3-none-any.whl", hash = "sha256:c11a475400e98450403c0364eb3a2d25d42f71cf1493da64390487b666de4324"}, {file = "virtualenv-20.0.26.tar.gz", hash = "sha256:e10cc66f40cbda459720dfe1d334c4dc15add0d80f09108224f171006a97a172"}, diff --git a/pyproject.toml b/pyproject.toml index b251d385..b8c36998 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,10 +27,11 @@ include = [ [tool.poetry.dependencies] python = "^3.6" python-dateutil = "^2.6" -pytzdata = ">=2020.1" +"backports.zoneinfo" = {version = "^0.2.1", python = ">=3.6,<3.9"} +tzdata = ">=2020.1" [tool.poetry.dev-dependencies] -pytest = "^4.6" +pytest = "^5.4.3" pytest-cov = "^2.5" pytz = ">=2018.3" babel = "^2.5" diff --git a/tests/tz/test_helpers.py b/tests/tz/test_helpers.py index c8b8c920..cc09c473 100644 --- a/tests/tz/test_helpers.py +++ b/tests/tz/test_helpers.py @@ -1,9 +1,9 @@ import pytest from pendulum.tz import timezone +from pendulum.tz.exceptions import InvalidTimezone from pendulum.tz.timezone import FixedTimezone from pendulum.tz.timezone import Timezone -from pendulum.tz.zoneinfo.exceptions import InvalidTimezone def test_timezone_with_name(): diff --git a/tests/tz/test_timezone.py b/tests/tz/test_timezone.py index 8efae423..b9792059 100644 --- a/tests/tz/test_timezone.py +++ b/tests/tz/test_timezone.py @@ -46,7 +46,7 @@ def test_skipped_time_with_pre_rule(): assert dt.year == 2013 assert dt.month == 3 assert dt.day == 31 - assert dt.hour == 1 + assert dt.hour == 2 assert dt.minute == 30 assert dt.second == 45 assert dt.microsecond == 123456 diff --git a/tests/tz/test_timezones.py b/tests/tz/test_timezones.py index 8c90674f..163fc0a1 100644 --- a/tests/tz/test_timezones.py +++ b/tests/tz/test_timezones.py @@ -4,11 +4,11 @@ def test_timezones(): - zones = pendulum.timezones + zones = pendulum.timezones() assert "America/Argentina/Buenos_Aires" in zones -@pytest.mark.parametrize("zone", [zone for zone in pendulum.timezones]) +@pytest.mark.parametrize("zone", [zone for zone in pendulum.timezones()]) def test_timezones_are_loadable(zone): pendulum.timezone(zone) diff --git a/tests/tz/zoneinfo/__init__.py b/tests/tz/zoneinfo/__init__.py deleted file mode 100644 index e69de29b..00000000 diff --git a/tests/tz/zoneinfo/test_posix_timezone.py b/tests/tz/zoneinfo/test_posix_timezone.py deleted file mode 100644 index 41a64587..00000000 --- a/tests/tz/zoneinfo/test_posix_timezone.py +++ /dev/null @@ -1,65 +0,0 @@ -from pendulum.tz.zoneinfo.posix_timezone import JPosixTransition -from pendulum.tz.zoneinfo.posix_timezone import MPosixTransition -from pendulum.tz.zoneinfo.posix_timezone import posix_spec - - -def test_posix_spec_m(): - spec = "CET-1CEST,M3.5.0,M10.5.0/3" - tz = posix_spec(spec) - - assert tz.std_abbr == "CET" - assert tz.std_offset == 3600 - assert tz.dst_abbr == "CEST" - assert tz.dst_offset == 7200 - - assert isinstance(tz.dst_start, MPosixTransition) - assert tz.dst_start.month == 3 - assert tz.dst_start.week == 5 - assert tz.dst_start.weekday == 0 - assert tz.dst_start.offset == 7200 - - assert isinstance(tz.dst_end, MPosixTransition) - assert tz.dst_end.month == 10 - assert tz.dst_end.week == 5 - assert tz.dst_end.weekday == 0 - assert tz.dst_end.offset == 3 * 3600 - - -def test_posix_spec_m_no_abbr(): - spec = "<+12>-12<+13>,M11.1.0,M1.2.1/147" - tz = posix_spec(spec) - - assert tz.std_abbr == "+12" - assert tz.std_offset == 12 * 3600 - assert tz.dst_abbr == "+13" - assert tz.dst_offset == 13 * 3600 - - assert isinstance(tz.dst_start, MPosixTransition) - assert tz.dst_start.month == 11 - assert tz.dst_start.week == 1 - assert tz.dst_start.weekday == 0 - assert tz.dst_start.offset == 7200 - - assert isinstance(tz.dst_end, MPosixTransition) - assert tz.dst_end.month == 1 - assert tz.dst_end.week == 2 - assert tz.dst_end.weekday == 1 - assert tz.dst_end.offset == 147 * 3600 - - -def test_posix_spec_j_no_abbr(): - spec = "<+0330>-3:30<+0430>,J80/0,J264/0" - tz = posix_spec(spec) - - assert tz.std_abbr == "+0330" - assert tz.std_offset == 3 * 3600 + 30 * 60 - assert tz.dst_abbr == "+0430" - assert tz.dst_offset == 4 * 3600 + 30 * 60 - - assert isinstance(tz.dst_start, JPosixTransition) - assert tz.dst_start.day == 80 - assert tz.dst_start.offset == 0 - - assert isinstance(tz.dst_end, JPosixTransition) - assert tz.dst_end.day == 264 - assert tz.dst_end.offset == 0 diff --git a/tests/tz/zoneinfo/test_reader.py b/tests/tz/zoneinfo/test_reader.py deleted file mode 100644 index a19ba9a0..00000000 --- a/tests/tz/zoneinfo/test_reader.py +++ /dev/null @@ -1,46 +0,0 @@ -import os - -import pytest - -from pendulum.tz.zoneinfo.exceptions import InvalidTimezone -from pendulum.tz.zoneinfo.exceptions import InvalidZoneinfoFile -from pendulum.tz.zoneinfo.reader import Reader -from pendulum.tz.zoneinfo.timezone import Timezone - - -def test_read_for_bad_timezone(): - reader = Reader() - with pytest.raises(InvalidTimezone): - reader.read_for("---NOT A TIMEZONE---") - - -def test_read_for_valid(): - reader = Reader() - - tz = reader.read_for("America/Toronto") - assert isinstance(tz, Timezone) - - -def test_read(): - reader = Reader() - local_path = os.path.join(os.path.split(__file__)[0], "..", "..") - tz_file = os.path.join(local_path, "fixtures", "tz", "Paris") - tz = reader.read(tz_file) - - assert len(tz.transitions) > 0 - - -def test_read_invalid(): - reader = Reader() - local_path = os.path.join(os.path.split(__file__)[0], "..") - tz_file = os.path.join(local_path, "fixtures", "tz", "NOT_A_TIMEZONE") - - with pytest.raises(InvalidZoneinfoFile): - reader.read(tz_file) - - -def test_set_transitions_for_no_transition_database_file(): - reader = Reader() - tz = reader.read_for("Etc/UTC") - - assert len(tz.transitions) == 1 From 907469821f7fdc66c93b8bf4faa597801aac5c4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Tue, 29 Jun 2021 10:21:46 +0200 Subject: [PATCH 015/177] Update dependencies --- poetry.lock | 451 +++++++++++++++++++++++++------------------------ pyproject.toml | 2 +- 2 files changed, 233 insertions(+), 220 deletions(-) diff --git a/poetry.lock b/poetry.lock index ddc92ebd..33e3e471 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,37 +1,37 @@ [[package]] -category = "dev" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." name = "appdirs" +version = "1.4.4" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +category = "dev" optional = false python-versions = "*" -version = "1.4.4" [[package]] -category = "dev" -description = "A few extensions to pyyaml." name = "aspy.yaml" +version = "1.3.0" +description = "A few extensions to pyyaml." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.3.0" [package.dependencies] pyyaml = "*" [[package]] -category = "dev" -description = "Atomic file writes." name = "atomicwrites" +version = "1.4.0" +description = "Atomic file writes." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.4.0" [[package]] -category = "dev" -description = "Classes Without Boilerplate" name = "attrs" +version = "19.3.0" +description = "Classes Without Boilerplate" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "19.3.0" [package.extras] azure-pipelines = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "pytest-azurepipelines"] @@ -40,23 +40,23 @@ docs = ["sphinx", "zope.interface"] tests = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] [[package]] -category = "dev" -description = "Internationalization utilities" name = "babel" +version = "2.8.0" +description = "Internationalization utilities" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "2.8.0" [package.dependencies] pytz = ">=2015.7" [[package]] -category = "main" -description = "Backport of the standard library zoneinfo module" name = "backports.zoneinfo" +version = "0.2.1" +description = "Backport of the standard library zoneinfo module" +category = "main" optional = false python-versions = ">=3.6" -version = "0.2.1" [package.dependencies] importlib-resources = {version = "*", markers = "python_version < \"3.7\""} @@ -65,12 +65,12 @@ importlib-resources = {version = "*", markers = "python_version < \"3.7\""} tzdata = ["tzdata"] [[package]] -category = "dev" -description = "The uncompromising code formatter." name = "black" +version = "19.10b0" +description = "The uncompromising code formatter." +category = "dev" optional = false python-versions = ">=3.6" -version = "19.10b0" [package.dependencies] appdirs = "*" @@ -85,144 +85,126 @@ typed-ast = ">=1.4.0" d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] [[package]] -category = "dev" -description = "" -develop = true -name = "celest" -optional = false -python-versions = "^3.6" -version = "0.1.0" - -[package.dependencies] -clikit = ">=0.6.2,<0.7.0" -pytest = ">=5.4.1,<6.0.0" - -[package.source] -reference = "" -type = "directory" -url = "../celest" - -[[package]] -category = "dev" -description = "Validate configuration and produce human readable error messages." name = "cfgv" +version = "3.0.0" +description = "Validate configuration and produce human readable error messages." +category = "dev" optional = false python-versions = ">=3.6" -version = "3.0.0" [[package]] -category = "dev" -description = "Cleo allows you to create beautiful and testable command-line interfaces." name = "cleo" +version = "0.8.1" +description = "Cleo allows you to create beautiful and testable command-line interfaces." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.8.1" [package.dependencies] clikit = ">=0.6.0,<0.7.0" [[package]] -category = "dev" -description = "Composable command line interface toolkit" name = "click" +version = "7.1.2" +description = "Composable command line interface toolkit" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "7.1.2" [[package]] -category = "dev" -description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." name = "clikit" +version = "0.6.2" +description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.6.2" [package.dependencies] +crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} pastel = ">=0.2.0,<0.3.0" pylev = ">=1.3,<2.0" -crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} [[package]] -category = "dev" -description = "Cross-platform colored terminal text." name = "colorama" +version = "0.4.3" +description = "Cross-platform colored terminal text." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.4.3" [[package]] -category = "dev" -description = "Code coverage measurement for Python" name = "coverage" +version = "5.2" +description = "Code coverage measurement for Python" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" -version = "5.2" [package.extras] toml = ["toml"] [[package]] -category = "dev" -description = "Manage Python errors with ease" name = "crashtest" +version = "0.3.0" +description = "Manage Python errors with ease" +category = "dev" optional = false python-versions = ">=3.6,<4.0" -version = "0.3.0" [[package]] -category = "dev" -description = "Distribution utilities" name = "distlib" +version = "0.3.1" +description = "Distribution utilities" +category = "dev" optional = false python-versions = "*" -version = "0.3.1" [[package]] -category = "dev" -description = "A platform independent file lock." name = "filelock" +version = "3.0.12" +description = "A platform independent file lock." +category = "dev" optional = false python-versions = "*" -version = "3.0.12" [[package]] -category = "dev" -description = "Let your Python tests travel through time" name = "freezegun" +version = "0.3.15" +description = "Let your Python tests travel through time" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.3.15" [package.dependencies] python-dateutil = ">=1.0,<2.0 || >2.0" six = "*" [[package]] -category = "dev" -description = "Clean single-source support for Python 3 and 2" name = "future" +version = "0.18.2" +description = "Clean single-source support for Python 3 and 2" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -version = "0.18.2" [[package]] -category = "dev" -description = "File identification library for Python" name = "identify" +version = "1.4.23" +description = "File identification library for Python" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -version = "1.4.23" [package.extras] license = ["editdistance"] [[package]] -category = "dev" -description = "Read metadata from Python packages" name = "importlib-metadata" +version = "1.7.0" +description = "Read metadata from Python packages" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "1.7.0" [package.dependencies] zipp = ">=0.5" @@ -232,12 +214,12 @@ docs = ["sphinx", "rst.linker"] testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] [[package]] -category = "main" -description = "Read resources from Python packages" name = "importlib-resources" +version = "3.0.0" +description = "Read resources from Python packages" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "3.0.0" [package.dependencies] zipp = {version = ">=0.4", markers = "python_version < \"3.8\""} @@ -246,26 +228,26 @@ zipp = {version = ">=0.4", markers = "python_version < \"3.8\""} docs = ["sphinx", "rst.linker", "jaraco.packaging"] [[package]] -category = "dev" -description = "A Python utility / library to sort Python imports." name = "isort" +version = "5.9.1" +description = "A Python utility / library to sort Python imports." +category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "4.3.21" +python-versions = ">=3.6.1,<4.0" [package.extras] -pipfile = ["pipreqs", "requirementslib"] -pyproject = ["toml"] -requirements = ["pipreqs", "pip-api"] -xdg_home = ["appdirs (>=1.4.0)"] +pipfile_deprecated_finder = ["pipreqs", "requirementslib"] +requirements_deprecated_finder = ["pipreqs", "pip-api"] +colors = ["colorama (>=0.4.3,<0.5.0)"] +plugins = ["setuptools"] [[package]] -category = "dev" -description = "A very fast and expressive template engine." name = "jinja2" +version = "2.11.2" +description = "A very fast and expressive template engine." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.11.2" [package.dependencies] MarkupSafe = ">=0.23" @@ -274,48 +256,48 @@ MarkupSafe = ">=0.23" i18n = ["Babel (>=0.8)"] [[package]] -category = "dev" -description = "Lightweight pipelining: using Python functions as pipeline jobs." name = "joblib" +version = "0.16.0" +description = "Lightweight pipelining: using Python functions as pipeline jobs." +category = "dev" optional = false python-versions = ">=3.6" -version = "0.16.0" [[package]] -category = "dev" -description = "Python LiveReload is an awesome tool for web developers" name = "livereload" +version = "2.6.2" +description = "Python LiveReload is an awesome tool for web developers" +category = "dev" optional = false python-versions = "*" -version = "2.6.2" [package.dependencies] six = "*" tornado = {version = "*", markers = "python_version > \"2.7\""} [[package]] -category = "dev" -description = "A Python implementation of Lunr.js" name = "lunr" +version = "0.5.8" +description = "A Python implementation of Lunr.js" +category = "dev" optional = false python-versions = "*" -version = "0.5.8" [package.dependencies] future = ">=0.16.0" -six = ">=1.11.0" nltk = {version = ">=3.2.5", optional = true, markers = "python_version > \"2.7\" and extra == \"languages\""} +six = ">=1.11.0" [package.extras] languages = ["nltk (>=3.2.5,<3.5)", "nltk (>=3.2.5)"] [[package]] -category = "dev" -description = "Python implementation of Markdown." name = "markdown" +version = "3.2.2" +description = "Python implementation of Markdown." +category = "dev" optional = false python-versions = ">=3.5" -version = "3.2.2" [package.dependencies] importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} @@ -324,56 +306,56 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} testing = ["coverage", "pyyaml"] [[package]] -category = "dev" -description = "This is an extension to Python-Markdown which provides an \"include\" function, similar to that found in LaTeX (and also the C pre-processor and Fortran). I originally wrote it for my FORD Fortran auto-documentation generator." name = "markdown-include" +version = "0.5.1" +description = "This is an extension to Python-Markdown which provides an \"include\" function, similar to that found in LaTeX (and also the C pre-processor and Fortran). I originally wrote it for my FORD Fortran auto-documentation generator." +category = "dev" optional = false python-versions = "*" -version = "0.5.1" [package.dependencies] markdown = "*" [[package]] -category = "dev" -description = "Safely add untrusted strings to HTML/XML markup." name = "markupsafe" +version = "1.1.1" +description = "Safely add untrusted strings to HTML/XML markup." +category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" -version = "1.1.1" [[package]] -category = "dev" -description = "Project documentation with Markdown." name = "mkdocs" +version = "1.1.2" +description = "Project documentation with Markdown." +category = "dev" optional = false python-versions = ">=3.5" -version = "1.1.2" [package.dependencies] +click = ">=3.3" Jinja2 = ">=2.10.1" +livereload = ">=2.5.1" +lunr = {version = "0.5.8", extras = ["languages"]} Markdown = ">=3.2.1" PyYAML = ">=3.10" -click = ">=3.3" -livereload = ">=2.5.1" tornado = ">=5.0" -lunr = {version = "0.5.8", extras = ["languages"]} [[package]] -category = "dev" -description = "More routines for operating on iterables, beyond itertools" name = "more-itertools" +version = "8.4.0" +description = "More routines for operating on iterables, beyond itertools" +category = "dev" optional = false python-versions = ">=3.5" -version = "8.4.0" [[package]] -category = "dev" -description = "Natural Language Toolkit" name = "nltk" +version = "3.5" +description = "Natural Language Toolkit" +category = "dev" optional = false python-versions = "*" -version = "3.5" [package.dependencies] click = "*" @@ -390,48 +372,48 @@ tgrep = ["pyparsing"] twitter = ["twython"] [[package]] -category = "dev" -description = "Node.js virtual environment builder" name = "nodeenv" +version = "1.4.0" +description = "Node.js virtual environment builder" +category = "dev" optional = false python-versions = "*" -version = "1.4.0" [[package]] -category = "dev" -description = "Core utilities for Python packages" name = "packaging" +version = "20.4" +description = "Core utilities for Python packages" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "20.4" [package.dependencies] pyparsing = ">=2.0.2" six = "*" [[package]] -category = "dev" -description = "Bring colors to your terminal." name = "pastel" +version = "0.2.0" +description = "Bring colors to your terminal." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.2.0" [[package]] -category = "dev" -description = "Utility library for gitignore style pattern matching of file paths." name = "pathspec" +version = "0.8.0" +description = "Utility library for gitignore style pattern matching of file paths." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "0.8.0" [[package]] -category = "dev" -description = "plugin and hook calling mechanisms for python" name = "pluggy" +version = "0.13.1" +description = "plugin and hook calling mechanisms for python" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "0.13.1" [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} @@ -440,258 +422,259 @@ importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} dev = ["pre-commit", "tox"] [[package]] -category = "dev" -description = "A framework for managing and maintaining multi-language pre-commit hooks." name = "pre-commit" +version = "1.21.0" +description = "A framework for managing and maintaining multi-language pre-commit hooks." +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "1.21.0" [package.dependencies] "aspy.yaml" = "*" cfgv = ">=2.0.0" identify = ">=1.0.0" +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +importlib-resources = {version = "*", markers = "python_version < \"3.7\""} nodeenv = ">=0.11.1" pyyaml = "*" six = "*" toml = "*" virtualenv = ">=15.2" -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} -importlib-resources = {version = "*", markers = "python_version < \"3.7\""} [[package]] -category = "dev" -description = "library with cross-python path, ini-parsing, io, code, log facilities" name = "py" +version = "1.9.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -version = "1.9.0" [[package]] -category = "dev" -description = "Pygments is a syntax highlighting package written in Python." name = "pygments" +version = "2.6.1" +description = "Pygments is a syntax highlighting package written in Python." +category = "dev" optional = false python-versions = ">=3.5" -version = "2.6.1" [[package]] -category = "dev" -description = "A pure Python Levenshtein implementation that's not freaking GPL'd." name = "pylev" +version = "1.3.0" +description = "A pure Python Levenshtein implementation that's not freaking GPL'd." +category = "dev" optional = false python-versions = "*" -version = "1.3.0" [[package]] -category = "dev" -description = "Extension pack for Python Markdown." name = "pymdown-extensions" +version = "6.3" +description = "Extension pack for Python Markdown." +category = "dev" optional = false python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*" -version = "6.3" [package.dependencies] Markdown = ">=3.2" [[package]] -category = "dev" -description = "Python parsing module" name = "pyparsing" +version = "2.4.7" +description = "Python parsing module" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" -version = "2.4.7" [[package]] -category = "dev" -description = "pytest: simple powerful testing with Python" name = "pytest" +version = "5.4.3" +description = "pytest: simple powerful testing with Python" +category = "dev" optional = false python-versions = ">=3.5" -version = "5.4.3" [package.dependencies] +atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} attrs = ">=17.4.0" +colorama = {version = "*", markers = "sys_platform == \"win32\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} more-itertools = ">=4.0.0" packaging = "*" pluggy = ">=0.12,<1.0" py = ">=1.5.0" wcwidth = "*" -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -colorama = {version = "*", markers = "sys_platform == \"win32\""} -importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] -checkqa-mypy = ["mypy (v0.761)"] +checkqa-mypy = ["mypy (==v0.761)"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] -category = "dev" -description = "Pytest plugin for measuring coverage." name = "pytest-cov" +version = "2.10.0" +description = "Pytest plugin for measuring coverage." +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "2.10.0" [package.dependencies] coverage = ">=4.4" pytest = ">=4.6" [package.extras] -testing = ["fields", "hunter", "process-tests (2.0.2)", "six", "pytest-xdist", "virtualenv"] +testing = ["fields", "hunter", "process-tests (==2.0.2)", "six", "pytest-xdist", "virtualenv"] [[package]] -category = "main" -description = "Extensions to the standard Python datetime module" name = "python-dateutil" +version = "2.8.1" +description = "Extensions to the standard Python datetime module" +category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" -version = "2.8.1" [package.dependencies] six = ">=1.5" [[package]] -category = "dev" -description = "World timezone definitions, modern and historical" name = "pytz" +version = "2020.1" +description = "World timezone definitions, modern and historical" +category = "dev" optional = false python-versions = "*" -version = "2020.1" [[package]] -category = "dev" -description = "YAML parser and emitter for Python" name = "pyyaml" +version = "5.3.1" +description = "YAML parser and emitter for Python" +category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -version = "5.3.1" [[package]] -category = "dev" -description = "Alternative regular expression module, to replace re." name = "regex" +version = "2020.6.8" +description = "Alternative regular expression module, to replace re." +category = "dev" optional = false python-versions = "*" -version = "2020.6.8" [[package]] -category = "main" -description = "Python 2 and 3 compatibility utilities" name = "six" +version = "1.15.0" +description = "Python 2 and 3 compatibility utilities" +category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" -version = "1.15.0" [[package]] -category = "dev" -description = "Python Library for Tom's Obvious, Minimal Language" name = "toml" +version = "0.10.1" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" optional = false python-versions = "*" -version = "0.10.1" [[package]] -category = "dev" -description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." name = "tornado" +version = "6.0.4" +description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." +category = "dev" optional = false python-versions = ">= 3.5" -version = "6.0.4" [[package]] -category = "dev" -description = "tox is a generic virtualenv management and test command line tool" name = "tox" +version = "3.16.1" +description = "tox is a generic virtualenv management and test command line tool" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" -version = "3.16.1" [package.dependencies] +colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} filelock = ">=3.0.0" +importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} packaging = ">=14" pluggy = ">=0.12.0" py = ">=1.4.17" six = ">=1.14.0" toml = ">=0.9.4" virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,<20.0.3 || >20.0.3,<20.0.4 || >20.0.4,<20.0.5 || >20.0.5,<20.0.6 || >20.0.6,<20.0.7 || >20.0.7" -colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} -importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} [package.extras] docs = ["sphinx (>=2.0.0)", "towncrier (>=18.5.0)", "pygments-github-lexers (>=0.0.5)", "sphinxcontrib-autoprogram (>=0.1.5)"] testing = ["freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-xdist (>=1.22.2)", "pytest-randomly (>=1.0.0)", "flaky (>=3.4.0)", "psutil (>=5.6.1)"] [[package]] -category = "dev" -description = "Fast, Extensible Progress Meter" name = "tqdm" +version = "4.47.0" +description = "Fast, Extensible Progress Meter" +category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*" -version = "4.47.0" [package.extras] dev = ["py-make (>=0.1.0)", "twine", "argopt", "pydoc-markdown"] [[package]] -category = "dev" -description = "a fork of Python 2 and 3 ast modules with type comment support" name = "typed-ast" +version = "1.4.1" +description = "a fork of Python 2 and 3 ast modules with type comment support" +category = "dev" optional = false python-versions = "*" -version = "1.4.1" [[package]] -category = "main" -description = "Provider of IANA time zone data" name = "tzdata" +version = "2020.1" +description = "Provider of IANA time zone data" +category = "main" optional = false python-versions = ">=2" -version = "2020.1" [[package]] -category = "dev" -description = "Virtual Python Environment builder" name = "virtualenv" +version = "20.0.26" +description = "Virtual Python Environment builder" +category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" -version = "20.0.26" [package.dependencies] appdirs = ">=1.4.3,<2" distlib = ">=0.3.1,<1" filelock = ">=3.0.0,<4" -six = ">=1.9.0,<2" importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} importlib-resources = {version = ">=1.0", markers = "python_version < \"3.7\""} +six = ">=1.9.0,<2" [package.extras] docs = ["sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)", "proselint (>=0.10.2)"] testing = ["pytest (>=4)", "coverage (>=5)", "coverage-enable-subprocess (>=1)", "pytest-xdist (>=1.31.0)", "pytest-mock (>=2)", "pytest-env (>=0.6.2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "pytest-freezegun (>=0.4.1)", "flaky (>=3)", "packaging (>=20.0)", "xonsh (>=0.9.16)"] [[package]] -category = "dev" -description = "Measures the displayed width of unicode strings in a terminal" name = "wcwidth" +version = "0.2.5" +description = "Measures the displayed width of unicode strings in a terminal" +category = "dev" optional = false python-versions = "*" -version = "0.2.5" [[package]] -category = "main" -description = "Backport of pathlib-compatible object wrapper for zip files" name = "zipp" +version = "3.1.0" +description = "Backport of pathlib-compatible object wrapper for zip files" +category = "main" optional = false python-versions = ">=3.6" -version = "3.1.0" [package.extras] docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] testing = ["jaraco.itertools", "func-timeout"] [metadata] -content-hash = "a72f5f4313061b0420acb03cfbf7627ab9f04e3c547788692de12fdd5924fd08" +lock-version = "1.1" python-versions = "^3.6" +content-hash = "525877ba6df700a4a4b43ef600002ae16f0bbea793ff18873c62065d395433af" [metadata.files] appdirs = [ @@ -736,7 +719,6 @@ black = [ {file = "black-19.10b0-py36-none-any.whl", hash = "sha256:1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b"}, {file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, ] -celest = [] cfgv = [ {file = "cfgv-3.0.0-py2.py3-none-any.whl", hash = "sha256:f22b426ed59cd2ab2b54ff96608d846c33dfb8766a67f0b4a6ce130ce244414f"}, {file = "cfgv-3.0.0.tar.gz", hash = "sha256:04b093b14ddf9fd4d17c53ebfd55582d27b76ed30050193c14e560770c5360eb"}, @@ -825,8 +807,8 @@ importlib-resources = [ {file = "importlib_resources-3.0.0.tar.gz", hash = "sha256:19f745a6eca188b490b1428c8d1d4a0d2368759f32370ea8fb89cad2ab1106c3"}, ] isort = [ - {file = "isort-4.3.21-py2.py3-none-any.whl", hash = "sha256:6e811fcb295968434526407adb8796944f1988c5b65e8139058f2014cbe100fd"}, - {file = "isort-4.3.21.tar.gz", hash = "sha256:54da7e92468955c4fceacd0c86bd0ec997b0e1ee80d97f67c35a78b719dccab1"}, + {file = "isort-5.9.1-py3-none-any.whl", hash = "sha256:8e2c107091cfec7286bc0f68a547d0ba4c094d460b732075b6fba674f1035c0c"}, + {file = "isort-5.9.1.tar.gz", hash = "sha256:83510593e07e433b77bd5bff0f6f607dbafa06d1a89022616f02d8b699cfcd56"}, ] jinja2 = [ {file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"}, @@ -869,20 +851,39 @@ markupsafe = [ {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d53bc011414228441014aa71dbec320c66468c1030aae3a6e29778a3382d96e5"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:3b8a6499709d29c2e2399569d96719a1b21dcd94410a586a18526b143ec8470f"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:84dee80c15f1b560d55bcfe6d47b27d070b4681c699c572af2e3c7cc90a3b8e0"}, + {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:b1dba4527182c95a0db8b6060cc98ac49b9e2f5e64320e2b56e47cb2831978c7"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bf5aa3cbcfdf57fa2ee9cd1822c862ef23037f5c832ad09cfea57fa846dec193"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:6fffc775d90dcc9aed1b89219549b329a9250d918fd0b8fa8d93d154918422e1"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a6a744282b7718a2a62d2ed9d993cad6f5f585605ad352c11de459f4108df0a1"}, + {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:195d7d2c4fbb0ee8139a6cf67194f3973a6b3042d742ebe0a9ed36d8b6f0c07f"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:acf08ac40292838b3cbbb06cfe9b2cb9ec78fce8baca31ddb87aaac2e2dc3bc2"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d9be0ba6c527163cbed5e0857c451fcd092ce83947944d6c14bc95441203f032"}, + {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:caabedc8323f1e93231b52fc32bdcde6db817623d33e100708d9a68e1f53b26b"}, {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d73a845f227b0bfe8a7455ee623525ee656a9e2e749e4742706d80a6065d5e2c"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:98bae9582248d6cf62321dcb52aaf5d9adf0bad3b40582925ef7c7f0ed85fceb"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:2beec1e0de6924ea551859edb9e7679da6e4870d32cb766240ce17e0a0ba2014"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:7fed13866cf14bba33e7176717346713881f56d9d2bcebab207f7a036f41b850"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6f1e273a344928347c1290119b493a1f0303c52f5a5eae5f16d74f48c15d4a85"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:feb7b34d6325451ef96bc0e36e1a6c0c1c64bc1fbec4b854f4529e51887b1621"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-win32.whl", hash = "sha256:22c178a091fc6630d0d045bdb5992d2dfe14e3259760e713c490da5323866c39"}, + {file = "MarkupSafe-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7d644ddb4dbd407d31ffb699f1d140bc35478da613b441c582aeb7c43838dd8"}, {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, ] mkdocs = [ @@ -898,6 +899,7 @@ nltk = [ ] nodeenv = [ {file = "nodeenv-1.4.0-py2.py3-none-any.whl", hash = "sha256:4b0b77afa3ba9b54f4b6396e60b0c83f59eaeb2d63dc3cc7a70f7f4af96c82bc"}, + {file = "nodeenv-1.4.0.tar.gz", hash = "sha256:26941644654d8dd5378720e38f62a3bac5f9240811fb3b8913d2663a17baa91c"}, ] packaging = [ {file = "packaging-20.4-py2.py3-none-any.whl", hash = "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181"}, @@ -966,6 +968,8 @@ pyyaml = [ {file = "PyYAML-5.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf"}, {file = "PyYAML-5.3.1-cp38-cp38-win32.whl", hash = "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97"}, {file = "PyYAML-5.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee"}, + {file = "PyYAML-5.3.1-cp39-cp39-win32.whl", hash = "sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a"}, + {file = "PyYAML-5.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e"}, {file = "PyYAML-5.3.1.tar.gz", hash = "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"}, ] regex = [ @@ -1026,19 +1030,28 @@ typed-ast = [ {file = "typed_ast-1.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75"}, {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652"}, {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7"}, + {file = "typed_ast-1.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:fcf135e17cc74dbfbc05894ebca928ffeb23d9790b3167a674921db19082401f"}, {file = "typed_ast-1.4.1-cp36-cp36m-win32.whl", hash = "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1"}, {file = "typed_ast-1.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa"}, {file = "typed_ast-1.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614"}, {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41"}, {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b"}, + {file = "typed_ast-1.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:f208eb7aff048f6bea9586e61af041ddf7f9ade7caed625742af423f6bae3298"}, {file = "typed_ast-1.4.1-cp37-cp37m-win32.whl", hash = "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe"}, {file = "typed_ast-1.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355"}, {file = "typed_ast-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6"}, {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907"}, {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d"}, + {file = "typed_ast-1.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:7e4c9d7658aaa1fc80018593abdf8598bf91325af6af5cce4ce7c73bc45ea53d"}, {file = "typed_ast-1.4.1-cp38-cp38-win32.whl", hash = "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c"}, {file = "typed_ast-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4"}, {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34"}, + {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:92c325624e304ebf0e025d1224b77dd4e6393f18aab8d829b5b7e04afe9b7a2c"}, + {file = "typed_ast-1.4.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:d648b8e3bf2fe648745c8ffcee3db3ff903d0817a01a12dd6a6ea7a8f4889072"}, + {file = "typed_ast-1.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:fac11badff8313e23717f3dada86a15389d0708275bddf766cca67a84ead3e91"}, + {file = "typed_ast-1.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:0d8110d78a5736e16e26213114a38ca35cb15b6515d535413b090bd50951556d"}, + {file = "typed_ast-1.4.1-cp39-cp39-win32.whl", hash = "sha256:b52ccf7cfe4ce2a1064b18594381bccf4179c2ecf7f513134ec2f993dd4ab395"}, + {file = "typed_ast-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:3742b32cf1c6ef124d57f95be609c473d7ec4c14d0090e5a5e05a15269fb4d0c"}, {file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"}, ] tzdata = [ diff --git a/pyproject.toml b/pyproject.toml index b8c36998..b316098a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,7 +38,7 @@ babel = "^2.5" cleo = "^0.8.1" tox = "^3.0" black = { version = "^19.3b0", markers = "implementation_name != 'pypy'" } -isort = "^4.3.21" +isort = {version = "^5.9.1", python = "^3.6.1"} pre-commit = "^1.10" mkdocs = { version = "^1.0", python = "^3.5" } pymdown-extensions = "^6.0" From 39842c1151f1d6777324edbb4fe88c9b6283c06a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Sat, 25 Sep 2021 23:26:15 +0200 Subject: [PATCH 016/177] Fix usage of zoneinfo timezones --- clock | 36 +- pendulum/__init__.py | 14 +- pendulum/_extensions/helpers.py | 1 - pendulum/datetime.py | 47 +- pendulum/formatting/formatter.py | 2 +- pendulum/tz/local_timezone.py | 5 +- pendulum/tz/timezone.py | 66 ++- poetry.lock | 920 ++++++++++++++++-------------- pyproject.toml | 6 +- tests/date/test_diff.py | 3 +- tests/datetime/test_add.py | 5 +- tests/datetime/test_behavior.py | 3 +- tests/datetime/test_construct.py | 15 +- tests/datetime/test_diff.py | 15 +- tests/datetime/test_getters.py | 11 +- tests/datetime/test_sub.py | 5 +- tests/period/test_add_subtract.py | 3 - tests/tz/test_timezone.py | 187 +----- 18 files changed, 628 insertions(+), 716 deletions(-) diff --git a/clock b/clock index 96e226d2..1fea481b 100755 --- a/clock +++ b/clock @@ -16,9 +16,9 @@ from babel.plural import _binary_compiler from babel.plural import _GettextCompiler from babel.plural import _unary_compiler from babel.plural import compile_zero -from cleo import Application -from cleo import Command -from cleo import argument +from cleo.application import Application +from cleo.commands.command import Command +from cleo.helpers import argument from pendulum import __version__ @@ -47,7 +47,7 @@ class _LambdaCompiler(_GettextCompiler): class LocaleCreate(Command): - name = "create" + name = "locale create" description = "Creates locale translations." arguments = [argument("locales", "Locales to dump.", optional=False, multiple=True)] @@ -236,7 +236,7 @@ translations = {{}} class LocaleRecreate(Command): - name = "recreate" + name = "locale recreate" description = "Recreate existing locales." def handle(self): @@ -249,20 +249,9 @@ class LocaleRecreate(Command): self.call("locale:create", [("locales", locales)]) -class LocaleCommand(Command): - - name = "locale" - description = "Locale related commands." - - commands = [LocaleCreate()] - - def handle(self): - self.call("help", self._config.name) - - class WindowsTzDump(Command): - name = "dump-timezones" + name = "windows dump-timezones" description = "Dumps the mapping of Windows timezones to IANA timezones." MAPPING_DIR = os.path.join("pendulum", "tz", "data") @@ -281,21 +270,14 @@ class WindowsTzDump(Command): with open(os.path.join(self.MAPPING_DIR, "windows.py"), "w") as f: f.write(mapping) - -class WindowsCommand(Command): - - name = "windows" - description = "Windows related commands." - - commands = [WindowsTzDump()] - def handle(self): self.call("help", self._config.name) app = Application("clock", __version__) -app.add(LocaleCommand()) -app.add(WindowsCommand()) +app.add(LocaleCreate()) +app.add(LocaleRecreate()) +app.add(WindowsTzDump()) if __name__ == "__main__": diff --git a/pendulum/__init__.py b/pendulum/__init__.py index aa63c908..78f13681 100644 --- a/pendulum/__init__.py +++ b/pendulum/__init__.py @@ -101,7 +101,8 @@ def datetime( second: int = 0, microsecond: int = 0, tz: Optional[Union[str, float, Timezone]] = UTC, - dst_rule: str = POST_TRANSITION, + fold: Optional[int] = 1, + raise_on_unknown_times: bool = False, ) -> DateTime: """ Creates a new DateTime instance from a specific date and time. @@ -109,10 +110,12 @@ def datetime( if tz is not None: tz = _safe_timezone(tz) - dt = _datetime.datetime(year, month, day, hour, minute, second, microsecond) + dt = _datetime.datetime( + year, month, day, hour, minute, second, microsecond, fold=fold + ) if tz is not None: - dt = tz.convert(dt, dst_rule=dst_rule) + dt = tz.convert(dt, raise_on_unknown_times=raise_on_unknown_times) return DateTime( dt.year, @@ -152,11 +155,12 @@ def naive( minute: int = 0, second: int = 0, microsecond: int = 0, + fold: Optional[int] = 1, ) -> DateTime: """ Return a naive DateTime. """ - return DateTime(year, month, day, hour, minute, second, microsecond) + return DateTime(year, month, day, hour, minute, second, microsecond, fold=fold) def date(year: int, month: int, day: int) -> Date: @@ -223,7 +227,7 @@ def now(tz: Optional[Union[str, Timezone]] = None) -> DateTime: else: dt = _datetime.datetime.now(UTC) tz = _safe_timezone(tz) - dt = tz.convert(dt) + dt = dt.astimezone(tz) return DateTime( dt.year, diff --git a/pendulum/_extensions/helpers.py b/pendulum/_extensions/helpers.py index e1eff814..549f3fc3 100644 --- a/pendulum/_extensions/helpers.py +++ b/pendulum/_extensions/helpers.py @@ -197,7 +197,6 @@ def precise_diff( :rtype: PreciseDiff """ - print("DT", d1, d2) sign = 1 if d1 == d2: diff --git a/pendulum/datetime.py b/pendulum/datetime.py index 3b254396..ce171adf 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -175,11 +175,11 @@ def tz(self) -> Optional[Timezone]: return self.timezone @property - def timezone_name(self) -> str: + def timezone_name(self) -> Optional[str]: tz = self.timezone if tz is None: - return None + return return tz.name @@ -191,7 +191,7 @@ def is_local(self) -> bool: return self.offset == self.in_timezone(pendulum.local_timezone()).offset def is_utc(self) -> bool: - return self.offset == UTC.offset + return self.offset == 0 def is_dst(self) -> bool: return self.dst() != datetime.timedelta() @@ -241,7 +241,11 @@ def in_timezone(self, tz: Union[str, Timezone]) -> "DateTime": """ tz = pendulum._safe_timezone(tz) - return tz.convert(self, dst_rule=pendulum.POST_TRANSITION) + dt = self + if not self.timezone: + dt = dt.replace(fold=1) + + return tz.convert(dt) def in_tz(self, tz: Union[str, Timezone]) -> "DateTime": """ @@ -377,7 +381,7 @@ def __repr__(self) -> str: minute=self.minute, second=self.second, us=us, - tzinfo=self.tzinfo, + tzinfo=repr(self.tzinfo), ) # Comparisons @@ -469,8 +473,7 @@ def add( Add a duration to the instance. If we're adding units of variable length (i.e., years, months), - move forward from curren time, - otherwise move forward from utc, for accuracy + move forward from current time, otherwise move forward from utc, for accuracy when moving across DST boundaries. """ units_of_variable_length = any([years, months, weeks, days]) @@ -1170,7 +1173,19 @@ def combine(cls, date: datetime.date, time: datetime.time) -> "DateTime": return pendulum.instance(datetime.datetime.combine(date, time), tz=None) def astimezone(self, tz: Optional[datetime.tzinfo] = None) -> "DateTime": - return pendulum.instance(super(DateTime, self).astimezone(tz)) + dt = super().astimezone(tz) + + return self.__class__( + dt.year, + dt.month, + dt.day, + dt.hour, + dt.minute, + dt.second, + dt.microsecond, + fold=dt.fold, + tzinfo=dt.tzinfo, + ) def replace( self, @@ -1203,22 +1218,8 @@ def replace( if fold is None: fold = self.fold - transition_rule = pendulum.POST_TRANSITION - if fold is not None: - transition_rule = pendulum.PRE_TRANSITION - if fold: - transition_rule = pendulum.POST_TRANSITION - return pendulum.datetime( - year, - month, - day, - hour, - minute, - second, - microsecond, - tz=tzinfo, - dst_rule=transition_rule, + year, month, day, hour, minute, second, microsecond, tz=tzinfo, fold=fold ) def __getnewargs__(self) -> Tuple: diff --git a/pendulum/formatting/formatter.py b/pendulum/formatting/formatter.py index b05b263b..9ffdd285 100644 --- a/pendulum/formatting/formatter.py +++ b/pendulum/formatting/formatter.py @@ -601,7 +601,7 @@ def _get_parsed_value( parsed["tz"] = pendulum.timezone(offset) elif token == "z": # Full timezone - if value not in pendulum.timezones: + if value not in pendulum.timezones(): raise ValueError("Invalid date") parsed["tz"] = pendulum.timezone(value) diff --git a/pendulum/tz/local_timezone.py b/pendulum/tz/local_timezone.py index 9b2856e7..e499444b 100644 --- a/pendulum/tz/local_timezone.py +++ b/pendulum/tz/local_timezone.py @@ -9,6 +9,7 @@ from pendulum.utils._compat import zoneinfo +from .exceptions import InvalidTimezone from .timezone import FixedTimezone from .timezone import Timezone @@ -213,7 +214,7 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone try: return Timezone(os.path.join(*tzpath)) - except zoneinfo.ZoneInfoNotFoundError: + except InvalidTimezone: pass # systemd distributions use symlinks that include the zone name, @@ -228,7 +229,7 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone tzpath.insert(0, parts.pop(0)) try: return Timezone(os.path.join(*tzpath)) - except zoneinfo.ZoneInfoNotFoundError: + except InvalidTimezone: pass # No explicit setting existed. Use localtime diff --git a/pendulum/tz/timezone.py b/pendulum/tz/timezone.py index ff68a4c6..2eb37b50 100644 --- a/pendulum/tz/timezone.py +++ b/pendulum/tz/timezone.py @@ -8,6 +8,10 @@ from pendulum.utils._compat import zoneinfo +from .exceptions import AmbiguousTime +from .exceptions import InvalidTimezone +from .exceptions import NonExistingTime + POST_TRANSITION = "post" PRE_TRANSITION = "pre" @@ -51,11 +55,17 @@ class Timezone(zoneinfo.ZoneInfo, PendulumTimezone): >>> tz = Timezone('Europe/Paris') """ + def __new__(cls, key: str) -> "Timezone": + try: + return super().__new__(cls, key) + except zoneinfo.ZoneInfoNotFoundError: + raise InvalidTimezone(key) + @property def name(self) -> str: return self.key - def convert(self, dt: datetime, dst_rule: Optional[str] = None) -> datetime: + def convert(self, dt: datetime, raise_on_unknown_times: bool = False) -> datetime: """ Converts a datetime in the current timezone. @@ -76,14 +86,30 @@ def convert(self, dt: datetime, dst_rule: Optional[str] = None) -> datetime: >>> in_new_york.isoformat() '2013-03-30T21:30:00-04:00' """ - if dst_rule is not None: - if dst_rule == PRE_TRANSITION and dt.fold != 0: - dt = dt.replace(fold=0) - elif dst_rule == POST_TRANSITION and dt.fold != 1: - dt = dt.replace(fold=1) - if dt.tzinfo is None: - dt = dt.replace(tzinfo=self) + offset_before = ( + self.utcoffset(dt.replace(fold=0)) if dt.fold else self.utcoffset(dt) + ) + offset_after = ( + self.utcoffset(dt) if dt.fold else self.utcoffset(dt.replace(fold=1)) + ) + + if offset_after > offset_before: + # Skipped time + if raise_on_unknown_times: + raise NonExistingTime(dt) + + dt += ( + (offset_after - offset_before) + if dt.fold + else (offset_before - offset_after) + ) + elif offset_before > offset_after: + # Repeated time + if raise_on_unknown_times: + raise AmbiguousTime(dt) + + return dt.replace(tzinfo=self) return dt.astimezone(self) @@ -100,10 +126,13 @@ def datetime( """ Return a normalized datetime for the current timezone. """ - return datetime( - year, month, day, hour, minute, second, microsecond, tzinfo=self, fold=1 + return self.convert( + datetime(year, month, day, hour, minute, second, microsecond, fold=1) ) + def __repr__(self) -> str: + return f"{self.__class__.__name__}('{self.name}')" + class FixedTimezone(tzinfo, PendulumTimezone): def __init__(self, offset: int, name: Optional[str] = None) -> None: @@ -123,7 +152,7 @@ def __init__(self, offset: int, name: Optional[str] = None) -> None: def name(self) -> str: return self._name - def convert(self, dt: datetime, dst_rule: Optional[str] = None) -> datetime: + def convert(self, dt: datetime, raise_on_unknown_times: bool = False) -> datetime: if dt.tzinfo is None: return dt.__class__( dt.year, @@ -137,12 +166,6 @@ def convert(self, dt: datetime, dst_rule: Optional[str] = None) -> datetime: fold=0, ) - if dst_rule is not None: - if dst_rule == PRE_TRANSITION and dt.fold != 0: - dt = dt.replace(fold=0) - elif dst_rule == POST_TRANSITION and dt.fold != 1: - dt = dt.replace(fold=1) - return dt.astimezone(self) def datetime( @@ -179,5 +202,12 @@ def tzname(self, dt: Optional[datetime]) -> Optional[str]: def __getinitargs__(self): # type: () -> tuple return self._offset, self._name + def __repr__(self) -> str: + name = "" + if self._name: + name = f', name="{self._name}"' + + return f"{self.__class__.__name__}({self._offset}{name})" + -UTC = FixedTimezone(0, "UTC") +UTC = Timezone("UTC") diff --git a/poetry.lock b/poetry.lock index 33e3e471..8c6fb975 100644 --- a/poetry.lock +++ b/poetry.lock @@ -27,21 +27,21 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "19.3.0" +version = "21.2.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -azure-pipelines = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "pytest-azurepipelines"] -dev = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface", "sphinx", "pre-commit"] -docs = ["sphinx", "zope.interface"] -tests = ["coverage", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "zope.interface"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] +docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] [[package]] name = "babel" -version = "2.8.0" +version = "2.9.1" description = "Internationalization utilities" category = "dev" optional = false @@ -50,6 +50,21 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [package.dependencies] pytz = ">=2015.7" +[[package]] +name = "backports.entry-points-selectable" +version = "1.1.0" +description = "Compatibility shim providing selectable entry points for older implementations" +category = "dev" +optional = false +python-versions = ">=2.7" + +[package.dependencies] +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-flake8", "pytest-cov", "pytest-black (>=0.3.7)", "pytest-mypy", "pytest-checkdocs (>=2.4)", "pytest-enabler (>=1.0.1)"] + [[package]] name = "backports.zoneinfo" version = "0.2.1" @@ -94,39 +109,31 @@ python-versions = ">=3.6" [[package]] name = "cleo" -version = "0.8.1" +version = "1.0.0a4" description = "Cleo allows you to create beautiful and testable command-line interfaces." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6,<4.0" [package.dependencies] -clikit = ">=0.6.0,<0.7.0" +crashtest = ">=0.3.1,<0.4.0" +pylev = ">=1.3.0,<2.0.0" [[package]] name = "click" -version = "7.1.2" +version = "8.0.1" description = "Composable command line interface toolkit" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[[package]] -name = "clikit" -version = "0.6.2" -description = "CliKit is a group of utilities to build beautiful and testable command line interfaces." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] -crashtest = {version = ">=0.3.0,<0.4.0", markers = "python_version >= \"3.6\" and python_version < \"4.0\""} -pastel = ">=0.2.0,<0.3.0" -pylev = ">=1.3,<2.0" +colorama = {version = "*", markers = "platform_system == \"Windows\""} +importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "colorama" -version = "0.4.3" +version = "0.4.4" description = "Cross-platform colored terminal text." category = "dev" optional = false @@ -134,7 +141,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "coverage" -version = "5.2" +version = "5.5" description = "Code coverage measurement for Python" category = "dev" optional = false @@ -145,7 +152,7 @@ toml = ["toml"] [[package]] name = "crashtest" -version = "0.3.0" +version = "0.3.1" description = "Manage Python errors with ease" category = "dev" optional = false @@ -153,7 +160,7 @@ python-versions = ">=3.6,<4.0" [[package]] name = "distlib" -version = "0.3.1" +version = "0.3.3" description = "Distribution utilities" category = "dev" optional = false @@ -168,28 +175,22 @@ optional = false python-versions = "*" [[package]] -name = "freezegun" -version = "0.3.15" -description = "Let your Python tests travel through time" +name = "ghp-import" +version = "2.0.1" +description = "Copy your docs directly to the gh-pages branch." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = "*" [package.dependencies] -python-dateutil = ">=1.0,<2.0 || >2.0" -six = "*" +python-dateutil = ">=2.8.1" -[[package]] -name = "future" -version = "0.18.2" -description = "Clean single-source support for Python 3 and 2" -category = "dev" -optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +[package.extras] +dev = ["twine", "markdown", "flake8"] [[package]] name = "identify" -version = "1.4.23" +version = "1.6.2" description = "File identification library for Python" category = "dev" optional = false @@ -200,36 +201,39 @@ license = ["editdistance"] [[package]] name = "importlib-metadata" -version = "1.7.0" +version = "4.8.1" description = "Read metadata from Python packages" category = "dev" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6" [package.dependencies] +typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "rst.linker"] -testing = ["packaging", "pep517", "importlib-resources (>=1.3)"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +perf = ["ipython"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "importlib-resources" -version = "3.0.0" +version = "5.2.2" description = "Read resources from Python packages" category = "main" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6" [package.dependencies] -zipp = {version = ">=0.4", markers = "python_version < \"3.8\""} +zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} [package.extras] -docs = ["sphinx", "rst.linker", "jaraco.packaging"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] [[package]] name = "isort" -version = "5.9.1" +version = "5.9.3" description = "A Python utility / library to sort Python imports." category = "dev" optional = false @@ -243,61 +247,25 @@ plugins = ["setuptools"] [[package]] name = "jinja2" -version = "2.11.2" +version = "3.0.1" description = "A very fast and expressive template engine." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" - -[package.dependencies] -MarkupSafe = ">=0.23" - -[package.extras] -i18n = ["Babel (>=0.8)"] - -[[package]] -name = "joblib" -version = "0.16.0" -description = "Lightweight pipelining: using Python functions as pipeline jobs." -category = "dev" -optional = false python-versions = ">=3.6" -[[package]] -name = "livereload" -version = "2.6.2" -description = "Python LiveReload is an awesome tool for web developers" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -six = "*" -tornado = {version = "*", markers = "python_version > \"2.7\""} - -[[package]] -name = "lunr" -version = "0.5.8" -description = "A Python implementation of Lunr.js" -category = "dev" -optional = false -python-versions = "*" - [package.dependencies] -future = ">=0.16.0" -nltk = {version = ">=3.2.5", optional = true, markers = "python_version > \"2.7\" and extra == \"languages\""} -six = ">=1.11.0" +MarkupSafe = ">=2.0" [package.extras] -languages = ["nltk (>=3.2.5,<3.5)", "nltk (>=3.2.5)"] +i18n = ["Babel (>=2.7)"] [[package]] name = "markdown" -version = "3.2.2" +version = "3.3.4" description = "Python implementation of Markdown." category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.dependencies] importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} @@ -318,62 +286,54 @@ markdown = "*" [[package]] name = "markupsafe" -version = "1.1.1" +version = "2.0.1" description = "Safely add untrusted strings to HTML/XML markup." category = "dev" optional = false -python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*" +python-versions = ">=3.6" + +[[package]] +name = "mergedeep" +version = "1.3.4" +description = "A deep merge function for 🐍." +category = "dev" +optional = false +python-versions = ">=3.6" [[package]] name = "mkdocs" -version = "1.1.2" +version = "1.2.2" description = "Project documentation with Markdown." category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.dependencies] click = ">=3.3" +ghp-import = ">=1.0" +importlib-metadata = ">=3.10" Jinja2 = ">=2.10.1" -livereload = ">=2.5.1" -lunr = {version = "0.5.8", extras = ["languages"]} Markdown = ">=3.2.1" +mergedeep = ">=1.3.4" +packaging = ">=20.5" PyYAML = ">=3.10" -tornado = ">=5.0" +pyyaml-env-tag = ">=0.1" +watchdog = ">=2.0" + +[package.extras] +i18n = ["babel (>=2.9.0)"] [[package]] name = "more-itertools" -version = "8.4.0" +version = "8.10.0" description = "More routines for operating on iterables, beyond itertools" category = "dev" optional = false python-versions = ">=3.5" -[[package]] -name = "nltk" -version = "3.5" -description = "Natural Language Toolkit" -category = "dev" -optional = false -python-versions = "*" - -[package.dependencies] -click = "*" -joblib = "*" -regex = "*" -tqdm = "*" - -[package.extras] -all = ["requests", "numpy", "python-crfsuite", "scikit-learn", "twython", "pyparsing", "scipy", "matplotlib", "gensim"] -corenlp = ["requests"] -machine_learning = ["gensim", "numpy", "python-crfsuite", "scikit-learn", "scipy"] -plot = ["matplotlib"] -tgrep = ["pyparsing"] -twitter = ["twython"] - [[package]] name = "nodeenv" -version = "1.4.0" +version = "1.6.0" description = "Node.js virtual environment builder" category = "dev" optional = false @@ -381,31 +341,34 @@ python-versions = "*" [[package]] name = "packaging" -version = "20.4" +version = "21.0" description = "Core utilities for Python packages" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] pyparsing = ">=2.0.2" -six = "*" [[package]] -name = "pastel" -version = "0.2.0" -description = "Bring colors to your terminal." +name = "pathspec" +version = "0.9.0" +description = "Utility library for gitignore style pattern matching of file paths." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [[package]] -name = "pathspec" -version = "0.8.0" -description = "Utility library for gitignore style pattern matching of file paths." +name = "platformdirs" +version = "2.3.0" +description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" + +[package.extras] +docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] +test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] [[package]] name = "pluggy" @@ -443,7 +406,7 @@ virtualenv = ">=15.2" [[package]] name = "py" -version = "1.9.0" +version = "1.10.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" category = "dev" optional = false @@ -451,7 +414,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "pygments" -version = "2.6.1" +version = "2.10.0" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false @@ -459,7 +422,7 @@ python-versions = ">=3.5" [[package]] name = "pylev" -version = "1.3.0" +version = "1.4.0" description = "A pure Python Levenshtein implementation that's not freaking GPL'd." category = "dev" optional = false @@ -509,22 +472,23 @@ testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xm [[package]] name = "pytest-cov" -version = "2.10.0" +version = "2.12.1" description = "Pytest plugin for measuring coverage." category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.dependencies] -coverage = ">=4.4" +coverage = ">=5.2.1" pytest = ">=4.6" +toml = "*" [package.extras] -testing = ["fields", "hunter", "process-tests (==2.0.2)", "six", "pytest-xdist", "virtualenv"] +testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] [[package]] name = "python-dateutil" -version = "2.8.1" +version = "2.8.2" description = "Extensions to the standard Python datetime module" category = "main" optional = false @@ -535,7 +499,7 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2020.1" +version = "2021.1" description = "World timezone definitions, modern and historical" category = "dev" optional = false @@ -543,15 +507,26 @@ python-versions = "*" [[package]] name = "pyyaml" -version = "5.3.1" +version = "5.4.1" description = "YAML parser and emitter for Python" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" + +[[package]] +name = "pyyaml-env-tag" +version = "0.1" +description = "A custom YAML tag for referencing environment variables in YAML files. " +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.dependencies] +pyyaml = "*" [[package]] name = "regex" -version = "2020.6.8" +version = "2021.9.24" description = "Alternative regular expression module, to replace re." category = "dev" optional = false @@ -559,31 +534,34 @@ python-versions = "*" [[package]] name = "six" -version = "1.15.0" +version = "1.16.0" description = "Python 2 and 3 compatibility utilities" category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] -name = "toml" -version = "0.10.1" -description = "Python Library for Tom's Obvious, Minimal Language" +name = "time-machine" +version = "2.4.0" +description = "Travel through time in your tests." category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" + +[package.dependencies] +python-dateutil = "*" [[package]] -name = "tornado" -version = "6.0.4" -description = "Tornado is a Python web framework and asynchronous networking library, originally developed at FriendFeed." +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" category = "dev" optional = false -python-versions = ">= 3.5" +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tox" -version = "3.16.1" +version = "3.24.4" description = "tox is a generic virtualenv management and test command line tool" category = "dev" optional = false @@ -592,7 +570,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] colorama = {version = ">=0.4.1", markers = "platform_system == \"Windows\""} filelock = ">=3.0.0" -importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} packaging = ">=14" pluggy = ">=0.12.0" py = ">=1.4.17" @@ -601,31 +579,28 @@ toml = ">=0.9.4" virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2,<20.0.3 || >20.0.3,<20.0.4 || >20.0.4,<20.0.5 || >20.0.5,<20.0.6 || >20.0.6,<20.0.7 || >20.0.7" [package.extras] -docs = ["sphinx (>=2.0.0)", "towncrier (>=18.5.0)", "pygments-github-lexers (>=0.0.5)", "sphinxcontrib-autoprogram (>=0.1.5)"] -testing = ["freezegun (>=0.3.11)", "pathlib2 (>=2.3.3)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-xdist (>=1.22.2)", "pytest-randomly (>=1.0.0)", "flaky (>=3.4.0)", "psutil (>=5.6.1)"] +docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] +testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "pytest-xdist (>=1.22.2)", "pathlib2 (>=2.3.3)"] [[package]] -name = "tqdm" -version = "4.47.0" -description = "Fast, Extensible Progress Meter" +name = "typed-ast" +version = "1.4.3" +description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*" - -[package.extras] -dev = ["py-make (>=0.1.0)", "twine", "argopt", "pydoc-markdown"] +python-versions = "*" [[package]] -name = "typed-ast" -version = "1.4.1" -description = "a fork of Python 2 and 3 ast modules with type comment support" +name = "typing-extensions" +version = "3.10.0.2" +description = "Backported and Experimental Type Hints for Python 3.5+" category = "dev" optional = false python-versions = "*" [[package]] name = "tzdata" -version = "2020.1" +version = "2021.1" description = "Provider of IANA time zone data" category = "main" optional = false @@ -633,23 +608,35 @@ python-versions = ">=2" [[package]] name = "virtualenv" -version = "20.0.26" +version = "20.8.1" description = "Virtual Python Environment builder" category = "dev" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" +python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] -appdirs = ">=1.4.3,<2" +"backports.entry-points-selectable" = ">=1.0.4" distlib = ">=0.3.1,<1" filelock = ">=3.0.0,<4" -importlib-metadata = {version = ">=0.12,<2", markers = "python_version < \"3.8\""} +importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} importlib-resources = {version = ">=1.0", markers = "python_version < \"3.7\""} +platformdirs = ">=2,<3" six = ">=1.9.0,<2" [package.extras] -docs = ["sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)", "proselint (>=0.10.2)"] -testing = ["pytest (>=4)", "coverage (>=5)", "coverage-enable-subprocess (>=1)", "pytest-xdist (>=1.31.0)", "pytest-mock (>=2)", "pytest-env (>=0.6.2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "pytest-freezegun (>=0.4.1)", "flaky (>=3)", "packaging (>=20.0)", "xonsh (>=0.9.16)"] +docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)"] +testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] + +[[package]] +name = "watchdog" +version = "2.1.5" +description = "Filesystem events monitoring" +category = "dev" +optional = false +python-versions = ">=3.6" + +[package.extras] +watchmedo = ["PyYAML (>=3.10)", "argh (>=0.24.1)"] [[package]] name = "wcwidth" @@ -661,20 +648,20 @@ python-versions = "*" [[package]] name = "zipp" -version = "3.1.0" +version = "3.5.0" description = "Backport of pathlib-compatible object wrapper for zip files" category = "main" optional = false python-versions = ">=3.6" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=3.2)", "rst.linker (>=1.9)"] -testing = ["jaraco.itertools", "func-timeout"] +docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [metadata] lock-version = "1.1" python-versions = "^3.6" -content-hash = "525877ba6df700a4a4b43ef600002ae16f0bbea793ff18873c62065d395433af" +content-hash = "8e30e69fa8012200f013a459ad67ce2f6770a3a01f3fa7c1f848f72b9c50b641" [metadata.files] appdirs = [ @@ -690,12 +677,16 @@ atomicwrites = [ {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, ] attrs = [ - {file = "attrs-19.3.0-py2.py3-none-any.whl", hash = "sha256:08a96c641c3a74e44eb59afb61a24f2cb9f4d7188748e76ba4bb5edfa3cb7d1c"}, - {file = "attrs-19.3.0.tar.gz", hash = "sha256:f7b7ce16570fe9965acd6d30101a28f62fb4a7f9e926b3bbc9b61f8b04247e72"}, + {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, + {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, ] babel = [ - {file = "Babel-2.8.0-py2.py3-none-any.whl", hash = "sha256:d670ea0b10f8b723672d3a6abeb87b565b244da220d76b4dba1b66269ec152d4"}, - {file = "Babel-2.8.0.tar.gz", hash = "sha256:1aac2ae2d0d8ea368fa90906567f5c08463d98ade155c0c4bfedd6a0f7160e38"}, + {file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"}, + {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, +] +"backports.entry-points-selectable" = [ + {file = "backports.entry_points_selectable-1.1.0-py2.py3-none-any.whl", hash = "sha256:a6d9a871cde5e15b4c4a53e3d43ba890cc6861ec1332c9c2428c92f977192acc"}, + {file = "backports.entry_points_selectable-1.1.0.tar.gz", hash = "sha256:988468260ec1c196dab6ae1149260e2f5472c9110334e5d51adcb77867361f6a"}, ] "backports.zoneinfo" = [ {file = "backports.zoneinfo-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc"}, @@ -724,194 +715,173 @@ cfgv = [ {file = "cfgv-3.0.0.tar.gz", hash = "sha256:04b093b14ddf9fd4d17c53ebfd55582d27b76ed30050193c14e560770c5360eb"}, ] cleo = [ - {file = "cleo-0.8.1-py2.py3-none-any.whl", hash = "sha256:141cda6dc94a92343be626bb87a0b6c86ae291dfc732a57bf04310d4b4201753"}, - {file = "cleo-0.8.1.tar.gz", hash = "sha256:3d0e22d30117851b45970b6c14aca4ab0b18b1b53c8af57bed13208147e4069f"}, + {file = "cleo-1.0.0a4-py3-none-any.whl", hash = "sha256:cdd0c3458c15ced3a9f0204b1e53a1b4bee3c56ebcb3ac54c872a56acc657a09"}, + {file = "cleo-1.0.0a4.tar.gz", hash = "sha256:a103a065d031b7d936ee88a6b93086a69bd9c1b40fa2ebfe8c056285a66b481d"}, ] click = [ - {file = "click-7.1.2-py2.py3-none-any.whl", hash = "sha256:dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc"}, - {file = "click-7.1.2.tar.gz", hash = "sha256:d2b5255c7c6349bc1bd1e59e08cd12acbbd63ce649f2588755783aa94dfb6b1a"}, -] -clikit = [ - {file = "clikit-0.6.2-py2.py3-none-any.whl", hash = "sha256:71268e074e68082306e23d7369a7b99f824a0ef926e55ba2665e911f7208489e"}, - {file = "clikit-0.6.2.tar.gz", hash = "sha256:442ee5db9a14120635c5990bcdbfe7c03ada5898291f0c802f77be71569ded59"}, + {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, + {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, ] colorama = [ - {file = "colorama-0.4.3-py2.py3-none-any.whl", hash = "sha256:7d73d2a99753107a36ac6b455ee49046802e59d9d076ef8e47b61499fa29afff"}, - {file = "colorama-0.4.3.tar.gz", hash = "sha256:e96da0d330793e2cb9485e9ddfd918d456036c7149416295932478192f4436a1"}, + {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, + {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] coverage = [ - {file = "coverage-5.2-cp27-cp27m-macosx_10_13_intel.whl", hash = "sha256:d9ad0a988ae20face62520785ec3595a5e64f35a21762a57d115dae0b8fb894a"}, - {file = "coverage-5.2-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:4bb385a747e6ae8a65290b3df60d6c8a692a5599dc66c9fa3520e667886f2e10"}, - {file = "coverage-5.2-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:9702e2cb1c6dec01fb8e1a64c015817c0800a6eca287552c47a5ee0ebddccf62"}, - {file = "coverage-5.2-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:42fa45a29f1059eda4d3c7b509589cc0343cd6bbf083d6118216830cd1a51613"}, - {file = "coverage-5.2-cp27-cp27m-win32.whl", hash = "sha256:41d88736c42f4a22c494c32cc48a05828236e37c991bd9760f8923415e3169e4"}, - {file = "coverage-5.2-cp27-cp27m-win_amd64.whl", hash = "sha256:bbb387811f7a18bdc61a2ea3d102be0c7e239b0db9c83be7bfa50f095db5b92a"}, - {file = "coverage-5.2-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:3740b796015b889e46c260ff18b84683fa2e30f0f75a171fb10d2bf9fb91fc70"}, - {file = "coverage-5.2-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:ebf2431b2d457ae5217f3a1179533c456f3272ded16f8ed0b32961a6d90e38ee"}, - {file = "coverage-5.2-cp35-cp35m-macosx_10_13_x86_64.whl", hash = "sha256:d54d7ea74cc00482a2410d63bf10aa34ebe1c49ac50779652106c867f9986d6b"}, - {file = "coverage-5.2-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:87bdc8135b8ee739840eee19b184804e5d57f518578ffc797f5afa2c3c297913"}, - {file = "coverage-5.2-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:ed9a21502e9223f563e071759f769c3d6a2e1ba5328c31e86830368e8d78bc9c"}, - {file = "coverage-5.2-cp35-cp35m-win32.whl", hash = "sha256:509294f3e76d3f26b35083973fbc952e01e1727656d979b11182f273f08aa80b"}, - {file = "coverage-5.2-cp35-cp35m-win_amd64.whl", hash = "sha256:ca63dae130a2e788f2b249200f01d7fa240f24da0596501d387a50e57aa7075e"}, - {file = "coverage-5.2-cp36-cp36m-macosx_10_13_x86_64.whl", hash = "sha256:5c74c5b6045969b07c9fb36b665c9cac84d6c174a809fc1b21bdc06c7836d9a0"}, - {file = "coverage-5.2-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:c32aa13cc3fe86b0f744dfe35a7f879ee33ac0a560684fef0f3e1580352b818f"}, - {file = "coverage-5.2-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:1e58fca3d9ec1a423f1b7f2aa34af4f733cbfa9020c8fe39ca451b6071237405"}, - {file = "coverage-5.2-cp36-cp36m-win32.whl", hash = "sha256:3b2c34690f613525672697910894b60d15800ac7e779fbd0fccf532486c1ba40"}, - {file = "coverage-5.2-cp36-cp36m-win_amd64.whl", hash = "sha256:a4d511012beb967a39580ba7d2549edf1e6865a33e5fe51e4dce550522b3ac0e"}, - {file = "coverage-5.2-cp37-cp37m-macosx_10_13_x86_64.whl", hash = "sha256:32ecee61a43be509b91a526819717d5e5650e009a8d5eda8631a59c721d5f3b6"}, - {file = "coverage-5.2-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6f91b4492c5cde83bfe462f5b2b997cdf96a138f7c58b1140f05de5751623cf1"}, - {file = "coverage-5.2-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:bfcc811883699ed49afc58b1ed9f80428a18eb9166422bce3c31a53dba00fd1d"}, - {file = "coverage-5.2-cp37-cp37m-win32.whl", hash = "sha256:60a3d36297b65c7f78329b80120f72947140f45b5c7a017ea730f9112b40f2ec"}, - {file = "coverage-5.2-cp37-cp37m-win_amd64.whl", hash = "sha256:12eaccd86d9a373aea59869bc9cfa0ab6ba8b1477752110cb4c10d165474f703"}, - {file = "coverage-5.2-cp38-cp38-macosx_10_13_x86_64.whl", hash = "sha256:d82db1b9a92cb5c67661ca6616bdca6ff931deceebb98eecbd328812dab52032"}, - {file = "coverage-5.2-cp38-cp38-manylinux1_i686.whl", hash = "sha256:214eb2110217f2636a9329bc766507ab71a3a06a8ea30cdeebb47c24dce5972d"}, - {file = "coverage-5.2-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8a3decd12e7934d0254939e2bf434bf04a5890c5bf91a982685021786a08087e"}, - {file = "coverage-5.2-cp38-cp38-win32.whl", hash = "sha256:1dcebae667b73fd4aa69237e6afb39abc2f27520f2358590c1b13dd90e32abe7"}, - {file = "coverage-5.2-cp38-cp38-win_amd64.whl", hash = "sha256:f50632ef2d749f541ca8e6c07c9928a37f87505ce3a9f20c8446ad310f1aa87b"}, - {file = "coverage-5.2-cp39-cp39-macosx_10_13_x86_64.whl", hash = "sha256:7403675df5e27745571aba1c957c7da2dacb537c21e14007ec3a417bf31f7f3d"}, - {file = "coverage-5.2-cp39-cp39-manylinux1_i686.whl", hash = "sha256:0fc4e0d91350d6f43ef6a61f64a48e917637e1dcfcba4b4b7d543c628ef82c2d"}, - {file = "coverage-5.2-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:25fe74b5b2f1b4abb11e103bb7984daca8f8292683957d0738cd692f6a7cc64c"}, - {file = "coverage-5.2-cp39-cp39-win32.whl", hash = "sha256:d67599521dff98ec8c34cd9652cbcfe16ed076a2209625fca9dc7419b6370e5c"}, - {file = "coverage-5.2-cp39-cp39-win_amd64.whl", hash = "sha256:10f2a618a6e75adf64329f828a6a5b40244c1c50f5ef4ce4109e904e69c71bd2"}, - {file = "coverage-5.2.tar.gz", hash = "sha256:1874bdc943654ba46d28f179c1846f5710eda3aeb265ff029e0ac2b52daae404"}, + {file = "coverage-5.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:b6d534e4b2ab35c9f93f46229363e17f63c53ad01330df9f2d6bd1187e5eaacf"}, + {file = "coverage-5.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:b7895207b4c843c76a25ab8c1e866261bcfe27bfaa20c192de5190121770672b"}, + {file = "coverage-5.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:c2723d347ab06e7ddad1a58b2a821218239249a9e4365eaff6649d31180c1669"}, + {file = "coverage-5.5-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:900fbf7759501bc7807fd6638c947d7a831fc9fdf742dc10f02956ff7220fa90"}, + {file = "coverage-5.5-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:004d1880bed2d97151facef49f08e255a20ceb6f9432df75f4eef018fdd5a78c"}, + {file = "coverage-5.5-cp27-cp27m-win32.whl", hash = "sha256:06191eb60f8d8a5bc046f3799f8a07a2d7aefb9504b0209aff0b47298333302a"}, + {file = "coverage-5.5-cp27-cp27m-win_amd64.whl", hash = "sha256:7501140f755b725495941b43347ba8a2777407fc7f250d4f5a7d2a1050ba8e82"}, + {file = "coverage-5.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:372da284cfd642d8e08ef606917846fa2ee350f64994bebfbd3afb0040436905"}, + {file = "coverage-5.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:8963a499849a1fc54b35b1c9f162f4108017b2e6db2c46c1bed93a72262ed083"}, + {file = "coverage-5.5-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:869a64f53488f40fa5b5b9dcb9e9b2962a66a87dab37790f3fcfb5144b996ef5"}, + {file = "coverage-5.5-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:4a7697d8cb0f27399b0e393c0b90f0f1e40c82023ea4d45d22bce7032a5d7b81"}, + {file = "coverage-5.5-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:8d0a0725ad7c1a0bcd8d1b437e191107d457e2ec1084b9f190630a4fb1af78e6"}, + {file = "coverage-5.5-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:51cb9476a3987c8967ebab3f0fe144819781fca264f57f89760037a2ea191cb0"}, + {file = "coverage-5.5-cp310-cp310-win_amd64.whl", hash = "sha256:c0891a6a97b09c1f3e073a890514d5012eb256845c451bd48f7968ef939bf4ae"}, + {file = "coverage-5.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:3487286bc29a5aa4b93a072e9592f22254291ce96a9fbc5251f566b6b7343cdb"}, + {file = "coverage-5.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:deee1077aae10d8fa88cb02c845cfba9b62c55e1183f52f6ae6a2df6a2187160"}, + {file = "coverage-5.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f11642dddbb0253cc8853254301b51390ba0081750a8ac03f20ea8103f0c56b6"}, + {file = "coverage-5.5-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:6c90e11318f0d3c436a42409f2749ee1a115cd8b067d7f14c148f1ce5574d701"}, + {file = "coverage-5.5-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:30c77c1dc9f253283e34c27935fded5015f7d1abe83bc7821680ac444eaf7793"}, + {file = "coverage-5.5-cp35-cp35m-win32.whl", hash = "sha256:9a1ef3b66e38ef8618ce5fdc7bea3d9f45f3624e2a66295eea5e57966c85909e"}, + {file = "coverage-5.5-cp35-cp35m-win_amd64.whl", hash = "sha256:972c85d205b51e30e59525694670de6a8a89691186012535f9d7dbaa230e42c3"}, + {file = "coverage-5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:af0e781009aaf59e25c5a678122391cb0f345ac0ec272c7961dc5455e1c40066"}, + {file = "coverage-5.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:74d881fc777ebb11c63736622b60cb9e4aee5cace591ce274fb69e582a12a61a"}, + {file = "coverage-5.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:92b017ce34b68a7d67bd6d117e6d443a9bf63a2ecf8567bb3d8c6c7bc5014465"}, + {file = "coverage-5.5-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d636598c8305e1f90b439dbf4f66437de4a5e3c31fdf47ad29542478c8508bbb"}, + {file = "coverage-5.5-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:41179b8a845742d1eb60449bdb2992196e211341818565abded11cfa90efb821"}, + {file = "coverage-5.5-cp36-cp36m-win32.whl", hash = "sha256:040af6c32813fa3eae5305d53f18875bedd079960822ef8ec067a66dd8afcd45"}, + {file = "coverage-5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:5fec2d43a2cc6965edc0bb9e83e1e4b557f76f843a77a2496cbe719583ce8184"}, + {file = "coverage-5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:18ba8bbede96a2c3dde7b868de9dcbd55670690af0988713f0603f037848418a"}, + {file = "coverage-5.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:2910f4d36a6a9b4214bb7038d537f015346f413a975d57ca6b43bf23d6563b53"}, + {file = "coverage-5.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f0b278ce10936db1a37e6954e15a3730bea96a0997c26d7fee88e6c396c2086d"}, + {file = "coverage-5.5-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:796c9c3c79747146ebd278dbe1e5c5c05dd6b10cc3bcb8389dfdf844f3ead638"}, + {file = "coverage-5.5-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:53194af30d5bad77fcba80e23a1441c71abfb3e01192034f8246e0d8f99528f3"}, + {file = "coverage-5.5-cp37-cp37m-win32.whl", hash = "sha256:184a47bbe0aa6400ed2d41d8e9ed868b8205046518c52464fde713ea06e3a74a"}, + {file = "coverage-5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:2949cad1c5208b8298d5686d5a85b66aae46d73eec2c3e08c817dd3513e5848a"}, + {file = "coverage-5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:217658ec7187497e3f3ebd901afdca1af062b42cfe3e0dafea4cced3983739f6"}, + {file = "coverage-5.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1aa846f56c3d49205c952d8318e76ccc2ae23303351d9270ab220004c580cfe2"}, + {file = "coverage-5.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:24d4a7de75446be83244eabbff746d66b9240ae020ced65d060815fac3423759"}, + {file = "coverage-5.5-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:d1f8bf7b90ba55699b3a5e44930e93ff0189aa27186e96071fac7dd0d06a1873"}, + {file = "coverage-5.5-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:970284a88b99673ccb2e4e334cfb38a10aab7cd44f7457564d11898a74b62d0a"}, + {file = "coverage-5.5-cp38-cp38-win32.whl", hash = "sha256:01d84219b5cdbfc8122223b39a954820929497a1cb1422824bb86b07b74594b6"}, + {file = "coverage-5.5-cp38-cp38-win_amd64.whl", hash = "sha256:2e0d881ad471768bf6e6c2bf905d183543f10098e3b3640fc029509530091502"}, + {file = "coverage-5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d1f9ce122f83b2305592c11d64f181b87153fc2c2bbd3bb4a3dde8303cfb1a6b"}, + {file = "coverage-5.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:13c4ee887eca0f4c5a247b75398d4114c37882658300e153113dafb1d76de529"}, + {file = "coverage-5.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:52596d3d0e8bdf3af43db3e9ba8dcdaac724ba7b5ca3f6358529d56f7a166f8b"}, + {file = "coverage-5.5-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:2cafbbb3af0733db200c9b5f798d18953b1a304d3f86a938367de1567f4b5bff"}, + {file = "coverage-5.5-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:44d654437b8ddd9eee7d1eaee28b7219bec228520ff809af170488fd2fed3e2b"}, + {file = "coverage-5.5-cp39-cp39-win32.whl", hash = "sha256:d314ed732c25d29775e84a960c3c60808b682c08d86602ec2c3008e1202e3bb6"}, + {file = "coverage-5.5-cp39-cp39-win_amd64.whl", hash = "sha256:13034c4409db851670bc9acd836243aeee299949bd5673e11844befcb0149f03"}, + {file = "coverage-5.5-pp36-none-any.whl", hash = "sha256:f030f8873312a16414c0d8e1a1ddff2d3235655a2174e3648b4fa66b3f2f1079"}, + {file = "coverage-5.5-pp37-none-any.whl", hash = "sha256:2a3859cb82dcbda1cfd3e6f71c27081d18aa251d20a17d87d26d4cd216fb0af4"}, + {file = "coverage-5.5.tar.gz", hash = "sha256:ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"}, ] crashtest = [ - {file = "crashtest-0.3.0-py3-none-any.whl", hash = "sha256:06069a9267c54be31c42b03574b72407bf780e13c82cb0238f24ea69cf25b6dd"}, - {file = "crashtest-0.3.0.tar.gz", hash = "sha256:e9c06cc96400939ab5327123a3f699078eaad8a6283247d7b2ae0f6afffadf14"}, + {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, + {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, ] distlib = [ - {file = "distlib-0.3.1-py2.py3-none-any.whl", hash = "sha256:8c09de2c67b3e7deef7184574fc060ab8a793e7adbb183d942c389c8b13c52fb"}, - {file = "distlib-0.3.1.zip", hash = "sha256:edf6116872c863e1aa9d5bb7cb5e05a022c519a4594dc703843343a9ddd9bff1"}, + {file = "distlib-0.3.3-py2.py3-none-any.whl", hash = "sha256:c8b54e8454e5bf6237cc84c20e8264c3e991e824ef27e8f1e81049867d861e31"}, + {file = "distlib-0.3.3.zip", hash = "sha256:d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05"}, ] filelock = [ {file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"}, {file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"}, ] -freezegun = [ - {file = "freezegun-0.3.15-py2.py3-none-any.whl", hash = "sha256:82c757a05b7c7ca3e176bfebd7d6779fd9139c7cb4ef969c38a28d74deef89b2"}, - {file = "freezegun-0.3.15.tar.gz", hash = "sha256:e2062f2c7f95cc276a834c22f1a17179467176b624cc6f936e8bc3be5535ad1b"}, -] -future = [ - {file = "future-0.18.2.tar.gz", hash = "sha256:b1bead90b70cf6ec3f0710ae53a525360fa360d306a86583adc6bf83a4db537d"}, +ghp-import = [ + {file = "ghp-import-2.0.1.tar.gz", hash = "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483"}, ] identify = [ - {file = "identify-1.4.23-py2.py3-none-any.whl", hash = "sha256:882c4b08b4569517b5f2257ecca180e01f38400a17f429f5d0edff55530c41c7"}, - {file = "identify-1.4.23.tar.gz", hash = "sha256:f89add935982d5bc62913ceee16c9297d8ff14b226e9d3072383a4e38136b656"}, + {file = "identify-1.6.2-py2.py3-none-any.whl", hash = "sha256:8f9879b5b7cca553878d31548a419ec2f227d3328da92fe8202bc5e546d5cbc3"}, + {file = "identify-1.6.2.tar.gz", hash = "sha256:1c2014f6985ed02e62b2e6955578acf069cb2c54859e17853be474bfe7e13bed"}, ] importlib-metadata = [ - {file = "importlib_metadata-1.7.0-py2.py3-none-any.whl", hash = "sha256:dc15b2969b4ce36305c51eebe62d418ac7791e9a157911d58bfb1f9ccd8e2070"}, - {file = "importlib_metadata-1.7.0.tar.gz", hash = "sha256:90bb658cdbbf6d1735b6341ce708fc7024a3e14e99ffdc5783edea9f9b077f83"}, + {file = "importlib_metadata-4.8.1-py3-none-any.whl", hash = "sha256:b618b6d2d5ffa2f16add5697cf57a46c76a56229b0ed1c438322e4e95645bd15"}, + {file = "importlib_metadata-4.8.1.tar.gz", hash = "sha256:f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1"}, ] importlib-resources = [ - {file = "importlib_resources-3.0.0-py2.py3-none-any.whl", hash = "sha256:d028f66b66c0d5732dae86ba4276999855e162a749c92620a38c1d779ed138a7"}, - {file = "importlib_resources-3.0.0.tar.gz", hash = "sha256:19f745a6eca188b490b1428c8d1d4a0d2368759f32370ea8fb89cad2ab1106c3"}, + {file = "importlib_resources-5.2.2-py3-none-any.whl", hash = "sha256:2480d8e07d1890056cb53c96e3de44fead9c62f2ba949b0f2e4c4345f4afa977"}, + {file = "importlib_resources-5.2.2.tar.gz", hash = "sha256:a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b"}, ] isort = [ - {file = "isort-5.9.1-py3-none-any.whl", hash = "sha256:8e2c107091cfec7286bc0f68a547d0ba4c094d460b732075b6fba674f1035c0c"}, - {file = "isort-5.9.1.tar.gz", hash = "sha256:83510593e07e433b77bd5bff0f6f607dbafa06d1a89022616f02d8b699cfcd56"}, + {file = "isort-5.9.3-py3-none-any.whl", hash = "sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2"}, + {file = "isort-5.9.3.tar.gz", hash = "sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899"}, ] jinja2 = [ - {file = "Jinja2-2.11.2-py2.py3-none-any.whl", hash = "sha256:f0a4641d3cf955324a89c04f3d94663aa4d638abe8f733ecd3582848e1c37035"}, - {file = "Jinja2-2.11.2.tar.gz", hash = "sha256:89aab215427ef59c34ad58735269eb58b1a5808103067f7bb9d5836c651b3bb0"}, -] -joblib = [ - {file = "joblib-0.16.0-py3-none-any.whl", hash = "sha256:d348c5d4ae31496b2aa060d6d9b787864dd204f9480baaa52d18850cb43e9f49"}, - {file = "joblib-0.16.0.tar.gz", hash = "sha256:8f52bf24c64b608bf0b2563e0e47d6fcf516abc8cfafe10cfd98ad66d94f92d6"}, -] -livereload = [ - {file = "livereload-2.6.2.tar.gz", hash = "sha256:d1eddcb5c5eb8d2ca1fa1f750e580da624c0f7fcb734aa5780dc81b7dcbd89be"}, -] -lunr = [ - {file = "lunr-0.5.8-py2.py3-none-any.whl", hash = "sha256:aab3f489c4d4fab4c1294a257a30fec397db56f0a50273218ccc3efdbf01d6ca"}, - {file = "lunr-0.5.8.tar.gz", hash = "sha256:c4fb063b98eff775dd638b3df380008ae85e6cb1d1a24d1cd81a10ef6391c26e"}, + {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, + {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, ] markdown = [ - {file = "Markdown-3.2.2-py3-none-any.whl", hash = "sha256:c467cd6233885534bf0fe96e62e3cf46cfc1605112356c4f9981512b8174de59"}, - {file = "Markdown-3.2.2.tar.gz", hash = "sha256:1fafe3f1ecabfb514a5285fca634a53c1b32a81cb0feb154264d55bf2ff22c17"}, + {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, + {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, ] markdown-include = [ {file = "markdown-include-0.5.1.tar.gz", hash = "sha256:72a45461b589489a088753893bc95c5fa5909936186485f4ed55caa57d10250f"}, ] markupsafe = [ - {file = "MarkupSafe-1.1.1-cp27-cp27m-macosx_10_6_intel.whl", hash = "sha256:09027a7803a62ca78792ad89403b1b7a73a01c8cb65909cd876f7fcebd79b161"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:e249096428b3ae81b08327a63a485ad0878de3fb939049038579ac0ef61e17e7"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:500d4957e52ddc3351cabf489e79c91c17f6e0899158447047588650b5e69183"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win32.whl", hash = "sha256:b2051432115498d3562c084a49bba65d97cf251f5a331c64a12ee7e04dacc51b"}, - {file = "MarkupSafe-1.1.1-cp27-cp27m-win_amd64.whl", hash = "sha256:98c7086708b163d425c67c7a91bad6e466bb99d797aa64f965e9d25c12111a5e"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:cd5df75523866410809ca100dc9681e301e3c27567cf498077e8551b6d20e42f"}, - {file = "MarkupSafe-1.1.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:43a55c2930bbc139570ac2452adf3d70cdbb3cfe5912c71cdce1c2c6bbd9c5d1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-macosx_10_6_intel.whl", hash = "sha256:1027c282dad077d0bae18be6794e6b6b8c91d58ed8a8d89a89d59693b9131db5"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_i686.whl", hash = "sha256:62fe6c95e3ec8a7fad637b7f3d372c15ec1caa01ab47926cfdf7a75b40e0eac1"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-manylinux1_x86_64.whl", hash = "sha256:88e5fcfb52ee7b911e8bb6d6aa2fd21fbecc674eadd44118a9cc3863f938e735"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win32.whl", hash = "sha256:ade5e387d2ad0d7ebf59146cc00c8044acbd863725f887353a10df825fc8ae21"}, - {file = "MarkupSafe-1.1.1-cp34-cp34m-win_amd64.whl", hash = "sha256:09c4b7f37d6c648cb13f9230d847adf22f8171b1ccc4d5682398e77f40309235"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-macosx_10_6_intel.whl", hash = "sha256:79855e1c5b8da654cf486b830bd42c06e8780cea587384cf6545b7d9ac013a0b"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:c8716a48d94b06bb3b2524c2b77e055fb313aeb4ea620c8dd03a105574ba704f"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:7c1699dfe0cf8ff607dbdcc1e9b9af1755371f92a68f706051cc8c37d447c905"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win32.whl", hash = "sha256:6dd73240d2af64df90aa7c4e7481e23825ea70af4b4922f8ede5b9e35f78a3b1"}, - {file = "MarkupSafe-1.1.1-cp35-cp35m-win_amd64.whl", hash = "sha256:9add70b36c5666a2ed02b43b335fe19002ee5235efd4b8a89bfcf9005bebac0d"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_6_intel.whl", hash = "sha256:24982cc2533820871eba85ba648cd53d8623687ff11cbb805be4ff7b4c971aff"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:d53bc011414228441014aa71dbec320c66468c1030aae3a6e29778a3382d96e5"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:00bc623926325b26bb9605ae9eae8a215691f33cae5df11ca5424f06f2d1f473"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:717ba8fe3ae9cc0006d7c451f0bb265ee07739daf76355d06366154ee68d221e"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:3b8a6499709d29c2e2399569d96719a1b21dcd94410a586a18526b143ec8470f"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:84dee80c15f1b560d55bcfe6d47b27d070b4681c699c572af2e3c7cc90a3b8e0"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:b1dba4527182c95a0db8b6060cc98ac49b9e2f5e64320e2b56e47cb2831978c7"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win32.whl", hash = "sha256:535f6fc4d397c1563d08b88e485c3496cf5784e927af890fb3c3aac7f933ec66"}, - {file = "MarkupSafe-1.1.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b1282f8c00509d99fef04d8ba936b156d419be841854fe901d8ae224c59f0be5"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_6_intel.whl", hash = "sha256:8defac2f2ccd6805ebf65f5eeb132adcf2ab57aa11fdf4c0dd5169a004710e7d"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bf5aa3cbcfdf57fa2ee9cd1822c862ef23037f5c832ad09cfea57fa846dec193"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:46c99d2de99945ec5cb54f23c8cd5689f6d7177305ebff350a58ce5f8de1669e"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:ba59edeaa2fc6114428f1637ffff42da1e311e29382d81b339c1817d37ec93c6"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:6fffc775d90dcc9aed1b89219549b329a9250d918fd0b8fa8d93d154918422e1"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:a6a744282b7718a2a62d2ed9d993cad6f5f585605ad352c11de459f4108df0a1"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:195d7d2c4fbb0ee8139a6cf67194f3973a6b3042d742ebe0a9ed36d8b6f0c07f"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win32.whl", hash = "sha256:b00c1de48212e4cc9603895652c5c410df699856a2853135b3967591e4beebc2"}, - {file = "MarkupSafe-1.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9bf40443012702a1d2070043cb6291650a0841ece432556f784f004937f0f32c"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:6788b695d50a51edb699cb55e35487e430fa21f1ed838122d722e0ff0ac5ba15"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:cdb132fc825c38e1aeec2c8aa9338310d29d337bebbd7baa06889d09a60a1fa2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:13d3144e1e340870b25e7b10b98d779608c02016d5184cfb9927a9f10c689f42"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:acf08ac40292838b3cbbb06cfe9b2cb9ec78fce8baca31ddb87aaac2e2dc3bc2"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:d9be0ba6c527163cbed5e0857c451fcd092ce83947944d6c14bc95441203f032"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:caabedc8323f1e93231b52fc32bdcde6db817623d33e100708d9a68e1f53b26b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win32.whl", hash = "sha256:596510de112c685489095da617b5bcbbac7dd6384aeebeda4df6025d0256a81b"}, - {file = "MarkupSafe-1.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:e8313f01ba26fbbe36c7be1966a7b7424942f670f38e666995b88d012765b9be"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d73a845f227b0bfe8a7455ee623525ee656a9e2e749e4742706d80a6065d5e2c"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:98bae9582248d6cf62321dcb52aaf5d9adf0bad3b40582925ef7c7f0ed85fceb"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:2beec1e0de6924ea551859edb9e7679da6e4870d32cb766240ce17e0a0ba2014"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:7fed13866cf14bba33e7176717346713881f56d9d2bcebab207f7a036f41b850"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:6f1e273a344928347c1290119b493a1f0303c52f5a5eae5f16d74f48c15d4a85"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:feb7b34d6325451ef96bc0e36e1a6c0c1c64bc1fbec4b854f4529e51887b1621"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-win32.whl", hash = "sha256:22c178a091fc6630d0d045bdb5992d2dfe14e3259760e713c490da5323866c39"}, - {file = "MarkupSafe-1.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7d644ddb4dbd407d31ffb699f1d140bc35478da613b441c582aeb7c43838dd8"}, - {file = "MarkupSafe-1.1.1.tar.gz", hash = "sha256:29872e92839765e546828bb7754a68c418d927cd064fd4708fab9fe9c8bb116b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, + {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, +] +mergedeep = [ + {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, + {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, ] mkdocs = [ - {file = "mkdocs-1.1.2-py3-none-any.whl", hash = "sha256:096f52ff52c02c7e90332d2e53da862fde5c062086e1b5356a6e392d5d60f5e9"}, - {file = "mkdocs-1.1.2.tar.gz", hash = "sha256:f0b61e5402b99d7789efa032c7a74c90a20220a9c81749da06dbfbcbd52ffb39"}, + {file = "mkdocs-1.2.2-py3-none-any.whl", hash = "sha256:d019ff8e17ec746afeb54eb9eb4112b5e959597aebc971da46a5c9486137f0ff"}, + {file = "mkdocs-1.2.2.tar.gz", hash = "sha256:a334f5bd98ec960638511366eb8c5abc9c99b9083a0ed2401d8791b112d6b078"}, ] more-itertools = [ - {file = "more-itertools-8.4.0.tar.gz", hash = "sha256:68c70cc7167bdf5c7c9d8f6954a7837089c6a36bf565383919bb595efb8a17e5"}, - {file = "more_itertools-8.4.0-py3-none-any.whl", hash = "sha256:b78134b2063dd214000685165d81c154522c3ee0a1c0d4d113c80361c234c5a2"}, -] -nltk = [ - {file = "nltk-3.5.zip", hash = "sha256:845365449cd8c5f9731f7cb9f8bd6fd0767553b9d53af9eb1b3abf7700936b35"}, + {file = "more-itertools-8.10.0.tar.gz", hash = "sha256:1debcabeb1df793814859d64a81ad7cb10504c24349368ccf214c664c474f41f"}, + {file = "more_itertools-8.10.0-py3-none-any.whl", hash = "sha256:56ddac45541718ba332db05f464bebfb0768110111affd27f66e0051f276fa43"}, ] nodeenv = [ - {file = "nodeenv-1.4.0-py2.py3-none-any.whl", hash = "sha256:4b0b77afa3ba9b54f4b6396e60b0c83f59eaeb2d63dc3cc7a70f7f4af96c82bc"}, - {file = "nodeenv-1.4.0.tar.gz", hash = "sha256:26941644654d8dd5378720e38f62a3bac5f9240811fb3b8913d2663a17baa91c"}, -] -packaging = [ - {file = "packaging-20.4-py2.py3-none-any.whl", hash = "sha256:998416ba6962ae7fbd6596850b80e17859a5753ba17c32284f67bfff33784181"}, - {file = "packaging-20.4.tar.gz", hash = "sha256:4357f74f47b9c12db93624a82154e9b120fa8293699949152b22065d556079f8"}, -] -pastel = [ - {file = "pastel-0.2.0-py2.py3-none-any.whl", hash = "sha256:18b559dc3ad4ba9b8bd5baebe6503f25f36d21460f021cf27a8d889cb5d17840"}, - {file = "pastel-0.2.0.tar.gz", hash = "sha256:46155fc523bdd4efcd450bbcb3f2b94a6e3b25edc0eb493e081104ad09e1ca36"}, + {file = "nodeenv-1.6.0-py2.py3-none-any.whl", hash = "sha256:621e6b7076565ddcacd2db0294c0381e01fd28945ab36bcf00f41c5daf63bef7"}, + {file = "nodeenv-1.6.0.tar.gz", hash = "sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b"}, ] +packaging = [] pathspec = [ - {file = "pathspec-0.8.0-py2.py3-none-any.whl", hash = "sha256:7d91249d21749788d07a2d0f94147accd8f845507400749ea19c1ec9054a12b0"}, - {file = "pathspec-0.8.0.tar.gz", hash = "sha256:da45173eb3a6f2a5a487efba21f050af2b41948be6ab52b6a1e3ff22bb8b7061"}, + {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, + {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, +] +platformdirs = [ + {file = "platformdirs-2.3.0-py3-none-any.whl", hash = "sha256:8003ac87717ae2c7ee1ea5a84a1a61e87f3fbd16eb5aadba194ea30a9019f648"}, + {file = "platformdirs-2.3.0.tar.gz", hash = "sha256:15b056538719b1c94bdaccb29e5f81879c7f7f0f4a153f46086d155dffcd4f0f"}, ] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, @@ -922,16 +892,16 @@ pre-commit = [ {file = "pre_commit-1.21.0.tar.gz", hash = "sha256:8f48d8637bdae6fa70cc97db9c1dd5aa7c5c8bf71968932a380628c25978b850"}, ] py = [ - {file = "py-1.9.0-py2.py3-none-any.whl", hash = "sha256:366389d1db726cd2fcfc79732e75410e5fe4d31db13692115529d34069a043c2"}, - {file = "py-1.9.0.tar.gz", hash = "sha256:9ca6883ce56b4e8da7e79ac18787889fa5206c79dcc67fb065376cd2fe03f342"}, + {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, + {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, ] pygments = [ - {file = "Pygments-2.6.1-py3-none-any.whl", hash = "sha256:ff7a40b4860b727ab48fad6360eb351cc1b33cbf9b15a0f689ca5353e9463324"}, - {file = "Pygments-2.6.1.tar.gz", hash = "sha256:647344a061c249a3b74e230c739f434d7ea4d8b1d5f3721bc0f3558049b38f44"}, + {file = "Pygments-2.10.0-py3-none-any.whl", hash = "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380"}, + {file = "Pygments-2.10.0.tar.gz", hash = "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6"}, ] pylev = [ - {file = "pylev-1.3.0-py2.py3-none-any.whl", hash = "sha256:1d29a87beb45ebe1e821e7a3b10da2b6b2f4c79b43f482c2df1a1f748a6e114e"}, - {file = "pylev-1.3.0.tar.gz", hash = "sha256:063910098161199b81e453025653ec53556c1be7165a9b7c50be2f4d57eae1c3"}, + {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, + {file = "pylev-1.4.0.tar.gz", hash = "sha256:9e77e941042ad3a4cc305dcdf2b2dec1aec2fbe3dd9015d2698ad02b173006d1"}, ] pymdown-extensions = [ {file = "pymdown-extensions-6.3.tar.gz", hash = "sha256:cb879686a586b22292899771f5e5bc3382808e92aa938f71b550ecdea709419f"}, @@ -946,127 +916,207 @@ pytest = [ {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, ] pytest-cov = [ - {file = "pytest-cov-2.10.0.tar.gz", hash = "sha256:1a629dc9f48e53512fcbfda6b07de490c374b0c83c55ff7a1720b3fccff0ac87"}, - {file = "pytest_cov-2.10.0-py2.py3-none-any.whl", hash = "sha256:6e6d18092dce6fad667cd7020deed816f858ad3b49d5b5e2b1cc1c97a4dba65c"}, -] -python-dateutil = [ - {file = "python-dateutil-2.8.1.tar.gz", hash = "sha256:73ebfe9dbf22e832286dafa60473e4cd239f8592f699aa5adaf10050e6e1823c"}, - {file = "python_dateutil-2.8.1-py2.py3-none-any.whl", hash = "sha256:75bb3f31ea686f1197762692a9ee6a7550b59fc6ca3a1f4b5d7e32fb98e2da2a"}, + {file = "pytest-cov-2.12.1.tar.gz", hash = "sha256:261ceeb8c227b726249b376b8526b600f38667ee314f910353fa318caa01f4d7"}, + {file = "pytest_cov-2.12.1-py2.py3-none-any.whl", hash = "sha256:261bb9e47e65bd099c89c3edf92972865210c36813f80ede5277dceb77a4a62a"}, ] +python-dateutil = [] pytz = [ - {file = "pytz-2020.1-py2.py3-none-any.whl", hash = "sha256:a494d53b6d39c3c6e44c3bec237336e14305e4f29bbf800b599253057fbb79ed"}, - {file = "pytz-2020.1.tar.gz", hash = "sha256:c35965d010ce31b23eeb663ed3cc8c906275d6be1a34393a1d73a41febf4a048"}, + {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, + {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, ] pyyaml = [ - {file = "PyYAML-5.3.1-cp27-cp27m-win32.whl", hash = "sha256:74809a57b329d6cc0fdccee6318f44b9b8649961fa73144a98735b0aaf029f1f"}, - {file = "PyYAML-5.3.1-cp27-cp27m-win_amd64.whl", hash = "sha256:240097ff019d7c70a4922b6869d8a86407758333f02203e0fc6ff79c5dcede76"}, - {file = "PyYAML-5.3.1-cp35-cp35m-win32.whl", hash = "sha256:4f4b913ca1a7319b33cfb1369e91e50354d6f07a135f3b901aca02aa95940bd2"}, - {file = "PyYAML-5.3.1-cp35-cp35m-win_amd64.whl", hash = "sha256:cc8955cfbfc7a115fa81d85284ee61147059a753344bc51098f3ccd69b0d7e0c"}, - {file = "PyYAML-5.3.1-cp36-cp36m-win32.whl", hash = "sha256:7739fc0fa8205b3ee8808aea45e968bc90082c10aef6ea95e855e10abf4a37b2"}, - {file = "PyYAML-5.3.1-cp36-cp36m-win_amd64.whl", hash = "sha256:69f00dca373f240f842b2931fb2c7e14ddbacd1397d57157a9b005a6a9942648"}, - {file = "PyYAML-5.3.1-cp37-cp37m-win32.whl", hash = "sha256:d13155f591e6fcc1ec3b30685d50bf0711574e2c0dfffd7644babf8b5102ca1a"}, - {file = "PyYAML-5.3.1-cp37-cp37m-win_amd64.whl", hash = "sha256:73f099454b799e05e5ab51423c7bcf361c58d3206fa7b0d555426b1f4d9a3eaf"}, - {file = "PyYAML-5.3.1-cp38-cp38-win32.whl", hash = "sha256:06a0d7ba600ce0b2d2fe2e78453a470b5a6e000a985dd4a4e54e436cc36b0e97"}, - {file = "PyYAML-5.3.1-cp38-cp38-win_amd64.whl", hash = "sha256:95f71d2af0ff4227885f7a6605c37fd53d3a106fcab511b8860ecca9fcf400ee"}, - {file = "PyYAML-5.3.1-cp39-cp39-win32.whl", hash = "sha256:ad9c67312c84def58f3c04504727ca879cb0013b2517c85a9a253f0cb6380c0a"}, - {file = "PyYAML-5.3.1-cp39-cp39-win_amd64.whl", hash = "sha256:6034f55dab5fea9e53f436aa68fa3ace2634918e8b5994d82f3621c04ff5ed2e"}, - {file = "PyYAML-5.3.1.tar.gz", hash = "sha256:b8eac752c5e14d3eca0e6dd9199cd627518cb5ec06add0de9d32baeee6fe645d"}, + {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, + {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, + {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, + {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, + {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, + {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, + {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, + {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, + {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, + {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, + {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, + {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, + {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, + {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, + {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, + {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, + {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, + {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, +] +pyyaml-env-tag = [ + {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, + {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] regex = [ - {file = "regex-2020.6.8-cp27-cp27m-win32.whl", hash = "sha256:fbff901c54c22425a5b809b914a3bfaf4b9570eee0e5ce8186ac71eb2025191c"}, - {file = "regex-2020.6.8-cp27-cp27m-win_amd64.whl", hash = "sha256:112e34adf95e45158c597feea65d06a8124898bdeac975c9087fe71b572bd938"}, - {file = "regex-2020.6.8-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:92d8a043a4241a710c1cf7593f5577fbb832cf6c3a00ff3fc1ff2052aff5dd89"}, - {file = "regex-2020.6.8-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:bae83f2a56ab30d5353b47f9b2a33e4aac4de9401fb582b55c42b132a8ac3868"}, - {file = "regex-2020.6.8-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:b2ba0f78b3ef375114856cbdaa30559914d081c416b431f2437f83ce4f8b7f2f"}, - {file = "regex-2020.6.8-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:95fa7726d073c87141f7bbfb04c284901f8328e2d430eeb71b8ffdd5742a5ded"}, - {file = "regex-2020.6.8-cp36-cp36m-win32.whl", hash = "sha256:e3cdc9423808f7e1bb9c2e0bdb1c9dc37b0607b30d646ff6faf0d4e41ee8fee3"}, - {file = "regex-2020.6.8-cp36-cp36m-win_amd64.whl", hash = "sha256:c78e66a922de1c95a208e4ec02e2e5cf0bb83a36ceececc10a72841e53fbf2bd"}, - {file = "regex-2020.6.8-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:08997a37b221a3e27d68ffb601e45abfb0093d39ee770e4257bd2f5115e8cb0a"}, - {file = "regex-2020.6.8-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:2f6f211633ee8d3f7706953e9d3edc7ce63a1d6aad0be5dcee1ece127eea13ae"}, - {file = "regex-2020.6.8-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:55b4c25cbb3b29f8d5e63aeed27b49fa0f8476b0d4e1b3171d85db891938cc3a"}, - {file = "regex-2020.6.8-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:89cda1a5d3e33ec9e231ece7307afc101b5217523d55ef4dc7fb2abd6de71ba3"}, - {file = "regex-2020.6.8-cp37-cp37m-win32.whl", hash = "sha256:690f858d9a94d903cf5cada62ce069b5d93b313d7d05456dbcd99420856562d9"}, - {file = "regex-2020.6.8-cp37-cp37m-win_amd64.whl", hash = "sha256:1700419d8a18c26ff396b3b06ace315b5f2a6e780dad387e4c48717a12a22c29"}, - {file = "regex-2020.6.8-cp38-cp38-manylinux1_i686.whl", hash = "sha256:654cb773b2792e50151f0e22be0f2b6e1c3a04c5328ff1d9d59c0398d37ef610"}, - {file = "regex-2020.6.8-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:52e1b4bef02f4040b2fd547357a170fc1146e60ab310cdbdd098db86e929b387"}, - {file = "regex-2020.6.8-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:cf59bbf282b627130f5ba68b7fa3abdb96372b24b66bdf72a4920e8153fc7910"}, - {file = "regex-2020.6.8-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:5aaa5928b039ae440d775acea11d01e42ff26e1561c0ffcd3d805750973c6baf"}, - {file = "regex-2020.6.8-cp38-cp38-win32.whl", hash = "sha256:97712e0d0af05febd8ab63d2ef0ab2d0cd9deddf4476f7aa153f76feef4b2754"}, - {file = "regex-2020.6.8-cp38-cp38-win_amd64.whl", hash = "sha256:6ad8663c17db4c5ef438141f99e291c4d4edfeaacc0ce28b5bba2b0bf273d9b5"}, - {file = "regex-2020.6.8.tar.gz", hash = "sha256:e9b64e609d37438f7d6e68c2546d2cb8062f3adb27e6336bc129b51be20773ac"}, + {file = "regex-2021.9.24-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0628ed7d6334e8f896f882a5c1240de8c4d9b0dd7c7fb8e9f4692f5684b7d656"}, + {file = "regex-2021.9.24-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3baf3eaa41044d4ced2463fd5d23bf7bd4b03d68739c6c99a59ce1f95599a673"}, + {file = "regex-2021.9.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c000635fd78400a558bd7a3c2981bb2a430005ebaa909d31e6e300719739a949"}, + {file = "regex-2021.9.24-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:295bc8a13554a25ad31e44c4bedabd3c3e28bba027e4feeb9bb157647a2344a7"}, + {file = "regex-2021.9.24-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b0e3f59d3c772f2c3baaef2db425e6fc4149d35a052d874bb95ccfca10a1b9f4"}, + {file = "regex-2021.9.24-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:aea4006b73b555fc5bdb650a8b92cf486d678afa168cf9b38402bb60bf0f9c18"}, + {file = "regex-2021.9.24-cp310-cp310-win32.whl", hash = "sha256:09eb62654030f39f3ba46bc6726bea464069c29d00a9709e28c9ee9623a8da4a"}, + {file = "regex-2021.9.24-cp310-cp310-win_amd64.whl", hash = "sha256:8d80087320632457aefc73f686f66139801959bf5b066b4419b92be85be3543c"}, + {file = "regex-2021.9.24-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:7e3536f305f42ad6d31fc86636c54c7dafce8d634e56fef790fbacb59d499dd5"}, + {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c31f35a984caffb75f00a86852951a337540b44e4a22171354fb760cefa09346"}, + {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c7cb25adba814d5f419733fe565f3289d6fa629ab9e0b78f6dff5fa94ab0456"}, + {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:85c61bee5957e2d7be390392feac7e1d7abd3a49cbaed0c8cee1541b784c8561"}, + {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c94722bf403b8da744b7d0bb87e1f2529383003ceec92e754f768ef9323f69ad"}, + {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6adc1bd68f81968c9d249aab8c09cdc2cbe384bf2d2cb7f190f56875000cdc72"}, + {file = "regex-2021.9.24-cp36-cp36m-win32.whl", hash = "sha256:2054dea683f1bda3a804fcfdb0c1c74821acb968093d0be16233873190d459e3"}, + {file = "regex-2021.9.24-cp36-cp36m-win_amd64.whl", hash = "sha256:7783d89bd5413d183a38761fbc68279b984b9afcfbb39fa89d91f63763fbfb90"}, + {file = "regex-2021.9.24-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b15dc34273aefe522df25096d5d087abc626e388a28a28ac75a4404bb7668736"}, + {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10a7a9cbe30bd90b7d9a1b4749ef20e13a3528e4215a2852be35784b6bd070f0"}, + {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb9f5844db480e2ef9fce3a72e71122dd010ab7b2920f777966ba25f7eb63819"}, + {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:17310b181902e0bb42b29c700e2c2346b8d81f26e900b1328f642e225c88bce1"}, + {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0bba1f6df4eafe79db2ecf38835c2626dbd47911e0516f6962c806f83e7a99ae"}, + {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:821e10b73e0898544807a0692a276e539e5bafe0a055506a6882814b6a02c3ec"}, + {file = "regex-2021.9.24-cp37-cp37m-win32.whl", hash = "sha256:9c371dd326289d85906c27ec2bc1dcdedd9d0be12b543d16e37bad35754bde48"}, + {file = "regex-2021.9.24-cp37-cp37m-win_amd64.whl", hash = "sha256:1e8d1898d4fb817120a5f684363b30108d7b0b46c7261264b100d14ec90a70e7"}, + {file = "regex-2021.9.24-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8a5c2250c0a74428fd5507ae8853706fdde0f23bfb62ee1ec9418eeacf216078"}, + {file = "regex-2021.9.24-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8aec4b4da165c4a64ea80443c16e49e3b15df0f56c124ac5f2f8708a65a0eddc"}, + {file = "regex-2021.9.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:650c4f1fc4273f4e783e1d8e8b51a3e2311c2488ba0fcae6425b1e2c248a189d"}, + {file = "regex-2021.9.24-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2cdb3789736f91d0b3333ac54d12a7e4f9efbc98f53cb905d3496259a893a8b3"}, + {file = "regex-2021.9.24-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e61100200fa6ab7c99b61476f9f9653962ae71b931391d0264acfb4d9527d9c"}, + {file = "regex-2021.9.24-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8c268e78d175798cd71d29114b0a1f1391c7d011995267d3b62319ec1a4ecaa1"}, + {file = "regex-2021.9.24-cp38-cp38-win32.whl", hash = "sha256:658e3477676009083422042c4bac2bdad77b696e932a3de001c42cc046f8eda2"}, + {file = "regex-2021.9.24-cp38-cp38-win_amd64.whl", hash = "sha256:a731552729ee8ae9c546fb1c651c97bf5f759018fdd40d0e9b4d129e1e3a44c8"}, + {file = "regex-2021.9.24-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:86f9931eb92e521809d4b64ec8514f18faa8e11e97d6c2d1afa1bcf6c20a8eab"}, + {file = "regex-2021.9.24-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcbbc9cfa147d55a577d285fd479b43103188855074552708df7acc31a476dd9"}, + {file = "regex-2021.9.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:29385c4dbb3f8b3a55ce13de6a97a3d21bd00de66acd7cdfc0b49cb2f08c906c"}, + {file = "regex-2021.9.24-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c50a6379763c733562b1fee877372234d271e5c78cd13ade5f25978aa06744db"}, + {file = "regex-2021.9.24-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f74b6d8f59f3cfb8237e25c532b11f794b96f5c89a6f4a25857d85f84fbef11"}, + {file = "regex-2021.9.24-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6c4d83d21d23dd854ffbc8154cf293f4e43ba630aa9bd2539c899343d7f59da3"}, + {file = "regex-2021.9.24-cp39-cp39-win32.whl", hash = "sha256:95e89a8558c8c48626dcffdf9c8abac26b7c251d352688e7ab9baf351e1c7da6"}, + {file = "regex-2021.9.24-cp39-cp39-win_amd64.whl", hash = "sha256:835962f432bce92dc9bf22903d46c50003c8d11b1dc64084c8fae63bca98564a"}, + {file = "regex-2021.9.24.tar.gz", hash = "sha256:6266fde576e12357b25096351aac2b4b880b0066263e7bc7a9a1b4307991bb0e"}, ] six = [ - {file = "six-1.15.0-py2.py3-none-any.whl", hash = "sha256:8b74bedcbbbaca38ff6d7491d76f2b06b3592611af620f8426e82dddb04a5ced"}, - {file = "six-1.15.0.tar.gz", hash = "sha256:30639c035cdb23534cd4aa2dd52c3bf48f06e5f4a941509c8bafd8ce11080259"}, + {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, + {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] -toml = [ - {file = "toml-0.10.1-py2.py3-none-any.whl", hash = "sha256:bda89d5935c2eac546d648028b9901107a595863cb36bae0c73ac804a9b4ce88"}, - {file = "toml-0.10.1.tar.gz", hash = "sha256:926b612be1e5ce0634a2ca03470f95169cf16f939018233a670519cb4ac58b0f"}, +time-machine = [ + {file = "time-machine-2.4.0.tar.gz", hash = "sha256:fd6afc71615c3034e842b0ca8f7c16176edf91651a96a9f5e6e2988c76cb88bb"}, + {file = "time_machine-2.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:51247349a5d73b61af89e85f6c8c7b36cbaf2bca707704e8cc7e3b4646665af3"}, + {file = "time_machine-2.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6a15296c71cf68300da7e29a5fe0c4ed711c22bfa23bb78b8f25150e6c26bf98"}, + {file = "time_machine-2.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99160a02c2a73ee8c9bcfd095b8289fe22f498f25605566ca78bd87b284ddaef"}, + {file = "time_machine-2.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:95d9d34ca1efce944cefeebe2f3a828b95c18db1a3505384049bd50b2f179d01"}, + {file = "time_machine-2.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a429a95f2b7ed26a3c23cc6381ad133b521dcaa90f243f43c841e131b43a3256"}, + {file = "time_machine-2.4.0-cp310-cp310-win32.whl", hash = "sha256:8a3666284ed72af1320a8a247c042e04a6a6e53ca779ee09af9fb7334cb810bf"}, + {file = "time_machine-2.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:932c52e7c7a7b5f7cdb163330fcd3064c9ba13b4243bd9d9c86fca9e4ee57879"}, + {file = "time_machine-2.4.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:692ce7c249761d5fb8244aa80ee97e57a43ce55d37f9d467028b8a8dea89ab93"}, + {file = "time_machine-2.4.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7e9fd6e24804c4cfa430fd6869d13e67cc16acfbfe411813431e8878ef01bc0c"}, + {file = "time_machine-2.4.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6802ad8188bd0dac9017928da71be42e39a8272eb0d33d98fe9d66ccc478816f"}, + {file = "time_machine-2.4.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:87b464aead70aaa645801f4774ea72e1f7e6cd399a3a87aa8c5e822689c9224f"}, + {file = "time_machine-2.4.0-cp36-cp36m-win32.whl", hash = "sha256:998b90b18c81949d7fa8c11cc3c530d8255c56ecd9afa29190c1057312611bcb"}, + {file = "time_machine-2.4.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a8192771f0d1b590a3b65e983ad818403a69261376c94b4a297a4e3d7cd7dfc1"}, + {file = "time_machine-2.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bb2955a4660e732f6d3eadf567f92a064c1f36589dd30382d25c4150b4a957fb"}, + {file = "time_machine-2.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe1cb15d7b8a2ac198499d54e911861b5702c49663f5a19812afb9167cd31aeb"}, + {file = "time_machine-2.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c9b25c3fd2e434d07e4f16425ac12a8926f669d77f70aa38c7148557db5e2675"}, + {file = "time_machine-2.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1018e9b0176e65d1c715cbc6bc992c3f7400ace561168c84056f90feadfd02b3"}, + {file = "time_machine-2.4.0-cp37-cp37m-win32.whl", hash = "sha256:de30b0f5389990f8bc2461bb8f20d9ee1c61f715465e0fd5cfb777bff4ecc4d8"}, + {file = "time_machine-2.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:30317429404d40f71070aae225c29af035918529080544ab16fe8b5ad39d7993"}, + {file = "time_machine-2.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:dfa1f919783ee01e949a571984db36af67cab81e58424b5fe05d3def303f6e93"}, + {file = "time_machine-2.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8697e7b64079670b5d59c07b764f87114f3dde0f12e3ee63df587b4c4a39fb0b"}, + {file = "time_machine-2.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48a8cb5a5e2f0ede8dc09dbffce2bb34abc41c6c3cd45fc4a39807a4a36bebcf"}, + {file = "time_machine-2.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:b86bec9ac4a7b91f94c5fd99f9713e0a51de573d4bc96afc78d21ef2f424c8eb"}, + {file = "time_machine-2.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f14ae1cb34934a7ec904cedd326cd3bca74bcfb2cd12cd3d9772cd049f5cf9db"}, + {file = "time_machine-2.4.0-cp38-cp38-win32.whl", hash = "sha256:5b799ec56fb680e2feddc92a9f07cb955fa581161acb64def953a9b3aaa8d179"}, + {file = "time_machine-2.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:6d3a1222524360387a4c7e76fd5b89d0fc69e0acdff12ce48ae75974de059498"}, + {file = "time_machine-2.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f91bb3dcf81d403cedb7ba4864e6f872d54f3b140a7ee19045f621ea79ef31fd"}, + {file = "time_machine-2.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6259e4e78c75ee3355b99483d47095ea89debb3360eb2523a0cdfe1015d7a89d"}, + {file = "time_machine-2.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3ed27458c9cfcfd2fdfeee54696df09637a54ad3e43d2c66ae8295445ea6061"}, + {file = "time_machine-2.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:97465a07270e329d0b943586a51bdc8d9cbc2f1d373c917b3a857a260ddce643"}, + {file = "time_machine-2.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:335aac3bc11262b0aa1a4c188d7caaa1c6b024cf4d4275380b2541e7e1a96661"}, + {file = "time_machine-2.4.0-cp39-cp39-win32.whl", hash = "sha256:a65552ef646bb650db3f0a67c6d347f9148ae2f8100d81ade356f15563049c41"}, + {file = "time_machine-2.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:9a0c2c089f0710664302e308a024780e050fe4a397606833942ff1048c500974"}, ] -tornado = [ - {file = "tornado-6.0.4-cp35-cp35m-win32.whl", hash = "sha256:5217e601700f24e966ddab689f90b7ea4bd91ff3357c3600fa1045e26d68e55d"}, - {file = "tornado-6.0.4-cp35-cp35m-win_amd64.whl", hash = "sha256:c98232a3ac391f5faea6821b53db8db461157baa788f5d6222a193e9456e1740"}, - {file = "tornado-6.0.4-cp36-cp36m-win32.whl", hash = "sha256:5f6a07e62e799be5d2330e68d808c8ac41d4a259b9cea61da4101b83cb5dc673"}, - {file = "tornado-6.0.4-cp36-cp36m-win_amd64.whl", hash = "sha256:c952975c8ba74f546ae6de2e226ab3cc3cc11ae47baf607459a6728585bb542a"}, - {file = "tornado-6.0.4-cp37-cp37m-win32.whl", hash = "sha256:2c027eb2a393d964b22b5c154d1a23a5f8727db6fda837118a776b29e2b8ebc6"}, - {file = "tornado-6.0.4-cp37-cp37m-win_amd64.whl", hash = "sha256:5618f72e947533832cbc3dec54e1dffc1747a5cb17d1fd91577ed14fa0dc081b"}, - {file = "tornado-6.0.4-cp38-cp38-win32.whl", hash = "sha256:22aed82c2ea340c3771e3babc5ef220272f6fd06b5108a53b4976d0d722bcd52"}, - {file = "tornado-6.0.4-cp38-cp38-win_amd64.whl", hash = "sha256:c58d56003daf1b616336781b26d184023ea4af13ae143d9dda65e31e534940b9"}, - {file = "tornado-6.0.4.tar.gz", hash = "sha256:0fe2d45ba43b00a41cd73f8be321a44936dc1aba233dee979f17a042b83eb6dc"}, +toml = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tox = [ - {file = "tox-3.16.1-py2.py3-none-any.whl", hash = "sha256:60c3793f8ab194097ec75b5a9866138444f63742b0f664ec80be1222a40687c5"}, - {file = "tox-3.16.1.tar.gz", hash = "sha256:9a746cda9cadb9e1e05c7ab99f98cfcea355140d2ecac5f97520be94657c3bc7"}, -] -tqdm = [ - {file = "tqdm-4.47.0-py2.py3-none-any.whl", hash = "sha256:7810e627bcf9d983a99d9ff8a0c09674400fd2927eddabeadf153c14a2ec8656"}, - {file = "tqdm-4.47.0.tar.gz", hash = "sha256:63ef7a6d3eb39f80d6b36e4867566b3d8e5f1fe3d6cb50c5e9ede2b3198ba7b7"}, + {file = "tox-3.24.4-py2.py3-none-any.whl", hash = "sha256:5e274227a53dc9ef856767c21867377ba395992549f02ce55eb549f9fb9a8d10"}, + {file = "tox-3.24.4.tar.gz", hash = "sha256:c30b57fa2477f1fb7c36aa1d83292d5c2336cd0018119e1b1c17340e2c2708ca"}, ] typed-ast = [ - {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:73d785a950fc82dd2a25897d525d003f6378d1cb23ab305578394694202a58c3"}, - {file = "typed_ast-1.4.1-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:aaee9905aee35ba5905cfb3c62f3e83b3bec7b39413f0a7f19be4e547ea01ebb"}, - {file = "typed_ast-1.4.1-cp35-cp35m-win32.whl", hash = "sha256:0c2c07682d61a629b68433afb159376e24e5b2fd4641d35424e462169c0a7919"}, - {file = "typed_ast-1.4.1-cp35-cp35m-win_amd64.whl", hash = "sha256:4083861b0aa07990b619bd7ddc365eb7fa4b817e99cf5f8d9cf21a42780f6e01"}, - {file = "typed_ast-1.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:269151951236b0f9a6f04015a9004084a5ab0d5f19b57de779f908621e7d8b75"}, - {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:24995c843eb0ad11a4527b026b4dde3da70e1f2d8806c99b7b4a7cf491612652"}, - {file = "typed_ast-1.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:fe460b922ec15dd205595c9b5b99e2f056fd98ae8f9f56b888e7a17dc2b757e7"}, - {file = "typed_ast-1.4.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:fcf135e17cc74dbfbc05894ebca928ffeb23d9790b3167a674921db19082401f"}, - {file = "typed_ast-1.4.1-cp36-cp36m-win32.whl", hash = "sha256:4e3e5da80ccbebfff202a67bf900d081906c358ccc3d5e3c8aea42fdfdfd51c1"}, - {file = "typed_ast-1.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:249862707802d40f7f29f6e1aad8d84b5aa9e44552d2cc17384b209f091276aa"}, - {file = "typed_ast-1.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:8ce678dbaf790dbdb3eba24056d5364fb45944f33553dd5869b7580cdbb83614"}, - {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:c9e348e02e4d2b4a8b2eedb48210430658df6951fa484e59de33ff773fbd4b41"}, - {file = "typed_ast-1.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:bcd3b13b56ea479b3650b82cabd6b5343a625b0ced5429e4ccad28a8973f301b"}, - {file = "typed_ast-1.4.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:f208eb7aff048f6bea9586e61af041ddf7f9ade7caed625742af423f6bae3298"}, - {file = "typed_ast-1.4.1-cp37-cp37m-win32.whl", hash = "sha256:d5d33e9e7af3b34a40dc05f498939f0ebf187f07c385fd58d591c533ad8562fe"}, - {file = "typed_ast-1.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:0666aa36131496aed8f7be0410ff974562ab7eeac11ef351def9ea6fa28f6355"}, - {file = "typed_ast-1.4.1-cp38-cp38-macosx_10_15_x86_64.whl", hash = "sha256:d205b1b46085271b4e15f670058ce182bd1199e56b317bf2ec004b6a44f911f6"}, - {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:6daac9731f172c2a22ade6ed0c00197ee7cc1221aa84cfdf9c31defeb059a907"}, - {file = "typed_ast-1.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:498b0f36cc7054c1fead3d7fc59d2150f4d5c6c56ba7fb150c013fbc683a8d2d"}, - {file = "typed_ast-1.4.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:7e4c9d7658aaa1fc80018593abdf8598bf91325af6af5cce4ce7c73bc45ea53d"}, - {file = "typed_ast-1.4.1-cp38-cp38-win32.whl", hash = "sha256:715ff2f2df46121071622063fc7543d9b1fd19ebfc4f5c8895af64a77a8c852c"}, - {file = "typed_ast-1.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc0fea399acb12edbf8a628ba8d2312f583bdbdb3335635db062fa98cf71fca4"}, - {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:d43943ef777f9a1c42bf4e552ba23ac77a6351de620aa9acf64ad54933ad4d34"}, - {file = "typed_ast-1.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:92c325624e304ebf0e025d1224b77dd4e6393f18aab8d829b5b7e04afe9b7a2c"}, - {file = "typed_ast-1.4.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:d648b8e3bf2fe648745c8ffcee3db3ff903d0817a01a12dd6a6ea7a8f4889072"}, - {file = "typed_ast-1.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:fac11badff8313e23717f3dada86a15389d0708275bddf766cca67a84ead3e91"}, - {file = "typed_ast-1.4.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:0d8110d78a5736e16e26213114a38ca35cb15b6515d535413b090bd50951556d"}, - {file = "typed_ast-1.4.1-cp39-cp39-win32.whl", hash = "sha256:b52ccf7cfe4ce2a1064b18594381bccf4179c2ecf7f513134ec2f993dd4ab395"}, - {file = "typed_ast-1.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:3742b32cf1c6ef124d57f95be609c473d7ec4c14d0090e5a5e05a15269fb4d0c"}, - {file = "typed_ast-1.4.1.tar.gz", hash = "sha256:8c8aaad94455178e3187ab22c8b01a3837f8ee50e09cf31f1ba129eb293ec30b"}, + {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, + {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, + {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, + {file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"}, + {file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"}, + {file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"}, + {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"}, + {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"}, + {file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"}, + {file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"}, + {file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"}, + {file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"}, + {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"}, + {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"}, + {file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"}, + {file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"}, + {file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"}, + {file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"}, + {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"}, + {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"}, + {file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"}, + {file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"}, + {file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"}, + {file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"}, + {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"}, + {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"}, + {file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"}, + {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, + {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, + {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, +] +typing-extensions = [ + {file = "typing_extensions-3.10.0.2-py2-none-any.whl", hash = "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7"}, + {file = "typing_extensions-3.10.0.2-py3-none-any.whl", hash = "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34"}, + {file = "typing_extensions-3.10.0.2.tar.gz", hash = "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"}, ] tzdata = [ - {file = "tzdata-2020.1-py2.py3-none-any.whl", hash = "sha256:02aa27fe896fbd4d3b530fa1c8a28602dfd890b0c1c8710f3911167c18d4b7ba"}, - {file = "tzdata-2020.1.tar.gz", hash = "sha256:5e0a01117b3dfc9be27ef727e8f39e355e29bbc788bcd8fe2110871df5f9a935"}, + {file = "tzdata-2021.1-py2.py3-none-any.whl", hash = "sha256:9ad21eada54c97001e3e9858a674b3ee6bebe4a4fb2b58465930f2af0ba6c85d"}, + {file = "tzdata-2021.1.tar.gz", hash = "sha256:e19c7351f887522a1ac739d21041e592ddde6dd1b764fdefa8f7b2b3551d3d38"}, ] virtualenv = [ - {file = "virtualenv-20.0.26-py2.py3-none-any.whl", hash = "sha256:c11a475400e98450403c0364eb3a2d25d42f71cf1493da64390487b666de4324"}, - {file = "virtualenv-20.0.26.tar.gz", hash = "sha256:e10cc66f40cbda459720dfe1d334c4dc15add0d80f09108224f171006a97a172"}, + {file = "virtualenv-20.8.1-py2.py3-none-any.whl", hash = "sha256:10062e34c204b5e4ec5f62e6ef2473f8ba76513a9a617e873f1f8fb4a519d300"}, + {file = "virtualenv-20.8.1.tar.gz", hash = "sha256:bcc17f0b3a29670dd777d6f0755a4c04f28815395bca279cdcb213b97199a6b8"}, +] +watchdog = [ + {file = "watchdog-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5f57ce4f7e498278fb2a091f39359930144a0f2f90ea8cbf4523c4e25de34028"}, + {file = "watchdog-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8b74d0d92a69a7ab5f101f9fe74e44ba017be269efa824337366ccbb4effde85"}, + {file = "watchdog-2.1.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:59767f476cd1f48531bf378f0300565d879688c82da8369ca8c52f633299523c"}, + {file = "watchdog-2.1.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:814d396859c95598f7576d15bc257c3bd3ba61fa4bc1db7dfc18f09070ded7da"}, + {file = "watchdog-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:28777dbed3bbd95f9c70f461443990a36c07dbf49ae7cd69932cdd1b8fb2850c"}, + {file = "watchdog-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5cf78f794c9d7bc64a626ef4f71aff88f57a7ae288e0b359a9c6ea711a41395f"}, + {file = "watchdog-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:43bf728eb7830559f329864ab5da2302c15b2efbac24ad84ccc09949ba753c40"}, + {file = "watchdog-2.1.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a7053d4d22dc95c5e0c90aeeae1e4ed5269d2f04001798eec43a654a03008d22"}, + {file = "watchdog-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6f3ad1d973fe8fc8fe64ba38f6a934b74346342fa98ef08ad5da361a05d46044"}, + {file = "watchdog-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:41d44ef21a77a32b55ce9bf59b75777063751f688de51098859b7c7f6466589a"}, + {file = "watchdog-2.1.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ed4ca4351cd2bb0d863ee737a2011ca44d8d8be19b43509bd4507f8a449b376b"}, + {file = "watchdog-2.1.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:8874d5ad6b7f43b18935d9b0183e29727a623a216693d6938d07dfd411ba462f"}, + {file = "watchdog-2.1.5-py3-none-manylinux2014_aarch64.whl", hash = "sha256:50a7f81f99d238f72185f481b493f9de80096e046935b60ea78e1276f3d76960"}, + {file = "watchdog-2.1.5-py3-none-manylinux2014_armv7l.whl", hash = "sha256:e40e33a4889382824846b4baa05634e1365b47c6fa40071dc2d06b4d7c715fc1"}, + {file = "watchdog-2.1.5-py3-none-manylinux2014_i686.whl", hash = "sha256:78b1514067ff4089f4dac930b043a142997a5b98553120919005e97fbaba6546"}, + {file = "watchdog-2.1.5-py3-none-manylinux2014_ppc64.whl", hash = "sha256:58ae842300cbfe5e62fb068c83901abe76e4f413234b7bec5446e4275eb1f9cb"}, + {file = "watchdog-2.1.5-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:b0cc7d8b7d60da6c313779d85903ce39a63d89d866014b085f720a083d5f3e9a"}, + {file = "watchdog-2.1.5-py3-none-manylinux2014_s390x.whl", hash = "sha256:e60d3bb7166b7cb830b86938d1eb0e6cfe23dfd634cce05c128f8f9967895193"}, + {file = "watchdog-2.1.5-py3-none-manylinux2014_x86_64.whl", hash = "sha256:51af09ae937ada0e9a10cc16988ec03c649754a91526170b6839b89fc56d6acb"}, + {file = "watchdog-2.1.5-py3-none-win32.whl", hash = "sha256:9391003635aa783957b9b11175d9802d3272ed67e69ef2e3394c0b6d9d24fa9a"}, + {file = "watchdog-2.1.5-py3-none-win_amd64.whl", hash = "sha256:eab14adfc417c2c983fbcb2c73ef3f28ba6990d1fff45d1180bf7e38bda0d98d"}, + {file = "watchdog-2.1.5-py3-none-win_ia64.whl", hash = "sha256:a2888a788893c4ef7e562861ec5433875b7915f930a5a7ed3d32c048158f1be5"}, + {file = "watchdog-2.1.5.tar.gz", hash = "sha256:5563b005907613430ef3d4aaac9c78600dd5704e84764cb6deda4b3d72807f09"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, ] zipp = [ - {file = "zipp-3.1.0-py3-none-any.whl", hash = "sha256:aa36550ff0c0b7ef7fa639055d797116ee891440eac1a56f378e2d3179e0320b"}, - {file = "zipp-3.1.0.tar.gz", hash = "sha256:c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96"}, + {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, + {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, ] diff --git a/pyproject.toml b/pyproject.toml index b316098a..10dd48f3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,12 +30,12 @@ python-dateutil = "^2.6" "backports.zoneinfo" = {version = "^0.2.1", python = ">=3.6,<3.9"} tzdata = ">=2020.1" -[tool.poetry.dev-dependencies] +[tool.poetry.group.dev.dependencies] pytest = "^5.4.3" pytest-cov = "^2.5" pytz = ">=2018.3" babel = "^2.5" -cleo = "^0.8.1" +cleo = "^1.0.0a3" tox = "^3.0" black = { version = "^19.3b0", markers = "implementation_name != 'pypy'" } isort = {version = "^5.9.1", python = "^3.6.1"} @@ -44,7 +44,7 @@ mkdocs = { version = "^1.0", python = "^3.5" } pymdown-extensions = "^6.0" pygments = "^2.2" markdown-include = "^0.5.1" -freezegun = "^0.3.15" +time-machine = "^2.4.0" [tool.poetry.build] generate-setup-file = false diff --git a/tests/date/test_diff.py b/tests/date/test_diff.py index 29814acc..6726f9ae 100644 --- a/tests/date/test_diff.py +++ b/tests/date/test_diff.py @@ -1,8 +1,9 @@ from datetime import date -import pendulum import pytest +import pendulum + @pytest.fixture def today(): diff --git a/tests/datetime/test_add.py b/tests/datetime/test_add.py index bb338ba7..3c40c8fd 100644 --- a/tests/datetime/test_add.py +++ b/tests/datetime/test_add.py @@ -1,8 +1,9 @@ from datetime import timedelta -import pendulum import pytest +import pendulum + from ..conftest import assert_datetime @@ -218,9 +219,7 @@ def test_add_time_to_new_transition_repeated(): assert not dt.is_dst() dt = pendulum.datetime(2013, 11, 3, 0, 59, 59, 999999, tz="America/New_York") - print(dt) dt = dt.add(hours=1) - print(dt) assert_datetime(dt, 2013, 11, 3, 1, 59, 59, 999999) assert dt.timezone_name == "America/New_York" diff --git a/tests/datetime/test_behavior.py b/tests/datetime/test_behavior.py index 04c0b1e1..137e1df5 100644 --- a/tests/datetime/test_behavior.py +++ b/tests/datetime/test_behavior.py @@ -6,9 +6,10 @@ from datetime import time from datetime import timedelta -import pendulum import pytest +import pendulum + from pendulum import timezone from pendulum.tz.timezone import Timezone diff --git a/tests/datetime/test_construct.py b/tests/datetime/test_construct.py index 0bb8f0e5..1466f21f 100644 --- a/tests/datetime/test_construct.py +++ b/tests/datetime/test_construct.py @@ -2,12 +2,13 @@ from datetime import datetime +import pytest +import pytz +import time_machine + from dateutil import tz -from freezegun import freeze_time import pendulum -import pytest -import pytz from pendulum import DateTime from pendulum.tz import timezone @@ -103,7 +104,7 @@ def test_now(): assert now.hour != in_paris.hour -@freeze_time("2016-03-27 00:30:00") +@time_machine.travel("2016-03-27 00:30:00Z", tick=False) def test_now_dst_off(): utc = pendulum.now("UTC") in_paris = pendulum.now("Europe/Paris") @@ -113,7 +114,7 @@ def test_now_dst_off(): assert in_paris.isoformat() == in_paris_from_utc.isoformat() -@freeze_time("2016-03-27 01:30:00") +@time_machine.travel("2016-03-27 01:30:00Z", tick=False) def test_now_dst_transitioning_on(): utc = pendulum.now("UTC") in_paris = pendulum.now("Europe/Paris") @@ -123,7 +124,7 @@ def test_now_dst_transitioning_on(): assert in_paris.isoformat() == in_paris_from_utc.isoformat() -@freeze_time("2016-10-30 00:30:00") +@time_machine.travel("2016-10-30 00:30:00Z", tick=False) def test_now_dst_on(): utc = pendulum.now("UTC") in_paris = pendulum.now("Europe/Paris") @@ -133,7 +134,7 @@ def test_now_dst_on(): assert in_paris.isoformat() == in_paris_from_utc.isoformat() -@freeze_time("2016-10-30 01:30:00") +@time_machine.travel("2016-10-30 01:30:00Z", tick=False) def test_now_dst_transitioning_off(): utc = pendulum.now("UTC") in_paris = pendulum.now("Europe/Paris") diff --git a/tests/datetime/test_diff.py b/tests/datetime/test_diff.py index b936b901..30d3aa51 100644 --- a/tests/datetime/test_diff.py +++ b/tests/datetime/test_diff.py @@ -1,8 +1,9 @@ from datetime import datetime -import pendulum import pytest +import pendulum + def test_diff_in_years_positive(): dt = pendulum.datetime(2000, 1, 1) @@ -807,17 +808,7 @@ def test_subtraction_with_timezone(): assert (post - dt).total_seconds() == 1e-06 - dt = pendulum.datetime( - 2013, - 10, - 27, - 2, - 59, - 59, - 999999, - tz="Europe/Paris", - dst_rule=pendulum.PRE_TRANSITION, - ) + dt = pendulum.datetime(2013, 10, 27, 2, 59, 59, 999999, tz="Europe/Paris", fold=0,) post = dt.add(microseconds=1) assert (post - dt).total_seconds() == 1e-06 diff --git a/tests/datetime/test_getters.py b/tests/datetime/test_getters.py index 70488d23..5948fc92 100644 --- a/tests/datetime/test_getters.py +++ b/tests/datetime/test_getters.py @@ -1,8 +1,9 @@ import struct -import pendulum import pytest +import pendulum + from pendulum import DateTime from pendulum.tz import timezone @@ -95,12 +96,8 @@ def test_int_timestamp_accuracy(): def test_timestamp_with_transition(): - d_pre = pendulum.datetime( - 2012, 10, 28, 2, 0, tz="Europe/Warsaw", dst_rule=pendulum.PRE_TRANSITION - ) - d_post = pendulum.datetime( - 2012, 10, 28, 2, 0, tz="Europe/Warsaw", dst_rule=pendulum.POST_TRANSITION - ) + d_pre = pendulum.datetime(2012, 10, 28, 2, 0, tz="Europe/Warsaw", fold=0) + d_post = pendulum.datetime(2012, 10, 28, 2, 0, tz="Europe/Warsaw", fold=1) # the difference between the timestamps before and after is equal to one hour assert d_post.timestamp() - d_pre.timestamp() == pendulum.SECONDS_PER_HOUR diff --git a/tests/datetime/test_sub.py b/tests/datetime/test_sub.py index 61d9a8bf..7ebf5222 100644 --- a/tests/datetime/test_sub.py +++ b/tests/datetime/test_sub.py @@ -1,8 +1,9 @@ from datetime import timedelta -import pendulum import pytest +import pendulum + from ..conftest import assert_datetime @@ -235,7 +236,7 @@ def test_subtract_invalid_type(): def test_subtract_negative_over_dls_transitioning_off(): just_before_dls_ends = pendulum.datetime( - 2019, 11, 3, 1, 30, tz="US/Pacific", dst_rule=pendulum.PRE_TRANSITION + 2019, 11, 3, 1, 30, tz="US/Pacific", fold=0 ) plus_10_hours = just_before_dls_ends + timedelta(hours=10) minus_neg_10_hours = just_before_dls_ends - timedelta(hours=-10) diff --git a/tests/period/test_add_subtract.py b/tests/period/test_add_subtract.py index d9a739e3..8bbc4d62 100644 --- a/tests/period/test_add_subtract.py +++ b/tests/period/test_add_subtract.py @@ -43,10 +43,7 @@ def test_negative_difference_subtract(): start = pendulum.datetime(2018, 5, 28, 12, 34, 56, 123456) end = pendulum.datetime(2018, 1, 1) - print((start - end).in_words()) - period = end - start - print(period.in_words()) new_end = start + period assert new_end == end diff --git a/tests/tz/test_timezone.py b/tests/tz/test_timezone.py index b9792059..38cdbcb1 100644 --- a/tests/tz/test_timezone.py +++ b/tests/tz/test_timezone.py @@ -1,9 +1,10 @@ from datetime import datetime from datetime import timedelta -import pendulum import pytest +import pendulum + from pendulum import timezone from pendulum.tz import fixed_timezone from pendulum.tz.exceptions import AmbiguousTime @@ -46,7 +47,7 @@ def test_skipped_time_with_pre_rule(): assert dt.year == 2013 assert dt.month == 3 assert dt.day == 31 - assert dt.hour == 2 + assert dt.hour == 1 assert dt.minute == 30 assert dt.second == 45 assert dt.microsecond == 123456 @@ -72,45 +73,11 @@ def test_skipped_time_with_post_rule(): assert dt.tzinfo.dst(dt) == timedelta(seconds=3600) -def test_skipped_time_with_explicit_post_rule(): - dt = datetime(2013, 3, 31, 2, 30, 45, 123456) - tz = timezone("Europe/Paris") - dt = tz.convert(dt, dst_rule=pendulum.POST_TRANSITION) - - assert dt.year == 2013 - assert dt.month == 3 - assert dt.day == 31 - assert dt.hour == 3 - assert dt.minute == 30 - assert dt.second == 45 - assert dt.microsecond == 123456 - assert dt.tzinfo.name == "Europe/Paris" - assert dt.tzinfo.utcoffset(dt) == timedelta(seconds=7200) - assert dt.tzinfo.dst(dt) == timedelta(seconds=3600) - - -def test_skipped_time_with_explicit_pre_rule(): - dt = datetime(2013, 3, 31, 2, 30, 45, 123456) - tz = timezone("Europe/Paris") - dt = tz.convert(dt, dst_rule=pendulum.PRE_TRANSITION) - - assert dt.year == 2013 - assert dt.month == 3 - assert dt.day == 31 - assert dt.hour == 1 - assert dt.minute == 30 - assert dt.second == 45 - assert dt.microsecond == 123456 - assert dt.tzinfo.name == "Europe/Paris" - assert dt.tzinfo.utcoffset(dt) == timedelta(seconds=3600) - assert dt.tzinfo.dst(dt) == timedelta() - - def test_skipped_time_with_error(): dt = datetime(2013, 3, 31, 2, 30, 45, 123456) tz = timezone("Europe/Paris") with pytest.raises(NonExistingTime): - tz.convert(dt, dst_rule=pendulum.TRANSITION_ERROR) + tz.convert(dt, raise_on_unknown_times=True) def test_repeated_time(): @@ -130,23 +97,6 @@ def test_repeated_time(): assert dt.tzinfo.dst(dt) == timedelta() -def test_repeated_time_explicit_post_rule(): - dt = datetime(2013, 10, 27, 2, 30, 45, 123456) - tz = timezone("Europe/Paris") - dt = tz.convert(dt, dst_rule=pendulum.POST_TRANSITION) - - assert dt.year == 2013 - assert dt.month == 10 - assert dt.day == 27 - assert dt.hour == 2 - assert dt.minute == 30 - assert dt.second == 45 - assert dt.microsecond == 123456 - assert dt.tzinfo.name == "Europe/Paris" - assert dt.tzinfo.utcoffset(dt) == timedelta(seconds=3600) - assert dt.tzinfo.dst(dt) == timedelta() - - def test_repeated_time_pre_rule(): dt = datetime(2013, 10, 27, 2, 30, 45, 123456, fold=0) tz = timezone("Europe/Paris") @@ -164,28 +114,11 @@ def test_repeated_time_pre_rule(): assert dt.tzinfo.dst(dt) == timedelta(seconds=3600) -def test_repeated_time_explicit_pre_rule(): - dt = datetime(2013, 10, 27, 2, 30, 45, 123456) - tz = timezone("Europe/Paris") - dt = tz.convert(dt, dst_rule=pendulum.PRE_TRANSITION) - - assert dt.year == 2013 - assert dt.month == 10 - assert dt.day == 27 - assert dt.hour == 2 - assert dt.minute == 30 - assert dt.second == 45 - assert dt.microsecond == 123456 - assert dt.tzinfo.name == "Europe/Paris" - assert dt.tzinfo.utcoffset(dt) == timedelta(seconds=7200) - assert dt.tzinfo.dst(dt) == timedelta(seconds=3600) - - def test_repeated_time_with_error(): dt = datetime(2013, 10, 27, 2, 30, 45, 123456) tz = timezone("Europe/Paris") with pytest.raises(AmbiguousTime): - tz.convert(dt, dst_rule=pendulum.TRANSITION_ERROR) + tz.convert(dt, raise_on_unknown_times=True) def test_pendulum_create_basic(): @@ -200,6 +133,7 @@ def test_pendulum_create_basic(): def test_pendulum_create_skipped(): dt = pendulum.datetime(2013, 3, 31, 2, 30, 45, 123456, tz="Europe/Paris") + assert isinstance(dt, pendulum.DateTime) assert_datetime(dt, 2013, 3, 31, 3, 30, 45, 123456) assert dt.timezone_name == "Europe/Paris" assert dt.tzinfo.utcoffset(dt) == timedelta(seconds=7200) @@ -207,17 +141,7 @@ def test_pendulum_create_skipped(): def test_pendulum_create_skipped_with_pre_rule(): - dt = pendulum.datetime( - 2013, - 3, - 31, - 2, - 30, - 45, - 123456, - tz="Europe/Paris", - dst_rule=pendulum.PRE_TRANSITION, - ) + dt = pendulum.datetime(2013, 3, 31, 2, 30, 45, 123456, tz="Europe/Paris", fold=0) assert_datetime(dt, 2013, 3, 31, 1, 30, 45, 123456) assert dt.timezone_name == "Europe/Paris" @@ -236,7 +160,7 @@ def test_pendulum_create_skipped_with_error(): 45, 123456, tz="Europe/Paris", - dst_rule=pendulum.TRANSITION_ERROR, + raise_on_unknown_times=True, ) @@ -250,17 +174,7 @@ def test_pendulum_create_repeated(): def test_pendulum_create_repeated_with_pre_rule(): - dt = pendulum.datetime( - 2013, - 10, - 27, - 2, - 30, - 45, - 123456, - tz="Europe/Paris", - dst_rule=pendulum.PRE_TRANSITION, - ) + dt = pendulum.datetime(2013, 10, 27, 2, 30, 45, 123456, tz="Europe/Paris", fold=0,) assert_datetime(dt, 2013, 10, 27, 2, 30, 45, 123456) assert dt.timezone_name == "Europe/Paris" @@ -279,7 +193,7 @@ def test_pendulum_create_repeated_with_error(): 45, 123456, tz="Europe/Paris", - dst_rule=pendulum.TRANSITION_ERROR, + raise_on_unknown_times=True, ) @@ -301,7 +215,7 @@ def test_utcoffset(): def test_utcoffset_pre_transition(): tz = pendulum.timezone("America/Chicago") utcoffset = tz.utcoffset(datetime(1883, 11, 18)) - assert utcoffset == timedelta(days=-1, seconds=64800) + assert utcoffset == timedelta(days=-1, seconds=65364) def test_dst(): @@ -311,14 +225,6 @@ def test_dst(): assert dst == timedelta(0, 6000) -def test_short_timezones(): - tz = pendulum.timezone("CET") - assert len(tz._transitions) > 0 - - tz = pendulum.timezone("EET") - assert len(tz._transitions) > 0 - - def test_short_timezones_should_not_modify_time(): tz = pendulum.timezone("EST") dt = tz.datetime(2017, 6, 15, 14, 0, 0) @@ -354,6 +260,9 @@ def test_after_last_transition(): assert dt.microsecond == 0 +@pytest.mark.skip( + reason="zoneinfo does not currently support POSIX transition rules to go beyond the last fixed transition." +) def test_on_last_transition(): tz = pendulum.timezone("Europe/Paris") dt = pendulum.naive(2037, 10, 25, 2, 30) @@ -442,16 +351,6 @@ def test_constructor_fold_attribute_is_honored(): assert dt.strftime("%z") == "-0500" -def test_convert_sets_fold_attribute_properly(): - tz = pendulum.timezone("US/Eastern") - - dt = tz.convert(datetime(2014, 11, 2, 1, 30), dst_rule=pendulum.PRE_TRANSITION) - assert dt.fold == 0 - - dt = tz.convert(datetime(2014, 11, 2, 1, 30), dst_rule=pendulum.POST_TRANSITION) - assert dt.fold == 1 - - def test_datetime(): tz = timezone("Europe/Paris") @@ -485,14 +384,17 @@ def test_fixed_timezone(): def test_just_before_last_transition(): tz = pendulum.timezone("Asia/Shanghai") - dt = datetime(1991, 4, 20, 1, 49, 8) - dt = tz.convert(dt, dst_rule=pendulum.POST_TRANSITION) + dt = datetime(1991, 4, 20, 1, 49, 8, fold=0) + dt = tz.convert(dt) epoch = datetime(1970, 1, 1, tzinfo=timezone("UTC")) expected = (dt - epoch).total_seconds() assert expected == 672079748.0 +@pytest.mark.skip( + reason="zoneinfo does not currently support POSIX transition rules to go beyond the last fixed transition." +) def test_timezones_are_extended(): tz = pendulum.timezone("Europe/Paris") dt = tz.convert(pendulum.naive(2134, 2, 13, 1)) @@ -501,9 +403,7 @@ def test_timezones_are_extended(): assert dt.utcoffset().total_seconds() == 3600 assert dt.dst() == timedelta() - dt = tz.convert( - pendulum.naive(2134, 3, 28, 2, 30), dst_rule=pendulum.POST_TRANSITION - ) + dt = tz.convert(pendulum.naive(2134, 3, 28, 2, 30)) assert_datetime(dt, 2134, 3, 28, 3, 30) assert dt.utcoffset().total_seconds() == 7200 @@ -515,56 +415,13 @@ def test_timezones_are_extended(): assert dt.utcoffset().total_seconds() == 7200 assert dt.dst() == timedelta(seconds=3600) - dt = tz.convert( - pendulum.naive(2134, 10, 31, 2, 30), dst_rule=pendulum.PRE_TRANSITION - ) + dt = tz.convert(pendulum.naive(2134, 10, 31, 2, 30, fold=0)) assert_datetime(dt, 2134, 10, 31, 2, 30) assert dt.utcoffset().total_seconds() == 7200 assert dt.dst() == timedelta(seconds=3600) - dt = tz.convert( - pendulum.naive(2134, 10, 31, 2, 30), dst_rule=pendulum.POST_TRANSITION - ) - - assert_datetime(dt, 2134, 10, 31, 2, 30) - assert dt.utcoffset().total_seconds() == 3600 - assert dt.dst() == timedelta() - - -def test_timezones_extension_can_be_disabled(): - tz = pendulum.timezone("Europe/Paris", extended=False) - dt = tz.convert(pendulum.naive(2134, 2, 13, 1)) - - assert_datetime(dt, 2134, 2, 13, 1) - assert dt.utcoffset().total_seconds() == 3600 - assert dt.dst() == timedelta() - - dt = tz.convert( - pendulum.naive(2134, 3, 28, 2, 30), dst_rule=pendulum.POST_TRANSITION - ) - - assert_datetime(dt, 2134, 3, 28, 2, 30) - assert dt.utcoffset().total_seconds() == 3600 - assert dt.dst() == timedelta() - - dt = tz.convert(pendulum.naive(2134, 7, 11, 2, 30)) - - assert_datetime(dt, 2134, 7, 11, 2, 30) - assert dt.utcoffset().total_seconds() == 3600 - assert dt.dst() == timedelta() - - dt = tz.convert( - pendulum.naive(2134, 10, 31, 2, 30), dst_rule=pendulum.PRE_TRANSITION - ) - - assert_datetime(dt, 2134, 10, 31, 2, 30) - assert dt.utcoffset().total_seconds() == 3600 - assert dt.dst() == timedelta() - - dt = tz.convert( - pendulum.naive(2134, 10, 31, 2, 30), dst_rule=pendulum.POST_TRANSITION - ) + dt = tz.convert(pendulum.naive(2134, 10, 31, 2, 30)) assert_datetime(dt, 2134, 10, 31, 2, 30) assert dt.utcoffset().total_seconds() == 3600 From 0fbb519c60b33fd62c2c8fdc4078016b76316ee4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Sat, 25 Sep 2021 23:37:18 +0200 Subject: [PATCH 017/177] Fix linting --- .pre-commit-config.yaml | 8 +- clock | 5 +- pendulum/helpers.py | 16 +-- pendulum/tz/local_timezone.py | 2 - poetry.lock | 136 +++++++++++-------- pyproject.toml | 12 +- tests/conftest.py | 3 +- tests/date/test_add.py | 3 +- tests/date/test_behavior.py | 3 +- tests/date/test_day_of_week_modifiers.py | 3 +- tests/date/test_start_end_of.py | 3 +- tests/date/test_sub.py | 3 +- tests/datetime/test_comparison.py | 3 +- tests/datetime/test_day_of_week_modifiers.py | 3 +- tests/datetime/test_diff.py | 12 +- tests/datetime/test_from_format.py | 3 +- tests/datetime/test_start_end_of.py | 3 +- tests/datetime/test_strings.py | 3 +- tests/duration/test_construct.py | 3 +- tests/formatting/test_formatter.py | 3 +- tests/parsing/test_parsing.py | 3 +- tests/test_helpers.py | 3 +- tests/time/test_add.py | 3 +- tests/time/test_behavior.py | 3 +- tests/time/test_sub.py | 3 +- tests/tz/test_local_timezone.py | 2 +- tests/tz/test_timezone.py | 12 +- tests/tz/test_timezones.py | 3 +- 28 files changed, 155 insertions(+), 107 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 42669213..fe000828 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,23 +1,23 @@ repos: - repo: https://github.com/psf/black - rev: stable + rev: 21.9b0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 - rev: 3.7.8 + rev: 3.9.2 hooks: - id: flake8 - repo: https://github.com/timothycrosley/isort - rev: 4.3.21 + rev: 5.9.3 hooks: - id: isort additional_dependencies: [toml] exclude: ^.*/?setup\.py$ - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v2.3.0 + rev: v4.0.1 hooks: - id: trailing-whitespace exclude: ^tests/.*/fixtures/.* diff --git a/clock b/clock index 1fea481b..8dfb173e 100755 --- a/clock +++ b/clock @@ -244,7 +244,7 @@ class LocaleRecreate(Command): locales_dir = os.path.join("pendulum", "locales") locales = glob.glob(os.path.join(locales_dir, "*", "locale.py")) - locales = [os.path.basename(os.path.dirname(l)) for l in locales] + locales = [os.path.basename(os.path.dirname(locale)) for locale in locales] self.call("locale:create", [("locales", locales)]) @@ -270,9 +270,6 @@ class WindowsTzDump(Command): with open(os.path.join(self.MAPPING_DIR, "windows.py"), "w") as f: f.write(mapping) - def handle(self): - self.call("help", self._config.name) - app = Application("clock", __version__) app.add(LocaleCreate()) diff --git a/pendulum/helpers.py b/pendulum/helpers.py index 6e51a731..e847b4bd 100644 --- a/pendulum/helpers.py +++ b/pendulum/helpers.py @@ -34,21 +34,21 @@ if not with_extensions or struct.calcsize("P") == 4: raise ImportError() - from ._extensions._helpers import local_time - from ._extensions._helpers import precise_diff + from ._extensions._helpers import days_in_year from ._extensions._helpers import is_leap from ._extensions._helpers import is_long_year - from ._extensions._helpers import week_day - from ._extensions._helpers import days_in_year + from ._extensions._helpers import local_time + from ._extensions._helpers import precise_diff from ._extensions._helpers import timestamp + from ._extensions._helpers import week_day except ImportError: - from ._extensions.helpers import local_time # noqa - from ._extensions.helpers import precise_diff # noqa + from ._extensions.helpers import days_in_year # noqa from ._extensions.helpers import is_leap # noqa from ._extensions.helpers import is_long_year # noqa - from ._extensions.helpers import week_day # noqa - from ._extensions.helpers import days_in_year # noqa + from ._extensions.helpers import local_time # noqa + from ._extensions.helpers import precise_diff # noqa from ._extensions.helpers import timestamp # noqa + from ._extensions.helpers import week_day # noqa difference_formatter = DifferenceFormatter() diff --git a/pendulum/tz/local_timezone.py b/pendulum/tz/local_timezone.py index e499444b..13e16484 100644 --- a/pendulum/tz/local_timezone.py +++ b/pendulum/tz/local_timezone.py @@ -7,8 +7,6 @@ from typing import Optional from typing import Union -from pendulum.utils._compat import zoneinfo - from .exceptions import InvalidTimezone from .timezone import FixedTimezone from .timezone import Timezone diff --git a/poetry.lock b/poetry.lock index 8c6fb975..8a08ac8d 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,22 +1,3 @@ -[[package]] -name = "appdirs" -version = "1.4.4" -description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" -optional = false -python-versions = "*" - -[[package]] -name = "aspy.yaml" -version = "1.3.0" -description = "A few extensions to pyyaml." -category = "dev" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" - -[package.dependencies] -pyyaml = "*" - [[package]] name = "atomicwrites" version = "1.4.0" @@ -81,31 +62,40 @@ tzdata = ["tzdata"] [[package]] name = "black" -version = "19.10b0" +version = "21.9b0" description = "The uncompromising code formatter." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.6.2" [package.dependencies] -appdirs = "*" -attrs = ">=18.1.0" -click = ">=6.5" -pathspec = ">=0.6,<1" -regex = "*" -toml = ">=0.9.4" -typed-ast = ">=1.4.0" +click = ">=7.1.2" +dataclasses = {version = ">=0.6", markers = "python_version < \"3.7\""} +mypy-extensions = ">=0.4.3" +pathspec = ">=0.9.0,<1" +platformdirs = ">=2" +regex = ">=2020.1.8" +tomli = ">=0.2.6,<2.0.0" +typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\""} +typing-extensions = [ + {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}, + {version = "!=3.10.0.1", markers = "python_version >= \"3.10\""}, +] [package.extras] -d = ["aiohttp (>=3.3.2)", "aiohttp-cors"] +colorama = ["colorama (>=0.4.3)"] +d = ["aiohttp (>=3.6.0)", "aiohttp-cors (>=0.4.0)"] +jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] +python2 = ["typed-ast (>=1.4.2)"] +uvloop = ["uvloop (>=0.15.2)"] [[package]] name = "cfgv" -version = "3.0.0" +version = "3.3.1" description = "Validate configuration and produce human readable error messages." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.6.1" [[package]] name = "cleo" @@ -158,6 +148,14 @@ category = "dev" optional = false python-versions = ">=3.6,<4.0" +[[package]] +name = "dataclasses" +version = "0.8" +description = "A backport of the dataclasses module for Python 3.6" +category = "dev" +optional = false +python-versions = ">=3.6, <3.7" + [[package]] name = "distlib" version = "0.3.3" @@ -190,14 +188,14 @@ dev = ["twine", "markdown", "flake8"] [[package]] name = "identify" -version = "1.6.2" +version = "2.2.15" description = "File identification library for Python" category = "dev" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,>=2.7" +python-versions = ">=3.6.1" [package.extras] -license = ["editdistance"] +license = ["editdistance-s"] [[package]] name = "importlib-metadata" @@ -331,6 +329,14 @@ category = "dev" optional = false python-versions = ">=3.5" +[[package]] +name = "mypy-extensions" +version = "0.4.3" +description = "Experimental type system extensions for programs checked with the mypy typechecker." +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "nodeenv" version = "1.6.0" @@ -360,7 +366,7 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [[package]] name = "platformdirs" -version = "2.3.0" +version = "2.4.0" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false @@ -386,23 +392,21 @@ dev = ["pre-commit", "tox"] [[package]] name = "pre-commit" -version = "1.21.0" +version = "2.15.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6.1" [package.dependencies] -"aspy.yaml" = "*" cfgv = ">=2.0.0" identify = ">=1.0.0" importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} importlib-resources = {version = "*", markers = "python_version < \"3.7\""} nodeenv = ">=0.11.1" -pyyaml = "*" -six = "*" +pyyaml = ">=5.1" toml = "*" -virtualenv = ">=15.2" +virtualenv = ">=20.0.8" [[package]] name = "py" @@ -559,6 +563,14 @@ category = "dev" optional = false python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "tomli" +version = "1.2.1" +description = "A lil' TOML parser" +category = "dev" +optional = false +python-versions = ">=3.6" + [[package]] name = "tox" version = "3.24.4" @@ -661,17 +673,9 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.6" -content-hash = "8e30e69fa8012200f013a459ad67ce2f6770a3a01f3fa7c1f848f72b9c50b641" +content-hash = "656fb64a37b4518454a432fffd80953786da2b4bf67be193e98378fb90d25332" [metadata.files] -appdirs = [ - {file = "appdirs-1.4.4-py2.py3-none-any.whl", hash = "sha256:a841dacd6b99318a741b166adb07e19ee71a274450e68237b4650ca1055ab128"}, - {file = "appdirs-1.4.4.tar.gz", hash = "sha256:7d5d0167b2b1ba821647616af46a749d1c653740dd0d2415100fe26e27afdf41"}, -] -"aspy.yaml" = [ - {file = "aspy.yaml-1.3.0-py2.py3-none-any.whl", hash = "sha256:463372c043f70160a9ec950c3f1e4c3a82db5fca01d334b6bc89c7164d744bdc"}, - {file = "aspy.yaml-1.3.0.tar.gz", hash = "sha256:e7c742382eff2caed61f87a39d13f99109088e5e93f04d76eb8d4b28aa143f45"}, -] atomicwrites = [ {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, @@ -707,12 +711,12 @@ babel = [ {file = "backports.zoneinfo-0.2.1.tar.gz", hash = "sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2"}, ] black = [ - {file = "black-19.10b0-py36-none-any.whl", hash = "sha256:1b30e59be925fafc1ee4565e5e08abef6b03fe455102883820fe5ee2e4734e0b"}, - {file = "black-19.10b0.tar.gz", hash = "sha256:c2edb73a08e9e0e6f65a0e6af18b059b8b1cdd5bef997d7a0b181df93dc81539"}, + {file = "black-21.9b0-py3-none-any.whl", hash = "sha256:380f1b5da05e5a1429225676655dddb96f5ae8c75bdf91e53d798871b902a115"}, + {file = "black-21.9b0.tar.gz", hash = "sha256:7de4cfc7eb6b710de325712d40125689101d21d25283eed7e9998722cf10eb91"}, ] cfgv = [ - {file = "cfgv-3.0.0-py2.py3-none-any.whl", hash = "sha256:f22b426ed59cd2ab2b54ff96608d846c33dfb8766a67f0b4a6ce130ce244414f"}, - {file = "cfgv-3.0.0.tar.gz", hash = "sha256:04b093b14ddf9fd4d17c53ebfd55582d27b76ed30050193c14e560770c5360eb"}, + {file = "cfgv-3.3.1-py2.py3-none-any.whl", hash = "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426"}, + {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, ] cleo = [ {file = "cleo-1.0.0a4-py3-none-any.whl", hash = "sha256:cdd0c3458c15ced3a9f0204b1e53a1b4bee3c56ebcb3ac54c872a56acc657a09"}, @@ -784,6 +788,10 @@ crashtest = [ {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, ] +dataclasses = [ + {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, + {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, +] distlib = [ {file = "distlib-0.3.3-py2.py3-none-any.whl", hash = "sha256:c8b54e8454e5bf6237cc84c20e8264c3e991e824ef27e8f1e81049867d861e31"}, {file = "distlib-0.3.3.zip", hash = "sha256:d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05"}, @@ -796,8 +804,8 @@ ghp-import = [ {file = "ghp-import-2.0.1.tar.gz", hash = "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483"}, ] identify = [ - {file = "identify-1.6.2-py2.py3-none-any.whl", hash = "sha256:8f9879b5b7cca553878d31548a419ec2f227d3328da92fe8202bc5e546d5cbc3"}, - {file = "identify-1.6.2.tar.gz", hash = "sha256:1c2014f6985ed02e62b2e6955578acf069cb2c54859e17853be474bfe7e13bed"}, + {file = "identify-2.2.15-py2.py3-none-any.whl", hash = "sha256:de83a84d774921669774a2000bf87ebba46b4d1c04775f4a5d37deff0cf39f73"}, + {file = "identify-2.2.15.tar.gz", hash = "sha256:528a88021749035d5a39fe2ba67c0642b8341aaf71889da0e1ed669a429b87f0"}, ] importlib-metadata = [ {file = "importlib_metadata-4.8.1-py3-none-any.whl", hash = "sha256:b618b6d2d5ffa2f16add5697cf57a46c76a56229b0ed1c438322e4e95645bd15"}, @@ -870,6 +878,10 @@ more-itertools = [ {file = "more-itertools-8.10.0.tar.gz", hash = "sha256:1debcabeb1df793814859d64a81ad7cb10504c24349368ccf214c664c474f41f"}, {file = "more_itertools-8.10.0-py3-none-any.whl", hash = "sha256:56ddac45541718ba332db05f464bebfb0768110111affd27f66e0051f276fa43"}, ] +mypy-extensions = [ + {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, + {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, +] nodeenv = [ {file = "nodeenv-1.6.0-py2.py3-none-any.whl", hash = "sha256:621e6b7076565ddcacd2db0294c0381e01fd28945ab36bcf00f41c5daf63bef7"}, {file = "nodeenv-1.6.0.tar.gz", hash = "sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b"}, @@ -880,16 +892,16 @@ pathspec = [ {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, ] platformdirs = [ - {file = "platformdirs-2.3.0-py3-none-any.whl", hash = "sha256:8003ac87717ae2c7ee1ea5a84a1a61e87f3fbd16eb5aadba194ea30a9019f648"}, - {file = "platformdirs-2.3.0.tar.gz", hash = "sha256:15b056538719b1c94bdaccb29e5f81879c7f7f0f4a153f46086d155dffcd4f0f"}, + {file = "platformdirs-2.4.0-py3-none-any.whl", hash = "sha256:8868bbe3c3c80d42f20156f22e7131d2fb321f5bc86a2a345375c6481a67021d"}, + {file = "platformdirs-2.4.0.tar.gz", hash = "sha256:367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2"}, ] pluggy = [ {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, ] pre-commit = [ - {file = "pre_commit-1.21.0-py2.py3-none-any.whl", hash = "sha256:f92a359477f3252452ae2e8d3029de77aec59415c16ae4189bcfba40b757e029"}, - {file = "pre_commit-1.21.0.tar.gz", hash = "sha256:8f48d8637bdae6fa70cc97db9c1dd5aa7c5c8bf71968932a380628c25978b850"}, + {file = "pre_commit-2.15.0-py2.py3-none-any.whl", hash = "sha256:a4ed01000afcb484d9eb8d504272e642c4c4099bbad3a6b27e519bd6a3e928a6"}, + {file = "pre_commit-2.15.0.tar.gz", hash = "sha256:3c25add78dbdfb6a28a651780d5c311ac40dd17f160eb3954a0c59da40a505a7"}, ] py = [ {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, @@ -1038,6 +1050,10 @@ toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] +tomli = [ + {file = "tomli-1.2.1-py3-none-any.whl", hash = "sha256:8dd0e9524d6f386271a36b41dbf6c57d8e32fd96fd22b6584679dc569d20899f"}, + {file = "tomli-1.2.1.tar.gz", hash = "sha256:a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442"}, +] tox = [ {file = "tox-3.24.4-py2.py3-none-any.whl", hash = "sha256:5e274227a53dc9ef856767c21867377ba395992549f02ce55eb549f9fb9a8d10"}, {file = "tox-3.24.4.tar.gz", hash = "sha256:c30b57fa2477f1fb7c36aa1d83292d5c2336cd0018119e1b1c17340e2c2708ca"}, diff --git a/pyproject.toml b/pyproject.toml index 10dd48f3..3ab8c9c5 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,9 +37,9 @@ pytz = ">=2018.3" babel = "^2.5" cleo = "^1.0.0a3" tox = "^3.0" -black = { version = "^19.3b0", markers = "implementation_name != 'pypy'" } +black = {version = "^21.9b0", markers = "python_full_version >= '3.6.2' and python_version < '4.0' and implementation_name != 'pypy'"} isort = {version = "^5.9.1", python = "^3.6.1"} -pre-commit = "^1.10" +pre-commit = {version = "^2.10.0", python = "^3.6.1"} mkdocs = { version = "^1.0", python = "^3.5" } pymdown-extensions = "^6.0" pygments = "^2.2" @@ -51,14 +51,12 @@ generate-setup-file = false script = "build.py" [tool.isort] -line_length = 88 +profile = "black" force_single_line = true -force_grid_wrap = 0 atomic = true include_trailing_comma = true lines_after_imports = 2 lines_between_types = 1 -multi_line_output = 3 use_parentheses = true not_skip = "__init__.py" skip_glob = ["*/setup.py"] @@ -69,11 +67,11 @@ known_third_party = [ "babel", "cleo", "dateutil", - "freezegun", + "time_machine", "pytzdata", ] [build-system] -requires = ["poetry-core>=1.0.0a9"] +requires = ["poetry-core>=1.1.0a6"] build-backend = "poetry.core.masonry.api" diff --git a/tests/conftest.py b/tests/conftest.py index 4ab1b877..18abbda9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,6 +1,7 @@ -import pendulum import pytest +import pendulum + @pytest.fixture(autouse=True) def setup(): diff --git a/tests/date/test_add.py b/tests/date/test_add.py index 9c83b61a..969dfb4b 100644 --- a/tests/date/test_add.py +++ b/tests/date/test_add.py @@ -1,8 +1,9 @@ from datetime import timedelta -import pendulum import pytest +import pendulum + from ..conftest import assert_date diff --git a/tests/date/test_behavior.py b/tests/date/test_behavior.py index 1ef56c49..23de481a 100644 --- a/tests/date/test_behavior.py +++ b/tests/date/test_behavior.py @@ -2,9 +2,10 @@ from datetime import date -import pendulum import pytest +import pendulum + @pytest.fixture() def p(): diff --git a/tests/date/test_day_of_week_modifiers.py b/tests/date/test_day_of_week_modifiers.py index 62aad336..85d67b69 100644 --- a/tests/date/test_day_of_week_modifiers.py +++ b/tests/date/test_day_of_week_modifiers.py @@ -1,6 +1,7 @@ -import pendulum import pytest +import pendulum + from pendulum.exceptions import PendulumException from ..conftest import assert_date diff --git a/tests/date/test_start_end_of.py b/tests/date/test_start_end_of.py index 8a825408..b27c3e5d 100644 --- a/tests/date/test_start_end_of.py +++ b/tests/date/test_start_end_of.py @@ -1,6 +1,7 @@ -import pendulum import pytest +import pendulum + from pendulum import Date from ..conftest import assert_date diff --git a/tests/date/test_sub.py b/tests/date/test_sub.py index dcf7a2a4..74ae6c33 100644 --- a/tests/date/test_sub.py +++ b/tests/date/test_sub.py @@ -1,9 +1,10 @@ from datetime import datetime from datetime import timedelta -import pendulum import pytest +import pendulum + from ..conftest import assert_date diff --git a/tests/datetime/test_comparison.py b/tests/datetime/test_comparison.py index 0819f801..564510c9 100644 --- a/tests/datetime/test_comparison.py +++ b/tests/datetime/test_comparison.py @@ -1,8 +1,9 @@ from datetime import datetime -import pendulum import pytz +import pendulum + from ..conftest import assert_datetime diff --git a/tests/datetime/test_day_of_week_modifiers.py b/tests/datetime/test_day_of_week_modifiers.py index 1526f4a8..80d0fa0b 100644 --- a/tests/datetime/test_day_of_week_modifiers.py +++ b/tests/datetime/test_day_of_week_modifiers.py @@ -1,6 +1,7 @@ -import pendulum import pytest +import pendulum + from pendulum.exceptions import PendulumException from ..conftest import assert_datetime diff --git a/tests/datetime/test_diff.py b/tests/datetime/test_diff.py index 30d3aa51..e4957e6e 100644 --- a/tests/datetime/test_diff.py +++ b/tests/datetime/test_diff.py @@ -808,7 +808,17 @@ def test_subtraction_with_timezone(): assert (post - dt).total_seconds() == 1e-06 - dt = pendulum.datetime(2013, 10, 27, 2, 59, 59, 999999, tz="Europe/Paris", fold=0,) + dt = pendulum.datetime( + 2013, + 10, + 27, + 2, + 59, + 59, + 999999, + tz="Europe/Paris", + fold=0, + ) post = dt.add(microseconds=1) assert (post - dt).total_seconds() == 1e-06 diff --git a/tests/datetime/test_from_format.py b/tests/datetime/test_from_format.py index c079c120..fcc9d678 100644 --- a/tests/datetime/test_from_format.py +++ b/tests/datetime/test_from_format.py @@ -1,6 +1,7 @@ -import pendulum import pytest +import pendulum + from ..conftest import assert_datetime diff --git a/tests/datetime/test_start_end_of.py b/tests/datetime/test_start_end_of.py index 1904c78d..09350d46 100644 --- a/tests/datetime/test_start_end_of.py +++ b/tests/datetime/test_start_end_of.py @@ -1,6 +1,7 @@ -import pendulum import pytest +import pendulum + from ..conftest import assert_datetime diff --git a/tests/datetime/test_strings.py b/tests/datetime/test_strings.py index 7583014e..eebe57ff 100644 --- a/tests/datetime/test_strings.py +++ b/tests/datetime/test_strings.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -import pendulum import pytest +import pendulum + def test_to_string(): d = pendulum.datetime(1975, 12, 25, 0, 0, 0, 0, tz="local") diff --git a/tests/duration/test_construct.py b/tests/duration/test_construct.py index 31ca0ea2..bd33a361 100644 --- a/tests/duration/test_construct.py +++ b/tests/duration/test_construct.py @@ -1,8 +1,9 @@ from datetime import timedelta -import pendulum import pytest +import pendulum + from pendulum.duration import AbsoluteDuration from ..conftest import assert_duration diff --git a/tests/formatting/test_formatter.py b/tests/formatting/test_formatter.py index dd44f4d0..53495bd6 100644 --- a/tests/formatting/test_formatter.py +++ b/tests/formatting/test_formatter.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -import pendulum import pytest +import pendulum + from pendulum.formatting import Formatter from pendulum.locales.locale import Locale diff --git a/tests/parsing/test_parsing.py b/tests/parsing/test_parsing.py index bcd7a53e..6c113bb2 100644 --- a/tests/parsing/test_parsing.py +++ b/tests/parsing/test_parsing.py @@ -1,8 +1,9 @@ import datetime -import pendulum import pytest +import pendulum + from pendulum.parsing import ParserError from pendulum.parsing import parse diff --git a/tests/test_helpers.py b/tests/test_helpers.py index 09a98a8e..cbaf0116 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -2,10 +2,11 @@ from datetime import datetime -import pendulum import pytest import pytz +import pendulum + from pendulum import timezone from pendulum.helpers import days_in_year from pendulum.helpers import precise_diff diff --git a/tests/time/test_add.py b/tests/time/test_add.py index 05998a32..ea44e175 100644 --- a/tests/time/test_add.py +++ b/tests/time/test_add.py @@ -1,8 +1,9 @@ from datetime import timedelta -import pendulum import pytest +import pendulum + def test_add_hours_positive(): assert pendulum.time(12, 34, 56).add(hours=1).hour == 13 diff --git a/tests/time/test_behavior.py b/tests/time/test_behavior.py index 42964345..66fde86c 100644 --- a/tests/time/test_behavior.py +++ b/tests/time/test_behavior.py @@ -2,9 +2,10 @@ from datetime import time -import pendulum import pytest +import pendulum + from pendulum import Time diff --git a/tests/time/test_sub.py b/tests/time/test_sub.py index 05e4b103..67ed915a 100644 --- a/tests/time/test_sub.py +++ b/tests/time/test_sub.py @@ -1,10 +1,11 @@ from datetime import time from datetime import timedelta -import pendulum import pytest import pytz +import pendulum + from pendulum import Time from ..conftest import assert_duration diff --git a/tests/tz/test_local_timezone.py b/tests/tz/test_local_timezone.py index c9dd89ff..dfdab991 100644 --- a/tests/tz/test_local_timezone.py +++ b/tests/tz/test_local_timezone.py @@ -47,4 +47,4 @@ def test_unix_etc_timezone_dir(): root_path = os.path.join(local_path, "fixtures", "tz", "timezone_dir") tz = _get_unix_timezone(_root=root_path) - assert tz.name == "Europe/Paris" \ No newline at end of file + assert tz.name == "Europe/Paris" diff --git a/tests/tz/test_timezone.py b/tests/tz/test_timezone.py index 38cdbcb1..af71fa39 100644 --- a/tests/tz/test_timezone.py +++ b/tests/tz/test_timezone.py @@ -174,7 +174,17 @@ def test_pendulum_create_repeated(): def test_pendulum_create_repeated_with_pre_rule(): - dt = pendulum.datetime(2013, 10, 27, 2, 30, 45, 123456, tz="Europe/Paris", fold=0,) + dt = pendulum.datetime( + 2013, + 10, + 27, + 2, + 30, + 45, + 123456, + tz="Europe/Paris", + fold=0, + ) assert_datetime(dt, 2013, 10, 27, 2, 30, 45, 123456) assert dt.timezone_name == "Europe/Paris" diff --git a/tests/tz/test_timezones.py b/tests/tz/test_timezones.py index 163fc0a1..be4f178f 100644 --- a/tests/tz/test_timezones.py +++ b/tests/tz/test_timezones.py @@ -1,7 +1,8 @@ # -*- coding: utf-8 -*- -import pendulum import pytest +import pendulum + def test_timezones(): zones = pendulum.timezones() From 0f8ba38e63ae6b6818b8f55a614c5d2a4d680c9c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Sat, 25 Sep 2021 23:47:36 +0200 Subject: [PATCH 018/177] Update test workflow --- .github/workflows/tests.yml | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 11f14865..dd41305e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -18,10 +18,10 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Set up Python 3.8 + - name: Set up Python 3.9 uses: actions/setup-python@v1 with: - python-version: 3.8 + python-version: 3.9 - name: Linting run: | pip install pre-commit @@ -34,7 +34,7 @@ jobs: strategy: matrix: os: [Ubuntu, MacOS, Windows] - python-version: [3.6, 3.7, 3.8, pypy3] + python-version: [3.6, 3.7, 3.8, 3.9, pypy3] steps: - uses: actions/checkout@v2 @@ -51,9 +51,18 @@ jobs: - name: Install poetry shell: bash run: | - curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py - python get-poetry.py --preview -y - echo "::set-env name=PATH::$HOME/.poetry/bin:$PATH" + curl -fsS -o install-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py + python install-poetry.py --preview -y + + - name: Update PATH + if: ${{ matrix.os != 'Windows' }} + shell: bash + run: echo "$HOME/.local/bin" >> $GITHUB_PATH + + - name: Update Path for Windows + if: ${{ matrix.os == 'Windows' }} + shell: bash + run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH - name: Configure poetry shell: bash From 7c050f1eddeb796cfabab581f52562b6ea36ead0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Sun, 26 Sep 2021 23:56:24 +0200 Subject: [PATCH 019/177] Fix tests on Python 3.8+ --- pendulum/datetime.py | 2 +- poetry.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pendulum/datetime.py b/pendulum/datetime.py index ce171adf..6872c9de 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -516,7 +516,7 @@ def add( tz=self.tz, ) - dt = self.__class__( + dt = datetime.datetime( dt.year, dt.month, dt.day, diff --git a/poetry.lock b/poetry.lock index 8a08ac8d..2c5d410a 100644 --- a/poetry.lock +++ b/poetry.lock @@ -174,7 +174,7 @@ python-versions = "*" [[package]] name = "ghp-import" -version = "2.0.1" +version = "2.0.2" description = "Copy your docs directly to the gh-pages branch." category = "dev" optional = false @@ -184,7 +184,7 @@ python-versions = "*" python-dateutil = ">=2.8.1" [package.extras] -dev = ["twine", "markdown", "flake8"] +dev = ["twine", "markdown", "flake8", "wheel"] [[package]] name = "identify" @@ -801,7 +801,8 @@ filelock = [ {file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"}, ] ghp-import = [ - {file = "ghp-import-2.0.1.tar.gz", hash = "sha256:753de2eace6e0f7d4edfb3cce5e3c3b98cd52aadb80163303d1d036bda7b4483"}, + {file = "ghp-import-2.0.2.tar.gz", hash = "sha256:947b3771f11be850c852c64b561c600fdddf794bab363060854c1ee7ad05e071"}, + {file = "ghp_import-2.0.2-py3-none-any.whl", hash = "sha256:5f8962b30b20652cdffa9c5a9812f7de6bcb56ec475acac579807719bf242c46"}, ] identify = [ {file = "identify-2.2.15-py2.py3-none-any.whl", hash = "sha256:de83a84d774921669774a2000bf87ebba46b4d1c04775f4a5d37deff0cf39f73"}, From 71b7239c16c104e8874e5dcb7b3a0f86251a697b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Mon, 18 Oct 2021 00:15:19 +0200 Subject: [PATCH 020/177] Fix compatibility with Python 3.8+ --- pendulum/datetime.py | 11 +++++++++++ pendulum/utils/_compat.py | 1 + tox.ini | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/pendulum/datetime.py b/pendulum/datetime.py index 6872c9de..7019eaa4 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -39,6 +39,7 @@ from .tz import UTC from .tz.timezone import FixedTimezone from .tz.timezone import Timezone +from .utils._compat import PY38 class DateTime(datetime.datetime, Date): @@ -1147,6 +1148,16 @@ def __add__(self, other: datetime.timedelta) -> "DateTime": if not isinstance(other, datetime.timedelta): return NotImplemented + if PY38: + # This is a workaround for Python 3.8+ + # since calling astimezone() will call this method + # instead of the base datetime class one. + import inspect + + caller = inspect.stack()[1][3] + if caller == "astimezone": + return super().__add__(other) + return self._add_timedelta_(other) def __radd__(self, other: datetime.timedelta) -> "DateTime": diff --git a/pendulum/utils/_compat.py b/pendulum/utils/_compat.py index 4f009988..11924e6c 100644 --- a/pendulum/utils/_compat.py +++ b/pendulum/utils/_compat.py @@ -2,6 +2,7 @@ PYPY = hasattr(sys, "pypy_version_info") +PY38 = sys.version_info[:2] >= (3, 8) try: diff --git a/tox.ini b/tox.ini index 38c59819..eb45ad57 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py36, py37, py38, pypy3 +envlist = py36, py37, py38, py39, pypy3 [testenv] whitelist_externals = poetry From 18ffa39b01661c743e46ba9bf86b6b67dc929144 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Mon, 18 Oct 2021 00:23:16 +0200 Subject: [PATCH 021/177] Remove PyPy from CI --- .github/workflows/tests.yml | 2 +- tox.ini | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dd41305e..ec9c8f9c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,7 @@ jobs: strategy: matrix: os: [Ubuntu, MacOS, Windows] - python-version: [3.6, 3.7, 3.8, 3.9, pypy3] + python-version: [3.6, 3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 diff --git a/tox.ini b/tox.ini index eb45ad57..4248f5ab 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py36, py37, py38, py39, pypy3 +envlist = py36, py37, py38, py39, py310, pypy3 [testenv] whitelist_externals = poetry From 8839cffb603f3f22c9897b57aed3962c324e2863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Mon, 18 Oct 2021 19:10:36 +0200 Subject: [PATCH 022/177] Remove support for Python 3.6 --- .github/workflows/tests.yml | 2 +- poetry.lock | 386 ++++++++++++++++-------------------- pyproject.toml | 12 +- tox.ini | 2 +- 4 files changed, 184 insertions(+), 218 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ec9c8f9c..e90f116d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,7 @@ jobs: strategy: matrix: os: [Ubuntu, MacOS, Windows] - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9] steps: - uses: actions/checkout@v2 diff --git a/poetry.lock b/poetry.lock index 2c5d410a..336dce9c 100644 --- a/poetry.lock +++ b/poetry.lock @@ -54,9 +54,6 @@ category = "main" optional = false python-versions = ">=3.6" -[package.dependencies] -importlib-resources = {version = "*", markers = "python_version < \"3.7\""} - [package.extras] tzdata = ["tzdata"] @@ -70,7 +67,6 @@ python-versions = ">=3.6.2" [package.dependencies] click = ">=7.1.2" -dataclasses = {version = ">=0.6", markers = "python_version < \"3.7\""} mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0,<1" platformdirs = ">=2" @@ -111,7 +107,7 @@ pylev = ">=1.3.0,<2.0.0" [[package]] name = "click" -version = "8.0.1" +version = "8.0.3" description = "Composable command line interface toolkit" category = "dev" optional = false @@ -131,14 +127,14 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "coverage" -version = "5.5" +version = "6.0.2" description = "Code coverage measurement for Python" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +python-versions = ">=3.6" [package.extras] -toml = ["toml"] +toml = ["tomli"] [[package]] name = "crashtest" @@ -148,14 +144,6 @@ category = "dev" optional = false python-versions = ">=3.6,<4.0" -[[package]] -name = "dataclasses" -version = "0.8" -description = "A backport of the dataclasses module for Python 3.6" -category = "dev" -optional = false -python-versions = ">=3.6, <3.7" - [[package]] name = "distlib" version = "0.3.3" @@ -166,11 +154,15 @@ python-versions = "*" [[package]] name = "filelock" -version = "3.0.12" +version = "3.3.1" description = "A platform independent file lock." category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" + +[package.extras] +docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] +testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-cov", "pytest-timeout (>=1.4.2)"] [[package]] name = "ghp-import" @@ -188,7 +180,7 @@ dev = ["twine", "markdown", "flake8", "wheel"] [[package]] name = "identify" -version = "2.2.15" +version = "2.3.0" description = "File identification library for Python" category = "dev" optional = false @@ -214,21 +206,6 @@ docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] perf = ["ipython"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] -[[package]] -name = "importlib-resources" -version = "5.2.2" -description = "Read resources from Python packages" -category = "main" -optional = false -python-versions = ">=3.6" - -[package.dependencies] -zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "pytest-black (>=0.3.7)", "pytest-mypy"] - [[package]] name = "isort" version = "5.9.3" @@ -245,7 +222,7 @@ plugins = ["setuptools"] [[package]] name = "jinja2" -version = "3.0.1" +version = "3.0.2" description = "A very fast and expressive template engine." category = "dev" optional = false @@ -300,7 +277,7 @@ python-versions = ">=3.6" [[package]] name = "mkdocs" -version = "1.2.2" +version = "1.2.3" description = "Project documentation with Markdown." category = "dev" optional = false @@ -402,7 +379,6 @@ python-versions = ">=3.6.1" cfgv = ">=2.0.0" identify = ">=1.0.0" importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} -importlib-resources = {version = "*", markers = "python_version < \"3.7\""} nodeenv = ">=0.11.1" pyyaml = ">=5.1" toml = "*" @@ -503,7 +479,7 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2021.1" +version = "2021.3" description = "World timezone definitions, modern and historical" category = "dev" optional = false @@ -511,11 +487,11 @@ python-versions = "*" [[package]] name = "pyyaml" -version = "5.4.1" +version = "6.0" description = "YAML parser and emitter for Python" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, !=3.5.*" +python-versions = ">=3.6" [[package]] name = "pyyaml-env-tag" @@ -530,7 +506,7 @@ pyyaml = "*" [[package]] name = "regex" -version = "2021.9.24" +version = "2021.10.8" description = "Alternative regular expression module, to replace re." category = "dev" optional = false @@ -612,7 +588,7 @@ python-versions = "*" [[package]] name = "tzdata" -version = "2021.1" +version = "2021.2.post0" description = "Provider of IANA time zone data" category = "main" optional = false @@ -631,7 +607,6 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" distlib = ">=0.3.1,<1" filelock = ">=3.0.0,<4" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -importlib-resources = {version = ">=1.0", markers = "python_version < \"3.7\""} platformdirs = ">=2,<3" six = ">=1.9.0,<2" @@ -641,14 +616,14 @@ testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", [[package]] name = "watchdog" -version = "2.1.5" +version = "2.1.6" description = "Filesystem events monitoring" category = "dev" optional = false python-versions = ">=3.6" [package.extras] -watchmedo = ["PyYAML (>=3.10)", "argh (>=0.24.1)"] +watchmedo = ["PyYAML (>=3.10)"] [[package]] name = "wcwidth" @@ -660,9 +635,9 @@ python-versions = "*" [[package]] name = "zipp" -version = "3.5.0" +version = "3.6.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" +category = "dev" optional = false python-versions = ">=3.6" @@ -672,8 +647,8 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" -python-versions = "^3.6" -content-hash = "656fb64a37b4518454a432fffd80953786da2b4bf67be193e98378fb90d25332" +python-versions = "^3.7" +content-hash = "04fdebb905eef9b386bcc19c73f81c828a94565269f0ae01de95bb7e69eb11fb" [metadata.files] atomicwrites = [ @@ -723,106 +698,79 @@ cleo = [ {file = "cleo-1.0.0a4.tar.gz", hash = "sha256:a103a065d031b7d936ee88a6b93086a69bd9c1b40fa2ebfe8c056285a66b481d"}, ] click = [ - {file = "click-8.0.1-py3-none-any.whl", hash = "sha256:fba402a4a47334742d782209a7c79bc448911afe1149d07bdabdf480b3e2f4b6"}, - {file = "click-8.0.1.tar.gz", hash = "sha256:8c04c11192119b1ef78ea049e0a6f0463e4c48ef00a30160c704337586f3ad7a"}, + {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"}, + {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"}, ] colorama = [ {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] coverage = [ - {file = "coverage-5.5-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:b6d534e4b2ab35c9f93f46229363e17f63c53ad01330df9f2d6bd1187e5eaacf"}, - {file = "coverage-5.5-cp27-cp27m-manylinux1_i686.whl", hash = "sha256:b7895207b4c843c76a25ab8c1e866261bcfe27bfaa20c192de5190121770672b"}, - {file = "coverage-5.5-cp27-cp27m-manylinux1_x86_64.whl", hash = "sha256:c2723d347ab06e7ddad1a58b2a821218239249a9e4365eaff6649d31180c1669"}, - {file = "coverage-5.5-cp27-cp27m-manylinux2010_i686.whl", hash = "sha256:900fbf7759501bc7807fd6638c947d7a831fc9fdf742dc10f02956ff7220fa90"}, - {file = "coverage-5.5-cp27-cp27m-manylinux2010_x86_64.whl", hash = "sha256:004d1880bed2d97151facef49f08e255a20ceb6f9432df75f4eef018fdd5a78c"}, - {file = "coverage-5.5-cp27-cp27m-win32.whl", hash = "sha256:06191eb60f8d8a5bc046f3799f8a07a2d7aefb9504b0209aff0b47298333302a"}, - {file = "coverage-5.5-cp27-cp27m-win_amd64.whl", hash = "sha256:7501140f755b725495941b43347ba8a2777407fc7f250d4f5a7d2a1050ba8e82"}, - {file = "coverage-5.5-cp27-cp27mu-manylinux1_i686.whl", hash = "sha256:372da284cfd642d8e08ef606917846fa2ee350f64994bebfbd3afb0040436905"}, - {file = "coverage-5.5-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:8963a499849a1fc54b35b1c9f162f4108017b2e6db2c46c1bed93a72262ed083"}, - {file = "coverage-5.5-cp27-cp27mu-manylinux2010_i686.whl", hash = "sha256:869a64f53488f40fa5b5b9dcb9e9b2962a66a87dab37790f3fcfb5144b996ef5"}, - {file = "coverage-5.5-cp27-cp27mu-manylinux2010_x86_64.whl", hash = "sha256:4a7697d8cb0f27399b0e393c0b90f0f1e40c82023ea4d45d22bce7032a5d7b81"}, - {file = "coverage-5.5-cp310-cp310-macosx_10_14_x86_64.whl", hash = "sha256:8d0a0725ad7c1a0bcd8d1b437e191107d457e2ec1084b9f190630a4fb1af78e6"}, - {file = "coverage-5.5-cp310-cp310-manylinux1_x86_64.whl", hash = "sha256:51cb9476a3987c8967ebab3f0fe144819781fca264f57f89760037a2ea191cb0"}, - {file = "coverage-5.5-cp310-cp310-win_amd64.whl", hash = "sha256:c0891a6a97b09c1f3e073a890514d5012eb256845c451bd48f7968ef939bf4ae"}, - {file = "coverage-5.5-cp35-cp35m-macosx_10_9_x86_64.whl", hash = "sha256:3487286bc29a5aa4b93a072e9592f22254291ce96a9fbc5251f566b6b7343cdb"}, - {file = "coverage-5.5-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:deee1077aae10d8fa88cb02c845cfba9b62c55e1183f52f6ae6a2df6a2187160"}, - {file = "coverage-5.5-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:f11642dddbb0253cc8853254301b51390ba0081750a8ac03f20ea8103f0c56b6"}, - {file = "coverage-5.5-cp35-cp35m-manylinux2010_i686.whl", hash = "sha256:6c90e11318f0d3c436a42409f2749ee1a115cd8b067d7f14c148f1ce5574d701"}, - {file = "coverage-5.5-cp35-cp35m-manylinux2010_x86_64.whl", hash = "sha256:30c77c1dc9f253283e34c27935fded5015f7d1abe83bc7821680ac444eaf7793"}, - {file = "coverage-5.5-cp35-cp35m-win32.whl", hash = "sha256:9a1ef3b66e38ef8618ce5fdc7bea3d9f45f3624e2a66295eea5e57966c85909e"}, - {file = "coverage-5.5-cp35-cp35m-win_amd64.whl", hash = "sha256:972c85d205b51e30e59525694670de6a8a89691186012535f9d7dbaa230e42c3"}, - {file = "coverage-5.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:af0e781009aaf59e25c5a678122391cb0f345ac0ec272c7961dc5455e1c40066"}, - {file = "coverage-5.5-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:74d881fc777ebb11c63736622b60cb9e4aee5cace591ce274fb69e582a12a61a"}, - {file = "coverage-5.5-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:92b017ce34b68a7d67bd6d117e6d443a9bf63a2ecf8567bb3d8c6c7bc5014465"}, - {file = "coverage-5.5-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:d636598c8305e1f90b439dbf4f66437de4a5e3c31fdf47ad29542478c8508bbb"}, - {file = "coverage-5.5-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:41179b8a845742d1eb60449bdb2992196e211341818565abded11cfa90efb821"}, - {file = "coverage-5.5-cp36-cp36m-win32.whl", hash = "sha256:040af6c32813fa3eae5305d53f18875bedd079960822ef8ec067a66dd8afcd45"}, - {file = "coverage-5.5-cp36-cp36m-win_amd64.whl", hash = "sha256:5fec2d43a2cc6965edc0bb9e83e1e4b557f76f843a77a2496cbe719583ce8184"}, - {file = "coverage-5.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:18ba8bbede96a2c3dde7b868de9dcbd55670690af0988713f0603f037848418a"}, - {file = "coverage-5.5-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:2910f4d36a6a9b4214bb7038d537f015346f413a975d57ca6b43bf23d6563b53"}, - {file = "coverage-5.5-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:f0b278ce10936db1a37e6954e15a3730bea96a0997c26d7fee88e6c396c2086d"}, - {file = "coverage-5.5-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:796c9c3c79747146ebd278dbe1e5c5c05dd6b10cc3bcb8389dfdf844f3ead638"}, - {file = "coverage-5.5-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:53194af30d5bad77fcba80e23a1441c71abfb3e01192034f8246e0d8f99528f3"}, - {file = "coverage-5.5-cp37-cp37m-win32.whl", hash = "sha256:184a47bbe0aa6400ed2d41d8e9ed868b8205046518c52464fde713ea06e3a74a"}, - {file = "coverage-5.5-cp37-cp37m-win_amd64.whl", hash = "sha256:2949cad1c5208b8298d5686d5a85b66aae46d73eec2c3e08c817dd3513e5848a"}, - {file = "coverage-5.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:217658ec7187497e3f3ebd901afdca1af062b42cfe3e0dafea4cced3983739f6"}, - {file = "coverage-5.5-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1aa846f56c3d49205c952d8318e76ccc2ae23303351d9270ab220004c580cfe2"}, - {file = "coverage-5.5-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:24d4a7de75446be83244eabbff746d66b9240ae020ced65d060815fac3423759"}, - {file = "coverage-5.5-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:d1f8bf7b90ba55699b3a5e44930e93ff0189aa27186e96071fac7dd0d06a1873"}, - {file = "coverage-5.5-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:970284a88b99673ccb2e4e334cfb38a10aab7cd44f7457564d11898a74b62d0a"}, - {file = "coverage-5.5-cp38-cp38-win32.whl", hash = "sha256:01d84219b5cdbfc8122223b39a954820929497a1cb1422824bb86b07b74594b6"}, - {file = "coverage-5.5-cp38-cp38-win_amd64.whl", hash = "sha256:2e0d881ad471768bf6e6c2bf905d183543f10098e3b3640fc029509530091502"}, - {file = "coverage-5.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d1f9ce122f83b2305592c11d64f181b87153fc2c2bbd3bb4a3dde8303cfb1a6b"}, - {file = "coverage-5.5-cp39-cp39-manylinux1_i686.whl", hash = "sha256:13c4ee887eca0f4c5a247b75398d4114c37882658300e153113dafb1d76de529"}, - {file = "coverage-5.5-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:52596d3d0e8bdf3af43db3e9ba8dcdaac724ba7b5ca3f6358529d56f7a166f8b"}, - {file = "coverage-5.5-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:2cafbbb3af0733db200c9b5f798d18953b1a304d3f86a938367de1567f4b5bff"}, - {file = "coverage-5.5-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:44d654437b8ddd9eee7d1eaee28b7219bec228520ff809af170488fd2fed3e2b"}, - {file = "coverage-5.5-cp39-cp39-win32.whl", hash = "sha256:d314ed732c25d29775e84a960c3c60808b682c08d86602ec2c3008e1202e3bb6"}, - {file = "coverage-5.5-cp39-cp39-win_amd64.whl", hash = "sha256:13034c4409db851670bc9acd836243aeee299949bd5673e11844befcb0149f03"}, - {file = "coverage-5.5-pp36-none-any.whl", hash = "sha256:f030f8873312a16414c0d8e1a1ddff2d3235655a2174e3648b4fa66b3f2f1079"}, - {file = "coverage-5.5-pp37-none-any.whl", hash = "sha256:2a3859cb82dcbda1cfd3e6f71c27081d18aa251d20a17d87d26d4cd216fb0af4"}, - {file = "coverage-5.5.tar.gz", hash = "sha256:ebe78fe9a0e874362175b02371bdfbee64d8edc42a044253ddf4ee7d3c15212c"}, + {file = "coverage-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1549e1d08ce38259de2bc3e9a0d5f3642ff4a8f500ffc1b2df73fd621a6cdfc0"}, + {file = "coverage-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcae10fccb27ca2a5f456bf64d84110a5a74144be3136a5e598f9d9fb48c0caa"}, + {file = "coverage-6.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:53a294dc53cfb39c74758edaa6305193fb4258a30b1f6af24b360a6c8bd0ffa7"}, + {file = "coverage-6.0.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8251b37be1f2cd9c0e5ccd9ae0380909c24d2a5ed2162a41fcdbafaf59a85ebd"}, + {file = "coverage-6.0.2-cp310-cp310-win32.whl", hash = "sha256:db42baa892cba723326284490283a68d4de516bfb5aaba369b4e3b2787a778b7"}, + {file = "coverage-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:bbffde2a68398682623d9dd8c0ca3f46fda074709b26fcf08ae7a4c431a6ab2d"}, + {file = "coverage-6.0.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:60e51a3dd55540bec686d7fff61b05048ca31e804c1f32cbb44533e6372d9cc3"}, + {file = "coverage-6.0.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a6a9409223a27d5ef3cca57dd7cd4dfcb64aadf2fad5c3b787830ac9223e01a"}, + {file = "coverage-6.0.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4b34ae4f51bbfa5f96b758b55a163d502be3dcb24f505d0227858c2b3f94f5b9"}, + {file = "coverage-6.0.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3bbda1b550e70fa6ac40533d3f23acd4f4e9cb4e6e77251ce77fdf41b3309fb2"}, + {file = "coverage-6.0.2-cp36-cp36m-win32.whl", hash = "sha256:4e28d2a195c533b58fc94a12826f4431726d8eb029ac21d874345f943530c122"}, + {file = "coverage-6.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:a82d79586a0a4f5fd1cf153e647464ced402938fbccb3ffc358c7babd4da1dd9"}, + {file = "coverage-6.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3be1206dc09fb6298de3fce70593e27436862331a85daee36270b6d0e1c251c4"}, + {file = "coverage-6.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9cd3828bbe1a40070c11fe16a51df733fd2f0cb0d745fb83b7b5c1f05967df7"}, + {file = "coverage-6.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:d036dc1ed8e1388e995833c62325df3f996675779541f682677efc6af71e96cc"}, + {file = "coverage-6.0.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:04560539c19ec26995ecfb3d9307ff154fbb9a172cb57e3b3cfc4ced673103d1"}, + {file = "coverage-6.0.2-cp37-cp37m-win32.whl", hash = "sha256:e4fb7ced4d9dec77d6cf533acfbf8e1415fe799430366affb18d69ee8a3c6330"}, + {file = "coverage-6.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:77b1da5767ed2f44611bc9bc019bc93c03fa495728ec389759b6e9e5039ac6b1"}, + {file = "coverage-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:61b598cbdbaae22d9e34e3f675997194342f866bb1d781da5d0be54783dce1ff"}, + {file = "coverage-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:36e9040a43d2017f2787b28d365a4bb33fcd792c7ff46a047a04094dc0e2a30d"}, + {file = "coverage-6.0.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:9f1627e162e3864a596486774876415a7410021f4b67fd2d9efdf93ade681afc"}, + {file = "coverage-6.0.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e7a0b42db2a47ecb488cde14e0f6c7679a2c5a9f44814393b162ff6397fcdfbb"}, + {file = "coverage-6.0.2-cp38-cp38-win32.whl", hash = "sha256:a1b73c7c4d2a42b9d37dd43199c5711d91424ff3c6c22681bc132db4a4afec6f"}, + {file = "coverage-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:1db67c497688fd4ba85b373b37cc52c50d437fd7267520ecd77bddbd89ea22c9"}, + {file = "coverage-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f2f184bf38e74f152eed7f87e345b51f3ab0b703842f447c22efe35e59942c24"}, + {file = "coverage-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd1cf1deb3d5544bd942356364a2fdc8959bad2b6cf6eb17f47d301ea34ae822"}, + {file = "coverage-6.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ad9b8c1206ae41d46ec7380b78ba735ebb77758a650643e841dd3894966c31d0"}, + {file = "coverage-6.0.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:381d773d896cc7f8ba4ff3b92dee4ed740fb88dfe33b6e42efc5e8ab6dfa1cfe"}, + {file = "coverage-6.0.2-cp39-cp39-win32.whl", hash = "sha256:424c44f65e8be58b54e2b0bd1515e434b940679624b1b72726147cfc6a9fc7ce"}, + {file = "coverage-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:abbff240f77347d17306d3201e14431519bf64495648ca5a49571f988f88dee9"}, + {file = "coverage-6.0.2-pp36-none-any.whl", hash = "sha256:7092eab374346121805fb637572483270324407bf150c30a3b161fc0c4ca5164"}, + {file = "coverage-6.0.2-pp37-none-any.whl", hash = "sha256:30922626ce6f7a5a30bdba984ad21021529d3d05a68b4f71ea3b16bda35b8895"}, + {file = "coverage-6.0.2.tar.gz", hash = "sha256:6807947a09510dc31fa86f43595bf3a14017cd60bf633cc746d52141bfa6b149"}, ] crashtest = [ {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, ] -dataclasses = [ - {file = "dataclasses-0.8-py3-none-any.whl", hash = "sha256:0201d89fa866f68c8ebd9d08ee6ff50c0b255f8ec63a71c16fda7af82bb887bf"}, - {file = "dataclasses-0.8.tar.gz", hash = "sha256:8479067f342acf957dc82ec415d355ab5edb7e7646b90dc6e2fd1d96ad084c97"}, -] distlib = [ {file = "distlib-0.3.3-py2.py3-none-any.whl", hash = "sha256:c8b54e8454e5bf6237cc84c20e8264c3e991e824ef27e8f1e81049867d861e31"}, {file = "distlib-0.3.3.zip", hash = "sha256:d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05"}, ] filelock = [ - {file = "filelock-3.0.12-py3-none-any.whl", hash = "sha256:929b7d63ec5b7d6b71b0fa5ac14e030b3f70b75747cef1b10da9b879fef15836"}, - {file = "filelock-3.0.12.tar.gz", hash = "sha256:18d82244ee114f543149c66a6e0c14e9c4f8a1044b5cdaadd0f82159d6a6ff59"}, + {file = "filelock-3.3.1-py3-none-any.whl", hash = "sha256:2b5eb3589e7fdda14599e7eb1a50e09b4cc14f34ed98b8ba56d33bfaafcbef2f"}, + {file = "filelock-3.3.1.tar.gz", hash = "sha256:34a9f35f95c441e7b38209775d6e0337f9a3759f3565f6c5798f19618527c76f"}, ] ghp-import = [ {file = "ghp-import-2.0.2.tar.gz", hash = "sha256:947b3771f11be850c852c64b561c600fdddf794bab363060854c1ee7ad05e071"}, {file = "ghp_import-2.0.2-py3-none-any.whl", hash = "sha256:5f8962b30b20652cdffa9c5a9812f7de6bcb56ec475acac579807719bf242c46"}, ] identify = [ - {file = "identify-2.2.15-py2.py3-none-any.whl", hash = "sha256:de83a84d774921669774a2000bf87ebba46b4d1c04775f4a5d37deff0cf39f73"}, - {file = "identify-2.2.15.tar.gz", hash = "sha256:528a88021749035d5a39fe2ba67c0642b8341aaf71889da0e1ed669a429b87f0"}, + {file = "identify-2.3.0-py2.py3-none-any.whl", hash = "sha256:d1e82c83d063571bb88087676f81261a4eae913c492dafde184067c584bc7c05"}, + {file = "identify-2.3.0.tar.gz", hash = "sha256:fd08c97f23ceee72784081f1ce5125c8f53a02d3f2716dde79a6ab8f1039fea5"}, ] importlib-metadata = [ {file = "importlib_metadata-4.8.1-py3-none-any.whl", hash = "sha256:b618b6d2d5ffa2f16add5697cf57a46c76a56229b0ed1c438322e4e95645bd15"}, {file = "importlib_metadata-4.8.1.tar.gz", hash = "sha256:f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1"}, ] -importlib-resources = [ - {file = "importlib_resources-5.2.2-py3-none-any.whl", hash = "sha256:2480d8e07d1890056cb53c96e3de44fead9c62f2ba949b0f2e4c4345f4afa977"}, - {file = "importlib_resources-5.2.2.tar.gz", hash = "sha256:a65882a4d0fe5fbf702273456ba2ce74fe44892c25e42e057aca526b702a6d4b"}, -] isort = [ {file = "isort-5.9.3-py3-none-any.whl", hash = "sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2"}, {file = "isort-5.9.3.tar.gz", hash = "sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899"}, ] jinja2 = [ - {file = "Jinja2-3.0.1-py3-none-any.whl", hash = "sha256:1f06f2da51e7b56b8f238affdd6b4e2c61e39598a378cc49345bc1bd42a978a4"}, - {file = "Jinja2-3.0.1.tar.gz", hash = "sha256:703f484b47a6af502e743c9122595cc812b0271f661722403114f71a79d0f5a4"}, + {file = "Jinja2-3.0.2-py3-none-any.whl", hash = "sha256:8569982d3f0889eed11dd620c706d39b60c36d6d25843961f33f77fb6bc6b20c"}, + {file = "Jinja2-3.0.2.tar.gz", hash = "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45"}, ] markdown = [ {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, @@ -872,8 +820,8 @@ mergedeep = [ {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, ] mkdocs = [ - {file = "mkdocs-1.2.2-py3-none-any.whl", hash = "sha256:d019ff8e17ec746afeb54eb9eb4112b5e959597aebc971da46a5c9486137f0ff"}, - {file = "mkdocs-1.2.2.tar.gz", hash = "sha256:a334f5bd98ec960638511366eb8c5abc9c99b9083a0ed2401d8791b112d6b078"}, + {file = "mkdocs-1.2.3-py3-none-any.whl", hash = "sha256:a1fa8c2d0c1305d7fc2b9d9f607c71778572a8b110fb26642aa00296c9e6d072"}, + {file = "mkdocs-1.2.3.tar.gz", hash = "sha256:89f5a094764381cda656af4298727c9f53dc3e602983087e1fe96ea1df24f4c1"}, ] more-itertools = [ {file = "more-itertools-8.10.0.tar.gz", hash = "sha256:1debcabeb1df793814859d64a81ad7cb10504c24349368ccf214c664c474f41f"}, @@ -934,78 +882,96 @@ pytest-cov = [ ] python-dateutil = [] pytz = [ - {file = "pytz-2021.1-py2.py3-none-any.whl", hash = "sha256:eb10ce3e7736052ed3623d49975ce333bcd712c7bb19a58b9e2089d4057d0798"}, - {file = "pytz-2021.1.tar.gz", hash = "sha256:83a4a90894bf38e243cf052c8b58f381bfe9a7a483f6a9cab140bc7f702ac4da"}, + {file = "pytz-2021.3-py2.py3-none-any.whl", hash = "sha256:3672058bc3453457b622aab7a1c3bfd5ab0bdae451512f6cf25f64ed37f5b87c"}, + {file = "pytz-2021.3.tar.gz", hash = "sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326"}, ] pyyaml = [ - {file = "PyYAML-5.4.1-cp27-cp27m-macosx_10_9_x86_64.whl", hash = "sha256:3b2b1824fe7112845700f815ff6a489360226a5609b96ec2190a45e62a9fc922"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win32.whl", hash = "sha256:129def1b7c1bf22faffd67b8f3724645203b79d8f4cc81f674654d9902cb4393"}, - {file = "PyYAML-5.4.1-cp27-cp27m-win_amd64.whl", hash = "sha256:4465124ef1b18d9ace298060f4eccc64b0850899ac4ac53294547536533800c8"}, - {file = "PyYAML-5.4.1-cp27-cp27mu-manylinux1_x86_64.whl", hash = "sha256:bb4191dfc9306777bc594117aee052446b3fa88737cd13b7188d0e7aa8162185"}, - {file = "PyYAML-5.4.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:6c78645d400265a062508ae399b60b8c167bf003db364ecb26dcab2bda048253"}, - {file = "PyYAML-5.4.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:4e0583d24c881e14342eaf4ec5fbc97f934b999a6828693a99157fde912540cc"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win32.whl", hash = "sha256:3bd0e463264cf257d1ffd2e40223b197271046d09dadf73a0fe82b9c1fc385a5"}, - {file = "PyYAML-5.4.1-cp36-cp36m-win_amd64.whl", hash = "sha256:e4fac90784481d221a8e4b1162afa7c47ed953be40d31ab4629ae917510051df"}, - {file = "PyYAML-5.4.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:5accb17103e43963b80e6f837831f38d314a0495500067cb25afab2e8d7a4018"}, - {file = "PyYAML-5.4.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:e1d4970ea66be07ae37a3c2e48b5ec63f7ba6804bdddfdbd3cfd954d25a82e63"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win32.whl", hash = "sha256:dd5de0646207f053eb0d6c74ae45ba98c3395a571a2891858e87df7c9b9bd51b"}, - {file = "PyYAML-5.4.1-cp37-cp37m-win_amd64.whl", hash = "sha256:08682f6b72c722394747bddaf0aa62277e02557c0fd1c42cb853016a38f8dedf"}, - {file = "PyYAML-5.4.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d2d9808ea7b4af864f35ea216be506ecec180628aced0704e34aca0b040ffe46"}, - {file = "PyYAML-5.4.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:8c1be557ee92a20f184922c7b6424e8ab6691788e6d86137c5d93c1a6ec1b8fb"}, - {file = "PyYAML-5.4.1-cp38-cp38-win32.whl", hash = "sha256:fa5ae20527d8e831e8230cbffd9f8fe952815b2b7dae6ffec25318803a7528fc"}, - {file = "PyYAML-5.4.1-cp38-cp38-win_amd64.whl", hash = "sha256:0f5f5786c0e09baddcd8b4b45f20a7b5d61a7e7e99846e3c799b05c7c53fa696"}, - {file = "PyYAML-5.4.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:294db365efa064d00b8d1ef65d8ea2c3426ac366c0c4368d930bf1c5fb497f77"}, - {file = "PyYAML-5.4.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:74c1485f7707cf707a7aef42ef6322b8f97921bd89be2ab6317fd782c2d53183"}, - {file = "PyYAML-5.4.1-cp39-cp39-win32.whl", hash = "sha256:49d4cdd9065b9b6e206d0595fee27a96b5dd22618e7520c33204a4a3239d5b10"}, - {file = "PyYAML-5.4.1-cp39-cp39-win_amd64.whl", hash = "sha256:c20cfa2d49991c8b4147af39859b167664f2ad4561704ee74c1de03318e898db"}, - {file = "PyYAML-5.4.1.tar.gz", hash = "sha256:607774cbba28732bfa802b54baa7484215f530991055bb562efbed5b2f20a45e"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, + {file = "PyYAML-6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:9df7ed3b3d2e0ecfe09e14741b857df43adb5a3ddadc919a2d94fbdf78fea53c"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77f396e6ef4c73fdc33a9157446466f1cff553d979bd00ecb64385760c6babdc"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:a80a78046a72361de73f8f395f1f1e49f956c6be882eed58505a15f3e430962b"}, + {file = "PyYAML-6.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f84fbc98b019fef2ee9a1cb3ce93e3187a6df0b2538a651bfb890254ba9f90b5"}, + {file = "PyYAML-6.0-cp310-cp310-win32.whl", hash = "sha256:2cd5df3de48857ed0544b34e2d40e9fac445930039f3cfe4bcc592a1f836d513"}, + {file = "PyYAML-6.0-cp310-cp310-win_amd64.whl", hash = "sha256:daf496c58a8c52083df09b80c860005194014c3698698d1a57cbcfa182142a3a"}, + {file = "PyYAML-6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:897b80890765f037df3403d22bab41627ca8811ae55e9a722fd0392850ec4d86"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:50602afada6d6cbfad699b0c7bb50d5ccffa7e46a3d738092afddc1f9758427f"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:48c346915c114f5fdb3ead70312bd042a953a8ce5c7106d5bfb1a5254e47da92"}, + {file = "PyYAML-6.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98c4d36e99714e55cfbaaee6dd5badbc9a1ec339ebfc3b1f52e293aee6bb71a4"}, + {file = "PyYAML-6.0-cp36-cp36m-win32.whl", hash = "sha256:0283c35a6a9fbf047493e3a0ce8d79ef5030852c51e9d911a27badfde0605293"}, + {file = "PyYAML-6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:07751360502caac1c067a8132d150cf3d61339af5691fe9e87803040dbc5db57"}, + {file = "PyYAML-6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:819b3830a1543db06c4d4b865e70ded25be52a2e0631ccd2f6a47a2822f2fd7c"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:473f9edb243cb1935ab5a084eb238d842fb8f404ed2193a915d1784b5a6b5fc0"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:0ce82d761c532fe4ec3f87fc45688bdd3a4c1dc5e0b4a19814b9009a29baefd4"}, + {file = "PyYAML-6.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:231710d57adfd809ef5d34183b8ed1eeae3f76459c18fb4a0b373ad56bedcdd9"}, + {file = "PyYAML-6.0-cp37-cp37m-win32.whl", hash = "sha256:c5687b8d43cf58545ade1fe3e055f70eac7a5a1a0bf42824308d868289a95737"}, + {file = "PyYAML-6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:d15a181d1ecd0d4270dc32edb46f7cb7733c7c508857278d3d378d14d606db2d"}, + {file = "PyYAML-6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0b4624f379dab24d3725ffde76559cff63d9ec94e1736b556dacdfebe5ab6d4b"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:213c60cd50106436cc818accf5baa1aba61c0189ff610f64f4a3e8c6726218ba"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:9fa600030013c4de8165339db93d182b9431076eb98eb40ee068700c9c813e34"}, + {file = "PyYAML-6.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:277a0ef2981ca40581a47093e9e2d13b3f1fbbeffae064c1d21bfceba2030287"}, + {file = "PyYAML-6.0-cp38-cp38-win32.whl", hash = "sha256:d4eccecf9adf6fbcc6861a38015c2a64f38b9d94838ac1810a9023a0609e1b78"}, + {file = "PyYAML-6.0-cp38-cp38-win_amd64.whl", hash = "sha256:1e4747bc279b4f613a09eb64bba2ba602d8a6664c6ce6396a4d0cd413a50ce07"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:055d937d65826939cb044fc8c9b08889e8c743fdc6a32b33e2390f66013e449b"}, + {file = "PyYAML-6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e61ceaab6f49fb8bdfaa0f92c4b57bcfbea54c09277b1b4f7ac376bfb7a7c174"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d67d839ede4ed1b28a4e8909735fc992a923cdb84e618544973d7dfc71540803"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:cba8c411ef271aa037d7357a2bc8f9ee8b58b9965831d9e51baf703280dc73d3"}, + {file = "PyYAML-6.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:40527857252b61eacd1d9af500c3337ba8deb8fc298940291486c465c8b46ec0"}, + {file = "PyYAML-6.0-cp39-cp39-win32.whl", hash = "sha256:b5b9eccad747aabaaffbc6064800670f0c297e52c12754eb1d976c57e4f74dcb"}, + {file = "PyYAML-6.0-cp39-cp39-win_amd64.whl", hash = "sha256:b3d267842bf12586ba6c734f89d1f5b871df0273157918b0ccefa29deb05c21c"}, + {file = "PyYAML-6.0.tar.gz", hash = "sha256:68fb519c14306fec9720a2a5b45bc9f0c8d1b9c72adf45c37baedfcd949c35a2"}, ] pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] regex = [ - {file = "regex-2021.9.24-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:0628ed7d6334e8f896f882a5c1240de8c4d9b0dd7c7fb8e9f4692f5684b7d656"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3baf3eaa41044d4ced2463fd5d23bf7bd4b03d68739c6c99a59ce1f95599a673"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c000635fd78400a558bd7a3c2981bb2a430005ebaa909d31e6e300719739a949"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:295bc8a13554a25ad31e44c4bedabd3c3e28bba027e4feeb9bb157647a2344a7"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b0e3f59d3c772f2c3baaef2db425e6fc4149d35a052d874bb95ccfca10a1b9f4"}, - {file = "regex-2021.9.24-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:aea4006b73b555fc5bdb650a8b92cf486d678afa168cf9b38402bb60bf0f9c18"}, - {file = "regex-2021.9.24-cp310-cp310-win32.whl", hash = "sha256:09eb62654030f39f3ba46bc6726bea464069c29d00a9709e28c9ee9623a8da4a"}, - {file = "regex-2021.9.24-cp310-cp310-win_amd64.whl", hash = "sha256:8d80087320632457aefc73f686f66139801959bf5b066b4419b92be85be3543c"}, - {file = "regex-2021.9.24-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:7e3536f305f42ad6d31fc86636c54c7dafce8d634e56fef790fbacb59d499dd5"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c31f35a984caffb75f00a86852951a337540b44e4a22171354fb760cefa09346"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:9c7cb25adba814d5f419733fe565f3289d6fa629ab9e0b78f6dff5fa94ab0456"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:85c61bee5957e2d7be390392feac7e1d7abd3a49cbaed0c8cee1541b784c8561"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c94722bf403b8da744b7d0bb87e1f2529383003ceec92e754f768ef9323f69ad"}, - {file = "regex-2021.9.24-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6adc1bd68f81968c9d249aab8c09cdc2cbe384bf2d2cb7f190f56875000cdc72"}, - {file = "regex-2021.9.24-cp36-cp36m-win32.whl", hash = "sha256:2054dea683f1bda3a804fcfdb0c1c74821acb968093d0be16233873190d459e3"}, - {file = "regex-2021.9.24-cp36-cp36m-win_amd64.whl", hash = "sha256:7783d89bd5413d183a38761fbc68279b984b9afcfbb39fa89d91f63763fbfb90"}, - {file = "regex-2021.9.24-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:b15dc34273aefe522df25096d5d087abc626e388a28a28ac75a4404bb7668736"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10a7a9cbe30bd90b7d9a1b4749ef20e13a3528e4215a2852be35784b6bd070f0"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fb9f5844db480e2ef9fce3a72e71122dd010ab7b2920f777966ba25f7eb63819"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:17310b181902e0bb42b29c700e2c2346b8d81f26e900b1328f642e225c88bce1"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:0bba1f6df4eafe79db2ecf38835c2626dbd47911e0516f6962c806f83e7a99ae"}, - {file = "regex-2021.9.24-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:821e10b73e0898544807a0692a276e539e5bafe0a055506a6882814b6a02c3ec"}, - {file = "regex-2021.9.24-cp37-cp37m-win32.whl", hash = "sha256:9c371dd326289d85906c27ec2bc1dcdedd9d0be12b543d16e37bad35754bde48"}, - {file = "regex-2021.9.24-cp37-cp37m-win_amd64.whl", hash = "sha256:1e8d1898d4fb817120a5f684363b30108d7b0b46c7261264b100d14ec90a70e7"}, - {file = "regex-2021.9.24-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8a5c2250c0a74428fd5507ae8853706fdde0f23bfb62ee1ec9418eeacf216078"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8aec4b4da165c4a64ea80443c16e49e3b15df0f56c124ac5f2f8708a65a0eddc"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:650c4f1fc4273f4e783e1d8e8b51a3e2311c2488ba0fcae6425b1e2c248a189d"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2cdb3789736f91d0b3333ac54d12a7e4f9efbc98f53cb905d3496259a893a8b3"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4e61100200fa6ab7c99b61476f9f9653962ae71b931391d0264acfb4d9527d9c"}, - {file = "regex-2021.9.24-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8c268e78d175798cd71d29114b0a1f1391c7d011995267d3b62319ec1a4ecaa1"}, - {file = "regex-2021.9.24-cp38-cp38-win32.whl", hash = "sha256:658e3477676009083422042c4bac2bdad77b696e932a3de001c42cc046f8eda2"}, - {file = "regex-2021.9.24-cp38-cp38-win_amd64.whl", hash = "sha256:a731552729ee8ae9c546fb1c651c97bf5f759018fdd40d0e9b4d129e1e3a44c8"}, - {file = "regex-2021.9.24-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:86f9931eb92e521809d4b64ec8514f18faa8e11e97d6c2d1afa1bcf6c20a8eab"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:dcbbc9cfa147d55a577d285fd479b43103188855074552708df7acc31a476dd9"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:29385c4dbb3f8b3a55ce13de6a97a3d21bd00de66acd7cdfc0b49cb2f08c906c"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c50a6379763c733562b1fee877372234d271e5c78cd13ade5f25978aa06744db"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6f74b6d8f59f3cfb8237e25c532b11f794b96f5c89a6f4a25857d85f84fbef11"}, - {file = "regex-2021.9.24-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6c4d83d21d23dd854ffbc8154cf293f4e43ba630aa9bd2539c899343d7f59da3"}, - {file = "regex-2021.9.24-cp39-cp39-win32.whl", hash = "sha256:95e89a8558c8c48626dcffdf9c8abac26b7c251d352688e7ab9baf351e1c7da6"}, - {file = "regex-2021.9.24-cp39-cp39-win_amd64.whl", hash = "sha256:835962f432bce92dc9bf22903d46c50003c8d11b1dc64084c8fae63bca98564a"}, - {file = "regex-2021.9.24.tar.gz", hash = "sha256:6266fde576e12357b25096351aac2b4b880b0066263e7bc7a9a1b4307991bb0e"}, + {file = "regex-2021.10.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:094a905e87a4171508c2a0e10217795f83c636ccc05ddf86e7272c26e14056ae"}, + {file = "regex-2021.10.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:981c786293a3115bc14c103086ae54e5ee50ca57f4c02ce7cf1b60318d1e8072"}, + {file = "regex-2021.10.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b0f2f874c6a157c91708ac352470cb3bef8e8814f5325e3c5c7a0533064c6a24"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51feefd58ac38eb91a21921b047da8644155e5678e9066af7bcb30ee0dca7361"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea8de658d7db5987b11097445f2b1f134400e2232cb40e614e5f7b6f5428710e"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1ce02f420a7ec3b2480fe6746d756530f69769292eca363218c2291d0b116a01"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:39079ebf54156be6e6902f5c70c078f453350616cfe7bfd2dd15bdb3eac20ccc"}, + {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ff24897f6b2001c38a805d53b6ae72267025878d35ea225aa24675fbff2dba7f"}, + {file = "regex-2021.10.8-cp310-cp310-win32.whl", hash = "sha256:c6569ba7b948c3d61d27f04e2b08ebee24fec9ff8e9ea154d8d1e975b175bfa7"}, + {file = "regex-2021.10.8-cp310-cp310-win_amd64.whl", hash = "sha256:45cb0f7ff782ef51bc79e227a87e4e8f24bc68192f8de4f18aae60b1d60bc152"}, + {file = "regex-2021.10.8-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fab3ab8aedfb443abb36729410403f0fe7f60ad860c19a979d47fb3eb98ef820"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74e55f8d66f1b41d44bc44c891bcf2c7fad252f8f323ee86fba99d71fd1ad5e3"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d52c5e089edbdb6083391faffbe70329b804652a53c2fdca3533e99ab0580d9"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1abbd95cbe9e2467cac65c77b6abd9223df717c7ae91a628502de67c73bf6838"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b9b5c215f3870aa9b011c00daeb7be7e1ae4ecd628e9beb6d7e6107e07d81287"}, + {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f540f153c4f5617bc4ba6433534f8916d96366a08797cbbe4132c37b70403e92"}, + {file = "regex-2021.10.8-cp36-cp36m-win32.whl", hash = "sha256:1f51926db492440e66c89cd2be042f2396cf91e5b05383acd7372b8cb7da373f"}, + {file = "regex-2021.10.8-cp36-cp36m-win_amd64.whl", hash = "sha256:5f55c4804797ef7381518e683249310f7f9646da271b71cb6b3552416c7894ee"}, + {file = "regex-2021.10.8-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fb2baff66b7d2267e07ef71e17d01283b55b3cc51a81b54cc385e721ae172ba4"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e527ab1c4c7cf2643d93406c04e1d289a9d12966529381ce8163c4d2abe4faf"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c98b013273e9da5790ff6002ab326e3f81072b4616fd95f06c8fa733d2745f"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:55ef044899706c10bc0aa052f2fc2e58551e2510694d6aae13f37c50f3f6ff61"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa0ab3530a279a3b7f50f852f1bab41bc304f098350b03e30a3876b7dd89840e"}, + {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a37305eb3199d8f0d8125ec2fb143ba94ff6d6d92554c4b8d4a8435795a6eccd"}, + {file = "regex-2021.10.8-cp37-cp37m-win32.whl", hash = "sha256:2efd47704bbb016136fe34dfb74c805b1ef5c7313aef3ce6dcb5ff844299f432"}, + {file = "regex-2021.10.8-cp37-cp37m-win_amd64.whl", hash = "sha256:924079d5590979c0e961681507eb1773a142553564ccae18d36f1de7324e71ca"}, + {file = "regex-2021.10.8-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:19b8f6d23b2dc93e8e1e7e288d3010e58fafed323474cf7f27ab9451635136d9"}, + {file = "regex-2021.10.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b09d3904bf312d11308d9a2867427479d277365b1617e48ad09696fa7dfcdf59"}, + {file = "regex-2021.10.8-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:951be934dc25d8779d92b530e922de44dda3c82a509cdb5d619f3a0b1491fafa"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f125fce0a0ae4fd5c3388d369d7a7d78f185f904c90dd235f7ecf8fe13fa741"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f199419a81c1016e0560c39773c12f0bd924c37715bffc64b97140d2c314354"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:09e1031e2059abd91177c302da392a7b6859ceda038be9e015b522a182c89e4f"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9c070d5895ac6aeb665bd3cd79f673775caf8d33a0b569e98ac434617ecea57d"}, + {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:176796cb7f82a7098b0c436d6daac82f57b9101bb17b8e8119c36eecf06a60a3"}, + {file = "regex-2021.10.8-cp38-cp38-win32.whl", hash = "sha256:5e5796d2f36d3c48875514c5cd9e4325a1ca172fc6c78b469faa8ddd3d770593"}, + {file = "regex-2021.10.8-cp38-cp38-win_amd64.whl", hash = "sha256:e4204708fa116dd03436a337e8e84261bc8051d058221ec63535c9403a1582a1"}, + {file = "regex-2021.10.8-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6dcf53d35850ce938b4f044a43b33015ebde292840cef3af2c8eb4c860730fff"}, + {file = "regex-2021.10.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b8b6ee6555b6fbae578f1468b3f685cdfe7940a65675611365a7ea1f8d724991"}, + {file = "regex-2021.10.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e2ec1c106d3f754444abf63b31e5c4f9b5d272272a491fa4320475aba9e8157c"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:973499dac63625a5ef9dfa4c791aa33a502ddb7615d992bdc89cf2cc2285daa3"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88dc3c1acd3f0ecfde5f95c32fcb9beda709dbdf5012acdcf66acbc4794468eb"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4786dae85c1f0624ac77cb3813ed99267c9adb72e59fdc7297e1cf4d6036d493"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe6ce4f3d3c48f9f402da1ceb571548133d3322003ce01b20d960a82251695d2"}, + {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9e3e2cea8f1993f476a6833ef157f5d9e8c75a59a8d8b0395a9a6887a097243b"}, + {file = "regex-2021.10.8-cp39-cp39-win32.whl", hash = "sha256:82cfb97a36b1a53de32b642482c6c46b6ce80803854445e19bc49993655ebf3b"}, + {file = "regex-2021.10.8-cp39-cp39-win_amd64.whl", hash = "sha256:b04e512eb628ea82ed86eb31c0f7fc6842b46bf2601b66b1356a7008327f7700"}, + {file = "regex-2021.10.8.tar.gz", hash = "sha256:26895d7c9bbda5c52b3635ce5991caa90fbb1ddfac9c9ff1c7ce505e2282fb2a"}, ] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, @@ -1097,43 +1063,43 @@ typing-extensions = [ {file = "typing_extensions-3.10.0.2.tar.gz", hash = "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"}, ] tzdata = [ - {file = "tzdata-2021.1-py2.py3-none-any.whl", hash = "sha256:9ad21eada54c97001e3e9858a674b3ee6bebe4a4fb2b58465930f2af0ba6c85d"}, - {file = "tzdata-2021.1.tar.gz", hash = "sha256:e19c7351f887522a1ac739d21041e592ddde6dd1b764fdefa8f7b2b3551d3d38"}, + {file = "tzdata-2021.2.post0-py2.py3-none-any.whl", hash = "sha256:a843aabf67dea3dc6bbbc8853e1aee6563e74bcfe920e11a571a389155db1401"}, + {file = "tzdata-2021.2.post0.tar.gz", hash = "sha256:99d30a01967bb8d7868c03dc924862b1ae8a0e649a322a1107bacc1723c430b9"}, ] virtualenv = [ {file = "virtualenv-20.8.1-py2.py3-none-any.whl", hash = "sha256:10062e34c204b5e4ec5f62e6ef2473f8ba76513a9a617e873f1f8fb4a519d300"}, {file = "virtualenv-20.8.1.tar.gz", hash = "sha256:bcc17f0b3a29670dd777d6f0755a4c04f28815395bca279cdcb213b97199a6b8"}, ] watchdog = [ - {file = "watchdog-2.1.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:5f57ce4f7e498278fb2a091f39359930144a0f2f90ea8cbf4523c4e25de34028"}, - {file = "watchdog-2.1.5-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8b74d0d92a69a7ab5f101f9fe74e44ba017be269efa824337366ccbb4effde85"}, - {file = "watchdog-2.1.5-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:59767f476cd1f48531bf378f0300565d879688c82da8369ca8c52f633299523c"}, - {file = "watchdog-2.1.5-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:814d396859c95598f7576d15bc257c3bd3ba61fa4bc1db7dfc18f09070ded7da"}, - {file = "watchdog-2.1.5-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:28777dbed3bbd95f9c70f461443990a36c07dbf49ae7cd69932cdd1b8fb2850c"}, - {file = "watchdog-2.1.5-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5cf78f794c9d7bc64a626ef4f71aff88f57a7ae288e0b359a9c6ea711a41395f"}, - {file = "watchdog-2.1.5-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:43bf728eb7830559f329864ab5da2302c15b2efbac24ad84ccc09949ba753c40"}, - {file = "watchdog-2.1.5-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a7053d4d22dc95c5e0c90aeeae1e4ed5269d2f04001798eec43a654a03008d22"}, - {file = "watchdog-2.1.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6f3ad1d973fe8fc8fe64ba38f6a934b74346342fa98ef08ad5da361a05d46044"}, - {file = "watchdog-2.1.5-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:41d44ef21a77a32b55ce9bf59b75777063751f688de51098859b7c7f6466589a"}, - {file = "watchdog-2.1.5-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ed4ca4351cd2bb0d863ee737a2011ca44d8d8be19b43509bd4507f8a449b376b"}, - {file = "watchdog-2.1.5-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:8874d5ad6b7f43b18935d9b0183e29727a623a216693d6938d07dfd411ba462f"}, - {file = "watchdog-2.1.5-py3-none-manylinux2014_aarch64.whl", hash = "sha256:50a7f81f99d238f72185f481b493f9de80096e046935b60ea78e1276f3d76960"}, - {file = "watchdog-2.1.5-py3-none-manylinux2014_armv7l.whl", hash = "sha256:e40e33a4889382824846b4baa05634e1365b47c6fa40071dc2d06b4d7c715fc1"}, - {file = "watchdog-2.1.5-py3-none-manylinux2014_i686.whl", hash = "sha256:78b1514067ff4089f4dac930b043a142997a5b98553120919005e97fbaba6546"}, - {file = "watchdog-2.1.5-py3-none-manylinux2014_ppc64.whl", hash = "sha256:58ae842300cbfe5e62fb068c83901abe76e4f413234b7bec5446e4275eb1f9cb"}, - {file = "watchdog-2.1.5-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:b0cc7d8b7d60da6c313779d85903ce39a63d89d866014b085f720a083d5f3e9a"}, - {file = "watchdog-2.1.5-py3-none-manylinux2014_s390x.whl", hash = "sha256:e60d3bb7166b7cb830b86938d1eb0e6cfe23dfd634cce05c128f8f9967895193"}, - {file = "watchdog-2.1.5-py3-none-manylinux2014_x86_64.whl", hash = "sha256:51af09ae937ada0e9a10cc16988ec03c649754a91526170b6839b89fc56d6acb"}, - {file = "watchdog-2.1.5-py3-none-win32.whl", hash = "sha256:9391003635aa783957b9b11175d9802d3272ed67e69ef2e3394c0b6d9d24fa9a"}, - {file = "watchdog-2.1.5-py3-none-win_amd64.whl", hash = "sha256:eab14adfc417c2c983fbcb2c73ef3f28ba6990d1fff45d1180bf7e38bda0d98d"}, - {file = "watchdog-2.1.5-py3-none-win_ia64.whl", hash = "sha256:a2888a788893c4ef7e562861ec5433875b7915f930a5a7ed3d32c048158f1be5"}, - {file = "watchdog-2.1.5.tar.gz", hash = "sha256:5563b005907613430ef3d4aaac9c78600dd5704e84764cb6deda4b3d72807f09"}, + {file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9693f35162dc6208d10b10ddf0458cc09ad70c30ba689d9206e02cd836ce28a3"}, + {file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:aba5c812f8ee8a3ff3be51887ca2d55fb8e268439ed44110d3846e4229eb0e8b"}, + {file = "watchdog-2.1.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4ae38bf8ba6f39d5b83f78661273216e7db5b00f08be7592062cb1fc8b8ba542"}, + {file = "watchdog-2.1.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ad6f1796e37db2223d2a3f302f586f74c72c630b48a9872c1e7ae8e92e0ab669"}, + {file = "watchdog-2.1.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:922a69fa533cb0c793b483becaaa0845f655151e7256ec73630a1b2e9ebcb660"}, + {file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:b2fcf9402fde2672545b139694284dc3b665fd1be660d73eca6805197ef776a3"}, + {file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3386b367e950a11b0568062b70cc026c6f645428a698d33d39e013aaeda4cc04"}, + {file = "watchdog-2.1.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f1c00aa35f504197561060ca4c21d3cc079ba29cf6dd2fe61024c70160c990b"}, + {file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b52b88021b9541a60531142b0a451baca08d28b74a723d0c99b13c8c8d48d604"}, + {file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8047da932432aa32c515ec1447ea79ce578d0559362ca3605f8e9568f844e3c6"}, + {file = "watchdog-2.1.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e92c2d33858c8f560671b448205a268096e17870dcf60a9bb3ac7bfbafb7f5f9"}, + {file = "watchdog-2.1.6-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b7d336912853d7b77f9b2c24eeed6a5065d0a0cc0d3b6a5a45ad6d1d05fb8cd8"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_aarch64.whl", hash = "sha256:cca7741c0fcc765568350cb139e92b7f9f3c9a08c4f32591d18ab0a6ac9e71b6"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_armv7l.whl", hash = "sha256:25fb5240b195d17de949588628fdf93032ebf163524ef08933db0ea1f99bd685"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_i686.whl", hash = "sha256:be9be735f827820a06340dff2ddea1fb7234561fa5e6300a62fe7f54d40546a0"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64.whl", hash = "sha256:d0d19fb2441947b58fbf91336638c2b9f4cc98e05e1045404d7a4cb7cddc7a65"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:3becdb380d8916c873ad512f1701f8a92ce79ec6978ffde92919fd18d41da7fb"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_s390x.whl", hash = "sha256:ae67501c95606072aafa865b6ed47343ac6484472a2f95490ba151f6347acfc2"}, + {file = "watchdog-2.1.6-py3-none-manylinux2014_x86_64.whl", hash = "sha256:e0f30db709c939cabf64a6dc5babb276e6d823fd84464ab916f9b9ba5623ca15"}, + {file = "watchdog-2.1.6-py3-none-win32.whl", hash = "sha256:e02794ac791662a5eafc6ffeaf9bcc149035a0e48eb0a9d40a8feb4622605a3d"}, + {file = "watchdog-2.1.6-py3-none-win_amd64.whl", hash = "sha256:bd9ba4f332cf57b2c1f698be0728c020399ef3040577cde2939f2e045b39c1e5"}, + {file = "watchdog-2.1.6-py3-none-win_ia64.whl", hash = "sha256:a0f1c7edf116a12f7245be06120b1852275f9506a7d90227648b250755a03923"}, + {file = "watchdog-2.1.6.tar.gz", hash = "sha256:a36e75df6c767cbf46f61a91c70b3ba71811dfa0aca4a324d9407a06a8b7a2e7"}, ] wcwidth = [ {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, ] zipp = [ - {file = "zipp-3.5.0-py3-none-any.whl", hash = "sha256:957cfda87797e389580cb8b9e3870841ca991e2125350677b2ca83a0e99390a3"}, - {file = "zipp-3.5.0.tar.gz", hash = "sha256:f5812b1e007e48cff63449a5e9f4e7ebea716b4111f9c4f9a645f91d579bf0c4"}, + {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, + {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"}, ] diff --git a/pyproject.toml b/pyproject.toml index 3ab8c9c5..441f26ff 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,9 +25,9 @@ include = [ [tool.poetry.dependencies] -python = "^3.6" +python = "^3.7" python-dateutil = "^2.6" -"backports.zoneinfo" = {version = "^0.2.1", python = ">=3.6,<3.9"} +"backports.zoneinfo" = {version = "^0.2.1", python = ">=3.7,<3.9"} tzdata = ">=2020.1" [tool.poetry.group.dev.dependencies] @@ -37,10 +37,10 @@ pytz = ">=2018.3" babel = "^2.5" cleo = "^1.0.0a3" tox = "^3.0" -black = {version = "^21.9b0", markers = "python_full_version >= '3.6.2' and python_version < '4.0' and implementation_name != 'pypy'"} -isort = {version = "^5.9.1", python = "^3.6.1"} -pre-commit = {version = "^2.10.0", python = "^3.6.1"} -mkdocs = { version = "^1.0", python = "^3.5" } +black = {version = "^21.9b0", markers = "implementation_name != 'pypy'"} +isort = "^5.9.1" +pre-commit = "^2.10.0" +mkdocs = "^1.0" pymdown-extensions = "^6.0" pygments = "^2.2" markdown-include = "^0.5.1" diff --git a/tox.ini b/tox.ini index 4248f5ab..d45c3e2b 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] isolated_build = true -envlist = py36, py37, py38, py39, py310, pypy3 +envlist = py37, py38, py39, py310, pypy3 [testenv] whitelist_externals = poetry From 5bb730c02cf81d9ed0af5d09593ec7e4dcb9c017 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Mon, 18 Oct 2021 23:03:05 +0200 Subject: [PATCH 023/177] Upgrade code with pyupgrade --- .pre-commit-config.yaml | 5 ++ clock | 24 +++------ pendulum/date.py | 23 ++++---- pendulum/datetime.py | 24 ++++----- pendulum/duration.py | 21 ++++---- pendulum/formatting/difference_formatter.py | 10 ++-- pendulum/formatting/formatter.py | 59 ++++++++++----------- pendulum/helpers.py | 2 - pendulum/locales/da/custom.py | 4 -- pendulum/locales/da/locale.py | 7 +-- pendulum/locales/de/custom.py | 4 -- pendulum/locales/de/locale.py | 5 +- pendulum/locales/en/custom.py | 4 -- pendulum/locales/en/locale.py | 17 +++--- pendulum/locales/es/custom.py | 4 -- pendulum/locales/es/locale.py | 5 +- pendulum/locales/fa/custom.py | 4 -- pendulum/locales/fa/locale.py | 5 +- pendulum/locales/fo/custom.py | 4 -- pendulum/locales/fo/locale.py | 5 +- pendulum/locales/fr/__init__.py | 1 - pendulum/locales/fr/custom.py | 4 -- pendulum/locales/fr/locale.py | 5 +- pendulum/locales/id/custom.py | 4 -- pendulum/locales/id/locale.py | 3 -- pendulum/locales/it/custom.py | 3 -- pendulum/locales/it/locale.py | 5 +- pendulum/locales/ko/custom.py | 4 -- pendulum/locales/ko/locale.py | 3 -- pendulum/locales/locale.py | 15 +++--- pendulum/locales/lt/custom.py | 4 -- pendulum/locales/lt/locale.py | 13 ++--- pendulum/locales/nb/custom.py | 4 -- pendulum/locales/nb/locale.py | 5 +- pendulum/locales/nl/custom.py | 4 -- pendulum/locales/nl/locale.py | 5 +- pendulum/locales/nn/custom.py | 4 -- pendulum/locales/nn/locale.py | 5 +- pendulum/locales/pl/custom.py | 4 -- pendulum/locales/pl/locale.py | 23 ++++---- pendulum/locales/pt_br/custom.py | 4 -- pendulum/locales/pt_br/locale.py | 5 +- pendulum/locales/ru/custom.py | 4 -- pendulum/locales/ru/locale.py | 23 ++++---- pendulum/locales/zh/custom.py | 4 -- pendulum/locales/zh/locale.py | 3 -- pendulum/mixins/__init__.py | 1 - pendulum/mixins/default.py | 2 +- pendulum/parser.py | 2 - pendulum/parsing/__init__.py | 6 +-- pendulum/parsing/iso8601.py | 18 +++---- pendulum/period.py | 8 ++- pendulum/time.py | 6 +-- pendulum/tz/exceptions.py | 4 +- pendulum/tz/local_timezone.py | 2 +- pendulum/tz/timezone.py | 2 +- tests/date/__init__.py | 1 - tests/date/test_strings.py | 9 ++-- tests/datetime/__init__.py | 1 - tests/datetime/test_strings.py | 11 ++-- tests/duration/__init__.py | 1 - tests/fixtures/__init__.py | 1 - tests/formatting/__init__.py | 1 - tests/formatting/test_formatter.py | 7 ++- tests/helpers/__init__.py | 1 - tests/localization/test_da.py | 3 -- tests/localization/test_de.py | 3 -- tests/localization/test_es.py | 3 -- tests/localization/test_fa.py | 3 -- tests/localization/test_fo.py | 3 -- tests/localization/test_fr.py | 3 -- tests/localization/test_id.py | 3 -- tests/localization/test_it.py | 3 -- tests/localization/test_ko.py | 3 -- tests/localization/test_lt.py | 3 -- tests/localization/test_nb.py | 3 -- tests/localization/test_nl.py | 3 -- tests/localization/test_nn.py | 3 -- tests/localization/test_pl.py | 3 -- tests/localization/test_ru.py | 3 -- tests/parsing/__init__.py | 1 - tests/period/__init__.py | 1 - tests/period/test_add_subtract.py | 2 - tests/test_helpers.py | 2 - tests/time/__init__.py | 1 - tests/time/test_strings.py | 4 +- tests/tz/__init__.py | 1 - tests/tz/test_timezones.py | 1 - 88 files changed, 160 insertions(+), 379 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index fe000828..bcc97bc7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -16,6 +16,11 @@ repos: additional_dependencies: [toml] exclude: ^.*/?setup\.py$ + - repo: https://github.com/asottile/pyupgrade + rev: v2.29.0 + hooks: + - id: pyupgrade + - repo: https://github.com/pre-commit/pre-commit-hooks rev: v4.0.1 hooks: diff --git a/clock b/clock index 8dfb173e..1bfa17c9 100755 --- a/clock +++ b/clock @@ -1,5 +1,4 @@ #!/usr/bin/env python -from __future__ import unicode_literals import glob import json @@ -41,7 +40,7 @@ class _LambdaCompiler(_GettextCompiler): code = code.replace("||", "or") if method == "in": expr = self.compile(expr) - code = "(%s == %s and %s)" % (expr, expr, code) + code = f"({expr} == {expr} and {code})" return code @@ -52,10 +51,7 @@ class LocaleCreate(Command): arguments = [argument("locales", "Locales to dump.", optional=False, multiple=True)] - TEMPLATE = """# -*- coding: utf-8 -*- -from __future__ import unicode_literals - -from .custom import translations as custom_translations + TEMPLATE = """from .custom import translations as custom_translations \"\"\" @@ -73,11 +69,7 @@ locale = {{ }} """ - CUSTOM_TEMPLATE = """# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - -\"\"\" + CUSTOM_TEMPLATE = """\"\"\" {locale} custom locale file. \"\"\" @@ -99,10 +91,10 @@ translations = {{}} normalized = normalize_locale(locale.replace("-", "_")) if not normalized: - self.line("Locale [{}] does not exist.".format(locale)) + self.line(f"Locale [{locale}] does not exist.") continue - self.line("Generating {} locale.".format(locale)) + self.line(f"Generating {locale} locale.") content = LocaleDataDict(load(normalized)) @@ -140,7 +132,7 @@ translations = {{}} ] data["units"] = {} for unit in units: - pattern = patterns["duration-{}".format(unit)]["long"] + pattern = patterns[f"duration-{unit}"]["long"] if "per" in pattern: del pattern["per"] @@ -199,7 +191,7 @@ translations = {{}} else: v = repr(v) - s.append("%s%r: %s,\n" % (" " * tab, k, v)) + s.append("{}{!r}: {},\n".format(" " * tab, k, v)) s.append("%s}" % (" " * (tab - 1))) return "".join(s) @@ -208,7 +200,7 @@ translations = {{}} to_py = _LambdaCompiler().compile result = ["lambda n: "] for tag, ast in PluralRule.parse(rule).abstract: - result.append("'%s' if %s else " % (tag, to_py(ast))) + result.append("'{}' if {} else ".format(tag, to_py(ast))) result.append("'other'") return "".join(result) diff --git a/pendulum/date.py b/pendulum/date.py index f11164ee..536b0a8b 100644 --- a/pendulum/date.py +++ b/pendulum/date.py @@ -1,6 +1,3 @@ -from __future__ import absolute_import -from __future__ import division - import calendar import math @@ -399,9 +396,9 @@ def start_of(self, unit): :rtype: Date """ if unit not in self._MODIFIERS_VALID_UNITS: - raise ValueError('Invalid unit "{}" for start_of()'.format(unit)) + raise ValueError(f'Invalid unit "{unit}" for start_of()') - return getattr(self, "_start_of_{}".format(unit))() + return getattr(self, f"_start_of_{unit}")() def end_of(self, unit): """ @@ -603,9 +600,9 @@ def first_of(self, unit, day_of_week=None): :rtype: Date """ if unit not in ["month", "quarter", "year"]: - raise ValueError('Invalid unit "{}" for first_of()'.format(unit)) + raise ValueError(f'Invalid unit "{unit}" for first_of()') - return getattr(self, "_first_of_{}".format(unit))(day_of_week) + return getattr(self, f"_first_of_{unit}")(day_of_week) def last_of(self, unit, day_of_week=None): """ @@ -624,9 +621,9 @@ def last_of(self, unit, day_of_week=None): :rtype: Date """ if unit not in ["month", "quarter", "year"]: - raise ValueError('Invalid unit "{}" for first_of()'.format(unit)) + raise ValueError(f'Invalid unit "{unit}" for first_of()') - return getattr(self, "_last_of_{}".format(unit))(day_of_week) + return getattr(self, f"_last_of_{unit}")(day_of_week) def nth_of(self, unit, nth, day_of_week): """ @@ -648,9 +645,9 @@ def nth_of(self, unit, nth, day_of_week): :rtype: Date """ if unit not in ["month", "quarter", "year"]: - raise ValueError('Invalid unit "{}" for first_of()'.format(unit)) + raise ValueError(f'Invalid unit "{unit}" for first_of()') - dt = getattr(self, "_nth_of_{}".format(unit))(nth, day_of_week) + dt = getattr(self, f"_nth_of_{unit}")(nth, day_of_week) if dt is False: raise PendulumException( "Unable to find occurence {} of {} in {}".format( @@ -873,13 +870,13 @@ def today(cls): @classmethod def fromtimestamp(cls, t): - dt = super(Date, cls).fromtimestamp(t) + dt = super().fromtimestamp(t) return cls(dt.year, dt.month, dt.day) @classmethod def fromordinal(cls, n): - dt = super(Date, cls).fromordinal(n) + dt = super().fromordinal(n) return cls(dt.year, dt.month, dt.day) diff --git a/pendulum/datetime.py b/pendulum/datetime.py index 7019eaa4..4b5e7af0 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import -from __future__ import division - import calendar import datetime @@ -350,7 +346,7 @@ def _to_string(self, fmt: str, locale: Optional[str] = None) -> str: Format the instance to a common string format. """ if fmt not in self._FORMATS: - raise ValueError("Format [{}] is not supported".format(fmt)) + raise ValueError(f"Format [{fmt}] is not supported") fmt = self._FORMATS[fmt] if callable(fmt): @@ -364,7 +360,7 @@ def __str__(self) -> str: def __repr__(self) -> str: us = "" if self.microsecond: - us = ", {}".format(self.microsecond) + us = f", {self.microsecond}" repr_ = "{klass}(" "{year}, {month}, {day}, " "{hour}, {minute}, {second}{us}" @@ -665,9 +661,9 @@ def start_of(self, unit: str) -> "DateTime": * century: date to first day of century and time to 00:00:00 """ if unit not in self._MODIFIERS_VALID_UNITS: - raise ValueError('Invalid unit "{}" for start_of()'.format(unit)) + raise ValueError(f'Invalid unit "{unit}" for start_of()') - return getattr(self, "_start_of_{}".format(unit))() + return getattr(self, f"_start_of_{unit}")() def end_of(self, unit: str) -> "DateTime": """ @@ -884,9 +880,9 @@ def first_of(self, unit: str, day_of_week: Optional[int] = None) -> "DateTime": Supported units are month, quarter and year. """ if unit not in ["month", "quarter", "year"]: - raise ValueError('Invalid unit "{}" for first_of()'.format(unit)) + raise ValueError(f'Invalid unit "{unit}" for first_of()') - return getattr(self, "_first_of_{}".format(unit))(day_of_week) + return getattr(self, f"_first_of_{unit}")(day_of_week) def last_of(self, unit: str, day_of_week: Optional[int] = None) -> "DateTime": """ @@ -898,9 +894,9 @@ def last_of(self, unit: str, day_of_week: Optional[int] = None) -> "DateTime": Supported units are month, quarter and year. """ if unit not in ["month", "quarter", "year"]: - raise ValueError('Invalid unit "{}" for first_of()'.format(unit)) + raise ValueError(f'Invalid unit "{unit}" for first_of()') - return getattr(self, "_last_of_{}".format(unit))(day_of_week) + return getattr(self, f"_last_of_{unit}")(day_of_week) def nth_of(self, unit: str, nth: int, day_of_week: int) -> "DateTime": """ @@ -913,9 +909,9 @@ def nth_of(self, unit: str, nth: int, day_of_week: int) -> "DateTime": Supported units are month, quarter and year. """ if unit not in ["month", "quarter", "year"]: - raise ValueError('Invalid unit "{}" for first_of()'.format(unit)) + raise ValueError(f'Invalid unit "{unit}" for first_of()') - dt = getattr(self, "_nth_of_{}".format(unit))(nth, day_of_week) + dt = getattr(self, f"_nth_of_{unit}")(nth, day_of_week) if dt is False: raise PendulumException( "Unable to find occurence {} of {} in {}".format( diff --git a/pendulum/duration.py b/pendulum/duration.py index c7d875df..9db45e2e 100644 --- a/pendulum/duration.py +++ b/pendulum/duration.py @@ -1,6 +1,3 @@ -from __future__ import absolute_import -from __future__ import division - from datetime import timedelta import pendulum @@ -280,31 +277,31 @@ def __str__(self): return self.in_words() def __repr__(self): - rep = "{}(".format(self.__class__.__name__) + rep = f"{self.__class__.__name__}(" if self._years: - rep += "years={}, ".format(self._years) + rep += f"years={self._years}, " if self._months: - rep += "months={}, ".format(self._months) + rep += f"months={self._months}, " if self._weeks: - rep += "weeks={}, ".format(self._weeks) + rep += f"weeks={self._weeks}, " if self._days: - rep += "days={}, ".format(self._remaining_days) + rep += f"days={self._remaining_days}, " if self.hours: - rep += "hours={}, ".format(self.hours) + rep += f"hours={self.hours}, " if self.minutes: - rep += "minutes={}, ".format(self.minutes) + rep += f"minutes={self.minutes}, " if self.remaining_seconds: - rep += "seconds={}, ".format(self.remaining_seconds) + rep += f"seconds={self.remaining_seconds}, " if self.microseconds: - rep += "microseconds={}, ".format(self.microseconds) + rep += f"microseconds={self.microseconds}, " rep += ")" diff --git a/pendulum/formatting/difference_formatter.py b/pendulum/formatting/difference_formatter.py index 6455fe3d..74f9616b 100644 --- a/pendulum/formatting/difference_formatter.py +++ b/pendulum/formatting/difference_formatter.py @@ -5,7 +5,7 @@ from ..locales.locale import Locale -class DifferenceFormatter(object): +class DifferenceFormatter: """ Handles formatting differences in text. """ @@ -105,14 +105,14 @@ def format( count = 1 if absolute: - key = "translations.units.{}".format(unit) + key = f"translations.units.{unit}" else: is_future = diff.invert if is_now: # Relative to now, so we can use # the CLDR data - key = "translations.relative.{}".format(unit) + key = f"translations.relative.{unit}" if is_future: key += ".future" @@ -125,9 +125,9 @@ def format( # Checking for special pluralization rules key = "custom.units_relative" if is_future: - key += ".{}.future".format(unit) + key += f".{unit}.future" else: - key += ".{}.past".format(unit) + key += f".{unit}.past" trans = locale.get(key) if not trans: diff --git a/pendulum/formatting/formatter.py b/pendulum/formatting/formatter.py index 9ffdd285..c264644d 100644 --- a/pendulum/formatting/formatter.py +++ b/pendulum/formatting/formatter.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import datetime import re import typing @@ -66,7 +63,7 @@ class Formatter: "Mo": None, "DDDo": None, "Do": lambda locale: tuple( - r"\d+{}".format(o) for o in locale.get("custom.ordinal").values() + fr"\d+{o}" for o in locale.get("custom.ordinal").values() ), "dddd": "days.wide", "ddd": "days.abbreviated", @@ -86,44 +83,44 @@ class Formatter: _TOKENS_RULES = { # Year - "YYYY": lambda dt: "{:d}".format(dt.year), - "YY": lambda dt: "{:d}".format(dt.year)[2:], - "Y": lambda dt: "{:d}".format(dt.year), + "YYYY": lambda dt: f"{dt.year:d}", + "YY": lambda dt: f"{dt.year:d}"[2:], + "Y": lambda dt: f"{dt.year:d}", # Quarter - "Q": lambda dt: "{:d}".format(dt.quarter), + "Q": lambda dt: f"{dt.quarter:d}", # Month - "MM": lambda dt: "{:02d}".format(dt.month), - "M": lambda dt: "{:d}".format(dt.month), + "MM": lambda dt: f"{dt.month:02d}", + "M": lambda dt: f"{dt.month:d}", # Day - "DD": lambda dt: "{:02d}".format(dt.day), - "D": lambda dt: "{:d}".format(dt.day), + "DD": lambda dt: f"{dt.day:02d}", + "D": lambda dt: f"{dt.day:d}", # Day of Year - "DDDD": lambda dt: "{:03d}".format(dt.day_of_year), - "DDD": lambda dt: "{:d}".format(dt.day_of_year), + "DDDD": lambda dt: f"{dt.day_of_year:03d}", + "DDD": lambda dt: f"{dt.day_of_year:d}", # Day of Week - "d": lambda dt: "{:d}".format(dt.day_of_week), + "d": lambda dt: f"{dt.day_of_week:d}", # Day of ISO Week - "E": lambda dt: "{:d}".format(dt.isoweekday()), + "E": lambda dt: f"{dt.isoweekday():d}", # Hour - "HH": lambda dt: "{:02d}".format(dt.hour), - "H": lambda dt: "{:d}".format(dt.hour), + "HH": lambda dt: f"{dt.hour:02d}", + "H": lambda dt: f"{dt.hour:d}", "hh": lambda dt: "{:02d}".format(dt.hour % 12 or 12), "h": lambda dt: "{:d}".format(dt.hour % 12 or 12), # Minute - "mm": lambda dt: "{:02d}".format(dt.minute), - "m": lambda dt: "{:d}".format(dt.minute), + "mm": lambda dt: f"{dt.minute:02d}", + "m": lambda dt: f"{dt.minute:d}", # Second - "ss": lambda dt: "{:02d}".format(dt.second), - "s": lambda dt: "{:d}".format(dt.second), + "ss": lambda dt: f"{dt.second:02d}", + "s": lambda dt: f"{dt.second:d}", # Fractional second "S": lambda dt: "{:01d}".format(dt.microsecond // 100000), "SS": lambda dt: "{:02d}".format(dt.microsecond // 10000), "SSS": lambda dt: "{:03d}".format(dt.microsecond // 1000), "SSSS": lambda dt: "{:04d}".format(dt.microsecond // 100), "SSSSS": lambda dt: "{:05d}".format(dt.microsecond // 10), - "SSSSSS": lambda dt: "{:06d}".format(dt.microsecond), + "SSSSSS": lambda dt: f"{dt.microsecond:06d}", # Timestamp - "X": lambda dt: "{:d}".format(dt.int_timestamp), + "X": lambda dt: f"{dt.int_timestamp:d}", "x": lambda dt: "{:d}".format(dt.int_timestamp * 1000 + dt.microsecond // 1000), # Timezone "zz": lambda dt: "{}".format(dt.tzname() if dt.tzinfo is not None else ""), @@ -279,7 +276,7 @@ def _format_token( :rtype: str """ if token in self._DATE_FORMATS: - fmt = locale.get("custom.date_formats.{}".format(token)) + fmt = locale.get(f"custom.date_formats.{token}") if fmt is None: fmt = self._DEFAULT_DATE_FORMATS[token] @@ -307,7 +304,7 @@ def _format_token( hour, minute = divmod(abs(int(minutes)), 60) - return "{}{:02d}{}{:02d}".format(sign, hour, separator, minute) + return f"{sign}{hour:02d}{separator}{minute:02d}" def _format_localizable_token( self, dt, token, locale @@ -409,7 +406,7 @@ def parse( ) if not re.search("^" + pattern + "$", time): - raise ValueError("String does not match format {}".format(fmt)) + raise ValueError(f"String does not match format {fmt}") re.sub(pattern, lambda m: self._get_parsed_values(m, parsed, locale, now), time) @@ -586,7 +583,7 @@ def _get_parsed_value( tz = value[1:] if ":" not in tz: if len(tz) == 2: - tz = "{}00".format(tz) + tz = f"{tz}00" off_hour = tz[0:2] off_minute = tz[2:4] @@ -645,7 +642,7 @@ def _get_parsed_locale_value( return else: - raise ValueError('Invalid token "{}"'.format(token)) + raise ValueError(f'Invalid token "{token}"') parsed[unit] = locale.match_translation(match, value) if value is None: @@ -660,7 +657,7 @@ def _replace_tokens(self, token, locale): # type: (str, Locale) -> str return token elif token not in self._REGEX_TOKENS and token not in self._LOCALIZABLE_TOKENS: - raise ValueError("Unsupported token: {}".format(token)) + raise ValueError(f"Unsupported token: {token}") if token in self._LOCALIZABLE_TOKENS: values = self._LOCALIZABLE_TOKENS[token] @@ -674,7 +671,7 @@ def _replace_tokens(self, token, locale): # type: (str, Locale) -> str candidates = self._REGEX_TOKENS[token] if not candidates: - raise ValueError("Unsupported token: {}".format(token)) + raise ValueError(f"Unsupported token: {token}") if not isinstance(candidates, tuple): candidates = (candidates,) diff --git a/pendulum/helpers.py b/pendulum/helpers.py index e847b4bd..3d758541 100644 --- a/pendulum/helpers.py +++ b/pendulum/helpers.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import os import struct diff --git a/pendulum/locales/da/custom.py b/pendulum/locales/da/custom.py index eaf36552..c62ab838 100644 --- a/pendulum/locales/da/custom.py +++ b/pendulum/locales/da/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ da custom locale file. """ diff --git a/pendulum/locales/da/locale.py b/pendulum/locales/da/locale.py index addee68a..936af3ab 100644 --- a/pendulum/locales/da/locale.py +++ b/pendulum/locales/da/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -14,8 +11,8 @@ locale = { "plural": lambda n: "one" if ( - (n == n and ((n == 1))) - or ((not (0 == 0 and ((0 == 0)))) and (n == n and ((n == 0) or (n == 1)))) + (n == n and (n == 1)) + or ((not (0 == 0 and (0 == 0))) and (n == n and ((n == 0) or (n == 1)))) ) else "other", "ordinal": lambda n: "other", diff --git a/pendulum/locales/de/custom.py b/pendulum/locales/de/custom.py index 45fd591c..a19a8e19 100644 --- a/pendulum/locales/de/custom.py +++ b/pendulum/locales/de/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ de custom locale file. """ diff --git a/pendulum/locales/de/locale.py b/pendulum/locales/de/locale.py index 9a9ec9f3..94d2ff1a 100644 --- a/pendulum/locales/de/locale.py +++ b/pendulum/locales/de/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -13,7 +10,7 @@ locale = { "plural": lambda n: "one" - if ((n == n and ((n == 1))) and (0 == 0 and ((0 == 0)))) + if ((n == n and (n == 1)) and (0 == 0 and (0 == 0))) else "other", "ordinal": lambda n: "other", "translations": { diff --git a/pendulum/locales/en/custom.py b/pendulum/locales/en/custom.py index 9e631a2b..a403ad82 100644 --- a/pendulum/locales/en/custom.py +++ b/pendulum/locales/en/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ en custom locale file. """ diff --git a/pendulum/locales/en/locale.py b/pendulum/locales/en/locale.py index 917a4ce2..00eafc2f 100644 --- a/pendulum/locales/en/locale.py +++ b/pendulum/locales/en/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -13,22 +10,22 @@ locale = { "plural": lambda n: "one" - if ((n == n and ((n == 1))) and (0 == 0 and ((0 == 0)))) + if ((n == n and (n == 1)) and (0 == 0 and (0 == 0))) else "other", "ordinal": lambda n: "few" if ( - ((n % 10) == (n % 10) and (((n % 10) == 3))) - and (not ((n % 100) == (n % 100) and (((n % 100) == 13)))) + ((n % 10) == (n % 10) and ((n % 10) == 3)) + and (not ((n % 100) == (n % 100) and ((n % 100) == 13))) ) else "one" if ( - ((n % 10) == (n % 10) and (((n % 10) == 1))) - and (not ((n % 100) == (n % 100) and (((n % 100) == 11)))) + ((n % 10) == (n % 10) and ((n % 10) == 1)) + and (not ((n % 100) == (n % 100) and ((n % 100) == 11))) ) else "two" if ( - ((n % 10) == (n % 10) and (((n % 10) == 2))) - and (not ((n % 100) == (n % 100) and (((n % 100) == 12)))) + ((n % 10) == (n % 10) and ((n % 10) == 2)) + and (not ((n % 100) == (n % 100) and ((n % 100) == 12))) ) else "other", "translations": { diff --git a/pendulum/locales/es/custom.py b/pendulum/locales/es/custom.py index 18585e07..4b7e2b55 100644 --- a/pendulum/locales/es/custom.py +++ b/pendulum/locales/es/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ es custom locale file. """ diff --git a/pendulum/locales/es/locale.py b/pendulum/locales/es/locale.py index 2f6266b6..edba4d38 100644 --- a/pendulum/locales/es/locale.py +++ b/pendulum/locales/es/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -12,7 +9,7 @@ locale = { - "plural": lambda n: "one" if (n == n and ((n == 1))) else "other", + "plural": lambda n: "one" if (n == n and (n == 1)) else "other", "ordinal": lambda n: "other", "translations": { "days": { diff --git a/pendulum/locales/fa/custom.py b/pendulum/locales/fa/custom.py index 9cc84d3a..082bfad9 100644 --- a/pendulum/locales/fa/custom.py +++ b/pendulum/locales/fa/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ fa custom locale file. """ diff --git a/pendulum/locales/fa/locale.py b/pendulum/locales/fa/locale.py index 4c5719d3..32f8e5f3 100644 --- a/pendulum/locales/fa/locale.py +++ b/pendulum/locales/fa/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -13,7 +10,7 @@ locale = { "plural": lambda n: "one" - if ((n == n and ((n == 0))) or (n == n and ((n == 1)))) + if ((n == n and (n == 0)) or (n == n and (n == 1))) else "other", "ordinal": lambda n: "other", "translations": { diff --git a/pendulum/locales/fo/custom.py b/pendulum/locales/fo/custom.py index 31f7f45e..456dd59d 100644 --- a/pendulum/locales/fo/custom.py +++ b/pendulum/locales/fo/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ fo custom locale file. """ diff --git a/pendulum/locales/fo/locale.py b/pendulum/locales/fo/locale.py index 8c87580c..10319eaa 100644 --- a/pendulum/locales/fo/locale.py +++ b/pendulum/locales/fo/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -12,7 +9,7 @@ locale = { - "plural": lambda n: "one" if (n == n and ((n == 1))) else "other", + "plural": lambda n: "one" if (n == n and (n == 1)) else "other", "ordinal": lambda n: "other", "translations": { "days": { diff --git a/pendulum/locales/fr/__init__.py b/pendulum/locales/fr/__init__.py index 40a96afc..e69de29b 100644 --- a/pendulum/locales/fr/__init__.py +++ b/pendulum/locales/fr/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/pendulum/locales/fr/custom.py b/pendulum/locales/fr/custom.py index 14d480f7..134f297a 100644 --- a/pendulum/locales/fr/custom.py +++ b/pendulum/locales/fr/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ fr custom locale file. """ diff --git a/pendulum/locales/fr/locale.py b/pendulum/locales/fr/locale.py index c884ce9a..8855d53c 100644 --- a/pendulum/locales/fr/locale.py +++ b/pendulum/locales/fr/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -13,7 +10,7 @@ locale = { "plural": lambda n: "one" if (n == n and ((n == 0) or (n == 1))) else "other", - "ordinal": lambda n: "one" if (n == n and ((n == 1))) else "other", + "ordinal": lambda n: "one" if (n == n and (n == 1)) else "other", "translations": { "days": { "abbreviated": { diff --git a/pendulum/locales/id/custom.py b/pendulum/locales/id/custom.py index 8abd4747..3ba20355 100644 --- a/pendulum/locales/id/custom.py +++ b/pendulum/locales/id/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ id custom locale file. """ diff --git a/pendulum/locales/id/locale.py b/pendulum/locales/id/locale.py index 44ee697d..bc994ce4 100644 --- a/pendulum/locales/id/locale.py +++ b/pendulum/locales/id/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations diff --git a/pendulum/locales/it/custom.py b/pendulum/locales/it/custom.py index 6f3963e1..e5cf1cc0 100644 --- a/pendulum/locales/it/custom.py +++ b/pendulum/locales/it/custom.py @@ -1,10 +1,7 @@ -# -*- coding: utf-8 -*- """ it custom locale file. """ -from __future__ import unicode_literals - translations = { "units": {"few_second": "alcuni secondi"}, diff --git a/pendulum/locales/it/locale.py b/pendulum/locales/it/locale.py index 920a778b..bb3fdcf6 100644 --- a/pendulum/locales/it/locale.py +++ b/pendulum/locales/it/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -13,7 +10,7 @@ locale = { "plural": lambda n: "one" - if ((n == n and ((n == 1))) and (0 == 0 and ((0 == 0)))) + if ((n == n and (n == 1)) and (0 == 0 and (0 == 0))) else "other", "ordinal": lambda n: "many" if (n == n and ((n == 11) or (n == 8) or (n == 80) or (n == 800))) diff --git a/pendulum/locales/ko/custom.py b/pendulum/locales/ko/custom.py index 0dd6a11a..2c0e50c5 100644 --- a/pendulum/locales/ko/custom.py +++ b/pendulum/locales/ko/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ ko custom locale file. """ diff --git a/pendulum/locales/ko/locale.py b/pendulum/locales/ko/locale.py index dfdb35a6..0f5a3462 100644 --- a/pendulum/locales/ko/locale.py +++ b/pendulum/locales/ko/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations diff --git a/pendulum/locales/locale.py b/pendulum/locales/locale.py index 4e22290d..5569725f 100644 --- a/pendulum/locales/locale.py +++ b/pendulum/locales/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import os import re @@ -37,11 +34,11 @@ def load(cls, locale: Union[str, "Locale"]) -> "Locale": locale_path = os.path.join(os.path.dirname(__file__), actual_locale) while not os.path.exists(locale_path): if actual_locale == locale: - raise ValueError("Locale [{}] does not exist.".format(locale)) + raise ValueError(f"Locale [{locale}] does not exist.") actual_locale = actual_locale.split("_")[0] - m = import_module("pendulum.locales.{}.locale".format(actual_locale)) + m = import_module(f"pendulum.locales.{actual_locale}.locale") cls._cache[locale] = cls(locale, m.locale) @@ -72,7 +69,7 @@ def get(self, key: str, default: Optional[Any] = None) -> Any: return self._key_cache[key] def translation(self, key: str) -> Any: - return self.get("translations.{}".format(key)) + return self.get(f"translations.{key}") def plural(self, number: int) -> str: return self._data["plural"](number) @@ -84,9 +81,9 @@ def ordinalize(self, number: int) -> str: ordinal = self.get("custom.ordinal.{}".format(self.ordinal(number))) if not ordinal: - return "{}".format(number) + return f"{number}" - return "{}{}".format(number, ordinal) + return f"{number}{ordinal}" def match_translation(self, key: str, value: Any) -> Optional[Dict]: translations = self.translation(key) @@ -96,4 +93,4 @@ def match_translation(self, key: str, value: Any) -> Optional[Dict]: return {v: k for k, v in translations.items()}[value] def __repr__(self) -> str: - return "{}('{}')".format(self.__class__.__name__, self._locale) + return f"{self.__class__.__name__}('{self._locale}')" diff --git a/pendulum/locales/lt/custom.py b/pendulum/locales/lt/custom.py index 11c99805..6480c314 100644 --- a/pendulum/locales/lt/custom.py +++ b/pendulum/locales/lt/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ lt custom locale file. """ diff --git a/pendulum/locales/lt/locale.py b/pendulum/locales/lt/locale.py index 12f13359..fb017efa 100644 --- a/pendulum/locales/lt/locale.py +++ b/pendulum/locales/lt/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -14,15 +11,15 @@ locale = { "plural": lambda n: "few" if ( - ((n % 10) == (n % 10) and (((n % 10) >= 2 and (n % 10) <= 9))) - and (not ((n % 100) == (n % 100) and (((n % 100) >= 11 and (n % 100) <= 19)))) + ((n % 10) == (n % 10) and ((n % 10) >= 2 and (n % 10) <= 9)) + and (not ((n % 100) == (n % 100) and ((n % 100) >= 11 and (n % 100) <= 19))) ) else "many" - if (not (0 == 0 and ((0 == 0)))) + if (not (0 == 0 and (0 == 0))) else "one" if ( - ((n % 10) == (n % 10) and (((n % 10) == 1))) - and (not ((n % 100) == (n % 100) and (((n % 100) >= 11 and (n % 100) <= 19)))) + ((n % 10) == (n % 10) and ((n % 10) == 1)) + and (not ((n % 100) == (n % 100) and ((n % 100) >= 11 and (n % 100) <= 19))) ) else "other", "ordinal": lambda n: "other", diff --git a/pendulum/locales/nb/custom.py b/pendulum/locales/nb/custom.py index 216dd046..4c7cd6a8 100644 --- a/pendulum/locales/nb/custom.py +++ b/pendulum/locales/nb/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ nn custom locale file. """ diff --git a/pendulum/locales/nb/locale.py b/pendulum/locales/nb/locale.py index 0ad08d18..c8297a86 100644 --- a/pendulum/locales/nb/locale.py +++ b/pendulum/locales/nb/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -12,7 +9,7 @@ locale = { - "plural": lambda n: "one" if (n == n and ((n == 1))) else "other", + "plural": lambda n: "one" if (n == n and (n == 1)) else "other", "ordinal": lambda n: "other", "translations": { "days": { diff --git a/pendulum/locales/nl/custom.py b/pendulum/locales/nl/custom.py index 2b8790ec..2ca5a85a 100644 --- a/pendulum/locales/nl/custom.py +++ b/pendulum/locales/nl/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ nl custom locale file. """ diff --git a/pendulum/locales/nl/locale.py b/pendulum/locales/nl/locale.py index 1e4d67ed..cb1570d7 100644 --- a/pendulum/locales/nl/locale.py +++ b/pendulum/locales/nl/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -13,7 +10,7 @@ locale = { "plural": lambda n: "one" - if ((n == n and ((n == 1))) and (0 == 0 and ((0 == 0)))) + if ((n == n and (n == 1)) and (0 == 0 and (0 == 0))) else "other", "ordinal": lambda n: "other", "translations": { diff --git a/pendulum/locales/nn/custom.py b/pendulum/locales/nn/custom.py index 216dd046..4c7cd6a8 100644 --- a/pendulum/locales/nn/custom.py +++ b/pendulum/locales/nn/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ nn custom locale file. """ diff --git a/pendulum/locales/nn/locale.py b/pendulum/locales/nn/locale.py index d7ad7909..eb46e1de 100644 --- a/pendulum/locales/nn/locale.py +++ b/pendulum/locales/nn/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -12,7 +9,7 @@ locale = { - "plural": lambda n: "one" if (n == n and ((n == 1))) else "other", + "plural": lambda n: "one" if (n == n and (n == 1)) else "other", "ordinal": lambda n: "other", "translations": { "days": { diff --git a/pendulum/locales/pl/custom.py b/pendulum/locales/pl/custom.py index d93465e5..9741b74c 100644 --- a/pendulum/locales/pl/custom.py +++ b/pendulum/locales/pl/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ pl custom locale file. """ diff --git a/pendulum/locales/pl/locale.py b/pendulum/locales/pl/locale.py index 7f83ee50..bf6af102 100644 --- a/pendulum/locales/pl/locale.py +++ b/pendulum/locales/pl/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -15,30 +12,30 @@ "plural": lambda n: "few" if ( ( - (0 == 0 and ((0 == 0))) - and ((n % 10) == (n % 10) and (((n % 10) >= 2 and (n % 10) <= 4))) + (0 == 0 and (0 == 0)) + and ((n % 10) == (n % 10) and ((n % 10) >= 2 and (n % 10) <= 4)) ) - and (not ((n % 100) == (n % 100) and (((n % 100) >= 12 and (n % 100) <= 14)))) + and (not ((n % 100) == (n % 100) and ((n % 100) >= 12 and (n % 100) <= 14))) ) else "many" if ( ( ( - ((0 == 0 and ((0 == 0))) and (not (n == n and ((n == 1))))) - and ((n % 10) == (n % 10) and (((n % 10) >= 0 and (n % 10) <= 1))) + ((0 == 0 and (0 == 0)) and (not (n == n and (n == 1)))) + and ((n % 10) == (n % 10) and ((n % 10) >= 0 and (n % 10) <= 1)) ) or ( - (0 == 0 and ((0 == 0))) - and ((n % 10) == (n % 10) and (((n % 10) >= 5 and (n % 10) <= 9))) + (0 == 0 and (0 == 0)) + and ((n % 10) == (n % 10) and ((n % 10) >= 5 and (n % 10) <= 9)) ) ) or ( - (0 == 0 and ((0 == 0))) - and ((n % 100) == (n % 100) and (((n % 100) >= 12 and (n % 100) <= 14))) + (0 == 0 and (0 == 0)) + and ((n % 100) == (n % 100) and ((n % 100) >= 12 and (n % 100) <= 14)) ) ) else "one" - if ((n == n and ((n == 1))) and (0 == 0 and ((0 == 0)))) + if ((n == n and (n == 1)) and (0 == 0 and (0 == 0))) else "other", "ordinal": lambda n: "other", "translations": { diff --git a/pendulum/locales/pt_br/custom.py b/pendulum/locales/pt_br/custom.py index 065a1401..12aced7d 100644 --- a/pendulum/locales/pt_br/custom.py +++ b/pendulum/locales/pt_br/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ pt-br custom locale file. """ diff --git a/pendulum/locales/pt_br/locale.py b/pendulum/locales/pt_br/locale.py index 307f34f6..742c41fe 100644 --- a/pendulum/locales/pt_br/locale.py +++ b/pendulum/locales/pt_br/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -13,7 +10,7 @@ locale = { "plural": lambda n: "one" - if ((n == n and ((n >= 0 and n <= 2))) and (not (n == n and ((n == 2))))) + if ((n == n and (n >= 0 and n <= 2)) and (not (n == n and (n == 2)))) else "other", "ordinal": lambda n: "other", "translations": { diff --git a/pendulum/locales/ru/custom.py b/pendulum/locales/ru/custom.py index 38f86efa..b4c89bb0 100644 --- a/pendulum/locales/ru/custom.py +++ b/pendulum/locales/ru/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ ru custom locale file. """ diff --git a/pendulum/locales/ru/locale.py b/pendulum/locales/ru/locale.py index a0800357..3736e0b1 100644 --- a/pendulum/locales/ru/locale.py +++ b/pendulum/locales/ru/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations @@ -15,29 +12,29 @@ "plural": lambda n: "few" if ( ( - (0 == 0 and ((0 == 0))) - and ((n % 10) == (n % 10) and (((n % 10) >= 2 and (n % 10) <= 4))) + (0 == 0 and (0 == 0)) + and ((n % 10) == (n % 10) and ((n % 10) >= 2 and (n % 10) <= 4)) ) - and (not ((n % 100) == (n % 100) and (((n % 100) >= 12 and (n % 100) <= 14)))) + and (not ((n % 100) == (n % 100) and ((n % 100) >= 12 and (n % 100) <= 14))) ) else "many" if ( ( - ((0 == 0 and ((0 == 0))) and ((n % 10) == (n % 10) and (((n % 10) == 0)))) + ((0 == 0 and (0 == 0)) and ((n % 10) == (n % 10) and ((n % 10) == 0))) or ( - (0 == 0 and ((0 == 0))) - and ((n % 10) == (n % 10) and (((n % 10) >= 5 and (n % 10) <= 9))) + (0 == 0 and (0 == 0)) + and ((n % 10) == (n % 10) and ((n % 10) >= 5 and (n % 10) <= 9)) ) ) or ( - (0 == 0 and ((0 == 0))) - and ((n % 100) == (n % 100) and (((n % 100) >= 11 and (n % 100) <= 14))) + (0 == 0 and (0 == 0)) + and ((n % 100) == (n % 100) and ((n % 100) >= 11 and (n % 100) <= 14)) ) ) else "one" if ( - ((0 == 0 and ((0 == 0))) and ((n % 10) == (n % 10) and (((n % 10) == 1)))) - and (not ((n % 100) == (n % 100) and (((n % 100) == 11)))) + ((0 == 0 and (0 == 0)) and ((n % 10) == (n % 10) and ((n % 10) == 1))) + and (not ((n % 100) == (n % 100) and ((n % 100) == 11))) ) else "other", "ordinal": lambda n: "other", diff --git a/pendulum/locales/zh/custom.py b/pendulum/locales/zh/custom.py index eb9bb810..69bc4cab 100644 --- a/pendulum/locales/zh/custom.py +++ b/pendulum/locales/zh/custom.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - - """ zh custom locale file. """ diff --git a/pendulum/locales/zh/locale.py b/pendulum/locales/zh/locale.py index f292924e..2df477f9 100644 --- a/pendulum/locales/zh/locale.py +++ b/pendulum/locales/zh/locale.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from .custom import translations as custom_translations diff --git a/pendulum/mixins/__init__.py b/pendulum/mixins/__init__.py index 40a96afc..e69de29b 100644 --- a/pendulum/mixins/__init__.py +++ b/pendulum/mixins/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/pendulum/mixins/default.py b/pendulum/mixins/default.py index fdb05b0f..6db27192 100644 --- a/pendulum/mixins/default.py +++ b/pendulum/mixins/default.py @@ -4,7 +4,7 @@ _formatter = Formatter() -class FormattableMixin(object): +class FormattableMixin: _formatter = _formatter diff --git a/pendulum/parser.py b/pendulum/parser.py index 0df76161..9b081755 100644 --- a/pendulum/parser.py +++ b/pendulum/parser.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import datetime import typing diff --git a/pendulum/parsing/__init__.py b/pendulum/parsing/__init__.py index 1b5c8b91..1d15023b 100644 --- a/pendulum/parsing/__init__.py +++ b/pendulum/parsing/__init__.py @@ -125,14 +125,14 @@ def _parse(text, **options): # so we fallback on the dateutil parser # If not strict if options.get("strict", True): - raise ParserError("Unable to parse string [{}]".format(text)) + raise ParserError(f"Unable to parse string [{text}]") try: dt = parser.parse( text, dayfirst=options["day_first"], yearfirst=options["year_first"] ) except ValueError: - raise ParserError("Invalid date string: {}".format(text)) + raise ParserError(f"Invalid date string: {text}") return dt @@ -192,7 +192,7 @@ def _parse_common(text, **options): # Limiting to 6 chars subsecond = m.group("subsecond")[:6] - microsecond = int("{:0<6}".format(subsecond)) + microsecond = int(f"{subsecond:0<6}") if has_date: return datetime(year, month, day, hour, minute, second, microsecond) diff --git a/pendulum/parsing/iso8601.py b/pendulum/parsing/iso8601.py index 2d8f222a..4f507264 100644 --- a/pendulum/parsing/iso8601.py +++ b/pendulum/parsing/iso8601.py @@ -1,5 +1,3 @@ -from __future__ import division - import datetime import re @@ -120,10 +118,10 @@ def parse_iso8601(text): and not m.group("weekdaysep") and m.group("isoweekday") ): - raise ParserError("Invalid date string: {}".format(text)) + raise ParserError(f"Invalid date string: {text}") if not m.group("weeksep") and m.group("weekdaysep"): - raise ParserError("Invalid date string: {}".format(text)) + raise ParserError(f"Invalid date string: {text}") try: date = _get_iso_8601_week( @@ -132,7 +130,7 @@ def parse_iso8601(text): except ParserError: raise except ValueError: - raise ParserError("Invalid date string: {}".format(text)) + raise ParserError(f"Invalid date string: {text}") year = date["year"] month = date["month"] @@ -189,10 +187,10 @@ def parse_iso8601(text): return datetime.date(year, month, day) if ambiguous_date: - raise ParserError("Invalid date string: {}".format(text)) + raise ParserError(f"Invalid date string: {text}") if is_date and not m.group("timesep"): - raise ParserError("Invalid date string: {}".format(text)) + raise ParserError(f"Invalid date string: {text}") if not is_date: is_time = True @@ -225,7 +223,7 @@ def parse_iso8601(text): # Limiting to 6 chars subsecond = m.group("subsecond")[:6] - microsecond = int("{:0<6}".format(subsecond)) + microsecond = int(f"{subsecond:0<6}") # Grabbing timezone, if any tz = m.group("tz") @@ -237,7 +235,7 @@ def parse_iso8601(text): tz = tz[1:] if ":" not in tz: if len(tz) == 2: - tz = "{}00".format(tz) + tz = f"{tz}00" off_hour = tz[0:2] off_minute = tz[2:4] @@ -440,7 +438,7 @@ def _get_iso_8601_week(year, week, weekday): year += 1 fmt = "%Y-%j" - string = "{}-{}".format(year, ordinal) + string = f"{year}-{ordinal}" dt = datetime.datetime.strptime(string, fmt) diff --git a/pendulum/period.py b/pendulum/period.py index de0bd39f..47475567 100644 --- a/pendulum/period.py +++ b/pendulum/period.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - import operator from datetime import date @@ -79,10 +77,10 @@ def __new__(cls, start, end, absolute=False): delta = _end - _start - return super(Period, cls).__new__(cls, seconds=delta.total_seconds()) + return super().__new__(cls, seconds=delta.total_seconds()) def __init__(self, start, end, absolute=False): - super(Period, self).__init__() + super().__init__() if not isinstance(start, pendulum.Date): if isinstance(start, datetime): @@ -319,7 +317,7 @@ def __abs__(self): return self.__class__(self.start, self.end, True) def __repr__(self): - return " {}]>".format(self._start, self._end) + return f" {self._end}]>" def __str__(self): return self.__repr__() diff --git a/pendulum/time.py b/pendulum/time.py index 6dea4a05..20948c1e 100644 --- a/pendulum/time.py +++ b/pendulum/time.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - from datetime import time from datetime import timedelta @@ -22,7 +20,7 @@ class Time(FormattableMixin, time): def __repr__(self): us = "" if self.microsecond: - us = ", {}".format(self.microsecond) + us = f", {self.microsecond}" tzinfo = "" if self.tzinfo: @@ -259,7 +257,7 @@ def replace( second = second if second is not None else self.second microsecond = microsecond if microsecond is not None else self.microsecond - t = super(Time, self).replace(hour, minute, second, microsecond, tzinfo=tzinfo) + t = super().replace(hour, minute, second, microsecond, tzinfo=tzinfo) return self.__class__( t.hour, t.minute, t.second, t.microsecond, tzinfo=t.tzinfo ) diff --git a/pendulum/tz/exceptions.py b/pendulum/tz/exceptions.py index 7e77022d..09e6d045 100644 --- a/pendulum/tz/exceptions.py +++ b/pendulum/tz/exceptions.py @@ -15,7 +15,7 @@ class NonExistingTime(TimezoneError): def __init__(self, dt): message = self.message.format(dt) - super(NonExistingTime, self).__init__(message) + super().__init__(message) class AmbiguousTime(TimezoneError): @@ -25,4 +25,4 @@ class AmbiguousTime(TimezoneError): def __init__(self, dt): message = self.message.format(dt) - super(AmbiguousTime, self).__init__(message) + super().__init__(message) diff --git a/pendulum/tz/local_timezone.py b/pendulum/tz/local_timezone.py index 13e16484..185abfe2 100644 --- a/pendulum/tz/local_timezone.py +++ b/pendulum/tz/local_timezone.py @@ -190,7 +190,7 @@ def _get_unix_timezone(_root="/"): # type: (str) -> Timezone if not os.path.isfile(tzpath): continue - with open(tzpath, "rt") as tzfile: + with open(tzpath) as tzfile: data = tzfile.readlines() for line in data: diff --git a/pendulum/tz/timezone.py b/pendulum/tz/timezone.py index 2eb37b50..120388a3 100644 --- a/pendulum/tz/timezone.py +++ b/pendulum/tz/timezone.py @@ -142,7 +142,7 @@ def __init__(self, offset: int, name: Optional[str] = None) -> None: hour, minute = divmod(abs(int(minutes)), 60) if not name: - name = "{0}{1:02d}:{2:02d}".format(sign, hour, minute) + name = f"{sign}{hour:02d}:{minute:02d}" self._name = name self._offset = offset diff --git a/tests/date/__init__.py b/tests/date/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/date/__init__.py +++ b/tests/date/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/date/test_strings.py b/tests/date/test_strings.py index 2323bc36..fe671b98 100644 --- a/tests/date/test_strings.py +++ b/tests/date/test_strings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import pendulum @@ -26,7 +25,7 @@ def test_repr(): def test_format_with_locale(): d = pendulum.Date(1975, 12, 25) - expected = u"jeudi 25e jour de décembre 1975" + expected = "jeudi 25e jour de décembre 1975" assert d.format("dddd Do [jour de] MMMM YYYY", locale="fr") == expected @@ -42,6 +41,6 @@ def test_for_json(): def test_format(): d = pendulum.Date(1975, 12, 25) - assert "{}".format(d) == "1975-12-25" - assert "{:YYYY}".format(d) == "1975" - assert "{:%Y}".format(d) == "1975" + assert f"{d}" == "1975-12-25" + assert f"{d:YYYY}" == "1975" + assert f"{d:%Y}" == "1975" diff --git a/tests/datetime/__init__.py b/tests/datetime/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/datetime/__init__.py +++ b/tests/datetime/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/datetime/test_strings.py b/tests/datetime/test_strings.py index eebe57ff..ea8233d0 100644 --- a/tests/datetime/test_strings.py +++ b/tests/datetime/test_strings.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import pytest import pendulum @@ -120,7 +119,7 @@ def test_repr(): def test_format_with_locale(): d = pendulum.datetime(1975, 12, 25, 14, 15, 16, tz="local") - expected = u"jeudi 25e jour de décembre 1975 02:15:16 PM -05:00" + expected = "jeudi 25e jour de décembre 1975 02:15:16 PM -05:00" assert d.format("dddd Do [jour de] MMMM YYYY hh:mm:ss A Z", locale="fr") == expected @@ -136,7 +135,7 @@ def test_for_json(): def test_format(): d = pendulum.datetime(1975, 12, 25, 14, 15, 16, tz="Europe/Paris") - assert "{}".format(d) == "1975-12-25T14:15:16+01:00" - assert "{:YYYY}".format(d) == "1975" - assert "{:%Y}".format(d) == "1975" - assert "{:%H:%M %d.%m.%Y}".format(d) == "14:15 25.12.1975" + assert f"{d}" == "1975-12-25T14:15:16+01:00" + assert f"{d:YYYY}" == "1975" + assert f"{d:%Y}" == "1975" + assert f"{d:%H:%M %d.%m.%Y}" == "14:15 25.12.1975" diff --git a/tests/duration/__init__.py b/tests/duration/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/duration/__init__.py +++ b/tests/duration/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/fixtures/__init__.py b/tests/fixtures/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/fixtures/__init__.py +++ b/tests/fixtures/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/formatting/__init__.py b/tests/formatting/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/formatting/__init__.py +++ b/tests/formatting/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/formatting/test_formatter.py b/tests/formatting/test_formatter.py index 53495bd6..97ca69b4 100644 --- a/tests/formatting/test_formatter.py +++ b/tests/formatting/test_formatter.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import pytest import pendulum @@ -231,9 +230,9 @@ def test_date_formats(): assert f.format(d, "LT", locale="fr") == "07:03" assert f.format(d, "LTS", locale="fr") == "07:03:06" assert f.format(d, "L", locale="fr") == "28/08/2016" - assert f.format(d, "LL", locale="fr") == u"28 août 2016" - assert f.format(d, "LLL", locale="fr") == u"28 août 2016 07:03" - assert f.format(d, "LLLL", locale="fr") == u"dimanche 28 août 2016 07:03" + assert f.format(d, "LL", locale="fr") == "28 août 2016" + assert f.format(d, "LLL", locale="fr") == "28 août 2016 07:03" + assert f.format(d, "LLLL", locale="fr") == "dimanche 28 août 2016 07:03" def test_escape(): diff --git a/tests/helpers/__init__.py b/tests/helpers/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/helpers/__init__.py +++ b/tests/helpers/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/localization/test_da.py b/tests/localization/test_da.py index aff40345..b5728442 100644 --- a/tests/localization/test_da.py +++ b/tests/localization/test_da.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_de.py b/tests/localization/test_de.py index babcc651..94aa18e3 100644 --- a/tests/localization/test_de.py +++ b/tests/localization/test_de.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_es.py b/tests/localization/test_es.py index c75d0bcc..80f64cd2 100644 --- a/tests/localization/test_es.py +++ b/tests/localization/test_es.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_fa.py b/tests/localization/test_fa.py index c14f3204..392f3250 100644 --- a/tests/localization/test_fa.py +++ b/tests/localization/test_fa.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_fo.py b/tests/localization/test_fo.py index 376d0906..67ec0a69 100644 --- a/tests/localization/test_fo.py +++ b/tests/localization/test_fo.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_fr.py b/tests/localization/test_fr.py index 68d1158f..d43674cb 100644 --- a/tests/localization/test_fr.py +++ b/tests/localization/test_fr.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_id.py b/tests/localization/test_id.py index 5b18a67a..1eda1496 100644 --- a/tests/localization/test_id.py +++ b/tests/localization/test_id.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_it.py b/tests/localization/test_it.py index 6db66c99..171a5ce6 100644 --- a/tests/localization/test_it.py +++ b/tests/localization/test_it.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_ko.py b/tests/localization/test_ko.py index 63f03f4a..44e5f7cb 100644 --- a/tests/localization/test_ko.py +++ b/tests/localization/test_ko.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_lt.py b/tests/localization/test_lt.py index 231c55d5..db47ee8d 100644 --- a/tests/localization/test_lt.py +++ b/tests/localization/test_lt.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_nb.py b/tests/localization/test_nb.py index 3cd7e8ee..12509d3d 100644 --- a/tests/localization/test_nb.py +++ b/tests/localization/test_nb.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_nl.py b/tests/localization/test_nl.py index 545c8a3b..60649adf 100644 --- a/tests/localization/test_nl.py +++ b/tests/localization/test_nl.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_nn.py b/tests/localization/test_nn.py index 5105c75c..d159641a 100644 --- a/tests/localization/test_nn.py +++ b/tests/localization/test_nn.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_pl.py b/tests/localization/test_pl.py index 926ee8a3..50ca10ad 100644 --- a/tests/localization/test_pl.py +++ b/tests/localization/test_pl.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/localization/test_ru.py b/tests/localization/test_ru.py index c257f118..a87ea295 100644 --- a/tests/localization/test_ru.py +++ b/tests/localization/test_ru.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import pendulum diff --git a/tests/parsing/__init__.py b/tests/parsing/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/parsing/__init__.py +++ b/tests/parsing/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/period/__init__.py b/tests/period/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/period/__init__.py +++ b/tests/period/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/period/test_add_subtract.py b/tests/period/test_add_subtract.py index 8bbc4d62..0a7ff756 100644 --- a/tests/period/test_add_subtract.py +++ b/tests/period/test_add_subtract.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import pendulum diff --git a/tests/test_helpers.py b/tests/test_helpers.py index cbaf0116..cb17385e 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -1,5 +1,3 @@ -from __future__ import absolute_import - from datetime import datetime import pytest diff --git a/tests/time/__init__.py b/tests/time/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/time/__init__.py +++ b/tests/time/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/time/test_strings.py b/tests/time/test_strings.py index 23be7db8..57ac988f 100644 --- a/tests/time/test_strings.py +++ b/tests/time/test_strings.py @@ -33,5 +33,5 @@ def test_for_json(): def test_format(): d = Time(14, 15, 16) - assert "{}".format(d) == "14:15:16" - assert "{:mm}".format(d) == "15" + assert f"{d}" == "14:15:16" + assert f"{d:mm}" == "15" diff --git a/tests/tz/__init__.py b/tests/tz/__init__.py index 40a96afc..e69de29b 100644 --- a/tests/tz/__init__.py +++ b/tests/tz/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/tests/tz/test_timezones.py b/tests/tz/test_timezones.py index be4f178f..41401275 100644 --- a/tests/tz/test_timezones.py +++ b/tests/tz/test_timezones.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- import pytest import pendulum From e52953f7f9849494edaa36b6a9a270ab24ef82a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Thu, 23 Dec 2021 23:43:04 +0100 Subject: [PATCH 024/177] Add a `create()` method to the DateTime class to ease inheritance --- pendulum/__init__.py | 61 +++++++-------------------------- pendulum/datetime.py | 80 +++++++++++++++++++++++++++++++++++++++++--- 2 files changed, 87 insertions(+), 54 deletions(-) diff --git a/pendulum/__init__.py b/pendulum/__init__.py index 78f13681..3e678052 100644 --- a/pendulum/__init__.py +++ b/pendulum/__init__.py @@ -107,26 +107,17 @@ def datetime( """ Creates a new DateTime instance from a specific date and time. """ - if tz is not None: - tz = _safe_timezone(tz) - - dt = _datetime.datetime( - year, month, day, hour, minute, second, microsecond, fold=fold - ) - - if tz is not None: - dt = tz.convert(dt, raise_on_unknown_times=raise_on_unknown_times) - - return DateTime( - dt.year, - dt.month, - dt.day, - dt.hour, - dt.minute, - dt.second, - dt.microsecond, - tzinfo=dt.tzinfo, - fold=dt.fold, + return DateTime.create( + year, + month, + day, + hour=hour, + minute=minute, + second=second, + microsecond=microsecond, + tz=tz, + fold=fold, + raise_on_unknown_times=raise_on_unknown_times, ) @@ -211,35 +202,7 @@ def now(tz: Optional[Union[str, Timezone]] = None) -> DateTime: """ Get a DateTime instance for the current date and time. """ - if has_test_now(): - test_instance = get_test_now() - _tz = _safe_timezone(tz) - - if tz is not None and _tz != test_instance.timezone: - test_instance = test_instance.in_tz(_tz) - - return test_instance - - if tz is None or tz == "local": - dt = _datetime.datetime.now(local_timezone()) - elif tz is UTC or tz == "UTC": - dt = _datetime.datetime.now(UTC) - else: - dt = _datetime.datetime.now(UTC) - tz = _safe_timezone(tz) - dt = dt.astimezone(tz) - - return DateTime( - dt.year, - dt.month, - dt.day, - dt.hour, - dt.minute, - dt.second, - dt.microsecond, - tzinfo=dt.tzinfo, - fold=dt.fold, - ) + return DateTime.now(tz) def today(tz: Union[str, Timezone] = "local") -> DateTime: diff --git a/pendulum/datetime.py b/pendulum/datetime.py index 4b5e7af0..a17d2626 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -30,9 +30,12 @@ from .date import Date from .exceptions import PendulumException from .helpers import add_duration +from .helpers import get_test_now +from .helpers import has_test_now from .period import Period from .time import Time from .tz import UTC +from .tz import local_timezone from .tz.timezone import FixedTimezone from .tz.timezone import Timezone from .utils._compat import PY38 @@ -72,12 +75,79 @@ class DateTime(datetime.datetime, Date): "century", ] + @classmethod + def create( + cls, + year: int, + month: int, + day: int, + hour: int = 0, + minute: int = 0, + second: int = 0, + microsecond: int = 0, + tz: Optional[Union[str, float, Timezone]] = UTC, + fold: Optional[int] = 1, + raise_on_unknown_times: bool = False, + ) -> "DateTime": + """ + Creates a new DateTime instance from a specific date and time. + """ + if tz is not None: + tz = pendulum._safe_timezone(tz) + + dt = datetime.datetime( + year, month, day, hour, minute, second, microsecond, fold=fold + ) + + if tz is not None: + dt = tz.convert(dt, raise_on_unknown_times=raise_on_unknown_times) + + return cls( + dt.year, + dt.month, + dt.day, + dt.hour, + dt.minute, + dt.second, + dt.microsecond, + tzinfo=dt.tzinfo, + fold=dt.fold, + ) + @classmethod def now(cls, tz: Optional[Union[str, Timezone]] = None) -> "DateTime": """ Get a DateTime instance for the current date and time. """ - return pendulum.now(tz) + if has_test_now(): + test_instance = get_test_now() + _tz = pendulum._safe_timezone(tz) + + if tz is not None and _tz != test_instance.timezone: + test_instance = test_instance.in_tz(_tz) + + return test_instance + + if tz is None or tz == "local": + dt = datetime.datetime.now(local_timezone()) + elif tz is UTC or tz == "UTC": + dt = datetime.datetime.now(UTC) + else: + dt = datetime.datetime.now(UTC) + tz = pendulum._safe_timezone(tz) + dt = dt.astimezone(tz) + + return cls( + dt.year, + dt.month, + dt.day, + dt.hour, + dt.minute, + dt.second, + dt.microsecond, + tzinfo=dt.tzinfo, + fold=dt.fold, + ) @classmethod def utcnow(cls) -> "DateTime": @@ -124,7 +194,7 @@ def set( if tz is None: tz = self.tz - return pendulum.datetime( + return DateTime.create( year, month, day, hour, minute, second, microsecond, tz=tz ) @@ -428,7 +498,7 @@ def is_long_year(self) -> bool: See link `https://en.wikipedia.org/wiki/ISO_8601#Week_dates`_ """ return ( - pendulum.datetime(self.year, 12, 28, 0, 0, 0, tz=self.tz).isocalendar()[1] + DateTime.create(self.year, 12, 28, 0, 0, 0, tz=self.tz).isocalendar()[1] == 53 ) @@ -502,7 +572,7 @@ def add( ) if units_of_variable_length or self.tzinfo is None: - return pendulum.datetime( + return DateTime.create( dt.year, dt.month, dt.day, @@ -1225,7 +1295,7 @@ def replace( if fold is None: fold = self.fold - return pendulum.datetime( + return DateTime.create( year, month, day, hour, minute, second, microsecond, tz=tzinfo, fold=fold ) From bdffb07759b3a967f86a4f9a59a66b7897eb0d05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Thu, 23 Dec 2021 23:49:39 +0100 Subject: [PATCH 025/177] Add Python 3.10 to test matrix --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e90f116d..cb3f549d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -34,7 +34,7 @@ jobs: strategy: matrix: os: [Ubuntu, MacOS, Windows] - python-version: [3.7, 3.8, 3.9] + python-version: [3.7, 3.8, 3.9, "3.10"] steps: - uses: actions/checkout@v2 From e563fed7120e9a1cf05e0d2c1a6c686dca41a085 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Fri, 24 Dec 2021 15:13:10 +0100 Subject: [PATCH 026/177] Update pytest --- poetry.lock | 104 +++++++++++++++++++++++++++++++------------------ pyproject.toml | 2 +- 2 files changed, 67 insertions(+), 39 deletions(-) diff --git a/poetry.lock b/poetry.lock index 336dce9c..ce9b611f 100644 --- a/poetry.lock +++ b/poetry.lock @@ -75,7 +75,7 @@ tomli = ">=0.2.6,<2.0.0" typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\""} typing-extensions = [ {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}, - {version = "!=3.10.0.1", markers = "python_version >= \"3.10\""}, + {version = ">=3.10.0.0,<3.10.0.1 || >3.10.0.1", markers = "python_version >= \"3.10\""}, ] [package.extras] @@ -206,6 +206,14 @@ docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] perf = ["ipython"] testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +[[package]] +name = "iniconfig" +version = "1.1.1" +description = "iniconfig: brain-dead simple config-ini parsing" +category = "dev" +optional = false +python-versions = "*" + [[package]] name = "isort" version = "5.9.3" @@ -298,14 +306,6 @@ watchdog = ">=2.0" [package.extras] i18n = ["babel (>=2.9.0)"] -[[package]] -name = "more-itertools" -version = "8.10.0" -description = "More routines for operating on iterables, beyond itertools" -category = "dev" -optional = false -python-versions = ">=3.5" - [[package]] name = "mypy-extensions" version = "0.4.3" @@ -429,25 +429,24 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "pytest" -version = "5.4.3" +version = "6.2.5" description = "pytest: simple powerful testing with Python" category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=17.4.0" +attrs = ">=19.2.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} -more-itertools = ">=4.0.0" +iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<1.0" -py = ">=1.5.0" -wcwidth = "*" +pluggy = ">=0.12,<2.0" +py = ">=1.8.2" +toml = "*" [package.extras] -checkqa-mypy = ["mypy (==v0.761)"] testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] [[package]] @@ -625,14 +624,6 @@ python-versions = ">=3.6" [package.extras] watchmedo = ["PyYAML (>=3.10)"] -[[package]] -name = "wcwidth" -version = "0.2.5" -description = "Measures the displayed width of unicode strings in a terminal" -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "zipp" version = "3.6.0" @@ -648,7 +639,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "04fdebb905eef9b386bcc19c73f81c828a94565269f0ae01de95bb7e69eb11fb" +content-hash = "3c3d2c6d774697b6ce74530da0d2da90b09ee520d2569098806d4984c43ffee5" [metadata.files] atomicwrites = [ @@ -764,6 +755,10 @@ importlib-metadata = [ {file = "importlib_metadata-4.8.1-py3-none-any.whl", hash = "sha256:b618b6d2d5ffa2f16add5697cf57a46c76a56229b0ed1c438322e4e95645bd15"}, {file = "importlib_metadata-4.8.1.tar.gz", hash = "sha256:f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1"}, ] +iniconfig = [ + {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, + {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, +] isort = [ {file = "isort-5.9.3-py3-none-any.whl", hash = "sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2"}, {file = "isort-5.9.3.tar.gz", hash = "sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899"}, @@ -780,12 +775,28 @@ markdown-include = [ {file = "markdown-include-0.5.1.tar.gz", hash = "sha256:72a45461b589489a088753893bc95c5fa5909936186485f4ed55caa57d10250f"}, ] markupsafe = [ + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, + {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, + {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, @@ -794,14 +805,27 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, + {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, + {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, @@ -811,6 +835,12 @@ markupsafe = [ {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, + {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, @@ -823,10 +853,6 @@ mkdocs = [ {file = "mkdocs-1.2.3-py3-none-any.whl", hash = "sha256:a1fa8c2d0c1305d7fc2b9d9f607c71778572a8b110fb26642aa00296c9e6d072"}, {file = "mkdocs-1.2.3.tar.gz", hash = "sha256:89f5a094764381cda656af4298727c9f53dc3e602983087e1fe96ea1df24f4c1"}, ] -more-itertools = [ - {file = "more-itertools-8.10.0.tar.gz", hash = "sha256:1debcabeb1df793814859d64a81ad7cb10504c24349368ccf214c664c474f41f"}, - {file = "more_itertools-8.10.0-py3-none-any.whl", hash = "sha256:56ddac45541718ba332db05f464bebfb0768110111affd27f66e0051f276fa43"}, -] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, @@ -835,7 +861,10 @@ nodeenv = [ {file = "nodeenv-1.6.0-py2.py3-none-any.whl", hash = "sha256:621e6b7076565ddcacd2db0294c0381e01fd28945ab36bcf00f41c5daf63bef7"}, {file = "nodeenv-1.6.0.tar.gz", hash = "sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b"}, ] -packaging = [] +packaging = [ + {file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"}, + {file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"}, +] pathspec = [ {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, @@ -873,14 +902,17 @@ pyparsing = [ {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, ] pytest = [ - {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, - {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, + {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, + {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, ] pytest-cov = [ {file = "pytest-cov-2.12.1.tar.gz", hash = "sha256:261ceeb8c227b726249b376b8526b600f38667ee314f910353fa318caa01f4d7"}, {file = "pytest_cov-2.12.1-py2.py3-none-any.whl", hash = "sha256:261bb9e47e65bd099c89c3edf92972865210c36813f80ede5277dceb77a4a62a"}, ] -python-dateutil = [] +python-dateutil = [ + {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, + {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, +] pytz = [ {file = "pytz-2021.3-py2.py3-none-any.whl", hash = "sha256:3672058bc3453457b622aab7a1c3bfd5ab0bdae451512f6cf25f64ed37f5b87c"}, {file = "pytz-2021.3.tar.gz", hash = "sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326"}, @@ -1095,10 +1127,6 @@ watchdog = [ {file = "watchdog-2.1.6-py3-none-win_ia64.whl", hash = "sha256:a0f1c7edf116a12f7245be06120b1852275f9506a7d90227648b250755a03923"}, {file = "watchdog-2.1.6.tar.gz", hash = "sha256:a36e75df6c767cbf46f61a91c70b3ba71811dfa0aca4a324d9407a06a8b7a2e7"}, ] -wcwidth = [ - {file = "wcwidth-0.2.5-py2.py3-none-any.whl", hash = "sha256:beb4802a9cebb9144e99086eff703a642a13d6a0052920003a230f3294bbe784"}, - {file = "wcwidth-0.2.5.tar.gz", hash = "sha256:c4d647b99872929fdb7bdcaa4fbe7f01413ed3d98077df798530e5b04f116c83"}, -] zipp = [ {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"}, diff --git a/pyproject.toml b/pyproject.toml index 441f26ff..8aceaf91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,7 +31,7 @@ python-dateutil = "^2.6" tzdata = ">=2020.1" [tool.poetry.group.dev.dependencies] -pytest = "^5.4.3" +pytest = "^6.2.5" pytest-cov = "^2.5" pytz = ">=2018.3" babel = "^2.5" From 607bab438a836c633f69638b5a6402d28946e219 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Eustace?= Date: Fri, 24 Dec 2021 15:31:48 +0100 Subject: [PATCH 027/177] Reorganize dependencies in groups --- .github/workflows/tests.yml | 7 +- poetry.lock | 425 ++++++++++++++++-------------------- pyproject.toml | 22 +- 3 files changed, 209 insertions(+), 245 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cb3f549d..f14fe11e 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -80,14 +80,9 @@ jobs: shell: bash run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv - - name: Upgrade pip - shell: bash - run: | - poetry run python -m pip install pip -U - - name: Install dependencies shell: bash - run: poetry install -vvv + run: poetry install --only default --only test -vvv - name: Test Pure Python shell: bash diff --git a/poetry.lock b/poetry.lock index ce9b611f..b449c16e 100644 --- a/poetry.lock +++ b/poetry.lock @@ -33,7 +33,7 @@ pytz = ">=2015.7" [[package]] name = "backports.entry-points-selectable" -version = "1.1.0" +version = "1.1.1" description = "Compatibility shim providing selectable entry points for older implementations" category = "dev" optional = false @@ -44,7 +44,7 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-flake8", "pytest-cov", "pytest-black (>=0.3.7)", "pytest-mypy", "pytest-checkdocs (>=2.4)", "pytest-enabler (>=1.0.1)"] +testing = ["pytest", "pytest-flake8", "pytest-cov", "pytest-black (>=0.3.7)", "pytest-mypy", "pytest-checkdocs (>=2.4)", "pytest-enabler (>=1.0.1)"] [[package]] name = "backports.zoneinfo" @@ -59,7 +59,7 @@ tzdata = ["tzdata"] [[package]] name = "black" -version = "21.9b0" +version = "21.12b0" description = "The uncompromising code formatter." category = "dev" optional = false @@ -70,9 +70,8 @@ click = ">=7.1.2" mypy-extensions = ">=0.4.3" pathspec = ">=0.9.0,<1" platformdirs = ">=2" -regex = ">=2020.1.8" tomli = ">=0.2.6,<2.0.0" -typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\""} +typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} typing-extensions = [ {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}, {version = ">=3.10.0.0,<3.10.0.1 || >3.10.0.1", markers = "python_version >= \"3.10\""}, @@ -80,9 +79,9 @@ typing-extensions = [ [package.extras] colorama = ["colorama (>=0.4.3)"] -d = ["aiohttp (>=3.6.0)", "aiohttp-cors (>=0.4.0)"] +d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -python2 = ["typed-ast (>=1.4.2)"] +python2 = ["typed-ast (>=1.4.3)"] uvloop = ["uvloop (>=0.15.2)"] [[package]] @@ -127,7 +126,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "coverage" -version = "6.0.2" +version = "6.2" description = "Code coverage measurement for Python" category = "dev" optional = false @@ -146,7 +145,7 @@ python-versions = ">=3.6,<4.0" [[package]] name = "distlib" -version = "0.3.3" +version = "0.3.4" description = "Distribution utilities" category = "dev" optional = false @@ -154,7 +153,7 @@ python-versions = "*" [[package]] name = "filelock" -version = "3.3.1" +version = "3.4.0" description = "A platform independent file lock." category = "dev" optional = false @@ -180,22 +179,22 @@ dev = ["twine", "markdown", "flake8", "wheel"] [[package]] name = "identify" -version = "2.3.0" +version = "2.4.0" description = "File identification library for Python" category = "dev" optional = false python-versions = ">=3.6.1" [package.extras] -license = ["editdistance-s"] +license = ["ukkonen"] [[package]] name = "importlib-metadata" -version = "4.8.1" +version = "4.10.0" description = "Read metadata from Python packages" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} @@ -204,7 +203,7 @@ zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] perf = ["ipython"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pep517", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -216,7 +215,7 @@ python-versions = "*" [[package]] name = "isort" -version = "5.9.3" +version = "5.10.1" description = "A Python utility / library to sort Python imports." category = "dev" optional = false @@ -230,7 +229,7 @@ plugins = ["setuptools"] [[package]] name = "jinja2" -version = "3.0.2" +version = "3.0.3" description = "A very fast and expressive template engine." category = "dev" optional = false @@ -244,14 +243,14 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "markdown" -version = "3.3.4" +version = "3.3.6" description = "Python implementation of Markdown." category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} +importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} [package.extras] testing = ["coverage", "pyyaml"] @@ -324,14 +323,14 @@ python-versions = "*" [[package]] name = "packaging" -version = "21.0" +version = "21.3" description = "Core utilities for Python packages" category = "dev" optional = false python-versions = ">=3.6" [package.dependencies] -pyparsing = ">=2.0.2" +pyparsing = ">=2.0.2,<3.0.5 || >3.0.5" [[package]] name = "pathspec" @@ -355,21 +354,22 @@ test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock [[package]] name = "pluggy" -version = "0.13.1" +version = "1.0.0" description = "plugin and hook calling mechanisms for python" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} [package.extras] dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "2.15.0" +version = "2.16.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false @@ -386,11 +386,11 @@ virtualenv = ">=20.0.8" [[package]] name = "py" -version = "1.10.0" +version = "1.11.0" description = "library with cross-python path, ini-parsing, io, code, log facilities" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pygments" @@ -421,11 +421,14 @@ Markdown = ">=3.2" [[package]] name = "pyparsing" -version = "2.4.7" +version = "3.0.6" description = "Python parsing module" category = "dev" optional = false -python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" +python-versions = ">=3.6" + +[package.extras] +diagrams = ["jinja2", "railroad-diagrams"] [[package]] name = "pytest" @@ -503,14 +506,6 @@ python-versions = ">=3.6" [package.dependencies] pyyaml = "*" -[[package]] -name = "regex" -version = "2021.10.8" -description = "Alternative regular expression module, to replace re." -category = "dev" -optional = false -python-versions = "*" - [[package]] name = "six" version = "1.16.0" @@ -521,7 +516,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "time-machine" -version = "2.4.0" +version = "2.5.0" description = "Travel through time in your tests." category = "dev" optional = false @@ -540,7 +535,7 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tomli" -version = "1.2.1" +version = "1.2.3" description = "A lil' TOML parser" category = "dev" optional = false @@ -571,23 +566,23 @@ testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "psutil (>=5.6.1)", "pytes [[package]] name = "typed-ast" -version = "1.4.3" +version = "1.5.1" description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" [[package]] name = "typing-extensions" -version = "3.10.0.2" -description = "Backported and Experimental Type Hints for Python 3.5+" +version = "4.0.1" +description = "Backported and Experimental Type Hints for Python 3.6+" category = "dev" optional = false -python-versions = "*" +python-versions = ">=3.6" [[package]] name = "tzdata" -version = "2021.2.post0" +version = "2021.5" description = "Provider of IANA time zone data" category = "main" optional = false @@ -595,7 +590,7 @@ python-versions = ">=2" [[package]] name = "virtualenv" -version = "20.8.1" +version = "20.10.0" description = "Virtual Python Environment builder" category = "dev" optional = false @@ -604,13 +599,13 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [package.dependencies] "backports.entry-points-selectable" = ">=1.0.4" distlib = ">=0.3.1,<1" -filelock = ">=3.0.0,<4" +filelock = ">=3.2,<4" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} platformdirs = ">=2,<3" six = ">=1.9.0,<2" [package.extras] -docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=19.9.0rc1)"] +docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] [[package]] @@ -639,7 +634,7 @@ testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytes [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "3c3d2c6d774697b6ce74530da0d2da90b09ee520d2569098806d4984c43ffee5" +content-hash = "09a75ed923554d44c6f1195434ae31c4467b2364fb24e31c98df0654ae6023cd" [metadata.files] atomicwrites = [ @@ -655,8 +650,8 @@ babel = [ {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, ] "backports.entry-points-selectable" = [ - {file = "backports.entry_points_selectable-1.1.0-py2.py3-none-any.whl", hash = "sha256:a6d9a871cde5e15b4c4a53e3d43ba890cc6861ec1332c9c2428c92f977192acc"}, - {file = "backports.entry_points_selectable-1.1.0.tar.gz", hash = "sha256:988468260ec1c196dab6ae1149260e2f5472c9110334e5d51adcb77867361f6a"}, + {file = "backports.entry_points_selectable-1.1.1-py2.py3-none-any.whl", hash = "sha256:7fceed9532a7aa2bd888654a7314f864a3c16a4e710b34a58cfc0f08114c663b"}, + {file = "backports.entry_points_selectable-1.1.1.tar.gz", hash = "sha256:914b21a479fde881635f7af5adc7f6e38d6b274be32269070c53b698c60d5386"}, ] "backports.zoneinfo" = [ {file = "backports.zoneinfo-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc"}, @@ -677,8 +672,8 @@ babel = [ {file = "backports.zoneinfo-0.2.1.tar.gz", hash = "sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2"}, ] black = [ - {file = "black-21.9b0-py3-none-any.whl", hash = "sha256:380f1b5da05e5a1429225676655dddb96f5ae8c75bdf91e53d798871b902a115"}, - {file = "black-21.9b0.tar.gz", hash = "sha256:7de4cfc7eb6b710de325712d40125689101d21d25283eed7e9998722cf10eb91"}, + {file = "black-21.12b0-py3-none-any.whl", hash = "sha256:a615e69ae185e08fdd73e4715e260e2479c861b5740057fde6e8b4e3b7dd589f"}, + {file = "black-21.12b0.tar.gz", hash = "sha256:77b80f693a569e2e527958459634f18df9b0ba2625ba4e0c2d5da5be42e6f2b3"}, ] cfgv = [ {file = "cfgv-3.3.1-py2.py3-none-any.whl", hash = "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426"}, @@ -697,79 +692,93 @@ colorama = [ {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, ] coverage = [ - {file = "coverage-6.0.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:1549e1d08ce38259de2bc3e9a0d5f3642ff4a8f500ffc1b2df73fd621a6cdfc0"}, - {file = "coverage-6.0.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bcae10fccb27ca2a5f456bf64d84110a5a74144be3136a5e598f9d9fb48c0caa"}, - {file = "coverage-6.0.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:53a294dc53cfb39c74758edaa6305193fb4258a30b1f6af24b360a6c8bd0ffa7"}, - {file = "coverage-6.0.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:8251b37be1f2cd9c0e5ccd9ae0380909c24d2a5ed2162a41fcdbafaf59a85ebd"}, - {file = "coverage-6.0.2-cp310-cp310-win32.whl", hash = "sha256:db42baa892cba723326284490283a68d4de516bfb5aaba369b4e3b2787a778b7"}, - {file = "coverage-6.0.2-cp310-cp310-win_amd64.whl", hash = "sha256:bbffde2a68398682623d9dd8c0ca3f46fda074709b26fcf08ae7a4c431a6ab2d"}, - {file = "coverage-6.0.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:60e51a3dd55540bec686d7fff61b05048ca31e804c1f32cbb44533e6372d9cc3"}, - {file = "coverage-6.0.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6a6a9409223a27d5ef3cca57dd7cd4dfcb64aadf2fad5c3b787830ac9223e01a"}, - {file = "coverage-6.0.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4b34ae4f51bbfa5f96b758b55a163d502be3dcb24f505d0227858c2b3f94f5b9"}, - {file = "coverage-6.0.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3bbda1b550e70fa6ac40533d3f23acd4f4e9cb4e6e77251ce77fdf41b3309fb2"}, - {file = "coverage-6.0.2-cp36-cp36m-win32.whl", hash = "sha256:4e28d2a195c533b58fc94a12826f4431726d8eb029ac21d874345f943530c122"}, - {file = "coverage-6.0.2-cp36-cp36m-win_amd64.whl", hash = "sha256:a82d79586a0a4f5fd1cf153e647464ced402938fbccb3ffc358c7babd4da1dd9"}, - {file = "coverage-6.0.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:3be1206dc09fb6298de3fce70593e27436862331a85daee36270b6d0e1c251c4"}, - {file = "coverage-6.0.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c9cd3828bbe1a40070c11fe16a51df733fd2f0cb0d745fb83b7b5c1f05967df7"}, - {file = "coverage-6.0.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:d036dc1ed8e1388e995833c62325df3f996675779541f682677efc6af71e96cc"}, - {file = "coverage-6.0.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:04560539c19ec26995ecfb3d9307ff154fbb9a172cb57e3b3cfc4ced673103d1"}, - {file = "coverage-6.0.2-cp37-cp37m-win32.whl", hash = "sha256:e4fb7ced4d9dec77d6cf533acfbf8e1415fe799430366affb18d69ee8a3c6330"}, - {file = "coverage-6.0.2-cp37-cp37m-win_amd64.whl", hash = "sha256:77b1da5767ed2f44611bc9bc019bc93c03fa495728ec389759b6e9e5039ac6b1"}, - {file = "coverage-6.0.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:61b598cbdbaae22d9e34e3f675997194342f866bb1d781da5d0be54783dce1ff"}, - {file = "coverage-6.0.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:36e9040a43d2017f2787b28d365a4bb33fcd792c7ff46a047a04094dc0e2a30d"}, - {file = "coverage-6.0.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:9f1627e162e3864a596486774876415a7410021f4b67fd2d9efdf93ade681afc"}, - {file = "coverage-6.0.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:e7a0b42db2a47ecb488cde14e0f6c7679a2c5a9f44814393b162ff6397fcdfbb"}, - {file = "coverage-6.0.2-cp38-cp38-win32.whl", hash = "sha256:a1b73c7c4d2a42b9d37dd43199c5711d91424ff3c6c22681bc132db4a4afec6f"}, - {file = "coverage-6.0.2-cp38-cp38-win_amd64.whl", hash = "sha256:1db67c497688fd4ba85b373b37cc52c50d437fd7267520ecd77bddbd89ea22c9"}, - {file = "coverage-6.0.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f2f184bf38e74f152eed7f87e345b51f3ab0b703842f447c22efe35e59942c24"}, - {file = "coverage-6.0.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:cd1cf1deb3d5544bd942356364a2fdc8959bad2b6cf6eb17f47d301ea34ae822"}, - {file = "coverage-6.0.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:ad9b8c1206ae41d46ec7380b78ba735ebb77758a650643e841dd3894966c31d0"}, - {file = "coverage-6.0.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:381d773d896cc7f8ba4ff3b92dee4ed740fb88dfe33b6e42efc5e8ab6dfa1cfe"}, - {file = "coverage-6.0.2-cp39-cp39-win32.whl", hash = "sha256:424c44f65e8be58b54e2b0bd1515e434b940679624b1b72726147cfc6a9fc7ce"}, - {file = "coverage-6.0.2-cp39-cp39-win_amd64.whl", hash = "sha256:abbff240f77347d17306d3201e14431519bf64495648ca5a49571f988f88dee9"}, - {file = "coverage-6.0.2-pp36-none-any.whl", hash = "sha256:7092eab374346121805fb637572483270324407bf150c30a3b161fc0c4ca5164"}, - {file = "coverage-6.0.2-pp37-none-any.whl", hash = "sha256:30922626ce6f7a5a30bdba984ad21021529d3d05a68b4f71ea3b16bda35b8895"}, - {file = "coverage-6.0.2.tar.gz", hash = "sha256:6807947a09510dc31fa86f43595bf3a14017cd60bf633cc746d52141bfa6b149"}, + {file = "coverage-6.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6dbc1536e105adda7a6312c778f15aaabe583b0e9a0b0a324990334fd458c94b"}, + {file = "coverage-6.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:174cf9b4bef0db2e8244f82059a5a72bd47e1d40e71c68ab055425172b16b7d0"}, + {file = "coverage-6.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:92b8c845527eae547a2a6617d336adc56394050c3ed8a6918683646328fbb6da"}, + {file = "coverage-6.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c7912d1526299cb04c88288e148c6c87c0df600eca76efd99d84396cfe00ef1d"}, + {file = "coverage-6.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d5d2033d5db1d58ae2d62f095e1aefb6988af65b4b12cb8987af409587cc0739"}, + {file = "coverage-6.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:3feac4084291642165c3a0d9eaebedf19ffa505016c4d3db15bfe235718d4971"}, + {file = "coverage-6.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:276651978c94a8c5672ea60a2656e95a3cce2a3f31e9fb2d5ebd4c215d095840"}, + {file = "coverage-6.2-cp310-cp310-win32.whl", hash = "sha256:f506af4f27def639ba45789fa6fde45f9a217da0be05f8910458e4557eed020c"}, + {file = "coverage-6.2-cp310-cp310-win_amd64.whl", hash = "sha256:3f7c17209eef285c86f819ff04a6d4cbee9b33ef05cbcaae4c0b4e8e06b3ec8f"}, + {file = "coverage-6.2-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:13362889b2d46e8d9f97c421539c97c963e34031ab0cb89e8ca83a10cc71ac76"}, + {file = "coverage-6.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:22e60a3ca5acba37d1d4a2ee66e051f5b0e1b9ac950b5b0cf4aa5366eda41d47"}, + {file = "coverage-6.2-cp311-cp311-win_amd64.whl", hash = "sha256:b637c57fdb8be84e91fac60d9325a66a5981f8086c954ea2772efe28425eaf64"}, + {file = "coverage-6.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f467bbb837691ab5a8ca359199d3429a11a01e6dfb3d9dcc676dc035ca93c0a9"}, + {file = "coverage-6.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2641f803ee9f95b1f387f3e8f3bf28d83d9b69a39e9911e5bfee832bea75240d"}, + {file = "coverage-6.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1219d760ccfafc03c0822ae2e06e3b1248a8e6d1a70928966bafc6838d3c9e48"}, + {file = "coverage-6.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9a2b5b52be0a8626fcbffd7e689781bf8c2ac01613e77feda93d96184949a98e"}, + {file = "coverage-6.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:8e2c35a4c1f269704e90888e56f794e2d9c0262fb0c1b1c8c4ee44d9b9e77b5d"}, + {file = "coverage-6.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:5d6b09c972ce9200264c35a1d53d43ca55ef61836d9ec60f0d44273a31aa9f17"}, + {file = "coverage-6.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:e3db840a4dee542e37e09f30859f1612da90e1c5239a6a2498c473183a50e781"}, + {file = "coverage-6.2-cp36-cp36m-win32.whl", hash = "sha256:4e547122ca2d244f7c090fe3f4b5a5861255ff66b7ab6d98f44a0222aaf8671a"}, + {file = "coverage-6.2-cp36-cp36m-win_amd64.whl", hash = "sha256:01774a2c2c729619760320270e42cd9e797427ecfddd32c2a7b639cdc481f3c0"}, + {file = "coverage-6.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fb8b8ee99b3fffe4fd86f4c81b35a6bf7e4462cba019997af2fe679365db0c49"}, + {file = "coverage-6.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:619346d57c7126ae49ac95b11b0dc8e36c1dd49d148477461bb66c8cf13bb521"}, + {file = "coverage-6.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0a7726f74ff63f41e95ed3a89fef002916c828bb5fcae83b505b49d81a066884"}, + {file = "coverage-6.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cfd9386c1d6f13b37e05a91a8583e802f8059bebfccde61a418c5808dea6bbfa"}, + {file = "coverage-6.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:17e6c11038d4ed6e8af1407d9e89a2904d573be29d51515f14262d7f10ef0a64"}, + {file = "coverage-6.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c254b03032d5a06de049ce8bca8338a5185f07fb76600afff3c161e053d88617"}, + {file = "coverage-6.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dca38a21e4423f3edb821292e97cec7ad38086f84313462098568baedf4331f8"}, + {file = "coverage-6.2-cp37-cp37m-win32.whl", hash = "sha256:600617008aa82032ddeace2535626d1bc212dfff32b43989539deda63b3f36e4"}, + {file = "coverage-6.2-cp37-cp37m-win_amd64.whl", hash = "sha256:bf154ba7ee2fd613eb541c2bc03d3d9ac667080a737449d1a3fb342740eb1a74"}, + {file = "coverage-6.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f9afb5b746781fc2abce26193d1c817b7eb0e11459510fba65d2bd77fe161d9e"}, + {file = "coverage-6.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edcada2e24ed68f019175c2b2af2a8b481d3d084798b8c20d15d34f5c733fa58"}, + {file = "coverage-6.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a9c8c4283e17690ff1a7427123ffb428ad6a52ed720d550e299e8291e33184dc"}, + {file = "coverage-6.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f614fc9956d76d8a88a88bb41ddc12709caa755666f580af3a688899721efecd"}, + {file = "coverage-6.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9365ed5cce5d0cf2c10afc6add145c5037d3148585b8ae0e77cc1efdd6aa2953"}, + {file = "coverage-6.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8bdfe9ff3a4ea37d17f172ac0dff1e1c383aec17a636b9b35906babc9f0f5475"}, + {file = "coverage-6.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:63c424e6f5b4ab1cf1e23a43b12f542b0ec2e54f99ec9f11b75382152981df57"}, + {file = "coverage-6.2-cp38-cp38-win32.whl", hash = "sha256:49dbff64961bc9bdd2289a2bda6a3a5a331964ba5497f694e2cbd540d656dc1c"}, + {file = "coverage-6.2-cp38-cp38-win_amd64.whl", hash = "sha256:9a29311bd6429be317c1f3fe4bc06c4c5ee45e2fa61b2a19d4d1d6111cb94af2"}, + {file = "coverage-6.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:03b20e52b7d31be571c9c06b74746746d4eb82fc260e594dc662ed48145e9efd"}, + {file = "coverage-6.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:215f8afcc02a24c2d9a10d3790b21054b58d71f4b3c6f055d4bb1b15cecce685"}, + {file = "coverage-6.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a4bdeb0a52d1d04123b41d90a4390b096f3ef38eee35e11f0b22c2d031222c6c"}, + {file = "coverage-6.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c332d8f8d448ded473b97fefe4a0983265af21917d8b0cdcb8bb06b2afe632c3"}, + {file = "coverage-6.2-cp39-cp39-win32.whl", hash = "sha256:6e1394d24d5938e561fbeaa0cd3d356207579c28bd1792f25a068743f2d5b282"}, + {file = "coverage-6.2-cp39-cp39-win_amd64.whl", hash = "sha256:86f2e78b1eff847609b1ca8050c9e1fa3bd44ce755b2ec30e70f2d3ba3844644"}, + {file = "coverage-6.2-pp36.pp37.pp38-none-any.whl", hash = "sha256:5829192582c0ec8ca4a2532407bc14c2f338d9878a10442f5d03804a95fac9de"}, + {file = "coverage-6.2.tar.gz", hash = "sha256:e2cad8093172b7d1595b4ad66f24270808658e11acf43a8f95b41276162eb5b8"}, ] crashtest = [ {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, ] distlib = [ - {file = "distlib-0.3.3-py2.py3-none-any.whl", hash = "sha256:c8b54e8454e5bf6237cc84c20e8264c3e991e824ef27e8f1e81049867d861e31"}, - {file = "distlib-0.3.3.zip", hash = "sha256:d982d0751ff6eaaab5e2ec8e691d949ee80eddf01a62eaa96ddb11531fe16b05"}, + {file = "distlib-0.3.4-py2.py3-none-any.whl", hash = "sha256:6564fe0a8f51e734df6333d08b8b94d4ea8ee6b99b5ed50613f731fd4089f34b"}, + {file = "distlib-0.3.4.zip", hash = "sha256:e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579"}, ] filelock = [ - {file = "filelock-3.3.1-py3-none-any.whl", hash = "sha256:2b5eb3589e7fdda14599e7eb1a50e09b4cc14f34ed98b8ba56d33bfaafcbef2f"}, - {file = "filelock-3.3.1.tar.gz", hash = "sha256:34a9f35f95c441e7b38209775d6e0337f9a3759f3565f6c5798f19618527c76f"}, + {file = "filelock-3.4.0-py3-none-any.whl", hash = "sha256:2e139a228bcf56dd8b2274a65174d005c4a6b68540ee0bdbb92c76f43f29f7e8"}, + {file = "filelock-3.4.0.tar.gz", hash = "sha256:93d512b32a23baf4cac44ffd72ccf70732aeff7b8050fcaf6d3ec406d954baf4"}, ] ghp-import = [ {file = "ghp-import-2.0.2.tar.gz", hash = "sha256:947b3771f11be850c852c64b561c600fdddf794bab363060854c1ee7ad05e071"}, {file = "ghp_import-2.0.2-py3-none-any.whl", hash = "sha256:5f8962b30b20652cdffa9c5a9812f7de6bcb56ec475acac579807719bf242c46"}, ] identify = [ - {file = "identify-2.3.0-py2.py3-none-any.whl", hash = "sha256:d1e82c83d063571bb88087676f81261a4eae913c492dafde184067c584bc7c05"}, - {file = "identify-2.3.0.tar.gz", hash = "sha256:fd08c97f23ceee72784081f1ce5125c8f53a02d3f2716dde79a6ab8f1039fea5"}, + {file = "identify-2.4.0-py2.py3-none-any.whl", hash = "sha256:eba31ca80258de6bb51453084bff4a923187cd2193b9c13710f2516ab30732cc"}, + {file = "identify-2.4.0.tar.gz", hash = "sha256:a33ae873287e81651c7800ca309dc1f84679b763c9c8b30680e16fbfa82f0107"}, ] importlib-metadata = [ - {file = "importlib_metadata-4.8.1-py3-none-any.whl", hash = "sha256:b618b6d2d5ffa2f16add5697cf57a46c76a56229b0ed1c438322e4e95645bd15"}, - {file = "importlib_metadata-4.8.1.tar.gz", hash = "sha256:f284b3e11256ad1e5d03ab86bb2ccd6f5339688ff17a4d797a0fe7df326f23b1"}, + {file = "importlib_metadata-4.10.0-py3-none-any.whl", hash = "sha256:b7cf7d3fef75f1e4c80a96ca660efbd51473d7e8f39b5ab9210febc7809012a4"}, + {file = "importlib_metadata-4.10.0.tar.gz", hash = "sha256:92a8b58ce734b2a4494878e0ecf7d79ccd7a128b5fc6014c401e0b61f006f0f6"}, ] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, ] isort = [ - {file = "isort-5.9.3-py3-none-any.whl", hash = "sha256:e17d6e2b81095c9db0a03a8025a957f334d6ea30b26f9ec70805411e5c7c81f2"}, - {file = "isort-5.9.3.tar.gz", hash = "sha256:9c2ea1e62d871267b78307fe511c0838ba0da28698c5732d54e2790bf3ba9899"}, + {file = "isort-5.10.1-py3-none-any.whl", hash = "sha256:6f62d78e2f89b4500b080fe3a81690850cd254227f27f75c3a0c491a1f351ba7"}, + {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, ] jinja2 = [ - {file = "Jinja2-3.0.2-py3-none-any.whl", hash = "sha256:8569982d3f0889eed11dd620c706d39b60c36d6d25843961f33f77fb6bc6b20c"}, - {file = "Jinja2-3.0.2.tar.gz", hash = "sha256:827a0e32839ab1600d4eb1c4c33ec5a8edfbc5cb42dafa13b81f182f97784b45"}, + {file = "Jinja2-3.0.3-py3-none-any.whl", hash = "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8"}, + {file = "Jinja2-3.0.3.tar.gz", hash = "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"}, ] markdown = [ - {file = "Markdown-3.3.4-py3-none-any.whl", hash = "sha256:96c3ba1261de2f7547b46a00ea8463832c921d3f9d6aba3f255a6f71386db20c"}, - {file = "Markdown-3.3.4.tar.gz", hash = "sha256:31b5b491868dcc87d6c24b7e3d19a0d730d59d3e46f4eea6430a321bed387a49"}, + {file = "Markdown-3.3.6-py3-none-any.whl", hash = "sha256:9923332318f843411e9932237530df53162e29dc7a4e2b91e35764583c46c9a3"}, + {file = "Markdown-3.3.6.tar.gz", hash = "sha256:76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006"}, ] markdown-include = [ {file = "markdown-include-0.5.1.tar.gz", hash = "sha256:72a45461b589489a088753893bc95c5fa5909936186485f4ed55caa57d10250f"}, @@ -862,8 +871,8 @@ nodeenv = [ {file = "nodeenv-1.6.0.tar.gz", hash = "sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b"}, ] packaging = [ - {file = "packaging-21.0-py3-none-any.whl", hash = "sha256:c86254f9220d55e31cc94d69bade760f0847da8000def4dfe1c6b872fd14ff14"}, - {file = "packaging-21.0.tar.gz", hash = "sha256:7dc96269f53a4ccec5c0670940a4281106dd0bb343f47b7471f779df49c2fbe7"}, + {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, + {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, ] pathspec = [ {file = "pathspec-0.9.0-py2.py3-none-any.whl", hash = "sha256:7d15c4ddb0b5c802d161efc417ec1a2558ea2653c2e8ad9c19098201dc1c993a"}, @@ -874,16 +883,16 @@ platformdirs = [ {file = "platformdirs-2.4.0.tar.gz", hash = "sha256:367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2"}, ] pluggy = [ - {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, - {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, + {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, + {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] pre-commit = [ - {file = "pre_commit-2.15.0-py2.py3-none-any.whl", hash = "sha256:a4ed01000afcb484d9eb8d504272e642c4c4099bbad3a6b27e519bd6a3e928a6"}, - {file = "pre_commit-2.15.0.tar.gz", hash = "sha256:3c25add78dbdfb6a28a651780d5c311ac40dd17f160eb3954a0c59da40a505a7"}, + {file = "pre_commit-2.16.0-py2.py3-none-any.whl", hash = "sha256:758d1dc9b62c2ed8881585c254976d66eae0889919ab9b859064fc2fe3c7743e"}, + {file = "pre_commit-2.16.0.tar.gz", hash = "sha256:fe9897cac830aa7164dbd02a4e7b90cae49630451ce88464bca73db486ba9f65"}, ] py = [ - {file = "py-1.10.0-py2.py3-none-any.whl", hash = "sha256:3b80836aa6d1feeaa108e046da6423ab8f6ceda6468545ae8d02d9d58d18818a"}, - {file = "py-1.10.0.tar.gz", hash = "sha256:21b81bda15b66ef5e1a777a21c4dcd9c20ad3efd0b3f817e7a809035269e1bd3"}, + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] pygments = [ {file = "Pygments-2.10.0-py3-none-any.whl", hash = "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380"}, @@ -898,8 +907,8 @@ pymdown-extensions = [ {file = "pymdown_extensions-6.3-py2.py3-none-any.whl", hash = "sha256:66fae2683c7a1dac53184f7de57f51f8dad73f9ead2f453e94e85096cb811335"}, ] pyparsing = [ - {file = "pyparsing-2.4.7-py2.py3-none-any.whl", hash = "sha256:ef9d7589ef3c200abe66653d3f1ab1033c3c419ae9b9bdb1240a85b024efc88b"}, - {file = "pyparsing-2.4.7.tar.gz", hash = "sha256:c203ec8783bf771a155b207279b9bccb8dea02d8f0c9e5f8ead507bc3246ecc1"}, + {file = "pyparsing-3.0.6-py3-none-any.whl", hash = "sha256:04ff808a5b90911829c55c4e26f75fa5ca8a2f5f36aa3a51f68e27033341d3e4"}, + {file = "pyparsing-3.0.6.tar.gz", hash = "sha256:d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81"}, ] pytest = [ {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, @@ -956,151 +965,105 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] -regex = [ - {file = "regex-2021.10.8-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:094a905e87a4171508c2a0e10217795f83c636ccc05ddf86e7272c26e14056ae"}, - {file = "regex-2021.10.8-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:981c786293a3115bc14c103086ae54e5ee50ca57f4c02ce7cf1b60318d1e8072"}, - {file = "regex-2021.10.8-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b0f2f874c6a157c91708ac352470cb3bef8e8814f5325e3c5c7a0533064c6a24"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:51feefd58ac38eb91a21921b047da8644155e5678e9066af7bcb30ee0dca7361"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ea8de658d7db5987b11097445f2b1f134400e2232cb40e614e5f7b6f5428710e"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1ce02f420a7ec3b2480fe6746d756530f69769292eca363218c2291d0b116a01"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:39079ebf54156be6e6902f5c70c078f453350616cfe7bfd2dd15bdb3eac20ccc"}, - {file = "regex-2021.10.8-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:ff24897f6b2001c38a805d53b6ae72267025878d35ea225aa24675fbff2dba7f"}, - {file = "regex-2021.10.8-cp310-cp310-win32.whl", hash = "sha256:c6569ba7b948c3d61d27f04e2b08ebee24fec9ff8e9ea154d8d1e975b175bfa7"}, - {file = "regex-2021.10.8-cp310-cp310-win_amd64.whl", hash = "sha256:45cb0f7ff782ef51bc79e227a87e4e8f24bc68192f8de4f18aae60b1d60bc152"}, - {file = "regex-2021.10.8-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:fab3ab8aedfb443abb36729410403f0fe7f60ad860c19a979d47fb3eb98ef820"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:74e55f8d66f1b41d44bc44c891bcf2c7fad252f8f323ee86fba99d71fd1ad5e3"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d52c5e089edbdb6083391faffbe70329b804652a53c2fdca3533e99ab0580d9"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1abbd95cbe9e2467cac65c77b6abd9223df717c7ae91a628502de67c73bf6838"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b9b5c215f3870aa9b011c00daeb7be7e1ae4ecd628e9beb6d7e6107e07d81287"}, - {file = "regex-2021.10.8-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f540f153c4f5617bc4ba6433534f8916d96366a08797cbbe4132c37b70403e92"}, - {file = "regex-2021.10.8-cp36-cp36m-win32.whl", hash = "sha256:1f51926db492440e66c89cd2be042f2396cf91e5b05383acd7372b8cb7da373f"}, - {file = "regex-2021.10.8-cp36-cp36m-win_amd64.whl", hash = "sha256:5f55c4804797ef7381518e683249310f7f9646da271b71cb6b3552416c7894ee"}, - {file = "regex-2021.10.8-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fb2baff66b7d2267e07ef71e17d01283b55b3cc51a81b54cc385e721ae172ba4"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9e527ab1c4c7cf2643d93406c04e1d289a9d12966529381ce8163c4d2abe4faf"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:36c98b013273e9da5790ff6002ab326e3f81072b4616fd95f06c8fa733d2745f"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:55ef044899706c10bc0aa052f2fc2e58551e2510694d6aae13f37c50f3f6ff61"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:aa0ab3530a279a3b7f50f852f1bab41bc304f098350b03e30a3876b7dd89840e"}, - {file = "regex-2021.10.8-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a37305eb3199d8f0d8125ec2fb143ba94ff6d6d92554c4b8d4a8435795a6eccd"}, - {file = "regex-2021.10.8-cp37-cp37m-win32.whl", hash = "sha256:2efd47704bbb016136fe34dfb74c805b1ef5c7313aef3ce6dcb5ff844299f432"}, - {file = "regex-2021.10.8-cp37-cp37m-win_amd64.whl", hash = "sha256:924079d5590979c0e961681507eb1773a142553564ccae18d36f1de7324e71ca"}, - {file = "regex-2021.10.8-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:19b8f6d23b2dc93e8e1e7e288d3010e58fafed323474cf7f27ab9451635136d9"}, - {file = "regex-2021.10.8-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b09d3904bf312d11308d9a2867427479d277365b1617e48ad09696fa7dfcdf59"}, - {file = "regex-2021.10.8-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:951be934dc25d8779d92b530e922de44dda3c82a509cdb5d619f3a0b1491fafa"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f125fce0a0ae4fd5c3388d369d7a7d78f185f904c90dd235f7ecf8fe13fa741"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:5f199419a81c1016e0560c39773c12f0bd924c37715bffc64b97140d2c314354"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:09e1031e2059abd91177c302da392a7b6859ceda038be9e015b522a182c89e4f"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9c070d5895ac6aeb665bd3cd79f673775caf8d33a0b569e98ac434617ecea57d"}, - {file = "regex-2021.10.8-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:176796cb7f82a7098b0c436d6daac82f57b9101bb17b8e8119c36eecf06a60a3"}, - {file = "regex-2021.10.8-cp38-cp38-win32.whl", hash = "sha256:5e5796d2f36d3c48875514c5cd9e4325a1ca172fc6c78b469faa8ddd3d770593"}, - {file = "regex-2021.10.8-cp38-cp38-win_amd64.whl", hash = "sha256:e4204708fa116dd03436a337e8e84261bc8051d058221ec63535c9403a1582a1"}, - {file = "regex-2021.10.8-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:6dcf53d35850ce938b4f044a43b33015ebde292840cef3af2c8eb4c860730fff"}, - {file = "regex-2021.10.8-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b8b6ee6555b6fbae578f1468b3f685cdfe7940a65675611365a7ea1f8d724991"}, - {file = "regex-2021.10.8-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e2ec1c106d3f754444abf63b31e5c4f9b5d272272a491fa4320475aba9e8157c"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:973499dac63625a5ef9dfa4c791aa33a502ddb7615d992bdc89cf2cc2285daa3"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:88dc3c1acd3f0ecfde5f95c32fcb9beda709dbdf5012acdcf66acbc4794468eb"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:4786dae85c1f0624ac77cb3813ed99267c9adb72e59fdc7297e1cf4d6036d493"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fe6ce4f3d3c48f9f402da1ceb571548133d3322003ce01b20d960a82251695d2"}, - {file = "regex-2021.10.8-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9e3e2cea8f1993f476a6833ef157f5d9e8c75a59a8d8b0395a9a6887a097243b"}, - {file = "regex-2021.10.8-cp39-cp39-win32.whl", hash = "sha256:82cfb97a36b1a53de32b642482c6c46b6ce80803854445e19bc49993655ebf3b"}, - {file = "regex-2021.10.8-cp39-cp39-win_amd64.whl", hash = "sha256:b04e512eb628ea82ed86eb31c0f7fc6842b46bf2601b66b1356a7008327f7700"}, - {file = "regex-2021.10.8.tar.gz", hash = "sha256:26895d7c9bbda5c52b3635ce5991caa90fbb1ddfac9c9ff1c7ce505e2282fb2a"}, -] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] time-machine = [ - {file = "time-machine-2.4.0.tar.gz", hash = "sha256:fd6afc71615c3034e842b0ca8f7c16176edf91651a96a9f5e6e2988c76cb88bb"}, - {file = "time_machine-2.4.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:51247349a5d73b61af89e85f6c8c7b36cbaf2bca707704e8cc7e3b4646665af3"}, - {file = "time_machine-2.4.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6a15296c71cf68300da7e29a5fe0c4ed711c22bfa23bb78b8f25150e6c26bf98"}, - {file = "time_machine-2.4.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99160a02c2a73ee8c9bcfd095b8289fe22f498f25605566ca78bd87b284ddaef"}, - {file = "time_machine-2.4.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:95d9d34ca1efce944cefeebe2f3a828b95c18db1a3505384049bd50b2f179d01"}, - {file = "time_machine-2.4.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a429a95f2b7ed26a3c23cc6381ad133b521dcaa90f243f43c841e131b43a3256"}, - {file = "time_machine-2.4.0-cp310-cp310-win32.whl", hash = "sha256:8a3666284ed72af1320a8a247c042e04a6a6e53ca779ee09af9fb7334cb810bf"}, - {file = "time_machine-2.4.0-cp310-cp310-win_amd64.whl", hash = "sha256:932c52e7c7a7b5f7cdb163330fcd3064c9ba13b4243bd9d9c86fca9e4ee57879"}, - {file = "time_machine-2.4.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:692ce7c249761d5fb8244aa80ee97e57a43ce55d37f9d467028b8a8dea89ab93"}, - {file = "time_machine-2.4.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7e9fd6e24804c4cfa430fd6869d13e67cc16acfbfe411813431e8878ef01bc0c"}, - {file = "time_machine-2.4.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:6802ad8188bd0dac9017928da71be42e39a8272eb0d33d98fe9d66ccc478816f"}, - {file = "time_machine-2.4.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:87b464aead70aaa645801f4774ea72e1f7e6cd399a3a87aa8c5e822689c9224f"}, - {file = "time_machine-2.4.0-cp36-cp36m-win32.whl", hash = "sha256:998b90b18c81949d7fa8c11cc3c530d8255c56ecd9afa29190c1057312611bcb"}, - {file = "time_machine-2.4.0-cp36-cp36m-win_amd64.whl", hash = "sha256:a8192771f0d1b590a3b65e983ad818403a69261376c94b4a297a4e3d7cd7dfc1"}, - {file = "time_machine-2.4.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:bb2955a4660e732f6d3eadf567f92a064c1f36589dd30382d25c4150b4a957fb"}, - {file = "time_machine-2.4.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:fe1cb15d7b8a2ac198499d54e911861b5702c49663f5a19812afb9167cd31aeb"}, - {file = "time_machine-2.4.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:c9b25c3fd2e434d07e4f16425ac12a8926f669d77f70aa38c7148557db5e2675"}, - {file = "time_machine-2.4.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1018e9b0176e65d1c715cbc6bc992c3f7400ace561168c84056f90feadfd02b3"}, - {file = "time_machine-2.4.0-cp37-cp37m-win32.whl", hash = "sha256:de30b0f5389990f8bc2461bb8f20d9ee1c61f715465e0fd5cfb777bff4ecc4d8"}, - {file = "time_machine-2.4.0-cp37-cp37m-win_amd64.whl", hash = "sha256:30317429404d40f71070aae225c29af035918529080544ab16fe8b5ad39d7993"}, - {file = "time_machine-2.4.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:dfa1f919783ee01e949a571984db36af67cab81e58424b5fe05d3def303f6e93"}, - {file = "time_machine-2.4.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8697e7b64079670b5d59c07b764f87114f3dde0f12e3ee63df587b4c4a39fb0b"}, - {file = "time_machine-2.4.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:48a8cb5a5e2f0ede8dc09dbffce2bb34abc41c6c3cd45fc4a39807a4a36bebcf"}, - {file = "time_machine-2.4.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:b86bec9ac4a7b91f94c5fd99f9713e0a51de573d4bc96afc78d21ef2f424c8eb"}, - {file = "time_machine-2.4.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f14ae1cb34934a7ec904cedd326cd3bca74bcfb2cd12cd3d9772cd049f5cf9db"}, - {file = "time_machine-2.4.0-cp38-cp38-win32.whl", hash = "sha256:5b799ec56fb680e2feddc92a9f07cb955fa581161acb64def953a9b3aaa8d179"}, - {file = "time_machine-2.4.0-cp38-cp38-win_amd64.whl", hash = "sha256:6d3a1222524360387a4c7e76fd5b89d0fc69e0acdff12ce48ae75974de059498"}, - {file = "time_machine-2.4.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:f91bb3dcf81d403cedb7ba4864e6f872d54f3b140a7ee19045f621ea79ef31fd"}, - {file = "time_machine-2.4.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:6259e4e78c75ee3355b99483d47095ea89debb3360eb2523a0cdfe1015d7a89d"}, - {file = "time_machine-2.4.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3ed27458c9cfcfd2fdfeee54696df09637a54ad3e43d2c66ae8295445ea6061"}, - {file = "time_machine-2.4.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:97465a07270e329d0b943586a51bdc8d9cbc2f1d373c917b3a857a260ddce643"}, - {file = "time_machine-2.4.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:335aac3bc11262b0aa1a4c188d7caaa1c6b024cf4d4275380b2541e7e1a96661"}, - {file = "time_machine-2.4.0-cp39-cp39-win32.whl", hash = "sha256:a65552ef646bb650db3f0a67c6d347f9148ae2f8100d81ade356f15563049c41"}, - {file = "time_machine-2.4.0-cp39-cp39-win_amd64.whl", hash = "sha256:9a0c2c089f0710664302e308a024780e050fe4a397606833942ff1048c500974"}, + {file = "time-machine-2.5.0.tar.gz", hash = "sha256:f61e582dfe1018c9b1c035d2da948b1ac7f298e3153d704a55f305a7aaefea57"}, + {file = "time_machine-2.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:176a18266394d66a2565a6d71874a945dad3b837ee7db6b26d3329792d086adc"}, + {file = "time_machine-2.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fd081d951ba84d27bce13a988884bf746877073e2bc4220c0d093dd579dd9081"}, + {file = "time_machine-2.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30a9a19ff9ec66cca00944830b3c5d89080a6a222615997a8db251b4dda13acd"}, + {file = "time_machine-2.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8afbb3d7445b2fd26c3d322e77cc5c1734367a55cdeab4198507f735e2a51a8b"}, + {file = "time_machine-2.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:089cea08787d3863bf0dd8ac79d5d9474231f8ce70c8b028ab7788d4196361ea"}, + {file = "time_machine-2.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:8fd7a95421f8979d47035e295443ad3e617eccb02f9e669ccb6a02a900e40321"}, + {file = "time_machine-2.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:31863586d37c72264f795353f70f3f076530941bef4e2936a0aafab28d70a5a1"}, + {file = "time_machine-2.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:51baf21f138dace274a2d628f28a004db5ce020eb5bbcb0908949141c993868b"}, + {file = "time_machine-2.5.0-cp310-cp310-win32.whl", hash = "sha256:0992030c0c58006610e1d8d65a61df176561b8baa416f22ee129cd8c0a092120"}, + {file = "time_machine-2.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:7116e9685513917c57fec0230024e27037d5eff92414a709999c21644ee3ac0a"}, + {file = "time_machine-2.5.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:5a95e99f0f29bd6fd5142e033709a3415246f314ed225661f2bcbe2759a41197"}, + {file = "time_machine-2.5.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a76092104d682a38b1081941bbbf030d47ae03001554425434b8a9f21ca1d5b"}, + {file = "time_machine-2.5.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3e7889e2496c64b85a760e79e25f791055f63c10a6d27abeb4ec4cd12146b6c9"}, + {file = "time_machine-2.5.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c213d5f4d708cdbcfe5be671f1110a7fbe9b8d2ceae9899fbb09dd4e1424d58"}, + {file = "time_machine-2.5.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a50222840f2702a5f7efd13d58506cc45484b22e7371bb86ce4eee7b615053de"}, + {file = "time_machine-2.5.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:9a10c379ebf7a80d8034538016af736103a6c3348670d297788146abaac2c606"}, + {file = "time_machine-2.5.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0873edc3d22a09c606771c899e95b9a9b23d66d9a9fd1f302c778287ece59481"}, + {file = "time_machine-2.5.0-cp36-cp36m-win32.whl", hash = "sha256:1288a7283b5efc53b69ce846d0ec5598ea6b2682053cd706f5d5e52fb6b2120c"}, + {file = "time_machine-2.5.0-cp36-cp36m-win_amd64.whl", hash = "sha256:f4ed5b43ab71f10dfeaf9c8a0c377cb091c3a3dac3e21ee0ec132ad76d0e771d"}, + {file = "time_machine-2.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:47ba6e193bd6a755abb7dde5000ea62b66fcb6ae468ca122652ed8dbd3ad6bd3"}, + {file = "time_machine-2.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4ac68af561565bce073230a6038209cf5a19fe0f1cb5e94ebf2ea10cc4a845a"}, + {file = "time_machine-2.5.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:28ad158c80187c17931c1667ced28294af5597ee28479b5b145da3d07ae2f34d"}, + {file = "time_machine-2.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b3f8178aa8676dce482100415e035eaf065664ecf1ab5b32dc88a6d07a5481"}, + {file = "time_machine-2.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:fc915a4c32084384acd88ebc39400a5dbf62129f2c694a58f71b35aa45663096"}, + {file = "time_machine-2.5.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:936890909eb86e6c735ba76ce06e42e0da41d888d41130e65d41819663446bf1"}, + {file = "time_machine-2.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7acf47de70fca46042b19f8b97b6f7c6cb37f6ddd157d0f56d22774e9bcc5cae"}, + {file = "time_machine-2.5.0-cp37-cp37m-win32.whl", hash = "sha256:30c533c30eb7dbf452b59170ea5584b9aca4bccf17b4382d42ad79481041d930"}, + {file = "time_machine-2.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:42614b6a234cc0c60ff9e8ff3567da480e7f69d1f19a70706fa7a95a382b21bf"}, + {file = "time_machine-2.5.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e6fd3ca3f49e2116889255e11f7243b79f8b15586f219538a8ed14c8d0677c64"}, + {file = "time_machine-2.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8dc833bc503e8f3afe5fbebb7ab5887a848534ee2de9883f3ce9b770efd78e5a"}, + {file = "time_machine-2.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:36d3f90b98bbb7bfaa45a8755d43bb290c27cd5e04b37329bda7617bfe745682"}, + {file = "time_machine-2.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:78a159d57131244c2a6591c26c75f26fce4c26f3b23ecac918cfe0de1812cde7"}, + {file = "time_machine-2.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37df69104c38af80e465b8530a2929a6bc4ea51e332b6ae66aa4fdade6a454e7"}, + {file = "time_machine-2.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:701f2e56205411d2d1644f26dc4a98a39e901a41868819d1826b7d2e00f5d37a"}, + {file = "time_machine-2.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:98800bb5db89815d9d1ade51d8690b6418d93b0b9664bf4a4a8492380e95dc38"}, + {file = "time_machine-2.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0e51562bad97ada3b00f996db40b9de2ff0e2cb61b54b017ede7738fc08edb7b"}, + {file = "time_machine-2.5.0-cp38-cp38-win32.whl", hash = "sha256:6c76ee141f4e33c64a9de7cda1f6793985c66bcfa3cc6d284ab8aae1ec468444"}, + {file = "time_machine-2.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:e7a0430b25c7f6487b7455774bbe0e447753bc2ac43f25cbc82aba6453bf126a"}, + {file = "time_machine-2.5.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b6c59c2fca5b573bbcd7b5eab8799e685d61c17ed31906f29e465e4d747f38f2"}, + {file = "time_machine-2.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8b567dc27997bc7cef3aeaf5aa5f6481560dced0a1fc0ca6d7de2cbc592a019b"}, + {file = "time_machine-2.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10532dcf6a6eb37eead208f6307886e6abf388af4d0bd1d50502b8bece9ca895"}, + {file = "time_machine-2.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd2edef76fa21de1238c54beb751863e75928b075a25d62d5ac65f8e909e4628"}, + {file = "time_machine-2.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ff6a4c60177d68489a8fc8f98d60692aa57572d1ddc4cd8209914010d8436a3"}, + {file = "time_machine-2.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:cfae49174892c138f9b127dcb820f4f287f603af6771581e130feedcbdd6c320"}, + {file = "time_machine-2.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:8b093449198841fc008f7d2af71e28485dc46958a488f2068bf31a59caff6887"}, + {file = "time_machine-2.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a486d59f966872732492e2139d76c4cd03460d6600de9239f4f8ab606b9b7f37"}, + {file = "time_machine-2.5.0-cp39-cp39-win32.whl", hash = "sha256:739ac3d5b75a1236ab3e7833a8a4936f046b94fae86e97ea124aa59fc060c2cc"}, + {file = "time_machine-2.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:ae0f33be3ab2550af3af8545e74382adc4c1fac3a6e4bf42924c7ebefc42d17a"}, ] toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tomli = [ - {file = "tomli-1.2.1-py3-none-any.whl", hash = "sha256:8dd0e9524d6f386271a36b41dbf6c57d8e32fd96fd22b6584679dc569d20899f"}, - {file = "tomli-1.2.1.tar.gz", hash = "sha256:a5b75cb6f3968abb47af1b40c1819dc519ea82bcc065776a866e8d74c5ca9442"}, + {file = "tomli-1.2.3-py3-none-any.whl", hash = "sha256:e3069e4be3ead9668e21cb9b074cd948f7b3113fd9c8bba083f48247aab8b11c"}, + {file = "tomli-1.2.3.tar.gz", hash = "sha256:05b6166bff487dc068d322585c7ea4ef78deed501cc124060e0f238e89a9231f"}, ] tox = [ {file = "tox-3.24.4-py2.py3-none-any.whl", hash = "sha256:5e274227a53dc9ef856767c21867377ba395992549f02ce55eb549f9fb9a8d10"}, {file = "tox-3.24.4.tar.gz", hash = "sha256:c30b57fa2477f1fb7c36aa1d83292d5c2336cd0018119e1b1c17340e2c2708ca"}, ] typed-ast = [ - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_i686.whl", hash = "sha256:2068531575a125b87a41802130fa7e29f26c09a2833fea68d9a40cf33902eba6"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux1_x86_64.whl", hash = "sha256:c907f561b1e83e93fad565bac5ba9c22d96a54e7ea0267c708bffe863cbe4075"}, - {file = "typed_ast-1.4.3-cp35-cp35m-manylinux2014_aarch64.whl", hash = "sha256:1b3ead4a96c9101bef08f9f7d1217c096f31667617b58de957f690c92378b528"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win32.whl", hash = "sha256:dde816ca9dac1d9c01dd504ea5967821606f02e510438120091b84e852367428"}, - {file = "typed_ast-1.4.3-cp35-cp35m-win_amd64.whl", hash = "sha256:777a26c84bea6cd934422ac2e3b78863a37017618b6e5c08f92ef69853e765d3"}, - {file = "typed_ast-1.4.3-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f8afcf15cc511ada719a88e013cec87c11aff7b91f019295eb4530f96fe5ef2f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:52b1eb8c83f178ab787f3a4283f68258525f8d70f778a2f6dd54d3b5e5fb4341"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:01ae5f73431d21eead5015997ab41afa53aa1fbe252f9da060be5dad2c730ace"}, - {file = "typed_ast-1.4.3-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:c190f0899e9f9f8b6b7863debfb739abcb21a5c054f911ca3596d12b8a4c4c7f"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win32.whl", hash = "sha256:398e44cd480f4d2b7ee8d98385ca104e35c81525dd98c519acff1b79bdaac363"}, - {file = "typed_ast-1.4.3-cp36-cp36m-win_amd64.whl", hash = "sha256:bff6ad71c81b3bba8fa35f0f1921fb24ff4476235a6e94a26ada2e54370e6da7"}, - {file = "typed_ast-1.4.3-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0fb71b8c643187d7492c1f8352f2c15b4c4af3f6338f21681d3681b3dc31a266"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:760ad187b1041a154f0e4d0f6aae3e40fdb51d6de16e5c99aedadd9246450e9e"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:5feca99c17af94057417d744607b82dd0a664fd5e4ca98061480fd8b14b18d04"}, - {file = "typed_ast-1.4.3-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:95431a26309a21874005845c21118c83991c63ea800dd44843e42a916aec5899"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win32.whl", hash = "sha256:aee0c1256be6c07bd3e1263ff920c325b59849dc95392a05f258bb9b259cf39c"}, - {file = "typed_ast-1.4.3-cp37-cp37m-win_amd64.whl", hash = "sha256:9ad2c92ec681e02baf81fdfa056fe0d818645efa9af1f1cd5fd6f1bd2bdfd805"}, - {file = "typed_ast-1.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:b36b4f3920103a25e1d5d024d155c504080959582b928e91cb608a65c3a49e1a"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_i686.whl", hash = "sha256:067a74454df670dcaa4e59349a2e5c81e567d8d65458d480a5b3dfecec08c5ff"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7538e495704e2ccda9b234b82423a4038f324f3a10c43bc088a1636180f11a41"}, - {file = "typed_ast-1.4.3-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:af3d4a73793725138d6b334d9d247ce7e5f084d96284ed23f22ee626a7b88e39"}, - {file = "typed_ast-1.4.3-cp38-cp38-win32.whl", hash = "sha256:f2362f3cb0f3172c42938946dbc5b7843c2a28aec307c49100c8b38764eb6927"}, - {file = "typed_ast-1.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:dd4a21253f42b8d2b48410cb31fe501d32f8b9fbeb1f55063ad102fe9c425e40"}, - {file = "typed_ast-1.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f328adcfebed9f11301eaedfa48e15bdece9b519fb27e6a8c01aa52a17ec31b3"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_i686.whl", hash = "sha256:2c726c276d09fc5c414693a2de063f521052d9ea7c240ce553316f70656c84d4"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:cae53c389825d3b46fb37538441f75d6aecc4174f615d048321b716df2757fb0"}, - {file = "typed_ast-1.4.3-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:b9574c6f03f685070d859e75c7f9eeca02d6933273b5e69572e5ff9d5e3931c3"}, - {file = "typed_ast-1.4.3-cp39-cp39-win32.whl", hash = "sha256:209596a4ec71d990d71d5e0d312ac935d86930e6eecff6ccc7007fe54d703808"}, - {file = "typed_ast-1.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:9c6d1a54552b5330bc657b7ef0eae25d00ba7ffe85d9ea8ae6540d2197a3788c"}, - {file = "typed_ast-1.4.3.tar.gz", hash = "sha256:fb1bbeac803adea29cedd70781399c99138358c26d05fcbd23c13016b7f5ec65"}, + {file = "typed_ast-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5d8314c92414ce7481eee7ad42b353943679cf6f30237b5ecbf7d835519e1212"}, + {file = "typed_ast-1.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b53ae5de5500529c76225d18eeb060efbcec90ad5e030713fe8dab0fb4531631"}, + {file = "typed_ast-1.5.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:24058827d8f5d633f97223f5148a7d22628099a3d2efe06654ce872f46f07cdb"}, + {file = "typed_ast-1.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:a6d495c1ef572519a7bac9534dbf6d94c40e5b6a608ef41136133377bba4aa08"}, + {file = "typed_ast-1.5.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:de4ecae89c7d8b56169473e08f6bfd2df7f95015591f43126e4ea7865928677e"}, + {file = "typed_ast-1.5.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:256115a5bc7ea9e665c6314ed6671ee2c08ca380f9d5f130bd4d2c1f5848d695"}, + {file = "typed_ast-1.5.1-cp36-cp36m-win_amd64.whl", hash = "sha256:7c42707ab981b6cf4b73490c16e9d17fcd5227039720ca14abe415d39a173a30"}, + {file = "typed_ast-1.5.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:71dcda943a471d826ea930dd449ac7e76db7be778fcd722deb63642bab32ea3f"}, + {file = "typed_ast-1.5.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4f30a2bcd8e68adbb791ce1567fdb897357506f7ea6716f6bbdd3053ac4d9471"}, + {file = "typed_ast-1.5.1-cp37-cp37m-win_amd64.whl", hash = "sha256:ca9e8300d8ba0b66d140820cf463438c8e7b4cdc6fd710c059bfcfb1531d03fb"}, + {file = "typed_ast-1.5.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9caaf2b440efb39ecbc45e2fabde809cbe56272719131a6318fd9bf08b58e2cb"}, + {file = "typed_ast-1.5.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c9bcad65d66d594bffab8575f39420fe0ee96f66e23c4d927ebb4e24354ec1af"}, + {file = "typed_ast-1.5.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:591bc04e507595887160ed7aa8d6785867fb86c5793911be79ccede61ae96f4d"}, + {file = "typed_ast-1.5.1-cp38-cp38-win_amd64.whl", hash = "sha256:a80d84f535642420dd17e16ae25bb46c7f4c16ee231105e7f3eb43976a89670a"}, + {file = "typed_ast-1.5.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:38cf5c642fa808300bae1281460d4f9b7617cf864d4e383054a5ef336e344d32"}, + {file = "typed_ast-1.5.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5b6ab14c56bc9c7e3c30228a0a0b54b915b1579613f6e463ba6f4eb1382e7fd4"}, + {file = "typed_ast-1.5.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a2b8d7007f6280e36fa42652df47087ac7b0a7d7f09f9468f07792ba646aac2d"}, + {file = "typed_ast-1.5.1-cp39-cp39-win_amd64.whl", hash = "sha256:b6d17f37f6edd879141e64a5db17b67488cfeffeedad8c5cec0392305e9bc775"}, + {file = "typed_ast-1.5.1.tar.gz", hash = "sha256:484137cab8ecf47e137260daa20bafbba5f4e3ec7fda1c1e69ab299b75fa81c5"}, ] typing-extensions = [ - {file = "typing_extensions-3.10.0.2-py2-none-any.whl", hash = "sha256:d8226d10bc02a29bcc81df19a26e56a9647f8b0a6d4a83924139f4a8b01f17b7"}, - {file = "typing_extensions-3.10.0.2-py3-none-any.whl", hash = "sha256:f1d25edafde516b146ecd0613dabcc61409817af4766fbbcfb8d1ad4ec441a34"}, - {file = "typing_extensions-3.10.0.2.tar.gz", hash = "sha256:49f75d16ff11f1cd258e1b988ccff82a3ca5570217d7ad8c5f48205dd99a677e"}, + {file = "typing_extensions-4.0.1-py3-none-any.whl", hash = "sha256:7f001e5ac290a0c0401508864c7ec868be4e701886d5b573a9528ed3973d9d3b"}, + {file = "typing_extensions-4.0.1.tar.gz", hash = "sha256:4ca091dea149f945ec56afb48dae714f21e8692ef22a395223bcd328961b6a0e"}, ] tzdata = [ - {file = "tzdata-2021.2.post0-py2.py3-none-any.whl", hash = "sha256:a843aabf67dea3dc6bbbc8853e1aee6563e74bcfe920e11a571a389155db1401"}, - {file = "tzdata-2021.2.post0.tar.gz", hash = "sha256:99d30a01967bb8d7868c03dc924862b1ae8a0e649a322a1107bacc1723c430b9"}, + {file = "tzdata-2021.5-py2.py3-none-any.whl", hash = "sha256:3eee491e22ebfe1e5cfcc97a4137cd70f092ce59144d81f8924a844de05ba8f5"}, + {file = "tzdata-2021.5.tar.gz", hash = "sha256:68dbe41afd01b867894bbdfd54fa03f468cfa4f0086bfb4adcd8de8f24f3ee21"}, ] virtualenv = [ - {file = "virtualenv-20.8.1-py2.py3-none-any.whl", hash = "sha256:10062e34c204b5e4ec5f62e6ef2473f8ba76513a9a617e873f1f8fb4a519d300"}, - {file = "virtualenv-20.8.1.tar.gz", hash = "sha256:bcc17f0b3a29670dd777d6f0755a4c04f28815395bca279cdcb213b97199a6b8"}, + {file = "virtualenv-20.10.0-py2.py3-none-any.whl", hash = "sha256:4b02e52a624336eece99c96e3ab7111f469c24ba226a53ec474e8e787b365814"}, + {file = "virtualenv-20.10.0.tar.gz", hash = "sha256:576d05b46eace16a9c348085f7d0dc8ef28713a2cabaa1cf0aea41e8f12c9218"}, ] watchdog = [ {file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9693f35162dc6208d10b10ddf0458cc09ad70c30ba689d9206e02cd836ce28a3"}, diff --git a/pyproject.toml b/pyproject.toml index 8aceaf91..748cae9b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -30,21 +30,27 @@ python-dateutil = "^2.6" "backports.zoneinfo" = {version = "^0.2.1", python = ">=3.7,<3.9"} tzdata = ">=2020.1" -[tool.poetry.group.dev.dependencies] +[tool.poetry.group.test.dependencies] pytest = "^6.2.5" pytest-cov = "^2.5" pytz = ">=2018.3" -babel = "^2.5" -cleo = "^1.0.0a3" -tox = "^3.0" -black = {version = "^21.9b0", markers = "implementation_name != 'pypy'"} -isort = "^5.9.1" -pre-commit = "^2.10.0" +time-machine = "^2.4.0" + +[tool.poetry.group.doc.dependencies] mkdocs = "^1.0" pymdown-extensions = "^6.0" pygments = "^2.2" markdown-include = "^0.5.1" -time-machine = "^2.4.0" + +[tool.poetry.group.lint.dependencies] +black = {version = "^21.12b0", markers = "implementation_name != 'pypy'"} +isort = "^5.9.1" +pre-commit = "^2.10.0" + +[tool.poetry.group.dev.dependencies] +babel = "^2.5" +cleo = "^1.0.0a3" +tox = "^3.0" [tool.poetry.build] generate-setup-file = false From c8aa24711e8065f1f7455b2b93fd01f845383cba Mon Sep 17 00:00:00 2001 From: Mai Nakagawa Date: Fri, 15 Apr 2022 20:27:07 +0900 Subject: [PATCH 028/177] Update string_formatting.md --- docs/docs/string_formatting.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/string_formatting.md b/docs/docs/string_formatting.md index ec6e0213..91b95fc4 100644 --- a/docs/docs/string_formatting.md +++ b/docs/docs/string_formatting.md @@ -126,8 +126,8 @@ The following tokens are currently supported: | | dd | Mo, Tu, We ... | | | d | 0, 1, 2 ... 6 | | **Days of ISO Week** | E | 1, 2, 3 ... 7 | -| **Hour** | HH | 00, 01, 02 ... 23, 24 | -| | H | 0, 1, 2 ... 23, 24 | +| **Hour** | HH | 00, 01, 02 ... 23 | +| | H | 0, 1, 2 ... 23 | | | hh | 01, 02, 03 ... 11, 12 | | | h | 1, 2, 3 ... 11, 12 | | **Minute** | mm | 00, 01, 02 ... 58, 59 | From f747f5057697cdfc02e75e6973b53a8369117475 Mon Sep 17 00:00:00 2001 From: palotasb-booking <108790365+palotasb-booking@users.noreply.github.com> Date: Wed, 6 Jul 2022 09:36:05 +0200 Subject: [PATCH 029/177] docs: Fix is_birthday example The example in the documentation asserts that `pendulum.datetime(1987, 4, 23).is_birthday(pendulum.datetime(2014, 2, 23))`, but that is probably just a typo. --- docs/docs/comparison.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/docs/comparison.md b/docs/docs/comparison.md index bc3fb50e..6be8d0da 100644 --- a/docs/docs/comparison.md +++ b/docs/docs/comparison.md @@ -64,7 +64,7 @@ the `now()` is created in the same timezone as the instance. >>> born = pendulum.datetime(1987, 4, 23) >>> not_birthday = pendulum.datetime(2014, 9, 26) ->>> birthday = pendulum.datetime(2014, 2, 23) +>>> birthday = pendulum.datetime(2014, 4, 23) >>> past_birthday = pendulum.now().subtract(years=50) >>> born.is_birthday(not_birthday) From eaab763463e5d4f5a0c31b23f5b83d6e421197c9 Mon Sep 17 00:00:00 2001 From: Tim Gates Date: Tue, 12 Jul 2022 22:27:57 +1000 Subject: [PATCH 030/177] docs: Fix a few typos There are small typos in: - README.rst - docs/docs/period.md Fixes: - Should read `dependencies` rather than `depedendencies`. - Should read `compatibility` rather than `compatiblity`. --- README.rst | 2 +- docs/docs/period.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.rst b/README.rst index 313d4c92..85c6003f 100644 --- a/README.rst +++ b/README.rst @@ -186,7 +186,7 @@ Getting started --------------- To work on the Pendulum codebase, you'll want to clone the project locally -and install the required depedendencies via `poetry `_. +and install the required dependencies via `poetry `_. .. code-block:: bash diff --git a/docs/docs/period.md b/docs/docs/period.md index 052966e3..71c58eab 100644 --- a/docs/docs/period.md +++ b/docs/docs/period.md @@ -27,7 +27,7 @@ instances that generated it, so that it can give access to more methods and prop 2 # 832 for the duration # However the days property will still remain the same -# to keep the compatiblity with the timedelta class +# to keep the compatibility with the timedelta class >>> period.days 5829 ``` From bd49d04f37c494bc5d9f58f81bc2c06910a96244 Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Wed, 3 Aug 2022 19:54:53 +0200 Subject: [PATCH 031/177] Update dependencies --- poetry.lock | 701 ++++++++++++++++++++++--------------------------- pyproject.toml | 25 +- 2 files changed, 326 insertions(+), 400 deletions(-) diff --git a/poetry.lock b/poetry.lock index b449c16e..f46f3ae0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,6 +1,6 @@ [[package]] name = "atomicwrites" -version = "1.4.0" +version = "1.4.1" description = "Atomic file writes." category = "dev" optional = false @@ -8,46 +8,31 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" [[package]] name = "attrs" -version = "21.2.0" +version = "22.1.0" description = "Classes Without Boilerplate" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.5" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] -tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope-interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit", "cloudpickle"] +docs = ["furo", "sphinx", "zope-interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "zope-interface", "cloudpickle"] +tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "mypy (>=0.900,!=0.940)", "pytest-mypy-plugins", "cloudpickle"] [[package]] name = "babel" -version = "2.9.1" +version = "2.10.3" description = "Internationalization utilities" category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.6" [package.dependencies] pytz = ">=2015.7" [[package]] -name = "backports.entry-points-selectable" -version = "1.1.1" -description = "Compatibility shim providing selectable entry points for older implementations" -category = "dev" -optional = false -python-versions = ">=2.7" - -[package.dependencies] -importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} - -[package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest", "pytest-flake8", "pytest-cov", "pytest-black (>=0.3.7)", "pytest-mypy", "pytest-checkdocs (>=2.4)", "pytest-enabler (>=1.0.1)"] - -[[package]] -name = "backports.zoneinfo" +name = "backports-zoneinfo" version = "0.2.1" description = "Backport of the standard library zoneinfo module" category = "main" @@ -59,29 +44,25 @@ tzdata = ["tzdata"] [[package]] name = "black" -version = "21.12b0" +version = "22.6.0" description = "The uncompromising code formatter." category = "dev" optional = false python-versions = ">=3.6.2" [package.dependencies] -click = ">=7.1.2" +click = ">=8.0.0" mypy-extensions = ">=0.4.3" -pathspec = ">=0.9.0,<1" +pathspec = ">=0.9.0" platformdirs = ">=2" -tomli = ">=0.2.6,<2.0.0" +tomli = {version = ">=1.1.0", markers = "python_full_version < \"3.11.0a7\""} typed-ast = {version = ">=1.4.2", markers = "python_version < \"3.8\" and implementation_name == \"cpython\""} -typing-extensions = [ - {version = ">=3.10.0.0", markers = "python_version < \"3.10\""}, - {version = ">=3.10.0.0,<3.10.0.1 || >3.10.0.1", markers = "python_version >= \"3.10\""}, -] +typing-extensions = {version = ">=3.10.0.0", markers = "python_version < \"3.10\""} [package.extras] colorama = ["colorama (>=0.4.3)"] d = ["aiohttp (>=3.7.4)"] jupyter = ["ipython (>=7.8.0)", "tokenize-rt (>=3.2.0)"] -python2 = ["typed-ast (>=1.4.3)"] uvloop = ["uvloop (>=0.15.2)"] [[package]] @@ -94,11 +75,11 @@ python-versions = ">=3.6.1" [[package]] name = "cleo" -version = "1.0.0a4" +version = "1.0.0a5" description = "Cleo allows you to create beautiful and testable command-line interfaces." category = "dev" optional = false -python-versions = ">=3.6,<4.0" +python-versions = ">=3.7,<4.0" [package.dependencies] crashtest = ">=0.3.1,<0.4.0" @@ -106,11 +87,11 @@ pylev = ">=1.3.0,<2.0.0" [[package]] name = "click" -version = "8.0.3" +version = "8.1.3" description = "Composable command line interface toolkit" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] colorama = {version = "*", markers = "platform_system == \"Windows\""} @@ -118,7 +99,7 @@ importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [[package]] name = "colorama" -version = "0.4.4" +version = "0.4.5" description = "Cross-platform colored terminal text." category = "dev" optional = false @@ -126,11 +107,14 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "coverage" -version = "6.2" +version = "6.4.2" description = "Code coverage measurement for Python" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" + +[package.dependencies] +tomli = {version = "*", optional = true, markers = "python_full_version <= \"3.11.0a6\" and extra == \"toml\""} [package.extras] toml = ["tomli"] @@ -145,7 +129,7 @@ python-versions = ">=3.6,<4.0" [[package]] name = "distlib" -version = "0.3.4" +version = "0.3.5" description = "Distribution utilities" category = "dev" optional = false @@ -153,11 +137,11 @@ python-versions = "*" [[package]] name = "filelock" -version = "3.4.0" +version = "3.7.1" description = "A platform independent file lock." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] docs = ["furo (>=2021.8.17b43)", "sphinx (>=4.1)", "sphinx-autodoc-typehints (>=1.12)"] @@ -165,7 +149,7 @@ testing = ["covdefaults (>=1.2.0)", "coverage (>=4)", "pytest (>=4)", "pytest-co [[package]] name = "ghp-import" -version = "2.0.2" +version = "2.1.0" description = "Copy your docs directly to the gh-pages branch." category = "dev" optional = false @@ -175,22 +159,22 @@ python-versions = "*" python-dateutil = ">=2.8.1" [package.extras] -dev = ["twine", "markdown", "flake8", "wheel"] +dev = ["wheel", "flake8", "markdown", "twine"] [[package]] name = "identify" -version = "2.4.0" +version = "2.5.2" description = "File identification library for Python" category = "dev" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.7" [package.extras] license = ["ukkonen"] [[package]] name = "importlib-metadata" -version = "4.10.0" +version = "4.12.0" description = "Read metadata from Python packages" category = "dev" optional = false @@ -201,9 +185,9 @@ typing-extensions = {version = ">=3.6.4", markers = "python_version < \"3.8\""} zipp = ">=0.5" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "packaging", "pyfakefs", "flufl-flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)", "importlib-resources (>=1.3)"] [[package]] name = "iniconfig" @@ -229,11 +213,11 @@ plugins = ["setuptools"] [[package]] name = "jinja2" -version = "3.0.3" +version = "3.1.2" description = "A very fast and expressive template engine." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] MarkupSafe = ">=2.0" @@ -243,11 +227,11 @@ i18n = ["Babel (>=2.7)"] [[package]] name = "markdown" -version = "3.3.6" +version = "3.4.1" description = "Python implementation of Markdown." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} @@ -268,11 +252,11 @@ markdown = "*" [[package]] name = "markupsafe" -version = "2.0.1" +version = "2.1.1" description = "Safely add untrusted strings to HTML/XML markup." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "mergedeep" @@ -284,7 +268,7 @@ python-versions = ">=3.6" [[package]] name = "mkdocs" -version = "1.2.3" +version = "1.3.0" description = "Project documentation with Markdown." category = "dev" optional = false @@ -293,8 +277,8 @@ python-versions = ">=3.6" [package.dependencies] click = ">=3.3" ghp-import = ">=1.0" -importlib-metadata = ">=3.10" -Jinja2 = ">=2.10.1" +importlib-metadata = ">=4.3" +Jinja2 = ">=2.10.2" Markdown = ">=3.2.1" mergedeep = ">=1.3.4" packaging = ">=20.5" @@ -315,11 +299,14 @@ python-versions = "*" [[package]] name = "nodeenv" -version = "1.6.0" +version = "1.7.0" description = "Node.js virtual environment builder" category = "dev" optional = false -python-versions = "*" +python-versions = ">=2.7,!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*" + +[package.dependencies] +setuptools = "*" [[package]] name = "packaging" @@ -342,15 +329,15 @@ python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" [[package]] name = "platformdirs" -version = "2.4.0" +version = "2.5.2" description = "A small Python module for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] -docs = ["Sphinx (>=4)", "furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)"] -test = ["appdirs (==1.4.4)", "pytest (>=6)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)"] +docs = ["furo (>=2021.7.5b38)", "proselint (>=0.10.2)", "sphinx-autodoc-typehints (>=1.12)", "sphinx (>=4)"] +test = ["appdirs (==1.4.4)", "pytest-cov (>=2.7)", "pytest-mock (>=3.6)", "pytest (>=6)"] [[package]] name = "pluggy" @@ -369,11 +356,11 @@ testing = ["pytest", "pytest-benchmark"] [[package]] name = "pre-commit" -version = "2.16.0" +version = "2.20.0" description = "A framework for managing and maintaining multi-language pre-commit hooks." category = "dev" optional = false -python-versions = ">=3.6.1" +python-versions = ">=3.7" [package.dependencies] cfgv = ">=2.0.0" @@ -394,11 +381,11 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [[package]] name = "pygments" -version = "2.10.0" +version = "2.12.0" description = "Pygments is a syntax highlighting package written in Python." category = "dev" optional = false -python-versions = ">=3.5" +python-versions = ">=3.6" [[package]] name = "pylev" @@ -421,22 +408,22 @@ Markdown = ">=3.2" [[package]] name = "pyparsing" -version = "3.0.6" -description = "Python parsing module" +version = "3.0.9" +description = "pyparsing module - Classes and methods to define and execute parsing grammars" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.6.8" [package.extras] -diagrams = ["jinja2", "railroad-diagrams"] +diagrams = ["railroad-diagrams", "jinja2"] [[package]] name = "pytest" -version = "6.2.5" +version = "7.1.2" description = "pytest: simple powerful testing with Python" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} @@ -447,23 +434,22 @@ iniconfig = "*" packaging = "*" pluggy = ">=0.12,<2.0" py = ">=1.8.2" -toml = "*" +tomli = ">=1.0.0" [package.extras] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "xmlschema"] [[package]] name = "pytest-cov" -version = "2.12.1" +version = "3.0.0" description = "Pytest plugin for measuring coverage." category = "dev" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +python-versions = ">=3.6" [package.dependencies] -coverage = ">=5.2.1" +coverage = {version = ">=5.2.1", extras = ["toml"]} pytest = ">=4.6" -toml = "*" [package.extras] testing = ["fields", "hunter", "process-tests", "six", "pytest-xdist", "virtualenv"] @@ -481,7 +467,7 @@ six = ">=1.5" [[package]] name = "pytz" -version = "2021.3" +version = "2022.1" description = "World timezone definitions, modern and historical" category = "dev" optional = false @@ -506,6 +492,19 @@ python-versions = ">=3.6" [package.dependencies] pyyaml = "*" +[[package]] +name = "setuptools" +version = "63.4.1" +description = "Easily download, build, install, upgrade, and uninstall Python packages" +category = "dev" +optional = false +python-versions = ">=3.7" + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)", "sphinx-notfound-page (==0.8.3)", "sphinx-hoverxref (<2)", "pygments-github-lexers (==0.0.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-reredirects", "sphinxcontrib-towncrier", "furo"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "flake8 (<5)", "pytest-enabler (>=1.3)", "pytest-perf", "mock", "flake8-2020", "virtualenv (>=13.0.0)", "wheel", "pip (>=19.1)", "jaraco.envs (>=2.2)", "pytest-xdist", "jaraco.path (>=3.2.0)", "build", "filelock (>=3.4.0)", "pip-run (>=8.8)", "ini2toml[lite] (>=0.9)", "tomli-w (>=1.0.0)", "pytest-black (>=0.3.7)", "pytest-cov", "pytest-mypy (>=0.9.1)"] +testing-integration = ["pytest", "pytest-xdist", "pytest-enabler", "virtualenv (>=13.0.0)", "tomli", "wheel", "jaraco.path (>=3.2.0)", "jaraco.envs (>=2.2)", "build", "filelock (>=3.4.0)"] + [[package]] name = "six" version = "1.16.0" @@ -516,11 +515,11 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "time-machine" -version = "2.5.0" +version = "2.7.1" description = "Travel through time in your tests." category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.dependencies] python-dateutil = "*" @@ -535,15 +534,15 @@ python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" [[package]] name = "tomli" -version = "1.2.3" +version = "2.0.1" description = "A lil' TOML parser" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "tox" -version = "3.24.4" +version = "3.25.1" description = "tox is a generic virtualenv management and test command line tool" category = "dev" optional = false @@ -562,11 +561,11 @@ virtualenv = ">=16.0.0,<20.0.0 || >20.0.0,<20.0.1 || >20.0.1,<20.0.2 || >20.0.2, [package.extras] docs = ["pygments-github-lexers (>=0.0.5)", "sphinx (>=2.0.0)", "sphinxcontrib-autoprogram (>=0.1.5)", "towncrier (>=18.5.0)"] -testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "psutil (>=5.6.1)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "pytest-xdist (>=1.22.2)", "pathlib2 (>=2.3.3)"] +testing = ["flaky (>=3.4.0)", "freezegun (>=0.3.11)", "pytest (>=4.0.0)", "pytest-cov (>=2.5.1)", "pytest-mock (>=1.10.0)", "pytest-randomly (>=1.0.0)", "psutil (>=5.6.1)", "pathlib2 (>=2.3.3)"] [[package]] name = "typed-ast" -version = "1.5.1" +version = "1.5.4" description = "a fork of Python 2 and 3 ast modules with type comment support" category = "dev" optional = false @@ -574,15 +573,15 @@ python-versions = ">=3.6" [[package]] name = "typing-extensions" -version = "4.0.1" -description = "Backported and Experimental Type Hints for Python 3.6+" +version = "4.3.0" +description = "Backported and Experimental Type Hints for Python 3.7+" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [[package]] name = "tzdata" -version = "2021.5" +version = "2022.1" description = "Provider of IANA time zone data" category = "main" optional = false @@ -590,27 +589,25 @@ python-versions = ">=2" [[package]] name = "virtualenv" -version = "20.10.0" +version = "20.16.2" description = "Virtual Python Environment builder" category = "dev" optional = false -python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7" +python-versions = ">=3.6" [package.dependencies] -"backports.entry-points-selectable" = ">=1.0.4" distlib = ">=0.3.1,<1" filelock = ">=3.2,<4" importlib-metadata = {version = ">=0.12", markers = "python_version < \"3.8\""} platformdirs = ">=2,<3" -six = ">=1.9.0,<2" [package.extras] docs = ["proselint (>=0.10.2)", "sphinx (>=3)", "sphinx-argparse (>=0.2.5)", "sphinx-rtd-theme (>=0.4.3)", "towncrier (>=21.3)"] -testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)", "packaging (>=20.0)"] +testing = ["coverage (>=4)", "coverage-enable-subprocess (>=1)", "flaky (>=3)", "packaging (>=20.0)", "pytest (>=4)", "pytest-env (>=0.6.2)", "pytest-freezegun (>=0.4.1)", "pytest-mock (>=2)", "pytest-randomly (>=1)", "pytest-timeout (>=1)"] [[package]] name = "watchdog" -version = "2.1.6" +version = "2.1.9" description = "Filesystem events monitoring" category = "dev" optional = false @@ -621,39 +618,32 @@ watchmedo = ["PyYAML (>=3.10)"] [[package]] name = "zipp" -version = "3.6.0" +version = "3.8.1" description = "Backport of pathlib-compatible object wrapper for zip files" category = "dev" optional = false -python-versions = ">=3.6" +python-versions = ">=3.7" [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "jaraco-itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "09a75ed923554d44c6f1195434ae31c4467b2364fb24e31c98df0654ae6023cd" +content-hash = "e68745a42f4beccf1f6a589760735abb3c39b0c0bdcc4a3715af97445144f6cf" [metadata.files] -atomicwrites = [ - {file = "atomicwrites-1.4.0-py2.py3-none-any.whl", hash = "sha256:6d1784dea7c0c8d4a5172b6c620f40b6e4cbfdf96d783691f2e1302a7b88e197"}, - {file = "atomicwrites-1.4.0.tar.gz", hash = "sha256:ae70396ad1a434f9c7046fd2dd196fc04b12f9e91ffb859164193be8b6168a7a"}, -] +atomicwrites = [] attrs = [ - {file = "attrs-21.2.0-py2.py3-none-any.whl", hash = "sha256:149e90d6d8ac20db7a955ad60cf0e6881a3f20d37096140088356da6c716b0b1"}, - {file = "attrs-21.2.0.tar.gz", hash = "sha256:ef6aaac3ca6cd92904cdd0d83f629a15f18053ec84e6432106f7a4d04ae4f5fb"}, + {file = "attrs-22.1.0-py2.py3-none-any.whl", hash = "sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c"}, + {file = "attrs-22.1.0.tar.gz", hash = "sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6"}, ] babel = [ - {file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"}, - {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, + {file = "Babel-2.10.3-py3-none-any.whl", hash = "sha256:ff56f4892c1c4bf0d814575ea23471c230d544203c7748e8c68f0089478d48eb"}, + {file = "Babel-2.10.3.tar.gz", hash = "sha256:7614553711ee97490f732126dc077f8d0ae084ebc6a96e23db1482afabdb2c51"}, ] -"backports.entry-points-selectable" = [ - {file = "backports.entry_points_selectable-1.1.1-py2.py3-none-any.whl", hash = "sha256:7fceed9532a7aa2bd888654a7314f864a3c16a4e710b34a58cfc0f08114c663b"}, - {file = "backports.entry_points_selectable-1.1.1.tar.gz", hash = "sha256:914b21a479fde881635f7af5adc7f6e38d6b274be32269070c53b698c60d5386"}, -] -"backports.zoneinfo" = [ +backports-zoneinfo = [ {file = "backports.zoneinfo-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc"}, {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:89a48c0d158a3cc3f654da4c2de1ceba85263fafb861b98b59040a5086259722"}, {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:1c5742112073a563c81f786e77514969acb58649bcdf6cdf0b4ed31a348d4546"}, @@ -672,98 +662,68 @@ babel = [ {file = "backports.zoneinfo-0.2.1.tar.gz", hash = "sha256:fadbfe37f74051d024037f223b8e001611eac868b5c5b06144ef4d8b799862f2"}, ] black = [ - {file = "black-21.12b0-py3-none-any.whl", hash = "sha256:a615e69ae185e08fdd73e4715e260e2479c861b5740057fde6e8b4e3b7dd589f"}, - {file = "black-21.12b0.tar.gz", hash = "sha256:77b80f693a569e2e527958459634f18df9b0ba2625ba4e0c2d5da5be42e6f2b3"}, + {file = "black-22.6.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:f586c26118bc6e714ec58c09df0157fe2d9ee195c764f630eb0d8e7ccce72e69"}, + {file = "black-22.6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:b270a168d69edb8b7ed32c193ef10fd27844e5c60852039599f9184460ce0807"}, + {file = "black-22.6.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:6797f58943fceb1c461fb572edbe828d811e719c24e03375fd25170ada53825e"}, + {file = "black-22.6.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c85928b9d5f83b23cee7d0efcb310172412fbf7cb9d9ce963bd67fd141781def"}, + {file = "black-22.6.0-cp310-cp310-win_amd64.whl", hash = "sha256:f6fe02afde060bbeef044af7996f335fbe90b039ccf3f5eb8f16df8b20f77666"}, + {file = "black-22.6.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:cfaf3895a9634e882bf9d2363fed5af8888802d670f58b279b0bece00e9a872d"}, + {file = "black-22.6.0-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:94783f636bca89f11eb5d50437e8e17fbc6a929a628d82304c80fa9cd945f256"}, + {file = "black-22.6.0-cp36-cp36m-win_amd64.whl", hash = "sha256:2ea29072e954a4d55a2ff58971b83365eba5d3d357352a07a7a4df0d95f51c78"}, + {file = "black-22.6.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:e439798f819d49ba1c0bd9664427a05aab79bfba777a6db94fd4e56fae0cb849"}, + {file = "black-22.6.0-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:187d96c5e713f441a5829e77120c269b6514418f4513a390b0499b0987f2ff1c"}, + {file = "black-22.6.0-cp37-cp37m-win_amd64.whl", hash = "sha256:074458dc2f6e0d3dab7928d4417bb6957bb834434516f21514138437accdbe90"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:a218d7e5856f91d20f04e931b6f16d15356db1c846ee55f01bac297a705ca24f"}, + {file = "black-22.6.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:568ac3c465b1c8b34b61cd7a4e349e93f91abf0f9371eda1cf87194663ab684e"}, + {file = "black-22.6.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:6c1734ab264b8f7929cef8ae5f900b85d579e6cbfde09d7387da8f04771b51c6"}, + {file = "black-22.6.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9a3ac16efe9ec7d7381ddebcc022119794872abce99475345c5a61aa18c45ad"}, + {file = "black-22.6.0-cp38-cp38-win_amd64.whl", hash = "sha256:b9fd45787ba8aa3f5e0a0a98920c1012c884622c6c920dbe98dbd05bc7c70fbf"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7ba9be198ecca5031cd78745780d65a3f75a34b2ff9be5837045dce55db83d1c"}, + {file = "black-22.6.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:a3db5b6409b96d9bd543323b23ef32a1a2b06416d525d27e0f67e74f1446c8f2"}, + {file = "black-22.6.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:560558527e52ce8afba936fcce93a7411ab40c7d5fe8c2463e279e843c0328ee"}, + {file = "black-22.6.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b154e6bbde1e79ea3260c4b40c0b7b3109ffcdf7bc4ebf8859169a6af72cd70b"}, + {file = "black-22.6.0-cp39-cp39-win_amd64.whl", hash = "sha256:4af5bc0e1f96be5ae9bd7aaec219c901a94d6caa2484c21983d043371c733fc4"}, + {file = "black-22.6.0-py3-none-any.whl", hash = "sha256:ac609cf8ef5e7115ddd07d85d988d074ed00e10fbc3445aee393e70164a2219c"}, + {file = "black-22.6.0.tar.gz", hash = "sha256:6c6d39e28aed379aec40da1c65434c77d75e65bb59a1e1c283de545fb4e7c6c9"}, ] cfgv = [ {file = "cfgv-3.3.1-py2.py3-none-any.whl", hash = "sha256:c6a0883f3917a037485059700b9e75da2464e6c27051014ad85ba6aaa5884426"}, {file = "cfgv-3.3.1.tar.gz", hash = "sha256:f5a830efb9ce7a445376bb66ec94c638a9787422f96264c98edc6bdeed8ab736"}, ] cleo = [ - {file = "cleo-1.0.0a4-py3-none-any.whl", hash = "sha256:cdd0c3458c15ced3a9f0204b1e53a1b4bee3c56ebcb3ac54c872a56acc657a09"}, - {file = "cleo-1.0.0a4.tar.gz", hash = "sha256:a103a065d031b7d936ee88a6b93086a69bd9c1b40fa2ebfe8c056285a66b481d"}, + {file = "cleo-1.0.0a5-py3-none-any.whl", hash = "sha256:ff53056589300976e960f75afb792dfbfc9c78dcbb5a448e207a17b643826360"}, + {file = "cleo-1.0.0a5.tar.gz", hash = "sha256:097c9d0e0332fd53cc89fc11eb0a6ba0309e6a3933c08f7b38558555486925d3"}, ] click = [ - {file = "click-8.0.3-py3-none-any.whl", hash = "sha256:353f466495adaeb40b6b5f592f9f91cb22372351c84caeb068132442a4518ef3"}, - {file = "click-8.0.3.tar.gz", hash = "sha256:410e932b050f5eed773c4cda94de75971c89cdb3155a72a0831139a79e5ecb5b"}, + {file = "click-8.1.3-py3-none-any.whl", hash = "sha256:bb4d8133cb15a609f44e8213d9b391b0809795062913b383c62be0ee95b1db48"}, + {file = "click-8.1.3.tar.gz", hash = "sha256:7682dc8afb30297001674575ea00d1814d808d6a36af415a82bd481d37ba7b8e"}, ] colorama = [ - {file = "colorama-0.4.4-py2.py3-none-any.whl", hash = "sha256:9f47eda37229f68eee03b24b9748937c7dc3868f906e8ba69fbcbdd3bc5dc3e2"}, - {file = "colorama-0.4.4.tar.gz", hash = "sha256:5941b2b48a20143d2267e95b1c2a7603ce057ee39fd88e7329b0c292aa16869b"}, -] -coverage = [ - {file = "coverage-6.2-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6dbc1536e105adda7a6312c778f15aaabe583b0e9a0b0a324990334fd458c94b"}, - {file = "coverage-6.2-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:174cf9b4bef0db2e8244f82059a5a72bd47e1d40e71c68ab055425172b16b7d0"}, - {file = "coverage-6.2-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:92b8c845527eae547a2a6617d336adc56394050c3ed8a6918683646328fbb6da"}, - {file = "coverage-6.2-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c7912d1526299cb04c88288e148c6c87c0df600eca76efd99d84396cfe00ef1d"}, - {file = "coverage-6.2-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:d5d2033d5db1d58ae2d62f095e1aefb6988af65b4b12cb8987af409587cc0739"}, - {file = "coverage-6.2-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:3feac4084291642165c3a0d9eaebedf19ffa505016c4d3db15bfe235718d4971"}, - {file = "coverage-6.2-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:276651978c94a8c5672ea60a2656e95a3cce2a3f31e9fb2d5ebd4c215d095840"}, - {file = "coverage-6.2-cp310-cp310-win32.whl", hash = "sha256:f506af4f27def639ba45789fa6fde45f9a217da0be05f8910458e4557eed020c"}, - {file = "coverage-6.2-cp310-cp310-win_amd64.whl", hash = "sha256:3f7c17209eef285c86f819ff04a6d4cbee9b33ef05cbcaae4c0b4e8e06b3ec8f"}, - {file = "coverage-6.2-cp311-cp311-macosx_10_14_x86_64.whl", hash = "sha256:13362889b2d46e8d9f97c421539c97c963e34031ab0cb89e8ca83a10cc71ac76"}, - {file = "coverage-6.2-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.whl", hash = "sha256:22e60a3ca5acba37d1d4a2ee66e051f5b0e1b9ac950b5b0cf4aa5366eda41d47"}, - {file = "coverage-6.2-cp311-cp311-win_amd64.whl", hash = "sha256:b637c57fdb8be84e91fac60d9325a66a5981f8086c954ea2772efe28425eaf64"}, - {file = "coverage-6.2-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f467bbb837691ab5a8ca359199d3429a11a01e6dfb3d9dcc676dc035ca93c0a9"}, - {file = "coverage-6.2-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2641f803ee9f95b1f387f3e8f3bf28d83d9b69a39e9911e5bfee832bea75240d"}, - {file = "coverage-6.2-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:1219d760ccfafc03c0822ae2e06e3b1248a8e6d1a70928966bafc6838d3c9e48"}, - {file = "coverage-6.2-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:9a2b5b52be0a8626fcbffd7e689781bf8c2ac01613e77feda93d96184949a98e"}, - {file = "coverage-6.2-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:8e2c35a4c1f269704e90888e56f794e2d9c0262fb0c1b1c8c4ee44d9b9e77b5d"}, - {file = "coverage-6.2-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:5d6b09c972ce9200264c35a1d53d43ca55ef61836d9ec60f0d44273a31aa9f17"}, - {file = "coverage-6.2-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:e3db840a4dee542e37e09f30859f1612da90e1c5239a6a2498c473183a50e781"}, - {file = "coverage-6.2-cp36-cp36m-win32.whl", hash = "sha256:4e547122ca2d244f7c090fe3f4b5a5861255ff66b7ab6d98f44a0222aaf8671a"}, - {file = "coverage-6.2-cp36-cp36m-win_amd64.whl", hash = "sha256:01774a2c2c729619760320270e42cd9e797427ecfddd32c2a7b639cdc481f3c0"}, - {file = "coverage-6.2-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:fb8b8ee99b3fffe4fd86f4c81b35a6bf7e4462cba019997af2fe679365db0c49"}, - {file = "coverage-6.2-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:619346d57c7126ae49ac95b11b0dc8e36c1dd49d148477461bb66c8cf13bb521"}, - {file = "coverage-6.2-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0a7726f74ff63f41e95ed3a89fef002916c828bb5fcae83b505b49d81a066884"}, - {file = "coverage-6.2-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:cfd9386c1d6f13b37e05a91a8583e802f8059bebfccde61a418c5808dea6bbfa"}, - {file = "coverage-6.2-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:17e6c11038d4ed6e8af1407d9e89a2904d573be29d51515f14262d7f10ef0a64"}, - {file = "coverage-6.2-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:c254b03032d5a06de049ce8bca8338a5185f07fb76600afff3c161e053d88617"}, - {file = "coverage-6.2-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:dca38a21e4423f3edb821292e97cec7ad38086f84313462098568baedf4331f8"}, - {file = "coverage-6.2-cp37-cp37m-win32.whl", hash = "sha256:600617008aa82032ddeace2535626d1bc212dfff32b43989539deda63b3f36e4"}, - {file = "coverage-6.2-cp37-cp37m-win_amd64.whl", hash = "sha256:bf154ba7ee2fd613eb541c2bc03d3d9ac667080a737449d1a3fb342740eb1a74"}, - {file = "coverage-6.2-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f9afb5b746781fc2abce26193d1c817b7eb0e11459510fba65d2bd77fe161d9e"}, - {file = "coverage-6.2-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:edcada2e24ed68f019175c2b2af2a8b481d3d084798b8c20d15d34f5c733fa58"}, - {file = "coverage-6.2-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a9c8c4283e17690ff1a7427123ffb428ad6a52ed720d550e299e8291e33184dc"}, - {file = "coverage-6.2-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:f614fc9956d76d8a88a88bb41ddc12709caa755666f580af3a688899721efecd"}, - {file = "coverage-6.2-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:9365ed5cce5d0cf2c10afc6add145c5037d3148585b8ae0e77cc1efdd6aa2953"}, - {file = "coverage-6.2-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:8bdfe9ff3a4ea37d17f172ac0dff1e1c383aec17a636b9b35906babc9f0f5475"}, - {file = "coverage-6.2-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:63c424e6f5b4ab1cf1e23a43b12f542b0ec2e54f99ec9f11b75382152981df57"}, - {file = "coverage-6.2-cp38-cp38-win32.whl", hash = "sha256:49dbff64961bc9bdd2289a2bda6a3a5a331964ba5497f694e2cbd540d656dc1c"}, - {file = "coverage-6.2-cp38-cp38-win_amd64.whl", hash = "sha256:9a29311bd6429be317c1f3fe4bc06c4c5ee45e2fa61b2a19d4d1d6111cb94af2"}, - {file = "coverage-6.2-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:03b20e52b7d31be571c9c06b74746746d4eb82fc260e594dc662ed48145e9efd"}, - {file = "coverage-6.2-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:215f8afcc02a24c2d9a10d3790b21054b58d71f4b3c6f055d4bb1b15cecce685"}, - {file = "coverage-6.2-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:a4bdeb0a52d1d04123b41d90a4390b096f3ef38eee35e11f0b22c2d031222c6c"}, - {file = "coverage-6.2-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c332d8f8d448ded473b97fefe4a0983265af21917d8b0cdcb8bb06b2afe632c3"}, - {file = "coverage-6.2-cp39-cp39-win32.whl", hash = "sha256:6e1394d24d5938e561fbeaa0cd3d356207579c28bd1792f25a068743f2d5b282"}, - {file = "coverage-6.2-cp39-cp39-win_amd64.whl", hash = "sha256:86f2e78b1eff847609b1ca8050c9e1fa3bd44ce755b2ec30e70f2d3ba3844644"}, - {file = "coverage-6.2-pp36.pp37.pp38-none-any.whl", hash = "sha256:5829192582c0ec8ca4a2532407bc14c2f338d9878a10442f5d03804a95fac9de"}, - {file = "coverage-6.2.tar.gz", hash = "sha256:e2cad8093172b7d1595b4ad66f24270808658e11acf43a8f95b41276162eb5b8"}, + {file = "colorama-0.4.5-py2.py3-none-any.whl", hash = "sha256:854bf444933e37f5824ae7bfc1e98d5bce2ebe4160d46b5edf346a89358e99da"}, + {file = "colorama-0.4.5.tar.gz", hash = "sha256:e6c6b4334fc50988a639d9b98aa429a0b57da6e17b9a44f0451f930b6967b7a4"}, ] +coverage = [] crashtest = [ {file = "crashtest-0.3.1-py3-none-any.whl", hash = "sha256:300f4b0825f57688b47b6d70c6a31de33512eb2fa1ac614f780939aa0cf91680"}, {file = "crashtest-0.3.1.tar.gz", hash = "sha256:42ca7b6ce88b6c7433e2ce47ea884e91ec93104a4b754998be498a8e6c3d37dd"}, ] distlib = [ - {file = "distlib-0.3.4-py2.py3-none-any.whl", hash = "sha256:6564fe0a8f51e734df6333d08b8b94d4ea8ee6b99b5ed50613f731fd4089f34b"}, - {file = "distlib-0.3.4.zip", hash = "sha256:e4b58818180336dc9c529bfb9a0b58728ffc09ad92027a3f30b7cd91e3458579"}, + {file = "distlib-0.3.5-py2.py3-none-any.whl", hash = "sha256:b710088c59f06338ca514800ad795a132da19fda270e3ce4affc74abf955a26c"}, + {file = "distlib-0.3.5.tar.gz", hash = "sha256:a7f75737c70be3b25e2bee06288cec4e4c221de18455b2dd037fe2a795cab2fe"}, ] filelock = [ - {file = "filelock-3.4.0-py3-none-any.whl", hash = "sha256:2e139a228bcf56dd8b2274a65174d005c4a6b68540ee0bdbb92c76f43f29f7e8"}, - {file = "filelock-3.4.0.tar.gz", hash = "sha256:93d512b32a23baf4cac44ffd72ccf70732aeff7b8050fcaf6d3ec406d954baf4"}, + {file = "filelock-3.7.1-py3-none-any.whl", hash = "sha256:37def7b658813cda163b56fc564cdc75e86d338246458c4c28ae84cabefa2404"}, + {file = "filelock-3.7.1.tar.gz", hash = "sha256:3a0fd85166ad9dbab54c9aec96737b744106dc5f15c0b09a6744a445299fcf04"}, ] ghp-import = [ - {file = "ghp-import-2.0.2.tar.gz", hash = "sha256:947b3771f11be850c852c64b561c600fdddf794bab363060854c1ee7ad05e071"}, - {file = "ghp_import-2.0.2-py3-none-any.whl", hash = "sha256:5f8962b30b20652cdffa9c5a9812f7de6bcb56ec475acac579807719bf242c46"}, + {file = "ghp-import-2.1.0.tar.gz", hash = "sha256:9c535c4c61193c2df8871222567d7fd7e5014d835f97dc7b7439069e2413d343"}, + {file = "ghp_import-2.1.0-py3-none-any.whl", hash = "sha256:8337dd7b50877f163d4c0289bc1f1c7f127550241988d568c1db512c4324a619"}, ] identify = [ - {file = "identify-2.4.0-py2.py3-none-any.whl", hash = "sha256:eba31ca80258de6bb51453084bff4a923187cd2193b9c13710f2516ab30732cc"}, - {file = "identify-2.4.0.tar.gz", hash = "sha256:a33ae873287e81651c7800ca309dc1f84679b763c9c8b30680e16fbfa82f0107"}, -] -importlib-metadata = [ - {file = "importlib_metadata-4.10.0-py3-none-any.whl", hash = "sha256:b7cf7d3fef75f1e4c80a96ca660efbd51473d7e8f39b5ab9210febc7809012a4"}, - {file = "importlib_metadata-4.10.0.tar.gz", hash = "sha256:92a8b58ce734b2a4494878e0ecf7d79ccd7a128b5fc6014c401e0b61f006f0f6"}, + {file = "identify-2.5.2-py2.py3-none-any.whl", hash = "sha256:feaa9db2dc0ce333b453ce171c0cf1247bbfde2c55fc6bb785022d411a1b78b5"}, + {file = "identify-2.5.2.tar.gz", hash = "sha256:a3d4c096b384d50d5e6dc5bc8b9bc44f1f61cefebd750a7b3e9f939b53fb214d"}, ] +importlib-metadata = [] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, @@ -773,103 +733,71 @@ isort = [ {file = "isort-5.10.1.tar.gz", hash = "sha256:e8443a5e7a020e9d7f97f1d7d9cd17c88bcb3bc7e218bf9cf5095fe550be2951"}, ] jinja2 = [ - {file = "Jinja2-3.0.3-py3-none-any.whl", hash = "sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8"}, - {file = "Jinja2-3.0.3.tar.gz", hash = "sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7"}, + {file = "Jinja2-3.1.2-py3-none-any.whl", hash = "sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61"}, + {file = "Jinja2-3.1.2.tar.gz", hash = "sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852"}, ] markdown = [ - {file = "Markdown-3.3.6-py3-none-any.whl", hash = "sha256:9923332318f843411e9932237530df53162e29dc7a4e2b91e35764583c46c9a3"}, - {file = "Markdown-3.3.6.tar.gz", hash = "sha256:76df8ae32294ec39dcf89340382882dfa12975f87f45c3ed1ecdb1e8cefc7006"}, + {file = "Markdown-3.4.1-py3-none-any.whl", hash = "sha256:08fb8465cffd03d10b9dd34a5c3fea908e20391a2a90b88d66362cb05beed186"}, + {file = "Markdown-3.4.1.tar.gz", hash = "sha256:3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff"}, ] markdown-include = [ {file = "markdown-include-0.5.1.tar.gz", hash = "sha256:72a45461b589489a088753893bc95c5fa5909936186485f4ed55caa57d10250f"}, ] markupsafe = [ - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win32.whl", hash = "sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28"}, - {file = "MarkupSafe-2.0.1-cp310-cp310-win_amd64.whl", hash = "sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_i686.whl", hash = "sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2010_x86_64.whl", hash = "sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux2014_aarch64.whl", hash = "sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win32.whl", hash = "sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d"}, - {file = "MarkupSafe-2.0.1-cp36-cp36m-win_amd64.whl", hash = "sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_i686.whl", hash = "sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux1_x86_64.whl", hash = "sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_i686.whl", hash = "sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2010_x86_64.whl", hash = "sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux2014_aarch64.whl", hash = "sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win32.whl", hash = "sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415"}, - {file = "MarkupSafe-2.0.1-cp37-cp37m-win_amd64.whl", hash = "sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_i686.whl", hash = "sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux1_x86_64.whl", hash = "sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_i686.whl", hash = "sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2010_x86_64.whl", hash = "sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux2014_aarch64.whl", hash = "sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win32.whl", hash = "sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64"}, - {file = "MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl", hash = "sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_i686.whl", hash = "sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux1_x86_64.whl", hash = "sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_i686.whl", hash = "sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2010_x86_64.whl", hash = "sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux2014_aarch64.whl", hash = "sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl", hash = "sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win32.whl", hash = "sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74"}, - {file = "MarkupSafe-2.0.1-cp39-cp39-win_amd64.whl", hash = "sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8"}, - {file = "MarkupSafe-2.0.1.tar.gz", hash = "sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win32.whl", hash = "sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6"}, + {file = "MarkupSafe-2.1.1-cp310-cp310-win_amd64.whl", hash = "sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win32.whl", hash = "sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff"}, + {file = "MarkupSafe-2.1.1-cp37-cp37m-win_amd64.whl", hash = "sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win32.whl", hash = "sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1"}, + {file = "MarkupSafe-2.1.1-cp38-cp38-win_amd64.whl", hash = "sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win32.whl", hash = "sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c"}, + {file = "MarkupSafe-2.1.1-cp39-cp39-win_amd64.whl", hash = "sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247"}, + {file = "MarkupSafe-2.1.1.tar.gz", hash = "sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b"}, ] mergedeep = [ {file = "mergedeep-1.3.4-py3-none-any.whl", hash = "sha256:70775750742b25c0d8f36c55aed03d24c3384d17c951b3175d898bd778ef0307"}, {file = "mergedeep-1.3.4.tar.gz", hash = "sha256:0096d52e9dad9939c3d975a774666af186eda617e6ca84df4c94dec30004f2a8"}, ] mkdocs = [ - {file = "mkdocs-1.2.3-py3-none-any.whl", hash = "sha256:a1fa8c2d0c1305d7fc2b9d9f607c71778572a8b110fb26642aa00296c9e6d072"}, - {file = "mkdocs-1.2.3.tar.gz", hash = "sha256:89f5a094764381cda656af4298727c9f53dc3e602983087e1fe96ea1df24f4c1"}, + {file = "mkdocs-1.3.0-py3-none-any.whl", hash = "sha256:26bd2b03d739ac57a3e6eed0b7bcc86168703b719c27b99ad6ca91dc439aacde"}, + {file = "mkdocs-1.3.0.tar.gz", hash = "sha256:b504405b04da38795fec9b2e5e28f6aa3a73bb0960cb6d5d27ead28952bd35ea"}, ] mypy-extensions = [ {file = "mypy_extensions-0.4.3-py2.py3-none-any.whl", hash = "sha256:090fedd75945a69ae91ce1303b5824f428daf5a028d2f6ab8a299250a846f15d"}, {file = "mypy_extensions-0.4.3.tar.gz", hash = "sha256:2d82818f5bb3e369420cb3c4060a7970edba416647068eb4c5343488a6c604a8"}, ] -nodeenv = [ - {file = "nodeenv-1.6.0-py2.py3-none-any.whl", hash = "sha256:621e6b7076565ddcacd2db0294c0381e01fd28945ab36bcf00f41c5daf63bef7"}, - {file = "nodeenv-1.6.0.tar.gz", hash = "sha256:3ef13ff90291ba2a4a7a4ff9a979b63ffdd00a464dbe04acf0ea6471517a4c2b"}, -] +nodeenv = [] packaging = [ {file = "packaging-21.3-py3-none-any.whl", hash = "sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522"}, {file = "packaging-21.3.tar.gz", hash = "sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb"}, @@ -879,24 +807,21 @@ pathspec = [ {file = "pathspec-0.9.0.tar.gz", hash = "sha256:e564499435a2673d586f6b2130bb5b95f04a3ba06f81b8f895b651a3c76aabb1"}, ] platformdirs = [ - {file = "platformdirs-2.4.0-py3-none-any.whl", hash = "sha256:8868bbe3c3c80d42f20156f22e7131d2fb321f5bc86a2a345375c6481a67021d"}, - {file = "platformdirs-2.4.0.tar.gz", hash = "sha256:367a5e80b3d04d2428ffa76d33f124cf11e8fff2acdaa9b43d545f5c7d661ef2"}, + {file = "platformdirs-2.5.2-py3-none-any.whl", hash = "sha256:027d8e83a2d7de06bbac4e5ef7e023c02b863d7ea5d079477e722bb41ab25788"}, + {file = "platformdirs-2.5.2.tar.gz", hash = "sha256:58c8abb07dcb441e6ee4b11d8df0ac856038f944ab98b7be6b27b2a3c7feef19"}, ] pluggy = [ {file = "pluggy-1.0.0-py2.py3-none-any.whl", hash = "sha256:74134bbf457f031a36d68416e1509f34bd5ccc019f0bcc952c7b909d06b37bd3"}, {file = "pluggy-1.0.0.tar.gz", hash = "sha256:4224373bacce55f955a878bf9cfa763c1e360858e330072059e10bad68531159"}, ] -pre-commit = [ - {file = "pre_commit-2.16.0-py2.py3-none-any.whl", hash = "sha256:758d1dc9b62c2ed8881585c254976d66eae0889919ab9b859064fc2fe3c7743e"}, - {file = "pre_commit-2.16.0.tar.gz", hash = "sha256:fe9897cac830aa7164dbd02a4e7b90cae49630451ce88464bca73db486ba9f65"}, -] +pre-commit = [] py = [ {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, ] pygments = [ - {file = "Pygments-2.10.0-py3-none-any.whl", hash = "sha256:b8e67fe6af78f492b3c4b3e2970c0624cbf08beb1e493b2c99b9fa1b67a20380"}, - {file = "Pygments-2.10.0.tar.gz", hash = "sha256:f398865f7eb6874156579fdf36bc840a03cab64d1cde9e93d68f46a425ec52c6"}, + {file = "Pygments-2.12.0-py3-none-any.whl", hash = "sha256:dc9c10fb40944260f6ed4c688ece0cd2048414940f1cea51b8b226318411c519"}, + {file = "Pygments-2.12.0.tar.gz", hash = "sha256:5eb116118f9612ff1ee89ac96437bb6b49e8f04d8a13b514ba26f620208e26eb"}, ] pylev = [ {file = "pylev-1.4.0-py2.py3-none-any.whl", hash = "sha256:7b2e2aa7b00e05bb3f7650eb506fc89f474f70493271a35c242d9a92188ad3dd"}, @@ -907,24 +832,24 @@ pymdown-extensions = [ {file = "pymdown_extensions-6.3-py2.py3-none-any.whl", hash = "sha256:66fae2683c7a1dac53184f7de57f51f8dad73f9ead2f453e94e85096cb811335"}, ] pyparsing = [ - {file = "pyparsing-3.0.6-py3-none-any.whl", hash = "sha256:04ff808a5b90911829c55c4e26f75fa5ca8a2f5f36aa3a51f68e27033341d3e4"}, - {file = "pyparsing-3.0.6.tar.gz", hash = "sha256:d9bdec0013ef1eb5a84ab39a3b3868911598afa494f5faa038647101504e2b81"}, + {file = "pyparsing-3.0.9-py3-none-any.whl", hash = "sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc"}, + {file = "pyparsing-3.0.9.tar.gz", hash = "sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb"}, ] pytest = [ - {file = "pytest-6.2.5-py3-none-any.whl", hash = "sha256:7310f8d27bc79ced999e760ca304d69f6ba6c6649c0b60fb0e04a4a77cacc134"}, - {file = "pytest-6.2.5.tar.gz", hash = "sha256:131b36680866a76e6781d13f101efb86cf674ebb9762eb70d3082b6f29889e89"}, + {file = "pytest-7.1.2-py3-none-any.whl", hash = "sha256:13d0e3ccfc2b6e26be000cb6568c832ba67ba32e719443bfe725814d3c42433c"}, + {file = "pytest-7.1.2.tar.gz", hash = "sha256:a06a0425453864a270bc45e71f783330a7428defb4230fb5e6a731fde06ecd45"}, ] pytest-cov = [ - {file = "pytest-cov-2.12.1.tar.gz", hash = "sha256:261ceeb8c227b726249b376b8526b600f38667ee314f910353fa318caa01f4d7"}, - {file = "pytest_cov-2.12.1-py2.py3-none-any.whl", hash = "sha256:261bb9e47e65bd099c89c3edf92972865210c36813f80ede5277dceb77a4a62a"}, + {file = "pytest-cov-3.0.0.tar.gz", hash = "sha256:e7f0f5b1617d2210a2cabc266dfe2f4c75a8d32fb89eafb7ad9d06f6d076d470"}, + {file = "pytest_cov-3.0.0-py3-none-any.whl", hash = "sha256:578d5d15ac4a25e5f961c938b85a05b09fdaae9deef3bb6de9a6e766622ca7a6"}, ] python-dateutil = [ {file = "python-dateutil-2.8.2.tar.gz", hash = "sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86"}, {file = "python_dateutil-2.8.2-py2.py3-none-any.whl", hash = "sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9"}, ] pytz = [ - {file = "pytz-2021.3-py2.py3-none-any.whl", hash = "sha256:3672058bc3453457b622aab7a1c3bfd5ab0bdae451512f6cf25f64ed37f5b87c"}, - {file = "pytz-2021.3.tar.gz", hash = "sha256:acad2d8b20a1af07d4e4c9d2e9285c5ed9104354062f275f3fcd88dcef4f1326"}, + {file = "pytz-2022.1-py2.py3-none-any.whl", hash = "sha256:e68985985296d9a66a881eb3193b0906246245294a881e7c8afe623866ac6a5c"}, + {file = "pytz-2022.1.tar.gz", hash = "sha256:1e760e2fe6a8163bc0b3d9a19c4f84342afa0a2affebfaa84b01b978a02ecaa7"}, ] pyyaml = [ {file = "PyYAML-6.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:d4db7c7aef085872ef65a8fd7d6d09a14ae91f691dec3e87ee5ee0539d516f53"}, @@ -965,132 +890,128 @@ pyyaml-env-tag = [ {file = "pyyaml_env_tag-0.1-py3-none-any.whl", hash = "sha256:af31106dec8a4d68c60207c1886031cbf839b68aa7abccdb19868200532c2069"}, {file = "pyyaml_env_tag-0.1.tar.gz", hash = "sha256:70092675bda14fdec33b31ba77e7543de9ddc88f2e5b99160396572d11525bdb"}, ] +setuptools = [ + {file = "setuptools-63.4.1-py3-none-any.whl", hash = "sha256:dc2662692f47d99cb8ae15a784529adeed535bcd7c277fee0beccf961522baf6"}, + {file = "setuptools-63.4.1.tar.gz", hash = "sha256:7c7854ee1429a240090297628dc9f75b35318d193537968e2dc14010ee2f5bca"}, +] six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] time-machine = [ - {file = "time-machine-2.5.0.tar.gz", hash = "sha256:f61e582dfe1018c9b1c035d2da948b1ac7f298e3153d704a55f305a7aaefea57"}, - {file = "time_machine-2.5.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:176a18266394d66a2565a6d71874a945dad3b837ee7db6b26d3329792d086adc"}, - {file = "time_machine-2.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:fd081d951ba84d27bce13a988884bf746877073e2bc4220c0d093dd579dd9081"}, - {file = "time_machine-2.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30a9a19ff9ec66cca00944830b3c5d89080a6a222615997a8db251b4dda13acd"}, - {file = "time_machine-2.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8afbb3d7445b2fd26c3d322e77cc5c1734367a55cdeab4198507f735e2a51a8b"}, - {file = "time_machine-2.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:089cea08787d3863bf0dd8ac79d5d9474231f8ce70c8b028ab7788d4196361ea"}, - {file = "time_machine-2.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:8fd7a95421f8979d47035e295443ad3e617eccb02f9e669ccb6a02a900e40321"}, - {file = "time_machine-2.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:31863586d37c72264f795353f70f3f076530941bef4e2936a0aafab28d70a5a1"}, - {file = "time_machine-2.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:51baf21f138dace274a2d628f28a004db5ce020eb5bbcb0908949141c993868b"}, - {file = "time_machine-2.5.0-cp310-cp310-win32.whl", hash = "sha256:0992030c0c58006610e1d8d65a61df176561b8baa416f22ee129cd8c0a092120"}, - {file = "time_machine-2.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:7116e9685513917c57fec0230024e27037d5eff92414a709999c21644ee3ac0a"}, - {file = "time_machine-2.5.0-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:5a95e99f0f29bd6fd5142e033709a3415246f314ed225661f2bcbe2759a41197"}, - {file = "time_machine-2.5.0-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0a76092104d682a38b1081941bbbf030d47ae03001554425434b8a9f21ca1d5b"}, - {file = "time_machine-2.5.0-cp36-cp36m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3e7889e2496c64b85a760e79e25f791055f63c10a6d27abeb4ec4cd12146b6c9"}, - {file = "time_machine-2.5.0-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2c213d5f4d708cdbcfe5be671f1110a7fbe9b8d2ceae9899fbb09dd4e1424d58"}, - {file = "time_machine-2.5.0-cp36-cp36m-musllinux_1_1_aarch64.whl", hash = "sha256:a50222840f2702a5f7efd13d58506cc45484b22e7371bb86ce4eee7b615053de"}, - {file = "time_machine-2.5.0-cp36-cp36m-musllinux_1_1_i686.whl", hash = "sha256:9a10c379ebf7a80d8034538016af736103a6c3348670d297788146abaac2c606"}, - {file = "time_machine-2.5.0-cp36-cp36m-musllinux_1_1_x86_64.whl", hash = "sha256:0873edc3d22a09c606771c899e95b9a9b23d66d9a9fd1f302c778287ece59481"}, - {file = "time_machine-2.5.0-cp36-cp36m-win32.whl", hash = "sha256:1288a7283b5efc53b69ce846d0ec5598ea6b2682053cd706f5d5e52fb6b2120c"}, - {file = "time_machine-2.5.0-cp36-cp36m-win_amd64.whl", hash = "sha256:f4ed5b43ab71f10dfeaf9c8a0c377cb091c3a3dac3e21ee0ec132ad76d0e771d"}, - {file = "time_machine-2.5.0-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:47ba6e193bd6a755abb7dde5000ea62b66fcb6ae468ca122652ed8dbd3ad6bd3"}, - {file = "time_machine-2.5.0-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f4ac68af561565bce073230a6038209cf5a19fe0f1cb5e94ebf2ea10cc4a845a"}, - {file = "time_machine-2.5.0-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:28ad158c80187c17931c1667ced28294af5597ee28479b5b145da3d07ae2f34d"}, - {file = "time_machine-2.5.0-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b8b3f8178aa8676dce482100415e035eaf065664ecf1ab5b32dc88a6d07a5481"}, - {file = "time_machine-2.5.0-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:fc915a4c32084384acd88ebc39400a5dbf62129f2c694a58f71b35aa45663096"}, - {file = "time_machine-2.5.0-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:936890909eb86e6c735ba76ce06e42e0da41d888d41130e65d41819663446bf1"}, - {file = "time_machine-2.5.0-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7acf47de70fca46042b19f8b97b6f7c6cb37f6ddd157d0f56d22774e9bcc5cae"}, - {file = "time_machine-2.5.0-cp37-cp37m-win32.whl", hash = "sha256:30c533c30eb7dbf452b59170ea5584b9aca4bccf17b4382d42ad79481041d930"}, - {file = "time_machine-2.5.0-cp37-cp37m-win_amd64.whl", hash = "sha256:42614b6a234cc0c60ff9e8ff3567da480e7f69d1f19a70706fa7a95a382b21bf"}, - {file = "time_machine-2.5.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:e6fd3ca3f49e2116889255e11f7243b79f8b15586f219538a8ed14c8d0677c64"}, - {file = "time_machine-2.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8dc833bc503e8f3afe5fbebb7ab5887a848534ee2de9883f3ce9b770efd78e5a"}, - {file = "time_machine-2.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:36d3f90b98bbb7bfaa45a8755d43bb290c27cd5e04b37329bda7617bfe745682"}, - {file = "time_machine-2.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:78a159d57131244c2a6591c26c75f26fce4c26f3b23ecac918cfe0de1812cde7"}, - {file = "time_machine-2.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:37df69104c38af80e465b8530a2929a6bc4ea51e332b6ae66aa4fdade6a454e7"}, - {file = "time_machine-2.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:701f2e56205411d2d1644f26dc4a98a39e901a41868819d1826b7d2e00f5d37a"}, - {file = "time_machine-2.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:98800bb5db89815d9d1ade51d8690b6418d93b0b9664bf4a4a8492380e95dc38"}, - {file = "time_machine-2.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:0e51562bad97ada3b00f996db40b9de2ff0e2cb61b54b017ede7738fc08edb7b"}, - {file = "time_machine-2.5.0-cp38-cp38-win32.whl", hash = "sha256:6c76ee141f4e33c64a9de7cda1f6793985c66bcfa3cc6d284ab8aae1ec468444"}, - {file = "time_machine-2.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:e7a0430b25c7f6487b7455774bbe0e447753bc2ac43f25cbc82aba6453bf126a"}, - {file = "time_machine-2.5.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b6c59c2fca5b573bbcd7b5eab8799e685d61c17ed31906f29e465e4d747f38f2"}, - {file = "time_machine-2.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8b567dc27997bc7cef3aeaf5aa5f6481560dced0a1fc0ca6d7de2cbc592a019b"}, - {file = "time_machine-2.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:10532dcf6a6eb37eead208f6307886e6abf388af4d0bd1d50502b8bece9ca895"}, - {file = "time_machine-2.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fd2edef76fa21de1238c54beb751863e75928b075a25d62d5ac65f8e909e4628"}, - {file = "time_machine-2.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6ff6a4c60177d68489a8fc8f98d60692aa57572d1ddc4cd8209914010d8436a3"}, - {file = "time_machine-2.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:cfae49174892c138f9b127dcb820f4f287f603af6771581e130feedcbdd6c320"}, - {file = "time_machine-2.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:8b093449198841fc008f7d2af71e28485dc46958a488f2068bf31a59caff6887"}, - {file = "time_machine-2.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a486d59f966872732492e2139d76c4cd03460d6600de9239f4f8ab606b9b7f37"}, - {file = "time_machine-2.5.0-cp39-cp39-win32.whl", hash = "sha256:739ac3d5b75a1236ab3e7833a8a4936f046b94fae86e97ea124aa59fc060c2cc"}, - {file = "time_machine-2.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:ae0f33be3ab2550af3af8545e74382adc4c1fac3a6e4bf42924c7ebefc42d17a"}, + {file = "time-machine-2.7.1.tar.gz", hash = "sha256:be6c1f0421a77a046db8fae00886fb364f683a86612b71dd5c74b22891590042"}, + {file = "time_machine-2.7.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:ae93d2f761435d192bc80c148438a0c4261979db0610cef08dfe2c8d21ca1c67"}, + {file = "time_machine-2.7.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:342b431154fbfb1889f8d7aa3d857373a837106bba395a5cc99123f11a7cea03"}, + {file = "time_machine-2.7.1-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:9f4011ea76f6ad2f932f00cf9e77a25b575a024d6bc15bcf891a3f9916ceeb6e"}, + {file = "time_machine-2.7.1-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:43ae8192d370a90d2246fca565a55633f592b314264c65c5c9151c361b715fb9"}, + {file = "time_machine-2.7.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cea12d0592ebbe738db952ce6fd272ed90e7bbb095e802f4f2145f8f0e322fa3"}, + {file = "time_machine-2.7.1-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:732d5fd2d442fa87538b5a6ca623cb205b9b048d2c9aaf79e5cfc7ec7f637848"}, + {file = "time_machine-2.7.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:c34e1f49cad2fd41d42c4aabd3d69a32c79d9a8e0779064554843823cd1fb1e4"}, + {file = "time_machine-2.7.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:6af3e81cf663b6d5660953ae59da2bb2ae802452ecbc9907272979ed06253659"}, + {file = "time_machine-2.7.1-cp310-cp310-win32.whl", hash = "sha256:10c2937d3556f4358205dac5c7cd2d33832b8b911f3deff050f59e1fe2be3231"}, + {file = "time_machine-2.7.1-cp310-cp310-win_amd64.whl", hash = "sha256:200974e9bb8a1cb227ce579caafeaeebb0f9de81758c444cbccc0ea464313caf"}, + {file = "time_machine-2.7.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:d5e2376b7922c9d96921709c7e730498b9c69da889f359a465d0c43117b62da3"}, + {file = "time_machine-2.7.1-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5ad9117abe223cdc7b4a4432e0a0cfebb1b351a091ee996c653e90f27a734fce"}, + {file = "time_machine-2.7.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:626ef686723147468e84da3edcd67ff757a463250fd35f8f6a8e5b899c43b43d"}, + {file = "time_machine-2.7.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c9331946ed13acd50bc484f408e26b8eefa67e3dbca41927d2052f2148d3661d"}, + {file = "time_machine-2.7.1-cp37-cp37m-musllinux_1_1_aarch64.whl", hash = "sha256:3d0612e0323047f29c23732963d9926f1a95e2ce334d86fecd37c803ac240fc6"}, + {file = "time_machine-2.7.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:b474499ad0083252240bc5be13f8116cc2ca8a89d1ca4967ed74a7b5f0883f95"}, + {file = "time_machine-2.7.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:7df0857709432585b62d2667c0e6e64029b652e2df776b9fb85223c60dce52c7"}, + {file = "time_machine-2.7.1-cp37-cp37m-win32.whl", hash = "sha256:77c8dfe8dc7f45bbfe73494c72f3728d99abec5a020460ad7ffee5247365eba4"}, + {file = "time_machine-2.7.1-cp37-cp37m-win_amd64.whl", hash = "sha256:c1fd1c231377ce076f99c8c16999a95510690f8dbd35db0e5fbbc74a17f84b39"}, + {file = "time_machine-2.7.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:462924fb87826882fc7830098e621116599f9259d181a7bbf5a4e49f74ec325b"}, + {file = "time_machine-2.7.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:46bf3b4a52d43289b23f0015a9d8592ddf621a5058e566c275cb060347d430c1"}, + {file = "time_machine-2.7.1-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:30afd5b978d8121334c80fa23119d7bd7c9f954169854edf5103e5c8b38358bb"}, + {file = "time_machine-2.7.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:633fb8c47f3cd64690591ca6981e4fdbcaa54c18d8a57a3cdc24638ca98f8216"}, + {file = "time_machine-2.7.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:80b6093c3b70d1d1a66b65f18a6e53b233c8dd5d8ffe7ac59e9d048fb1d5e15c"}, + {file = "time_machine-2.7.1-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:e62ed7d78694b7e0a2ab30b3dd52ebf26b03e17d6eda0f231fd77e24307a55a9"}, + {file = "time_machine-2.7.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:0eaf024d16482ec211a579fd389cbbd4fedd8a1f0a0c41642508815f880ca3a9"}, + {file = "time_machine-2.7.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:2688091ce0c16151faa80625efb34e3096731fbdee6d5284c48c984bce95c311"}, + {file = "time_machine-2.7.1-cp38-cp38-win32.whl", hash = "sha256:2e54bf0521b6e397fcaa03060feb187bbe5aa63ac51dbb97d5bc59fb0c4725f8"}, + {file = "time_machine-2.7.1-cp38-cp38-win_amd64.whl", hash = "sha256:cee72d9e14d36e4b8da6af1d2d784f14da53f76aeb5066540a38318aa907b551"}, + {file = "time_machine-2.7.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:06322d41d45d86e2dc2520794c95129ff25b8620b33851ed40700c859ebf8c30"}, + {file = "time_machine-2.7.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:193b14daa3b3cf67e6b55d6e2d63c2eb7c1d3f49017704d4b43963b198656888"}, + {file = "time_machine-2.7.1-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1367a89fb857f68cfa723e236cd47febaf201a3a625ad8423110fe0509d5fca8"}, + {file = "time_machine-2.7.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ce350f7e8bd51a0bb064180486300283bec5cd1a21a318a8ffe5f7df11735f36"}, + {file = "time_machine-2.7.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:68ff623d835760314e279aedc0d19a1dc4dec117c6bca388e1ff077c781256bd"}, + {file = "time_machine-2.7.1-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:05fecd818d41727d31109a0d039ce07c8311602b45ffc07bffd8ae8b6f266ee5"}, + {file = "time_machine-2.7.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:1fe4e604c5effc290c1bbecd3ea98687690d0a88fd98ba93e0246bf19ae2a520"}, + {file = "time_machine-2.7.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ff07a5635d42957f2bd7eb5ca6579f64de368c842e754a4d3414520693b75db9"}, + {file = "time_machine-2.7.1-cp39-cp39-win32.whl", hash = "sha256:8c6314e7e0ffd7af82c8026786d5551aff973e0c86ec1368b0590be9a7620cad"}, + {file = "time_machine-2.7.1-cp39-cp39-win_amd64.whl", hash = "sha256:d50a2620d726788cbde97c58e0f6f61d10337d16d088a1fad789f50a1b5ff4d1"}, ] toml = [ {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, ] tomli = [ - {file = "tomli-1.2.3-py3-none-any.whl", hash = "sha256:e3069e4be3ead9668e21cb9b074cd948f7b3113fd9c8bba083f48247aab8b11c"}, - {file = "tomli-1.2.3.tar.gz", hash = "sha256:05b6166bff487dc068d322585c7ea4ef78deed501cc124060e0f238e89a9231f"}, -] -tox = [ - {file = "tox-3.24.4-py2.py3-none-any.whl", hash = "sha256:5e274227a53dc9ef856767c21867377ba395992549f02ce55eb549f9fb9a8d10"}, - {file = "tox-3.24.4.tar.gz", hash = "sha256:c30b57fa2477f1fb7c36aa1d83292d5c2336cd0018119e1b1c17340e2c2708ca"}, + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, ] +tox = [] typed-ast = [ - {file = "typed_ast-1.5.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:5d8314c92414ce7481eee7ad42b353943679cf6f30237b5ecbf7d835519e1212"}, - {file = "typed_ast-1.5.1-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:b53ae5de5500529c76225d18eeb060efbcec90ad5e030713fe8dab0fb4531631"}, - {file = "typed_ast-1.5.1-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:24058827d8f5d633f97223f5148a7d22628099a3d2efe06654ce872f46f07cdb"}, - {file = "typed_ast-1.5.1-cp310-cp310-win_amd64.whl", hash = "sha256:a6d495c1ef572519a7bac9534dbf6d94c40e5b6a608ef41136133377bba4aa08"}, - {file = "typed_ast-1.5.1-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:de4ecae89c7d8b56169473e08f6bfd2df7f95015591f43126e4ea7865928677e"}, - {file = "typed_ast-1.5.1-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:256115a5bc7ea9e665c6314ed6671ee2c08ca380f9d5f130bd4d2c1f5848d695"}, - {file = "typed_ast-1.5.1-cp36-cp36m-win_amd64.whl", hash = "sha256:7c42707ab981b6cf4b73490c16e9d17fcd5227039720ca14abe415d39a173a30"}, - {file = "typed_ast-1.5.1-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:71dcda943a471d826ea930dd449ac7e76db7be778fcd722deb63642bab32ea3f"}, - {file = "typed_ast-1.5.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4f30a2bcd8e68adbb791ce1567fdb897357506f7ea6716f6bbdd3053ac4d9471"}, - {file = "typed_ast-1.5.1-cp37-cp37m-win_amd64.whl", hash = "sha256:ca9e8300d8ba0b66d140820cf463438c8e7b4cdc6fd710c059bfcfb1531d03fb"}, - {file = "typed_ast-1.5.1-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9caaf2b440efb39ecbc45e2fabde809cbe56272719131a6318fd9bf08b58e2cb"}, - {file = "typed_ast-1.5.1-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:c9bcad65d66d594bffab8575f39420fe0ee96f66e23c4d927ebb4e24354ec1af"}, - {file = "typed_ast-1.5.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:591bc04e507595887160ed7aa8d6785867fb86c5793911be79ccede61ae96f4d"}, - {file = "typed_ast-1.5.1-cp38-cp38-win_amd64.whl", hash = "sha256:a80d84f535642420dd17e16ae25bb46c7f4c16ee231105e7f3eb43976a89670a"}, - {file = "typed_ast-1.5.1-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:38cf5c642fa808300bae1281460d4f9b7617cf864d4e383054a5ef336e344d32"}, - {file = "typed_ast-1.5.1-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:5b6ab14c56bc9c7e3c30228a0a0b54b915b1579613f6e463ba6f4eb1382e7fd4"}, - {file = "typed_ast-1.5.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:a2b8d7007f6280e36fa42652df47087ac7b0a7d7f09f9468f07792ba646aac2d"}, - {file = "typed_ast-1.5.1-cp39-cp39-win_amd64.whl", hash = "sha256:b6d17f37f6edd879141e64a5db17b67488cfeffeedad8c5cec0392305e9bc775"}, - {file = "typed_ast-1.5.1.tar.gz", hash = "sha256:484137cab8ecf47e137260daa20bafbba5f4e3ec7fda1c1e69ab299b75fa81c5"}, + {file = "typed_ast-1.5.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:669dd0c4167f6f2cd9f57041e03c3c2ebf9063d0757dc89f79ba1daa2bfca9d4"}, + {file = "typed_ast-1.5.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:211260621ab1cd7324e0798d6be953d00b74e0428382991adfddb352252f1d62"}, + {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:267e3f78697a6c00c689c03db4876dd1efdfea2f251a5ad6555e82a26847b4ac"}, + {file = "typed_ast-1.5.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:c542eeda69212fa10a7ada75e668876fdec5f856cd3d06829e6aa64ad17c8dfe"}, + {file = "typed_ast-1.5.4-cp310-cp310-win_amd64.whl", hash = "sha256:a9916d2bb8865f973824fb47436fa45e1ebf2efd920f2b9f99342cb7fab93f72"}, + {file = "typed_ast-1.5.4-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:79b1e0869db7c830ba6a981d58711c88b6677506e648496b1f64ac7d15633aec"}, + {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a94d55d142c9265f4ea46fab70977a1944ecae359ae867397757d836ea5a3f47"}, + {file = "typed_ast-1.5.4-cp36-cp36m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:183afdf0ec5b1b211724dfef3d2cad2d767cbefac291f24d69b00546c1837fb6"}, + {file = "typed_ast-1.5.4-cp36-cp36m-win_amd64.whl", hash = "sha256:639c5f0b21776605dd6c9dbe592d5228f021404dafd377e2b7ac046b0349b1a1"}, + {file = "typed_ast-1.5.4-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:cf4afcfac006ece570e32d6fa90ab74a17245b83dfd6655a6f68568098345ff6"}, + {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ed855bbe3eb3715fca349c80174cfcfd699c2f9de574d40527b8429acae23a66"}, + {file = "typed_ast-1.5.4-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:6778e1b2f81dfc7bc58e4b259363b83d2e509a65198e85d5700dfae4c6c8ff1c"}, + {file = "typed_ast-1.5.4-cp37-cp37m-win_amd64.whl", hash = "sha256:0261195c2062caf107831e92a76764c81227dae162c4f75192c0d489faf751a2"}, + {file = "typed_ast-1.5.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:2efae9db7a8c05ad5547d522e7dbe62c83d838d3906a3716d1478b6c1d61388d"}, + {file = "typed_ast-1.5.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:7d5d014b7daa8b0bf2eaef684295acae12b036d79f54178b92a2b6a56f92278f"}, + {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:370788a63915e82fd6f212865a596a0fefcbb7d408bbbb13dea723d971ed8bdc"}, + {file = "typed_ast-1.5.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:4e964b4ff86550a7a7d56345c7864b18f403f5bd7380edf44a3c1fb4ee7ac6c6"}, + {file = "typed_ast-1.5.4-cp38-cp38-win_amd64.whl", hash = "sha256:683407d92dc953c8a7347119596f0b0e6c55eb98ebebd9b23437501b28dcbb8e"}, + {file = "typed_ast-1.5.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:4879da6c9b73443f97e731b617184a596ac1235fe91f98d279a7af36c796da35"}, + {file = "typed_ast-1.5.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:3e123d878ba170397916557d31c8f589951e353cc95fb7f24f6bb69adc1a8a97"}, + {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ebd9d7f80ccf7a82ac5f88c521115cc55d84e35bf8b446fcd7836eb6b98929a3"}, + {file = "typed_ast-1.5.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:98f80dee3c03455e92796b58b98ff6ca0b2a6f652120c263efdba4d6c5e58f72"}, + {file = "typed_ast-1.5.4-cp39-cp39-win_amd64.whl", hash = "sha256:0fdbcf2fef0ca421a3f5912555804296f0b0960f0418c440f5d6d3abb549f3e1"}, + {file = "typed_ast-1.5.4.tar.gz", hash = "sha256:39e21ceb7388e4bb37f4c679d72707ed46c2fbf2a5609b8b8ebc4b067d977df2"}, ] typing-extensions = [ - {file = "typing_extensions-4.0.1-py3-none-any.whl", hash = "sha256:7f001e5ac290a0c0401508864c7ec868be4e701886d5b573a9528ed3973d9d3b"}, - {file = "typing_extensions-4.0.1.tar.gz", hash = "sha256:4ca091dea149f945ec56afb48dae714f21e8692ef22a395223bcd328961b6a0e"}, + {file = "typing_extensions-4.3.0-py3-none-any.whl", hash = "sha256:25642c956049920a5aa49edcdd6ab1e06d7e5d467fc00e0506c44ac86fbfca02"}, + {file = "typing_extensions-4.3.0.tar.gz", hash = "sha256:e6d2677a32f47fc7eb2795db1dd15c1f34eff616bcaf2cfb5e997f854fa1c4a6"}, ] tzdata = [ - {file = "tzdata-2021.5-py2.py3-none-any.whl", hash = "sha256:3eee491e22ebfe1e5cfcc97a4137cd70f092ce59144d81f8924a844de05ba8f5"}, - {file = "tzdata-2021.5.tar.gz", hash = "sha256:68dbe41afd01b867894bbdfd54fa03f468cfa4f0086bfb4adcd8de8f24f3ee21"}, + {file = "tzdata-2022.1-py2.py3-none-any.whl", hash = "sha256:238e70234214138ed7b4e8a0fab0e5e13872edab3be586ab8198c407620e2ab9"}, + {file = "tzdata-2022.1.tar.gz", hash = "sha256:8b536a8ec63dc0751342b3984193a3118f8fca2afe25752bb9b7fffd398552d3"}, ] virtualenv = [ - {file = "virtualenv-20.10.0-py2.py3-none-any.whl", hash = "sha256:4b02e52a624336eece99c96e3ab7111f469c24ba226a53ec474e8e787b365814"}, - {file = "virtualenv-20.10.0.tar.gz", hash = "sha256:576d05b46eace16a9c348085f7d0dc8ef28713a2cabaa1cf0aea41e8f12c9218"}, + {file = "virtualenv-20.16.2-py2.py3-none-any.whl", hash = "sha256:635b272a8e2f77cb051946f46c60a54ace3cb5e25568228bd6b57fc70eca9ff3"}, + {file = "virtualenv-20.16.2.tar.gz", hash = "sha256:0ef5be6d07181946891f5abc8047fda8bc2f0b4b9bf222c64e6e8963baee76db"}, ] watchdog = [ - {file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:9693f35162dc6208d10b10ddf0458cc09ad70c30ba689d9206e02cd836ce28a3"}, - {file = "watchdog-2.1.6-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:aba5c812f8ee8a3ff3be51887ca2d55fb8e268439ed44110d3846e4229eb0e8b"}, - {file = "watchdog-2.1.6-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:4ae38bf8ba6f39d5b83f78661273216e7db5b00f08be7592062cb1fc8b8ba542"}, - {file = "watchdog-2.1.6-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:ad6f1796e37db2223d2a3f302f586f74c72c630b48a9872c1e7ae8e92e0ab669"}, - {file = "watchdog-2.1.6-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:922a69fa533cb0c793b483becaaa0845f655151e7256ec73630a1b2e9ebcb660"}, - {file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:b2fcf9402fde2672545b139694284dc3b665fd1be660d73eca6805197ef776a3"}, - {file = "watchdog-2.1.6-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:3386b367e950a11b0568062b70cc026c6f645428a698d33d39e013aaeda4cc04"}, - {file = "watchdog-2.1.6-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:8f1c00aa35f504197561060ca4c21d3cc079ba29cf6dd2fe61024c70160c990b"}, - {file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:b52b88021b9541a60531142b0a451baca08d28b74a723d0c99b13c8c8d48d604"}, - {file = "watchdog-2.1.6-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:8047da932432aa32c515ec1447ea79ce578d0559362ca3605f8e9568f844e3c6"}, - {file = "watchdog-2.1.6-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:e92c2d33858c8f560671b448205a268096e17870dcf60a9bb3ac7bfbafb7f5f9"}, - {file = "watchdog-2.1.6-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:b7d336912853d7b77f9b2c24eeed6a5065d0a0cc0d3b6a5a45ad6d1d05fb8cd8"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_aarch64.whl", hash = "sha256:cca7741c0fcc765568350cb139e92b7f9f3c9a08c4f32591d18ab0a6ac9e71b6"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_armv7l.whl", hash = "sha256:25fb5240b195d17de949588628fdf93032ebf163524ef08933db0ea1f99bd685"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_i686.whl", hash = "sha256:be9be735f827820a06340dff2ddea1fb7234561fa5e6300a62fe7f54d40546a0"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64.whl", hash = "sha256:d0d19fb2441947b58fbf91336638c2b9f4cc98e05e1045404d7a4cb7cddc7a65"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:3becdb380d8916c873ad512f1701f8a92ce79ec6978ffde92919fd18d41da7fb"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_s390x.whl", hash = "sha256:ae67501c95606072aafa865b6ed47343ac6484472a2f95490ba151f6347acfc2"}, - {file = "watchdog-2.1.6-py3-none-manylinux2014_x86_64.whl", hash = "sha256:e0f30db709c939cabf64a6dc5babb276e6d823fd84464ab916f9b9ba5623ca15"}, - {file = "watchdog-2.1.6-py3-none-win32.whl", hash = "sha256:e02794ac791662a5eafc6ffeaf9bcc149035a0e48eb0a9d40a8feb4622605a3d"}, - {file = "watchdog-2.1.6-py3-none-win_amd64.whl", hash = "sha256:bd9ba4f332cf57b2c1f698be0728c020399ef3040577cde2939f2e045b39c1e5"}, - {file = "watchdog-2.1.6-py3-none-win_ia64.whl", hash = "sha256:a0f1c7edf116a12f7245be06120b1852275f9506a7d90227648b250755a03923"}, - {file = "watchdog-2.1.6.tar.gz", hash = "sha256:a36e75df6c767cbf46f61a91c70b3ba71811dfa0aca4a324d9407a06a8b7a2e7"}, -] -zipp = [ - {file = "zipp-3.6.0-py3-none-any.whl", hash = "sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc"}, - {file = "zipp-3.6.0.tar.gz", hash = "sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832"}, -] + {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:a735a990a1095f75ca4f36ea2ef2752c99e6ee997c46b0de507ba40a09bf7330"}, + {file = "watchdog-2.1.9-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:6b17d302850c8d412784d9246cfe8d7e3af6bcd45f958abb2d08a6f8bedf695d"}, + {file = "watchdog-2.1.9-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ee3e38a6cc050a8830089f79cbec8a3878ec2fe5160cdb2dc8ccb6def8552658"}, + {file = "watchdog-2.1.9-cp36-cp36m-macosx_10_9_x86_64.whl", hash = "sha256:64a27aed691408a6abd83394b38503e8176f69031ca25d64131d8d640a307591"}, + {file = "watchdog-2.1.9-cp37-cp37m-macosx_10_9_x86_64.whl", hash = "sha256:195fc70c6e41237362ba720e9aaf394f8178bfc7fa68207f112d108edef1af33"}, + {file = "watchdog-2.1.9-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:bfc4d351e6348d6ec51df007432e6fe80adb53fd41183716017026af03427846"}, + {file = "watchdog-2.1.9-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:8250546a98388cbc00c3ee3cc5cf96799b5a595270dfcfa855491a64b86ef8c3"}, + {file = "watchdog-2.1.9-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:117ffc6ec261639a0209a3252546b12800670d4bf5f84fbd355957a0595fe654"}, + {file = "watchdog-2.1.9-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:97f9752208f5154e9e7b76acc8c4f5a58801b338de2af14e7e181ee3b28a5d39"}, + {file = "watchdog-2.1.9-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:247dcf1df956daa24828bfea5a138d0e7a7c98b1a47cf1fa5b0c3c16241fcbb7"}, + {file = "watchdog-2.1.9-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:226b3c6c468ce72051a4c15a4cc2ef317c32590d82ba0b330403cafd98a62cfd"}, + {file = "watchdog-2.1.9-pp37-pypy37_pp73-macosx_10_9_x86_64.whl", hash = "sha256:d9820fe47c20c13e3c9dd544d3706a2a26c02b2b43c993b62fcd8011bcc0adb3"}, + {file = "watchdog-2.1.9-pp38-pypy38_pp73-macosx_10_9_x86_64.whl", hash = "sha256:70af927aa1613ded6a68089a9262a009fbdf819f46d09c1a908d4b36e1ba2b2d"}, + {file = "watchdog-2.1.9-pp39-pypy39_pp73-macosx_10_9_x86_64.whl", hash = "sha256:ed80a1628cee19f5cfc6bb74e173f1b4189eb532e705e2a13e3250312a62e0c9"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_aarch64.whl", hash = "sha256:9f05a5f7c12452f6a27203f76779ae3f46fa30f1dd833037ea8cbc2887c60213"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_armv7l.whl", hash = "sha256:255bb5758f7e89b1a13c05a5bceccec2219f8995a3a4c4d6968fe1de6a3b2892"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_i686.whl", hash = "sha256:d3dda00aca282b26194bdd0adec21e4c21e916956d972369359ba63ade616153"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_ppc64.whl", hash = "sha256:186f6c55abc5e03872ae14c2f294a153ec7292f807af99f57611acc8caa75306"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_ppc64le.whl", hash = "sha256:083171652584e1b8829581f965b9b7723ca5f9a2cd7e20271edf264cfd7c1412"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_s390x.whl", hash = "sha256:b530ae007a5f5d50b7fbba96634c7ee21abec70dc3e7f0233339c81943848dc1"}, + {file = "watchdog-2.1.9-py3-none-manylinux2014_x86_64.whl", hash = "sha256:4f4e1c4aa54fb86316a62a87b3378c025e228178d55481d30d857c6c438897d6"}, + {file = "watchdog-2.1.9-py3-none-win32.whl", hash = "sha256:5952135968519e2447a01875a6f5fc8c03190b24d14ee52b0f4b1682259520b1"}, + {file = "watchdog-2.1.9-py3-none-win_amd64.whl", hash = "sha256:7a833211f49143c3d336729b0020ffd1274078e94b0ae42e22f596999f50279c"}, + {file = "watchdog-2.1.9-py3-none-win_ia64.whl", hash = "sha256:ad576a565260d8f99d97f2e64b0f97a48228317095908568a9d5c786c829d428"}, + {file = "watchdog-2.1.9.tar.gz", hash = "sha256:43ce20ebb36a51f21fa376f76d1d4692452b2527ccd601950d69ed36b9e21609"}, +] +zipp = [] diff --git a/pyproject.toml b/pyproject.toml index 748cae9b..8cf31891 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -31,10 +31,10 @@ python-dateutil = "^2.6" tzdata = ">=2020.1" [tool.poetry.group.test.dependencies] -pytest = "^6.2.5" -pytest-cov = "^2.5" -pytz = ">=2018.3" -time-machine = "^2.4.0" +pytest = "^7.1.2" +pytest-cov = "^3.0.0" +pytz = ">=2022.1" +time-machine = "^2.7.1" [tool.poetry.group.doc.dependencies] mkdocs = "^1.0" @@ -43,14 +43,14 @@ pygments = "^2.2" markdown-include = "^0.5.1" [tool.poetry.group.lint.dependencies] -black = {version = "^21.12b0", markers = "implementation_name != 'pypy'"} -isort = "^5.9.1" -pre-commit = "^2.10.0" +black = {version = "^22.6.0", markers = "implementation_name != 'pypy'"} +isort = "^5.10.1" +pre-commit = "^2.20.0" [tool.poetry.group.dev.dependencies] -babel = "^2.5" -cleo = "^1.0.0a3" -tox = "^3.0" +babel = "^2.10.3" +cleo = "^1.0.0a5" +tox = "^3.25.1" [tool.poetry.build] generate-setup-file = false @@ -77,6 +77,11 @@ known_third_party = [ "pytzdata", ] +[tool.mypy] +strict = true +files = "pendulum, tests" +show_error_codes = true +pretty = true [build-system] requires = ["poetry-core>=1.1.0a6"] From 3df90b7ab72f605fecbc625f461bda1ff7d93434 Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Wed, 3 Aug 2022 19:55:27 +0200 Subject: [PATCH 032/177] Update old and add new checks to pre-commit --- .pre-commit-config.yaml | 61 +++++++++++++++++++++++++++++++---------- 1 file changed, 46 insertions(+), 15 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bcc97bc7..97d256e8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,31 +1,62 @@ repos: + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v4.0.1 + hooks: + - id: trailing-whitespace + exclude: ^tests/.*/fixtures/.* + - id: end-of-file-fixer + exclude: ^tests/.*/fixtures/.* + - id: debug-statements + + - repo: https://github.com/hadialqattan/pycln + rev: v2.1.1 + hooks: + - id: pycln + args: [--all] + - repo: https://github.com/psf/black - rev: 21.9b0 + rev: 22.6.0 hooks: - id: black - - repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 + - repo: https://github.com/pycqa/flake8 + rev: 4.0.1 hooks: - id: flake8 + additional_dependencies: &flake8_deps + - flake8-broken-line==0.4.0 + - flake8-bugbear==22.7.1 + - flake8-comprehensions==3.10.0 + - flake8-eradicate==1.2.1 + - flake8-quotes==3.3.1 + - flake8-simplify==0.19.2 + - flake8-tidy-imports==4.8.0 + - flake8-type-checking==2.0.3 + - flake8-typing-imports==1.12.0 + - flake8-use-fstring==1.3 + - pep8-naming==0.13.1 + + - repo: https://github.com/asottile/yesqa + rev: v1.3.0 + hooks: + - id: yesqa + additional_dependencies: *flake8_deps - - repo: https://github.com/timothycrosley/isort - rev: 5.9.3 + - repo: https://github.com/pycqa/isort + rev: 5.10.1 hooks: - id: isort - additional_dependencies: [toml] - exclude: ^.*/?setup\.py$ + args: [--add-import, from __future__ import annotations] - repo: https://github.com/asottile/pyupgrade - rev: v2.29.0 + rev: v2.37.3 hooks: - id: pyupgrade - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 + - repo: https://github.com/pre-commit/mirrors-mypy + rev: v0.971 hooks: - - id: trailing-whitespace - exclude: ^tests/.*/fixtures/.* - - id: end-of-file-fixer - exclude: ^tests/.*/fixtures/.* - - id: debug-statements + - id: mypy + pass_filenames: false + additional_dependencies: + - pytest>=7.1.2 From cfa19d40182d57000d2d02b2bc68cf836f1b9d25 Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Wed, 3 Aug 2022 21:27:09 +0200 Subject: [PATCH 033/177] Run isort --- .coveragerc | 7 ------ .flake8 | 24 +++++++++++++++++++- .pre-commit-config.yaml | 4 ++++ clock | 2 ++ pendulum/__init__.py | 2 ++ pendulum/__version__.py | 2 +- pendulum/_extensions/helpers.py | 2 ++ pendulum/constants.py | 3 +++ pendulum/date.py | 2 ++ pendulum/datetime.py | 2 ++ pendulum/duration.py | 2 ++ pendulum/exceptions.py | 2 ++ pendulum/formatting/__init__.py | 2 ++ pendulum/formatting/difference_formatter.py | 2 ++ pendulum/formatting/formatter.py | 2 ++ pendulum/helpers.py | 2 ++ pendulum/mixins/default.py | 2 ++ pendulum/parser.py | 2 ++ pendulum/parsing/__init__.py | 2 ++ pendulum/parsing/exceptions/__init__.py | 3 +++ pendulum/parsing/iso8601.py | 2 ++ pendulum/period.py | 2 ++ pendulum/time.py | 2 ++ pendulum/tz/__init__.py | 2 ++ pendulum/tz/data/windows.py | 3 +++ pendulum/tz/exceptions.py | 3 +++ pendulum/tz/local_timezone.py | 2 ++ pendulum/tz/timezone.py | 2 ++ pendulum/utils/_compat.py | 2 ++ pyproject.toml | 16 +++++++++++-- tests/conftest.py | 2 ++ tests/date/test_add.py | 2 ++ tests/date/test_behavior.py | 2 ++ tests/date/test_comparison.py | 2 ++ tests/date/test_construct.py | 2 ++ tests/date/test_day_of_week_modifiers.py | 2 ++ tests/date/test_diff.py | 2 ++ tests/date/test_fluent_setters.py | 2 ++ tests/date/test_getters.py | 2 ++ tests/date/test_start_end_of.py | 2 ++ tests/date/test_strings.py | 2 ++ tests/date/test_sub.py | 2 ++ tests/datetime/test_add.py | 2 ++ tests/datetime/test_behavior.py | 2 ++ tests/datetime/test_comparison.py | 2 ++ tests/datetime/test_construct.py | 2 ++ tests/datetime/test_create_from_timestamp.py | 2 ++ tests/datetime/test_day_of_week_modifiers.py | 2 ++ tests/datetime/test_diff.py | 2 ++ tests/datetime/test_fluent_setters.py | 2 ++ tests/datetime/test_from_format.py | 2 ++ tests/datetime/test_getters.py | 2 ++ tests/datetime/test_naive.py | 2 ++ tests/datetime/test_replace.py | 2 ++ tests/datetime/test_start_end_of.py | 2 ++ tests/datetime/test_strings.py | 2 ++ tests/datetime/test_sub.py | 2 ++ tests/datetime/test_timezone.py | 2 ++ tests/duration/test_add_sub.py | 2 ++ tests/duration/test_arithmetic.py | 2 ++ tests/duration/test_behavior.py | 2 ++ tests/duration/test_construct.py | 2 ++ tests/duration/test_in_methods.py | 2 ++ tests/duration/test_in_words.py | 2 ++ tests/duration/test_total_methods.py | 2 ++ tests/formatting/test_formatter.py | 2 ++ tests/helpers/test_local_time.py | 2 ++ tests/localization/test_da.py | 2 ++ tests/localization/test_de.py | 2 ++ tests/localization/test_es.py | 2 ++ tests/localization/test_fa.py | 2 ++ tests/localization/test_fo.py | 2 ++ tests/localization/test_fr.py | 2 ++ tests/localization/test_id.py | 2 ++ tests/localization/test_it.py | 2 ++ tests/localization/test_ko.py | 2 ++ tests/localization/test_lt.py | 2 ++ tests/localization/test_nb.py | 2 ++ tests/localization/test_nl.py | 2 ++ tests/localization/test_nn.py | 2 ++ tests/localization/test_pl.py | 2 ++ tests/localization/test_ru.py | 2 ++ tests/parsing/test_parse_iso8601.py | 2 ++ tests/parsing/test_parsing.py | 2 ++ tests/parsing/test_parsing_duration.py | 2 ++ tests/period/test_add_subtract.py | 2 ++ tests/period/test_arithmetic.py | 2 ++ tests/period/test_behavior.py | 2 ++ tests/period/test_construct.py | 2 ++ tests/period/test_hashing.py | 2 ++ tests/period/test_in_words.py | 2 ++ tests/period/test_range.py | 2 ++ tests/test_helpers.py | 2 ++ tests/test_main.py | 2 ++ tests/test_parsing.py | 2 ++ tests/time/test_add.py | 2 ++ tests/time/test_behavior.py | 2 ++ tests/time/test_comparison.py | 2 ++ tests/time/test_construct.py | 2 ++ tests/time/test_diff.py | 2 ++ tests/time/test_fluent_setters.py | 2 ++ tests/time/test_strings.py | 2 ++ tests/time/test_sub.py | 2 ++ tests/tz/test_helpers.py | 2 ++ tests/tz/test_local_timezone.py | 2 ++ tests/tz/test_timezone.py | 2 ++ tests/tz/test_timezones.py | 2 ++ 107 files changed, 250 insertions(+), 11 deletions(-) delete mode 100644 .coveragerc diff --git a/.coveragerc b/.coveragerc deleted file mode 100644 index 73ec6b72..00000000 --- a/.coveragerc +++ /dev/null @@ -1,7 +0,0 @@ -[run] -omit = pendulum/locales/*, - pendulum/_compat.py, - pendulum/__version__.py, - pendulum/_extensions/* - pendulum/parsing/iso8601.py - pendulum/utils/_compat.py diff --git a/.flake8 b/.flake8 index facde560..322a90e5 100644 --- a/.flake8 +++ b/.flake8 @@ -1,9 +1,31 @@ [flake8] max-line-length = 88 -ignore = E501, E203, W503 +ignore = + # E501: Line too long + E501, + # E203: Whitespace before ':' + E203, + #W503: Line break occurred before a binary operator + W503 per-file-ignores = + # F401: Module imported but unused __init__.py:F401 + # F811: Redefinition of unused name from line n pendulum/tz/timezone.py:F811 +min_python_version = 3.7.0 +ban-relative-imports = true +# flake8-use-fstring: https://github.com/MichaelKim0407/flake8-use-fstring#--percent-greedy-and---format-greedy +format-greedy = 1 +inline-quotes = double +enable-extensions = TC, TC1 +type-checking-exempt-modules = typing, typing-extensions +eradicate-whitelist-extend = ^-.*; +extend-ignore = + # SIM106: Handle error-cases first + SIM106, +extend-exclude = + # External to the project's coding standards: + docs/*, exclude = .git __pycache__ diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 97d256e8..632bb1d7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,11 +52,15 @@ repos: rev: v2.37.3 hooks: - id: pyupgrade + exclude: ^build\.py$ + args: + - --py37-plus - repo: https://github.com/pre-commit/mirrors-mypy rev: v0.971 hooks: - id: mypy pass_filenames: false + exclude: ^build\.py$ additional_dependencies: - pytest>=7.1.2 diff --git a/clock b/clock index 1bfa17c9..2a89bc98 100755 --- a/clock +++ b/clock @@ -1,5 +1,7 @@ #!/usr/bin/env python +from __future__ import annotations + import glob import json import os diff --git a/pendulum/__init__.py b/pendulum/__init__.py index 3e678052..cad1fdaa 100644 --- a/pendulum/__init__.py +++ b/pendulum/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime as _datetime from typing import Optional diff --git a/pendulum/__version__.py b/pendulum/__version__.py index 58039f50..29e86a85 100644 --- a/pendulum/__version__.py +++ b/pendulum/__version__.py @@ -1 +1 @@ -__version__ = "2.1.1" +__version__ = "3.0.0a" diff --git a/pendulum/_extensions/helpers.py b/pendulum/_extensions/helpers.py index 549f3fc3..f8a9ce7a 100644 --- a/pendulum/_extensions/helpers.py +++ b/pendulum/_extensions/helpers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime import math import typing diff --git a/pendulum/constants.py b/pendulum/constants.py index 38697d73..c7b3876a 100644 --- a/pendulum/constants.py +++ b/pendulum/constants.py @@ -1,4 +1,7 @@ # The day constants +from __future__ import annotations + + SUNDAY = 0 MONDAY = 1 TUESDAY = 2 diff --git a/pendulum/date.py b/pendulum/date.py index 536b0a8b..c62a2f80 100644 --- a/pendulum/date.py +++ b/pendulum/date.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import calendar import math diff --git a/pendulum/datetime.py b/pendulum/datetime.py index a17d2626..eddf5165 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import calendar import datetime diff --git a/pendulum/duration.py b/pendulum/duration.py index 9db45e2e..9fde234c 100644 --- a/pendulum/duration.py +++ b/pendulum/duration.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import timedelta import pendulum diff --git a/pendulum/exceptions.py b/pendulum/exceptions.py index 4c6448a6..3ab4db91 100644 --- a/pendulum/exceptions.py +++ b/pendulum/exceptions.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from .parsing.exceptions import ParserError # noqa diff --git a/pendulum/formatting/__init__.py b/pendulum/formatting/__init__.py index 856321af..8e33afd5 100644 --- a/pendulum/formatting/__init__.py +++ b/pendulum/formatting/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from .formatter import Formatter diff --git a/pendulum/formatting/difference_formatter.py b/pendulum/formatting/difference_formatter.py index 74f9616b..f5a92984 100644 --- a/pendulum/formatting/difference_formatter.py +++ b/pendulum/formatting/difference_formatter.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import typing import pendulum diff --git a/pendulum/formatting/formatter.py b/pendulum/formatting/formatter.py index c264644d..96fee604 100644 --- a/pendulum/formatting/formatter.py +++ b/pendulum/formatting/formatter.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime import re import typing diff --git a/pendulum/helpers.py b/pendulum/helpers.py index 3d758541..0e85f548 100644 --- a/pendulum/helpers.py +++ b/pendulum/helpers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import struct diff --git a/pendulum/mixins/default.py b/pendulum/mixins/default.py index 6db27192..cff9cc9c 100644 --- a/pendulum/mixins/default.py +++ b/pendulum/mixins/default.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from ..formatting import Formatter diff --git a/pendulum/parser.py b/pendulum/parser.py index 9b081755..c58781e9 100644 --- a/pendulum/parser.py +++ b/pendulum/parser.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime import typing diff --git a/pendulum/parsing/__init__.py b/pendulum/parsing/__init__.py index 1d15023b..352f68c8 100644 --- a/pendulum/parsing/__init__.py +++ b/pendulum/parsing/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import copy import os import re diff --git a/pendulum/parsing/exceptions/__init__.py b/pendulum/parsing/exceptions/__init__.py index 9b4ea71a..05195b5c 100644 --- a/pendulum/parsing/exceptions/__init__.py +++ b/pendulum/parsing/exceptions/__init__.py @@ -1,3 +1,6 @@ +from __future__ import annotations + + class ParserError(ValueError): pass diff --git a/pendulum/parsing/iso8601.py b/pendulum/parsing/iso8601.py index 4f507264..acdd8278 100644 --- a/pendulum/parsing/iso8601.py +++ b/pendulum/parsing/iso8601.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime import re diff --git a/pendulum/period.py b/pendulum/period.py index 47475567..c5e5f457 100644 --- a/pendulum/period.py +++ b/pendulum/period.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import operator from datetime import date diff --git a/pendulum/time.py b/pendulum/time.py index 20948c1e..064c6284 100644 --- a/pendulum/time.py +++ b/pendulum/time.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import time from datetime import timedelta diff --git a/pendulum/tz/__init__.py b/pendulum/tz/__init__.py index ba4af1b1..5477393e 100644 --- a/pendulum/tz/__init__.py +++ b/pendulum/tz/__init__.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os from typing import Union diff --git a/pendulum/tz/data/windows.py b/pendulum/tz/data/windows.py index 68bcfeb2..e76e6bbf 100644 --- a/pendulum/tz/data/windows.py +++ b/pendulum/tz/data/windows.py @@ -1,3 +1,6 @@ +from __future__ import annotations + + windows_timezones = { "AUS Central Standard Time": "Australia/Darwin", "AUS Eastern Standard Time": "Australia/Sydney", diff --git a/pendulum/tz/exceptions.py b/pendulum/tz/exceptions.py index 09e6d045..5d5a393e 100644 --- a/pendulum/tz/exceptions.py +++ b/pendulum/tz/exceptions.py @@ -1,3 +1,6 @@ +from __future__ import annotations + + class TimezoneError(ValueError): pass diff --git a/pendulum/tz/local_timezone.py b/pendulum/tz/local_timezone.py index 185abfe2..b2e11088 100644 --- a/pendulum/tz/local_timezone.py +++ b/pendulum/tz/local_timezone.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import re import sys diff --git a/pendulum/tz/timezone.py b/pendulum/tz/timezone.py index 120388a3..e657243a 100644 --- a/pendulum/tz/timezone.py +++ b/pendulum/tz/timezone.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from abc import ABC from abc import abstractmethod from datetime import datetime diff --git a/pendulum/utils/_compat.py b/pendulum/utils/_compat.py index 11924e6c..60ad52cb 100644 --- a/pendulum/utils/_compat.py +++ b/pendulum/utils/_compat.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import sys diff --git a/pyproject.toml b/pyproject.toml index 8cf31891..eaee5a91 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -64,8 +64,11 @@ include_trailing_comma = true lines_after_imports = 2 lines_between_types = 1 use_parentheses = true -not_skip = "__init__.py" -skip_glob = ["*/setup.py"] +skip_glob = [ + "pendulum/locales/**", + "build.py", + "pendulum/__version__.py", +] filter_files = true known_first_party = "pendulum" @@ -83,6 +86,15 @@ files = "pendulum, tests" show_error_codes = true pretty = true +[tool.coverage.run] +omit = [ + "pendulum/locales/*", + "pendulum/__version__.py,", + "pendulum/_extensions/*", + "pendulum/parsing/iso8601.py", + "pendulum/utils/_compat.py", +] + [build-system] requires = ["poetry-core>=1.1.0a6"] build-backend = "poetry.core.masonry.api" diff --git a/tests/conftest.py b/tests/conftest.py index 18abbda9..14d20b1a 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest import pendulum diff --git a/tests/date/test_add.py b/tests/date/test_add.py index 969dfb4b..01c1ef04 100644 --- a/tests/date/test_add.py +++ b/tests/date/test_add.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import timedelta import pytest diff --git a/tests/date/test_behavior.py b/tests/date/test_behavior.py index 23de481a..98dd175f 100644 --- a/tests/date/test_behavior.py +++ b/tests/date/test_behavior.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pickle from datetime import date diff --git a/tests/date/test_comparison.py b/tests/date/test_comparison.py index 052ae2f3..bd6c9b19 100644 --- a/tests/date/test_comparison.py +++ b/tests/date/test_comparison.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import date import pendulum diff --git a/tests/date/test_construct.py b/tests/date/test_construct.py index 615ca80d..eb3635d2 100644 --- a/tests/date/test_construct.py +++ b/tests/date/test_construct.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pendulum import Date from ..conftest import assert_date diff --git a/tests/date/test_day_of_week_modifiers.py b/tests/date/test_day_of_week_modifiers.py index 85d67b69..5d6a0255 100644 --- a/tests/date/test_day_of_week_modifiers.py +++ b/tests/date/test_day_of_week_modifiers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest import pendulum diff --git a/tests/date/test_diff.py b/tests/date/test_diff.py index 6726f9ae..e1ba44d7 100644 --- a/tests/date/test_diff.py +++ b/tests/date/test_diff.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import date import pytest diff --git a/tests/date/test_fluent_setters.py b/tests/date/test_fluent_setters.py index 4eaea8c4..0d11cf94 100644 --- a/tests/date/test_fluent_setters.py +++ b/tests/date/test_fluent_setters.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from ..conftest import assert_date diff --git a/tests/date/test_getters.py b/tests/date/test_getters.py index 3d95ae30..a4927941 100644 --- a/tests/date/test_getters.py +++ b/tests/date/test_getters.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/date/test_start_end_of.py b/tests/date/test_start_end_of.py index b27c3e5d..e966e257 100644 --- a/tests/date/test_start_end_of.py +++ b/tests/date/test_start_end_of.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest import pendulum diff --git a/tests/date/test_strings.py b/tests/date/test_strings.py index fe671b98..f3735818 100644 --- a/tests/date/test_strings.py +++ b/tests/date/test_strings.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/date/test_sub.py b/tests/date/test_sub.py index 74ae6c33..66500ba9 100644 --- a/tests/date/test_sub.py +++ b/tests/date/test_sub.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import datetime from datetime import timedelta diff --git a/tests/datetime/test_add.py b/tests/datetime/test_add.py index 3c40c8fd..6b17945c 100644 --- a/tests/datetime/test_add.py +++ b/tests/datetime/test_add.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import timedelta import pytest diff --git a/tests/datetime/test_behavior.py b/tests/datetime/test_behavior.py index 137e1df5..712a4e53 100644 --- a/tests/datetime/test_behavior.py +++ b/tests/datetime/test_behavior.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pickle from copy import deepcopy diff --git a/tests/datetime/test_comparison.py b/tests/datetime/test_comparison.py index 564510c9..6e5b6420 100644 --- a/tests/datetime/test_comparison.py +++ b/tests/datetime/test_comparison.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import datetime import pytz diff --git a/tests/datetime/test_construct.py b/tests/datetime/test_construct.py index 1466f21f..0405e467 100644 --- a/tests/datetime/test_construct.py +++ b/tests/datetime/test_construct.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os from datetime import datetime diff --git a/tests/datetime/test_create_from_timestamp.py b/tests/datetime/test_create_from_timestamp.py index e7e24d7a..f466ee10 100644 --- a/tests/datetime/test_create_from_timestamp.py +++ b/tests/datetime/test_create_from_timestamp.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from pendulum import timezone diff --git a/tests/datetime/test_day_of_week_modifiers.py b/tests/datetime/test_day_of_week_modifiers.py index 80d0fa0b..93c85383 100644 --- a/tests/datetime/test_day_of_week_modifiers.py +++ b/tests/datetime/test_day_of_week_modifiers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest import pendulum diff --git a/tests/datetime/test_diff.py b/tests/datetime/test_diff.py index e4957e6e..592318a5 100644 --- a/tests/datetime/test_diff.py +++ b/tests/datetime/test_diff.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import datetime import pytest diff --git a/tests/datetime/test_fluent_setters.py b/tests/datetime/test_fluent_setters.py index 13a313f8..86633faa 100644 --- a/tests/datetime/test_fluent_setters.py +++ b/tests/datetime/test_fluent_setters.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import datetime import pendulum diff --git a/tests/datetime/test_from_format.py b/tests/datetime/test_from_format.py index fcc9d678..bf6d6c1d 100644 --- a/tests/datetime/test_from_format.py +++ b/tests/datetime/test_from_format.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest import pendulum diff --git a/tests/datetime/test_getters.py b/tests/datetime/test_getters.py index 5948fc92..c0c7760b 100644 --- a/tests/datetime/test_getters.py +++ b/tests/datetime/test_getters.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import struct import pytest diff --git a/tests/datetime/test_naive.py b/tests/datetime/test_naive.py index 61afaae7..a5488318 100644 --- a/tests/datetime/test_naive.py +++ b/tests/datetime/test_naive.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from ..conftest import assert_datetime diff --git a/tests/datetime/test_replace.py b/tests/datetime/test_replace.py index 11466f43..13282a8b 100644 --- a/tests/datetime/test_replace.py +++ b/tests/datetime/test_replace.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from ..conftest import assert_datetime diff --git a/tests/datetime/test_start_end_of.py b/tests/datetime/test_start_end_of.py index 09350d46..8ab58a2b 100644 --- a/tests/datetime/test_start_end_of.py +++ b/tests/datetime/test_start_end_of.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest import pendulum diff --git a/tests/datetime/test_strings.py b/tests/datetime/test_strings.py index ea8233d0..5ce6ed06 100644 --- a/tests/datetime/test_strings.py +++ b/tests/datetime/test_strings.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest import pendulum diff --git a/tests/datetime/test_sub.py b/tests/datetime/test_sub.py index 7ebf5222..a962e095 100644 --- a/tests/datetime/test_sub.py +++ b/tests/datetime/test_sub.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import timedelta import pytest diff --git a/tests/datetime/test_timezone.py b/tests/datetime/test_timezone.py index 96398e37..1b6fb460 100644 --- a/tests/datetime/test_timezone.py +++ b/tests/datetime/test_timezone.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from ..conftest import assert_datetime diff --git a/tests/duration/test_add_sub.py b/tests/duration/test_add_sub.py index 530343ae..0482c8f0 100644 --- a/tests/duration/test_add_sub.py +++ b/tests/duration/test_add_sub.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import timedelta import pendulum diff --git a/tests/duration/test_arithmetic.py b/tests/duration/test_arithmetic.py index 0f3283a5..33992198 100644 --- a/tests/duration/test_arithmetic.py +++ b/tests/duration/test_arithmetic.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from ..conftest import assert_duration diff --git a/tests/duration/test_behavior.py b/tests/duration/test_behavior.py index 115e3979..a97bbde6 100644 --- a/tests/duration/test_behavior.py +++ b/tests/duration/test_behavior.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pickle from datetime import timedelta diff --git a/tests/duration/test_construct.py b/tests/duration/test_construct.py index bd33a361..2a1179c5 100644 --- a/tests/duration/test_construct.py +++ b/tests/duration/test_construct.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import timedelta import pytest diff --git a/tests/duration/test_in_methods.py b/tests/duration/test_in_methods.py index 85ad3e7a..4527257f 100644 --- a/tests/duration/test_in_methods.py +++ b/tests/duration/test_in_methods.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/duration/test_in_words.py b/tests/duration/test_in_words.py index 499e3c35..c0a1a1fe 100644 --- a/tests/duration/test_in_words.py +++ b/tests/duration/test_in_words.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/duration/test_total_methods.py b/tests/duration/test_total_methods.py index 9c2897ee..aabcd6c0 100644 --- a/tests/duration/test_total_methods.py +++ b/tests/duration/test_total_methods.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/formatting/test_formatter.py b/tests/formatting/test_formatter.py index 97ca69b4..76c7a7ff 100644 --- a/tests/formatting/test_formatter.py +++ b/tests/formatting/test_formatter.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest import pendulum diff --git a/tests/helpers/test_local_time.py b/tests/helpers/test_local_time.py index a9afbd0d..05631077 100644 --- a/tests/helpers/test_local_time.py +++ b/tests/helpers/test_local_time.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from pendulum.helpers import local_time diff --git a/tests/localization/test_da.py b/tests/localization/test_da.py index b5728442..7b455faf 100644 --- a/tests/localization/test_da.py +++ b/tests/localization/test_da.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_de.py b/tests/localization/test_de.py index 94aa18e3..0b051eef 100644 --- a/tests/localization/test_de.py +++ b/tests/localization/test_de.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_es.py b/tests/localization/test_es.py index 80f64cd2..4e8af450 100644 --- a/tests/localization/test_es.py +++ b/tests/localization/test_es.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_fa.py b/tests/localization/test_fa.py index 392f3250..2c52b0e0 100644 --- a/tests/localization/test_fa.py +++ b/tests/localization/test_fa.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_fo.py b/tests/localization/test_fo.py index 67ec0a69..d3c82a15 100644 --- a/tests/localization/test_fo.py +++ b/tests/localization/test_fo.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_fr.py b/tests/localization/test_fr.py index d43674cb..5080061f 100644 --- a/tests/localization/test_fr.py +++ b/tests/localization/test_fr.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_id.py b/tests/localization/test_id.py index 1eda1496..9885c456 100644 --- a/tests/localization/test_id.py +++ b/tests/localization/test_id.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_it.py b/tests/localization/test_it.py index 171a5ce6..b7fca2a2 100644 --- a/tests/localization/test_it.py +++ b/tests/localization/test_it.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_ko.py b/tests/localization/test_ko.py index 44e5f7cb..24a392f2 100644 --- a/tests/localization/test_ko.py +++ b/tests/localization/test_ko.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_lt.py b/tests/localization/test_lt.py index db47ee8d..edeb9aa9 100644 --- a/tests/localization/test_lt.py +++ b/tests/localization/test_lt.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_nb.py b/tests/localization/test_nb.py index 12509d3d..8e548d24 100644 --- a/tests/localization/test_nb.py +++ b/tests/localization/test_nb.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_nl.py b/tests/localization/test_nl.py index 60649adf..e6f8ee91 100644 --- a/tests/localization/test_nl.py +++ b/tests/localization/test_nl.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_nn.py b/tests/localization/test_nn.py index d159641a..bd896718 100644 --- a/tests/localization/test_nn.py +++ b/tests/localization/test_nn.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_pl.py b/tests/localization/test_pl.py index 50ca10ad..e525d716 100644 --- a/tests/localization/test_pl.py +++ b/tests/localization/test_pl.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/localization/test_ru.py b/tests/localization/test_ru.py index a87ea295..5b7dd35d 100644 --- a/tests/localization/test_ru.py +++ b/tests/localization/test_ru.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/parsing/test_parse_iso8601.py b/tests/parsing/test_parse_iso8601.py index d86cb621..83f28810 100644 --- a/tests/parsing/test_parse_iso8601.py +++ b/tests/parsing/test_parse_iso8601.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import date from datetime import datetime from datetime import time diff --git a/tests/parsing/test_parsing.py b/tests/parsing/test_parsing.py index 6c113bb2..50526746 100644 --- a/tests/parsing/test_parsing.py +++ b/tests/parsing/test_parsing.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import datetime import pytest diff --git a/tests/parsing/test_parsing_duration.py b/tests/parsing/test_parsing_duration.py index 41d488b7..ab8b9920 100644 --- a/tests/parsing/test_parsing_duration.py +++ b/tests/parsing/test_parsing_duration.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest from pendulum.parsing import ParserError diff --git a/tests/period/test_add_subtract.py b/tests/period/test_add_subtract.py index 0a7ff756..88525a36 100644 --- a/tests/period/test_add_subtract.py +++ b/tests/period/test_add_subtract.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/period/test_arithmetic.py b/tests/period/test_arithmetic.py index 47b6ddfb..71f7202f 100644 --- a/tests/period/test_arithmetic.py +++ b/tests/period/test_arithmetic.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from ..conftest import assert_duration diff --git a/tests/period/test_behavior.py b/tests/period/test_behavior.py index 7ad7b455..98cf2494 100644 --- a/tests/period/test_behavior.py +++ b/tests/period/test_behavior.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pickle from datetime import timedelta diff --git a/tests/period/test_construct.py b/tests/period/test_construct.py index 21538fc2..f5946b22 100644 --- a/tests/period/test_construct.py +++ b/tests/period/test_construct.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import datetime import pendulum diff --git a/tests/period/test_hashing.py b/tests/period/test_hashing.py index 2a567f11..c18502ff 100644 --- a/tests/period/test_hashing.py +++ b/tests/period/test_hashing.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/period/test_in_words.py b/tests/period/test_in_words.py index 7bedbc7a..a6e8fb2a 100644 --- a/tests/period/test_in_words.py +++ b/tests/period/test_in_words.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum diff --git a/tests/period/test_range.py b/tests/period/test_range.py index 55aac10c..663bd765 100644 --- a/tests/period/test_range.py +++ b/tests/period/test_range.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from pendulum import Period diff --git a/tests/test_helpers.py b/tests/test_helpers.py index cb17385e..0a898895 100644 --- a/tests/test_helpers.py +++ b/tests/test_helpers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import datetime import pytest diff --git a/tests/test_main.py b/tests/test_main.py index becc4964..1205b3de 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytz from pendulum import _safe_timezone diff --git a/tests/test_parsing.py b/tests/test_parsing.py index 3dcf050b..fd895634 100644 --- a/tests/test_parsing.py +++ b/tests/test_parsing.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from .conftest import assert_date diff --git a/tests/time/test_add.py b/tests/time/test_add.py index ea44e175..7075ebe2 100644 --- a/tests/time/test_add.py +++ b/tests/time/test_add.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import timedelta import pytest diff --git a/tests/time/test_behavior.py b/tests/time/test_behavior.py index 66fde86c..0071c944 100644 --- a/tests/time/test_behavior.py +++ b/tests/time/test_behavior.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pickle from datetime import time diff --git a/tests/time/test_comparison.py b/tests/time/test_comparison.py index b163ecba..2ed7c1cf 100644 --- a/tests/time/test_comparison.py +++ b/tests/time/test_comparison.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import time import pendulum diff --git a/tests/time/test_construct.py b/tests/time/test_construct.py index d2d106fe..2d1fdb3a 100644 --- a/tests/time/test_construct.py +++ b/tests/time/test_construct.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from ..conftest import assert_time diff --git a/tests/time/test_diff.py b/tests/time/test_diff.py index 5e99701b..dd5e0938 100644 --- a/tests/time/test_diff.py +++ b/tests/time/test_diff.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pendulum from pendulum import Time diff --git a/tests/time/test_fluent_setters.py b/tests/time/test_fluent_setters.py index 1337ec51..e21ade6b 100644 --- a/tests/time/test_fluent_setters.py +++ b/tests/time/test_fluent_setters.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pendulum import Time from ..conftest import assert_time diff --git a/tests/time/test_strings.py b/tests/time/test_strings.py index 57ac988f..db3c9cd1 100644 --- a/tests/time/test_strings.py +++ b/tests/time/test_strings.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from pendulum import Time diff --git a/tests/time/test_sub.py b/tests/time/test_sub.py index 67ed915a..f15de7b0 100644 --- a/tests/time/test_sub.py +++ b/tests/time/test_sub.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import time from datetime import timedelta diff --git a/tests/tz/test_helpers.py b/tests/tz/test_helpers.py index cc09c473..edec6fda 100644 --- a/tests/tz/test_helpers.py +++ b/tests/tz/test_helpers.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest from pendulum.tz import timezone diff --git a/tests/tz/test_local_timezone.py b/tests/tz/test_local_timezone.py index dfdab991..b8eff6de 100644 --- a/tests/tz/test_local_timezone.py +++ b/tests/tz/test_local_timezone.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import os import sys diff --git a/tests/tz/test_timezone.py b/tests/tz/test_timezone.py index af71fa39..40f3e2a1 100644 --- a/tests/tz/test_timezone.py +++ b/tests/tz/test_timezone.py @@ -1,3 +1,5 @@ +from __future__ import annotations + from datetime import datetime from datetime import timedelta diff --git a/tests/tz/test_timezones.py b/tests/tz/test_timezones.py index 41401275..abe599ed 100644 --- a/tests/tz/test_timezones.py +++ b/tests/tz/test_timezones.py @@ -1,3 +1,5 @@ +from __future__ import annotations + import pytest import pendulum From 353377b226fb701f7943d592bf1cbf20c1668f7d Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Wed, 3 Aug 2022 21:29:53 +0200 Subject: [PATCH 034/177] Fix versions in pre-commit config to fix CI --- .pre-commit-config.yaml | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index bcc97bc7..3df81e8a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,19 +1,18 @@ repos: - repo: https://github.com/psf/black - rev: 21.9b0 + rev: 22.6.0 hooks: - id: black - repo: https://gitlab.com/pycqa/flake8 - rev: 3.9.2 + rev: 4.0.1 hooks: - id: flake8 - repo: https://github.com/timothycrosley/isort - rev: 5.9.3 + rev: 5.10.1 hooks: - id: isort - additional_dependencies: [toml] exclude: ^.*/?setup\.py$ - repo: https://github.com/asottile/pyupgrade From 8b55544f41b06ed3f19f1f2f28557322f268efc6 Mon Sep 17 00:00:00 2001 From: Bartosz Sokorski Date: Wed, 3 Aug 2022 22:52:54 +0200 Subject: [PATCH 035/177] Fix CI (#635) * Fix CI * Change default group to main * Add pre-commit ci config * Refresh release workflow * Formatting --- .github/workflows/release.yml | 15 ++++------ .github/workflows/tests.yml | 47 ++++++++++---------------------- .pre-commit-config.yaml | 3 ++ pendulum/formatting/formatter.py | 2 +- 4 files changed, 24 insertions(+), 43 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c8dd2596..48215087 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Get tag id: tag run: | @@ -29,7 +29,7 @@ jobs: runs-on: macos-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.7, 3.8, 3.9, "3.10"] steps: - uses: actions/checkout@v2 @@ -43,8 +43,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install and set up Poetry run: | - curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py - python get-poetry.py -y + curl -fsS https://install.python-poetry.org | python - --preview -y - name: Build distributions run: | source $HOME/.poetry/env @@ -59,7 +58,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python-version: [3.6, 3.7, 3.8] + python-version: [3.7, 3.8, 3.9, "3.10"] steps: - uses: actions/checkout@v2 @@ -74,8 +73,7 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install and setup Poetry run: | - Invoke-WebRequest https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py -O get-poetry.py - python get-poetry.py -y + (Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | python - --preview -y - name: Build distributions run: | $env:Path += ";$env:Userprofile\.poetry\bin" @@ -104,8 +102,7 @@ jobs: path: dist - name: Install and set up Poetry run: | - curl -fsS -o get-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/get-poetry.py - python get-poetry.py -y + curl -fsS https://install.python-poetry.org | python - --preview -y - name: Set up cache uses: actions/cache@v1 with: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f14fe11e..341859e8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,83 +13,64 @@ on: - '**' jobs: - Linting: - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.9 - uses: actions/setup-python@v1 - with: - python-version: 3.9 - - name: Linting - run: | - pip install pre-commit - pre-commit run --all-files - Tests: - needs: Linting name: ${{ matrix.os }} / ${{ matrix.python-version }} runs-on: ${{ matrix.os }}-latest strategy: matrix: os: [Ubuntu, MacOS, Windows] python-version: [3.7, 3.8, 3.9, "3.10"] + defaults: + run: + shell: bash + steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - name: Get full Python version id: full-python-version - shell: bash - run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") + run: | + echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))") - name: Install poetry - shell: bash run: | - curl -fsS -o install-poetry.py https://raw.githubusercontent.com/sdispater/poetry/master/install-poetry.py - python install-poetry.py --preview -y + curl -fsS https://install.python-poetry.org | python - --preview -y - name: Update PATH if: ${{ matrix.os != 'Windows' }} - shell: bash run: echo "$HOME/.local/bin" >> $GITHUB_PATH - name: Update Path for Windows if: ${{ matrix.os == 'Windows' }} - shell: bash run: echo "$APPDATA\Python\Scripts" >> $GITHUB_PATH - name: Configure poetry - shell: bash run: poetry config virtualenvs.in-project true - name: Set up cache - uses: actions/cache@v2 + uses: actions/cache@v3 id: cache with: path: .venv key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} - name: Ensure cache is healthy - if: steps.cache.outputs.cache-hit == 'true' - shell: bash - run: poetry run pip --version >/dev/null 2>&1 || rm -rf .venv + # MacOS does not come with `timeout` command out of the box + if: steps.cache.outputs.cache-hit == 'true' && matrix.os != 'MacOS' + run: timeout 10s poetry run pip --version || rm -rf .venv - name: Install dependencies - shell: bash - run: poetry install --only default --only test -vvv + run: poetry install --only main --only test -vvv - name: Test Pure Python - shell: bash run: | PENDULUM_EXTENSIONS=0 poetry run pytest -q tests - name: Test - shell: bash run: | poetry run pytest -q tests diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3df81e8a..a5aa938d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,3 +1,6 @@ +ci: + autofix_prs: false + repos: - repo: https://github.com/psf/black rev: 22.6.0 diff --git a/pendulum/formatting/formatter.py b/pendulum/formatting/formatter.py index c264644d..34d8b2e4 100644 --- a/pendulum/formatting/formatter.py +++ b/pendulum/formatting/formatter.py @@ -63,7 +63,7 @@ class Formatter: "Mo": None, "DDDo": None, "Do": lambda locale: tuple( - fr"\d+{o}" for o in locale.get("custom.ordinal").values() + rf"\d+{o}" for o in locale.get("custom.ordinal").values() ), "dddd": "days.wide", "ddd": "days.abbreviated", From 0ba5cc17644ec46eba1bfd54a5c1488d3479f6d7 Mon Sep 17 00:00:00 2001 From: Hugo van Kemenade Date: Thu, 4 Aug 2022 00:22:07 +0300 Subject: [PATCH 036/177] CI: Test on Python 3.9 and 3.10 (#574) * CI: Test on Python 3.9 and 3.10 * Update tests.yml * Update tox.ini Co-authored-by: Bartosz Sokorski --- .github/workflows/release.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 48215087..23c7add3 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: run: | make linux_release - name: Upload distributions artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: pendulum-dist path: dist/wheelhouse @@ -38,7 +38,7 @@ jobs: run: | echo ::set-output name=tag::${GITHUB_REF#refs/tags/} - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install and set up Poetry @@ -49,7 +49,7 @@ jobs: source $HOME/.poetry/env poetry build -vvv - name: Upload distribution artifacts - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: pendulum-dist path: dist @@ -68,7 +68,7 @@ jobs: run: | echo ::set-output name=tag::${GITHUB_REF#refs/tags/} - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v1 + uses: actions/setup-python@v2 with: python-version: ${{ matrix.python-version }} - name: Install and setup Poetry @@ -79,7 +79,7 @@ jobs: $env:Path += ";$env:Userprofile\.poetry\bin" poetry build -vvv - name: Upload distribution artifact - uses: actions/upload-artifact@v1 + uses: actions/upload-artifact@v2 with: name: pendulum-dist path: dist @@ -104,7 +104,7 @@ jobs: run: | curl -fsS https://install.python-poetry.org | python - --preview -y - name: Set up cache - uses: actions/cache@v1 + uses: actions/cache@v2 with: path: .venv key: venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }} From e014199a6be8ce4e086ac2612dab9bc9093dc6dc Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Thu, 4 Aug 2022 00:39:41 +0200 Subject: [PATCH 037/177] Modernize with pyupgrade and com2ann --- clock | 15 +- pendulum/__init__.py | 26 +-- pendulum/_extensions/helpers.py | 20 +-- pendulum/date.py | 4 +- pendulum/datetime.py | 184 ++++++++++---------- pendulum/duration.py | 8 +- pendulum/formatting/difference_formatter.py | 8 +- pendulum/formatting/formatter.py | 40 ++--- pendulum/helpers.py | 54 +++--- pendulum/locales/locale.py | 4 +- pendulum/parser.py | 4 +- pendulum/parsing/_iso8601.c | 2 +- pendulum/parsing/iso8601.py | 4 +- pendulum/period.py | 8 +- pendulum/time.py | 2 +- pendulum/tz/__init__.py | 2 +- pendulum/tz/local_timezone.py | 6 +- pendulum/tz/timezone.py | 14 +- tests/datetime/test_strings.py | 2 +- 19 files changed, 203 insertions(+), 204 deletions(-) diff --git a/clock b/clock index 2a89bc98..d549e21d 100755 --- a/clock +++ b/clock @@ -193,8 +193,8 @@ translations = {{}} else: v = repr(v) - s.append("{}{!r}: {},\n".format(" " * tab, k, v)) - s.append("%s}" % (" " * (tab - 1))) + s.append(f"{' ' * tab}{k!r}: {v},\n") + s.append(f'{" " * (tab - 1)}}}') return "".join(s) @@ -202,7 +202,7 @@ translations = {{}} to_py = _LambdaCompiler().compile result = ["lambda n: "] for tag, ast in PluralRule.parse(rule).abstract: - result.append("'{}' if {} else ".format(tag, to_py(ast))) + result.append(f"'{tag}' if {to_py(ast)} else ") result.append("'other'") return "".join(result) @@ -217,13 +217,13 @@ translations = {{}} limit = PATTERN_CHARS[fieldchar] if limit and fieldnum not in limit: raise ValueError( - "Invalid length for field: %r" % (fieldchar * fieldnum) + f"Invalid length for field: {(fieldchar * fieldnum)!r}" ) result.append( self.TOKENS_MAP.get(fieldchar * fieldnum, fieldchar * fieldnum) ) else: - raise NotImplementedError("Unknown token type: %s" % tok_type) + raise NotImplementedError(f"Unknown token type: {tok_type}") return "".join(result) @@ -258,11 +258,10 @@ class WindowsTzDump(Command): for name in sorted_names: tznames[name] = raw_tznames[name] - mapping = json.dumps(tznames, indent=4) - mapping = "windows_timezones = " + mapping.replace('"', "'") + "\n" + mapping = json.dumps(tznames, indent=4).replace('"', "'") with open(os.path.join(self.MAPPING_DIR, "windows.py"), "w") as f: - f.write(mapping) + f.write(f"windows_timezones = {mapping}\n") app = Application("clock", __version__) diff --git a/pendulum/__init__.py b/pendulum/__init__.py index cad1fdaa..6916ec3e 100644 --- a/pendulum/__init__.py +++ b/pendulum/__init__.py @@ -53,7 +53,7 @@ from .tz.timezone import Timezone -_TEST_NOW = None # type: Optional[DateTime] +_TEST_NOW: DateTime | None = None _LOCALE = "en" _WEEK_STARTS_AT = MONDAY _WEEK_ENDS_AT = SUNDAY @@ -62,7 +62,7 @@ def _safe_timezone( - obj: Optional[Union[str, float, _datetime.tzinfo, Timezone]] + obj: str | float | _datetime.tzinfo | Timezone | None ) -> Timezone: """ Creates a timezone instance @@ -102,8 +102,8 @@ def datetime( minute: int = 0, second: int = 0, microsecond: int = 0, - tz: Optional[Union[str, float, Timezone]] = UTC, - fold: Optional[int] = 1, + tz: str | float | Timezone | None = UTC, + fold: int | None = 1, raise_on_unknown_times: bool = False, ) -> DateTime: """ @@ -148,7 +148,7 @@ def naive( minute: int = 0, second: int = 0, microsecond: int = 0, - fold: Optional[int] = 1, + fold: int | None = 1, ) -> DateTime: """ Return a naive DateTime. @@ -171,7 +171,7 @@ def time(hour: int, minute: int = 0, second: int = 0, microsecond: int = 0) -> T def instance( - dt: _datetime.datetime, tz: Optional[Union[str, Timezone]] = UTC + dt: _datetime.datetime, tz: str | Timezone | None = UTC ) -> DateTime: """ Create a DateTime instance from a datetime one. @@ -200,28 +200,28 @@ def instance( ) -def now(tz: Optional[Union[str, Timezone]] = None) -> DateTime: +def now(tz: str | Timezone | None = None) -> DateTime: """ Get a DateTime instance for the current date and time. """ return DateTime.now(tz) -def today(tz: Union[str, Timezone] = "local") -> DateTime: +def today(tz: str | Timezone = "local") -> DateTime: """ Create a DateTime instance for today. """ return now(tz).start_of("day") -def tomorrow(tz: Union[str, Timezone] = "local") -> DateTime: +def tomorrow(tz: str | Timezone = "local") -> DateTime: """ Create a DateTime instance for today. """ return today(tz).add(days=1) -def yesterday(tz: Union[str, Timezone] = "local") -> DateTime: +def yesterday(tz: str | Timezone = "local") -> DateTime: """ Create a DateTime instance for today. """ @@ -231,8 +231,8 @@ def yesterday(tz: Union[str, Timezone] = "local") -> DateTime: def from_format( string: str, fmt: str, - tz: Union[str, Timezone] = UTC, - locale: Optional[str] = None, # noqa + tz: str | Timezone = UTC, + locale: str | None = None, # noqa ) -> DateTime: """ Creates a DateTime instance from a specific format. @@ -245,7 +245,7 @@ def from_format( def from_timestamp( - timestamp: Union[int, float], tz: Union[str, Timezone] = UTC + timestamp: int | float, tz: str | Timezone = UTC ) -> DateTime: """ Create a DateTime instance from a timestamp. diff --git a/pendulum/_extensions/helpers.py b/pendulum/_extensions/helpers.py index f8a9ce7a..8d493263 100644 --- a/pendulum/_extensions/helpers.py +++ b/pendulum/_extensions/helpers.py @@ -49,18 +49,18 @@ def __repr__(self): ) -def is_leap(year): # type: (int) -> bool +def is_leap(year: int) -> bool: return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) -def is_long_year(year): # type: (int) -> bool +def is_long_year(year: int) -> bool: def p(y): return y + y // 4 - y // 100 + y // 400 return p(year) % 7 == 4 or p(year - 1) % 7 == 3 -def week_day(year, month, day): # type: (int, int, int) -> int +def week_day(year: int, month: int, day: int) -> int: if month < 3: year -= 1 @@ -79,14 +79,14 @@ def week_day(year, month, day): # type: (int, int, int) -> int return w -def days_in_year(year): # type: (int) -> int +def days_in_year(year: int) -> int: if is_leap(year): return DAYS_PER_L_YEAR return DAYS_PER_N_YEAR -def timestamp(dt): # type: (datetime.datetime) -> int +def timestamp(dt: datetime.datetime) -> int: year = dt.year result = (year - 1970) * 365 + MONTHS_OFFSETS[0][dt.month] @@ -109,8 +109,8 @@ def timestamp(dt): # type: (datetime.datetime) -> int def local_time( - unix_time, utc_offset, microseconds -): # type: (int, int, int) -> typing.Tuple[int, int, int, int, int, int, int] + unix_time: int, utc_offset: int, microseconds: int +) -> tuple[int, int, int, int, int, int, int]: """ Returns a UNIX time as a broken down time for a particular transition type. @@ -186,8 +186,8 @@ def local_time( def precise_diff( - d1, d2 -): # type: (typing.Union[datetime.datetime, datetime.date], typing.Union[datetime.datetime, datetime.date]) -> PreciseDiff + d1: datetime.datetime | datetime.date, d2: datetime.datetime | datetime.date +) -> PreciseDiff: """ Calculate a precise difference between two datetimes. @@ -351,7 +351,7 @@ def precise_diff( ) -def _day_number(year, month, day): # type: (int, int, int) -> int +def _day_number(year: int, month: int, day: int) -> int: month = (month + 9) % 12 year = year - month // 10 diff --git a/pendulum/date.py b/pendulum/date.py index c62a2f80..1d2e6ce9 100644 --- a/pendulum/date.py +++ b/pendulum/date.py @@ -419,9 +419,9 @@ def end_of(self, unit): :rtype: Date """ if unit not in self._MODIFIERS_VALID_UNITS: - raise ValueError('Invalid unit "%s" for end_of()' % unit) + raise ValueError(f'Invalid unit "{unit}" for end_of()') - return getattr(self, "_end_of_%s" % unit)() + return getattr(self, f"_end_of_{unit}")() def _start_of_day(self): """ diff --git a/pendulum/datetime.py b/pendulum/datetime.py index eddf5165..af0d00c8 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -45,11 +45,11 @@ class DateTime(datetime.datetime, Date): - EPOCH: Optional["DateTime"] = None + EPOCH: DateTime | None = None # Formats - _FORMATS: Dict[str, Union[str, Callable]] = { + _FORMATS: dict[str, str | Callable] = { "atom": ATOM, "cookie": COOKIE, "iso8601": lambda dt: dt.isoformat(), @@ -65,7 +65,7 @@ class DateTime(datetime.datetime, Date): _EPOCH: datetime.datetime = datetime.datetime(1970, 1, 1, tzinfo=UTC) - _MODIFIERS_VALID_UNITS: List[str] = [ + _MODIFIERS_VALID_UNITS: list[str] = [ "second", "minute", "hour", @@ -87,10 +87,10 @@ def create( minute: int = 0, second: int = 0, microsecond: int = 0, - tz: Optional[Union[str, float, Timezone]] = UTC, - fold: Optional[int] = 1, + tz: str | float | Timezone | None = UTC, + fold: int | None = 1, raise_on_unknown_times: bool = False, - ) -> "DateTime": + ) -> DateTime: """ Creates a new DateTime instance from a specific date and time. """ @@ -117,7 +117,7 @@ def create( ) @classmethod - def now(cls, tz: Optional[Union[str, Timezone]] = None) -> "DateTime": + def now(cls, tz: str | Timezone | None = None) -> DateTime: """ Get a DateTime instance for the current date and time. """ @@ -152,18 +152,18 @@ def now(cls, tz: Optional[Union[str, Timezone]] = None) -> "DateTime": ) @classmethod - def utcnow(cls) -> "DateTime": + def utcnow(cls) -> DateTime: """ Get a DateTime instance for the current date and time in UTC. """ return pendulum.now(UTC) @classmethod - def today(cls) -> "DateTime": + def today(cls) -> DateTime: return pendulum.now() @classmethod - def strptime(cls, time: str, fmt: str) -> "DateTime": + def strptime(cls, time: str, fmt: str) -> DateTime: return pendulum.instance(datetime.datetime.strptime(time, fmt)) # Getters/Setters @@ -233,18 +233,18 @@ def offset_hours(self) -> int: return self.get_offset() / SECONDS_PER_MINUTE / MINUTES_PER_HOUR @property - def timezone(self) -> Optional[Timezone]: + def timezone(self) -> Timezone | None: if not isinstance(self.tzinfo, (Timezone, FixedTimezone)): return return self.tzinfo @property - def tz(self) -> Optional[Timezone]: + def tz(self) -> Timezone | None: return self.timezone @property - def timezone_name(self) -> Optional[str]: + def timezone_name(self) -> str | None: tz = self.timezone if tz is None: @@ -274,7 +274,7 @@ def date(self) -> Date: def time(self) -> Time: return Time(self.hour, self.minute, self.second, self.microsecond) - def naive(self) -> "DateTime": + def naive(self) -> DateTime: """ Return the DateTime without timezone information. """ @@ -288,7 +288,7 @@ def naive(self) -> "DateTime": self.microsecond, ) - def on(self, year: int, month: int, day: int) -> "DateTime": + def on(self, year: int, month: int, day: int) -> DateTime: """ Returns a new instance with the current date set to a different date. """ @@ -296,7 +296,7 @@ def on(self, year: int, month: int, day: int) -> "DateTime": def at( self, hour: int, minute: int = 0, second: int = 0, microsecond: int = 0 - ) -> "DateTime": + ) -> DateTime: """ Returns a new instance with the current time to a different time. """ @@ -304,7 +304,7 @@ def at( hour=hour, minute=minute, second=second, microsecond=microsecond ) - def in_timezone(self, tz: Union[str, Timezone]) -> "DateTime": + def in_timezone(self, tz: str | Timezone) -> DateTime: """ Set the instance's timezone from a string or object. """ @@ -316,7 +316,7 @@ def in_timezone(self, tz: Union[str, Timezone]) -> "DateTime": return tz.convert(dt) - def in_tz(self, tz: Union[str, Timezone]) -> "DateTime": + def in_tz(self, tz: str | Timezone) -> DateTime: """ Set the instance's timezone from a string or object. """ @@ -413,7 +413,7 @@ def to_w3c_string(self) -> str: """ return self._to_string("w3c") - def _to_string(self, fmt: str, locale: Optional[str] = None) -> str: + def _to_string(self, fmt: str, locale: str | None = None) -> str: """ Format the instance to a common string format. """ @@ -456,7 +456,7 @@ def __repr__(self) -> str: # Comparisons def closest( self, dt1: datetime.datetime, dt2: datetime.datetime, *dts: datetime.datetime - ) -> "DateTime": + ) -> DateTime: """ Get the farthest date from the instance. """ @@ -469,7 +469,7 @@ def closest( def farthest( self, dt1: datetime.datetime, dt2: datetime.datetime, *dts: datetime.datetime - ) -> "DateTime": + ) -> DateTime: """ Get the farthest date from the instance. """ @@ -513,7 +513,7 @@ def is_same_day(self, dt: datetime.datetime) -> bool: return self.to_date_string() == dt.to_date_string() - def is_anniversary(self, dt: Optional[datetime.datetime] = None) -> bool: + def is_anniversary(self, dt: datetime.datetime | None = None) -> bool: """ Check if its the anniversary. Compares the date/month values of the two dates. @@ -537,7 +537,7 @@ def add( minutes: int = 0, seconds: int = 0, microseconds: int = 0, - ) -> "DateTime": + ) -> DateTime: """ Add a duration to the instance. @@ -620,7 +620,7 @@ def subtract( minutes: int = 0, seconds: int = 0, microseconds: int = 0, - ) -> "DateTime": + ) -> DateTime: """ Remove duration from the instance. """ @@ -638,7 +638,7 @@ def subtract( # Adding a final underscore to the method name # to avoid errors for PyPy which already defines # a _add_timedelta method - def _add_timedelta_(self, delta: datetime.timedelta) -> "DateTime": + def _add_timedelta_(self, delta: datetime.timedelta) -> DateTime: """ Add timedelta duration to the instance. """ @@ -660,7 +660,7 @@ def _add_timedelta_(self, delta: datetime.timedelta) -> "DateTime": return self.add(seconds=delta.total_seconds()) - def _subtract_timedelta(self, delta: datetime.timedelta) -> "DateTime": + def _subtract_timedelta(self, delta: datetime.timedelta) -> DateTime: """ Remove timedelta duration from the instance. """ @@ -673,7 +673,7 @@ def _subtract_timedelta(self, delta: datetime.timedelta) -> "DateTime": # DIFFERENCES - def diff(self, dt: Optional["DateTime"] = None, abs: bool = True) -> Period: + def diff(self, dt: DateTime | None = None, abs: bool = True) -> Period: """ Returns the difference between two DateTime objects represented as a Period. """ @@ -684,9 +684,9 @@ def diff(self, dt: Optional["DateTime"] = None, abs: bool = True) -> Period: def diff_for_humans( self, - other: Optional["DateTime"] = None, + other: DateTime | None = None, absolute: bool = False, - locale: Optional[str] = None, + locale: str | None = None, ) -> str: """ Get the difference in a human readable format in the current locale. @@ -717,7 +717,7 @@ def diff_for_humans( return pendulum.format_diff(diff, is_now, absolute, locale) # Modifiers - def start_of(self, unit: str) -> "DateTime": + def start_of(self, unit: str) -> DateTime: """ Returns a copy of the instance with the time reset with the following rules: @@ -737,7 +737,7 @@ def start_of(self, unit: str) -> "DateTime": return getattr(self, f"_start_of_{unit}")() - def end_of(self, unit: str) -> "DateTime": + def end_of(self, unit: str) -> DateTime: """ Returns a copy of the instance with the time reset with the following rules: @@ -753,85 +753,85 @@ def end_of(self, unit: str) -> "DateTime": * century: date to last day of century and time to 23:59:59.999999 """ if unit not in self._MODIFIERS_VALID_UNITS: - raise ValueError('Invalid unit "%s" for end_of()' % unit) + raise ValueError(f'Invalid unit "{unit}" for end_of()') - return getattr(self, "_end_of_%s" % unit)() + return getattr(self, f"_end_of_{unit}")() - def _start_of_second(self) -> "DateTime": + def _start_of_second(self) -> DateTime: """ Reset microseconds to 0. """ return self.set(microsecond=0) - def _end_of_second(self) -> "DateTime": + def _end_of_second(self) -> DateTime: """ Set microseconds to 999999. """ return self.set(microsecond=999999) - def _start_of_minute(self) -> "DateTime": + def _start_of_minute(self) -> DateTime: """ Reset seconds and microseconds to 0. """ return self.set(second=0, microsecond=0) - def _end_of_minute(self) -> "DateTime": + def _end_of_minute(self) -> DateTime: """ Set seconds to 59 and microseconds to 999999. """ return self.set(second=59, microsecond=999999) - def _start_of_hour(self) -> "DateTime": + def _start_of_hour(self) -> DateTime: """ Reset minutes, seconds and microseconds to 0. """ return self.set(minute=0, second=0, microsecond=0) - def _end_of_hour(self) -> "DateTime": + def _end_of_hour(self) -> DateTime: """ Set minutes and seconds to 59 and microseconds to 999999. """ return self.set(minute=59, second=59, microsecond=999999) - def _start_of_day(self) -> "DateTime": + def _start_of_day(self) -> DateTime: """ Reset the time to 00:00:00. """ return self.at(0, 0, 0, 0) - def _end_of_day(self) -> "DateTime": + def _end_of_day(self) -> DateTime: """ Reset the time to 23:59:59.999999. """ return self.at(23, 59, 59, 999999) - def _start_of_month(self) -> "DateTime": + def _start_of_month(self) -> DateTime: """ Reset the date to the first day of the month and the time to 00:00:00. """ return self.set(self.year, self.month, 1, 0, 0, 0, 0) - def _end_of_month(self) -> "DateTime": + def _end_of_month(self) -> DateTime: """ Reset the date to the last day of the month and the time to 23:59:59.999999. """ return self.set(self.year, self.month, self.days_in_month, 23, 59, 59, 999999) - def _start_of_year(self) -> "DateTime": + def _start_of_year(self) -> DateTime: """ Reset the date to the first day of the year and the time to 00:00:00. """ return self.set(self.year, 1, 1, 0, 0, 0, 0) - def _end_of_year(self) -> "DateTime": + def _end_of_year(self) -> DateTime: """ Reset the date to the last day of the year and the time to 23:59:59.999999. """ return self.set(self.year, 12, 31, 23, 59, 59, 999999) - def _start_of_decade(self) -> "DateTime": + def _start_of_decade(self) -> DateTime: """ Reset the date to the first day of the decade and the time to 00:00:00. @@ -839,7 +839,7 @@ def _start_of_decade(self) -> "DateTime": year = self.year - self.year % YEARS_PER_DECADE return self.set(year, 1, 1, 0, 0, 0, 0) - def _end_of_decade(self) -> "DateTime": + def _end_of_decade(self) -> DateTime: """ Reset the date to the last day of the decade and the time to 23:59:59.999999. @@ -848,7 +848,7 @@ def _end_of_decade(self) -> "DateTime": return self.set(year, 12, 31, 23, 59, 59, 999999) - def _start_of_century(self) -> "DateTime": + def _start_of_century(self) -> DateTime: """ Reset the date to the first day of the century and the time to 00:00:00. @@ -857,7 +857,7 @@ def _start_of_century(self) -> "DateTime": return self.set(year, 1, 1, 0, 0, 0, 0) - def _end_of_century(self) -> "DateTime": + def _end_of_century(self) -> DateTime: """ Reset the date to the last day of the century and the time to 23:59:59.999999. @@ -866,7 +866,7 @@ def _end_of_century(self) -> "DateTime": return self.set(year, 12, 31, 23, 59, 59, 999999) - def _start_of_week(self) -> "DateTime": + def _start_of_week(self) -> DateTime: """ Reset the date to the first day of the week and the time to 00:00:00. @@ -878,7 +878,7 @@ def _start_of_week(self) -> "DateTime": return dt.start_of("day") - def _end_of_week(self) -> "DateTime": + def _end_of_week(self) -> DateTime: """ Reset the date to the last day of the week and the time to 23:59:59. @@ -891,8 +891,8 @@ def _end_of_week(self) -> "DateTime": return dt.end_of("day") def next( - self, day_of_week: Optional[int] = None, keep_time: bool = False - ) -> "DateTime": + self, day_of_week: int | None = None, keep_time: bool = False + ) -> DateTime: """ Modify to the next occurrence of a given day of the week. If no day_of_week is provided, modify to the next occurrence @@ -917,8 +917,8 @@ def next( return dt def previous( - self, day_of_week: Optional[int] = None, keep_time: bool = False - ) -> "DateTime": + self, day_of_week: int | None = None, keep_time: bool = False + ) -> DateTime: """ Modify to the previous occurrence of a given day of the week. If no day_of_week is provided, modify to the previous occurrence @@ -942,7 +942,7 @@ def previous( return dt - def first_of(self, unit: str, day_of_week: Optional[int] = None) -> "DateTime": + def first_of(self, unit: str, day_of_week: int | None = None) -> DateTime: """ Returns an instance set to the first occurrence of a given day of the week in the current unit. @@ -956,7 +956,7 @@ def first_of(self, unit: str, day_of_week: Optional[int] = None) -> "DateTime": return getattr(self, f"_first_of_{unit}")(day_of_week) - def last_of(self, unit: str, day_of_week: Optional[int] = None) -> "DateTime": + def last_of(self, unit: str, day_of_week: int | None = None) -> DateTime: """ Returns an instance set to the last occurrence of a given day of the week in the current unit. @@ -970,7 +970,7 @@ def last_of(self, unit: str, day_of_week: Optional[int] = None) -> "DateTime": return getattr(self, f"_last_of_{unit}")(day_of_week) - def nth_of(self, unit: str, nth: int, day_of_week: int) -> "DateTime": + def nth_of(self, unit: str, nth: int, day_of_week: int) -> DateTime: """ Returns a new instance set to the given occurrence of a given day of the week in the current unit. @@ -993,7 +993,7 @@ def nth_of(self, unit: str, nth: int, day_of_week: int) -> "DateTime": return dt - def _first_of_month(self, day_of_week: Optional[int] = None) -> "DateTime": + def _first_of_month(self, day_of_week: int | None = None) -> DateTime: """ Modify to the first occurrence of a given day of the week in the current month. If no day_of_week is provided, @@ -1016,7 +1016,7 @@ def _first_of_month(self, day_of_week: Optional[int] = None) -> "DateTime": return dt.set(day=day_of_month) - def _last_of_month(self, day_of_week: Optional[int] = None) -> "DateTime": + def _last_of_month(self, day_of_week: int | None = None) -> DateTime: """ Modify to the last occurrence of a given day of the week in the current month. If no day_of_week is provided, @@ -1039,7 +1039,7 @@ def _last_of_month(self, day_of_week: Optional[int] = None) -> "DateTime": return dt.set(day=day_of_month) - def _nth_of_month(self, nth: int, day_of_week: Optional[int] = None) -> "DateTime": + def _nth_of_month(self, nth: int, day_of_week: int | None = None) -> DateTime: """ Modify to the given occurrence of a given day of the week in the current month. If the calculated occurrence is outside, @@ -1060,7 +1060,7 @@ def _nth_of_month(self, nth: int, day_of_week: Optional[int] = None) -> "DateTim return False - def _first_of_quarter(self, day_of_week: Optional[int] = None) -> "DateTime": + def _first_of_quarter(self, day_of_week: int | None = None) -> DateTime: """ Modify to the first occurrence of a given day of the week in the current quarter. If no day_of_week is provided, @@ -1071,7 +1071,7 @@ def _first_of_quarter(self, day_of_week: Optional[int] = None) -> "DateTime": "month", day_of_week ) - def _last_of_quarter(self, day_of_week: Optional[int] = None) -> "DateTime": + def _last_of_quarter(self, day_of_week: int | None = None) -> DateTime: """ Modify to the last occurrence of a given day of the week in the current quarter. If no day_of_week is provided, @@ -1081,8 +1081,8 @@ def _last_of_quarter(self, day_of_week: Optional[int] = None) -> "DateTime": return self.on(self.year, self.quarter * 3, 1).last_of("month", day_of_week) def _nth_of_quarter( - self, nth: int, day_of_week: Optional[int] = None - ) -> "DateTime": + self, nth: int, day_of_week: int | None = None + ) -> DateTime: """ Modify to the given occurrence of a given day of the week in the current quarter. If the calculated occurrence is outside, @@ -1111,7 +1111,7 @@ def _nth_of_quarter( return self.on(self.year, dt.month, dt.day).start_of("day") - def _first_of_year(self, day_of_week: Optional[int] = None) -> "DateTime": + def _first_of_year(self, day_of_week: int | None = None) -> DateTime: """ Modify to the first occurrence of a given day of the week in the current year. If no day_of_week is provided, @@ -1120,7 +1120,7 @@ def _first_of_year(self, day_of_week: Optional[int] = None) -> "DateTime": """ return self.set(month=1).first_of("month", day_of_week) - def _last_of_year(self, day_of_week: Optional[int] = None) -> "DateTime": + def _last_of_year(self, day_of_week: int | None = None) -> DateTime: """ Modify to the last occurrence of a given day of the week in the current year. If no day_of_week is provided, @@ -1129,7 +1129,7 @@ def _last_of_year(self, day_of_week: Optional[int] = None) -> "DateTime": """ return self.set(month=MONTHS_PER_YEAR).last_of("month", day_of_week) - def _nth_of_year(self, nth: int, day_of_week: Optional[int] = None) -> "DateTime": + def _nth_of_year(self, nth: int, day_of_week: int | None = None) -> DateTime: """ Modify to the given occurrence of a given day of the week in the current year. If the calculated occurrence is outside, @@ -1150,7 +1150,7 @@ def _nth_of_year(self, nth: int, day_of_week: Optional[int] = None) -> "DateTime return self.on(self.year, dt.month, dt.day).start_of("day") - def average(self, dt: Optional[datetime.datetime] = None) -> "DateTime": + def average(self, dt: datetime.datetime | None = None) -> DateTime: """ Modify the current instance to the average of a given instance (default now) and the current instance. @@ -1168,8 +1168,8 @@ def average(self, dt: Optional[datetime.datetime] = None) -> "DateTime": ) def __sub__( - self, other: Union[datetime.datetime, datetime.timedelta] - ) -> Union["DateTime", Period]: + self, other: datetime.datetime | datetime.timedelta + ) -> DateTime | Period: if isinstance(other, datetime.timedelta): return self._subtract_timedelta(other) @@ -1212,7 +1212,7 @@ def __rsub__(self, other: datetime.datetime) -> Period: return self.diff(other, False) - def __add__(self, other: datetime.timedelta) -> "DateTime": + def __add__(self, other: datetime.timedelta) -> DateTime: if not isinstance(other, datetime.timedelta): return NotImplemented @@ -1228,30 +1228,30 @@ def __add__(self, other: datetime.timedelta) -> "DateTime": return self._add_timedelta_(other) - def __radd__(self, other: datetime.timedelta) -> "DateTime": + def __radd__(self, other: datetime.timedelta) -> DateTime: return self.__add__(other) # Native methods override @classmethod def fromtimestamp( - cls, t: float, tz: Optional[datetime.tzinfo] = None - ) -> "DateTime": + cls, t: float, tz: datetime.tzinfo | None = None + ) -> DateTime: return pendulum.instance(datetime.datetime.fromtimestamp(t, tz=tz), tz=tz) @classmethod - def utcfromtimestamp(cls, t: float) -> "DateTime": + def utcfromtimestamp(cls, t: float) -> DateTime: return pendulum.instance(datetime.datetime.utcfromtimestamp(t), tz=None) @classmethod - def fromordinal(cls, n) -> "DateTime": + def fromordinal(cls, n) -> DateTime: return pendulum.instance(datetime.datetime.fromordinal(n), tz=None) @classmethod - def combine(cls, date: datetime.date, time: datetime.time) -> "DateTime": + def combine(cls, date: datetime.date, time: datetime.time) -> DateTime: return pendulum.instance(datetime.datetime.combine(date, time), tz=None) - def astimezone(self, tz: Optional[datetime.tzinfo] = None) -> "DateTime": + def astimezone(self, tz: datetime.tzinfo | None = None) -> DateTime: dt = super().astimezone(tz) return self.__class__( @@ -1268,15 +1268,15 @@ def astimezone(self, tz: Optional[datetime.tzinfo] = None) -> "DateTime": def replace( self, - year: Optional[int] = None, - month: Optional[int] = None, - day: Optional[int] = None, - hour: Optional[int] = None, - minute: Optional[int] = None, - second: Optional[int] = None, - microsecond: Optional[int] = None, - tzinfo: Optional[Union[bool, datetime.tzinfo]] = True, - fold: Optional[int] = None, + year: int | None = None, + month: int | None = None, + day: int | None = None, + hour: int | None = None, + minute: int | None = None, + second: int | None = None, + microsecond: int | None = None, + tzinfo: bool | datetime.tzinfo | None = True, + fold: int | None = None, ): if year is None: year = self.year @@ -1301,10 +1301,10 @@ def replace( year, month, day, hour, minute, second, microsecond, tz=tzinfo, fold=fold ) - def __getnewargs__(self) -> Tuple: + def __getnewargs__(self) -> tuple: return (self,) - def _getstate(self, protocol: int = 3) -> Tuple: + def _getstate(self, protocol: int = 3) -> tuple: return ( self.year, self.month, @@ -1316,10 +1316,10 @@ def _getstate(self, protocol: int = 3) -> Tuple: self.tzinfo, ) - def __reduce__(self) -> Tuple: + def __reduce__(self) -> tuple: return self.__reduce_ex__(2) - def __reduce_ex__(self, protocol: int) -> Tuple: + def __reduce_ex__(self, protocol: int) -> tuple: return self.__class__, self._getstate(protocol) def _cmp(self, other: datetime.datetime, **kwargs) -> int: diff --git a/pendulum/duration.py b/pendulum/duration.py index 9fde234c..411b2e9e 100644 --- a/pendulum/duration.py +++ b/pendulum/duration.py @@ -245,16 +245,16 @@ def in_words(self, locale=None, separator=" "): unit, count = period if abs(count) > 0: translation = locale.translation( - "units.{}.{}".format(unit, locale.plural(abs(count))) + f"units.{unit}.{locale.plural(abs(count))}" ) parts.append(translation.format(count)) if not parts: if abs(self.microseconds) > 0: - unit = "units.second.{}".format(locale.plural(1)) - count = "{:.2f}".format(abs(self.microseconds) / 1e6) + unit = f"units.second.{locale.plural(1)}" + count = f"{abs(self.microseconds) / 1e6:.2f}" else: - unit = "units.microsecond.{}".format(locale.plural(0)) + unit = f"units.microsecond.{locale.plural(0)}" count = 0 translation = locale.translation(unit) parts.append(translation.format(count)) diff --git a/pendulum/formatting/difference_formatter.py b/pendulum/formatting/difference_formatter.py index f5a92984..f6dfe4a8 100644 --- a/pendulum/formatting/difference_formatter.py +++ b/pendulum/formatting/difference_formatter.py @@ -16,8 +16,8 @@ def __init__(self, locale="en"): self._locale = Locale.load(locale) def format( - self, diff, is_now=True, absolute=False, locale=None - ): # type: (pendulum.Period, bool, bool, typing.Optional[str]) -> str + self, diff: pendulum.Period, is_now: bool = True, absolute: bool = False, locale: str | None = None + ) -> str: """ Formats a difference. @@ -135,7 +135,7 @@ def format( if not trans: # No special rule time = locale.get( - "translations.units.{}.{}".format(unit, locale.plural(count)) + f"translations.units.{unit}.{locale.plural(count)}" ).format(count) else: time = trans[locale.plural(count)].format(count) @@ -148,6 +148,6 @@ def format( return locale.get(key).format(time) - key += ".{}".format(locale.plural(count)) + key += f".{locale.plural(count)}" return locale.get(key).format(count) diff --git a/pendulum/formatting/formatter.py b/pendulum/formatting/formatter.py index 65523770..1798772d 100644 --- a/pendulum/formatting/formatter.py +++ b/pendulum/formatting/formatter.py @@ -228,8 +228,8 @@ class Formatter: } def format( - self, dt, fmt, locale=None - ): # type: (pendulum.DateTime, str, typing.Optional[typing.Union[str, Locale]]) -> str + self, dt: pendulum.DateTime, fmt: str, locale: str | Locale | None = None + ) -> str: """ Formats a DateTime instance with a given format and locale. @@ -261,8 +261,8 @@ def format( return result def _format_token( - self, dt, token, locale - ): # type: (pendulum.DateTime, str, Locale) -> str + self, dt: pendulum.DateTime, token: str, locale: Locale + ) -> str: """ Formats a DateTime instance with a given token and locale. @@ -309,8 +309,8 @@ def _format_token( return f"{sign}{hour:02d}{separator}{minute:02d}" def _format_localizable_token( - self, dt, token, locale - ): # type: (pendulum.DateTime, str, Locale) -> str + self, dt: pendulum.DateTime, token: str, locale: Locale + ) -> str: """ Formats a DateTime instance with a given localizable token and locale. @@ -361,11 +361,11 @@ def _format_localizable_token( def parse( self, - time, # type: str - fmt, # type: str - now, # type: pendulum.DateTime - locale=None, # type: typing.Optional[str] - ): # type: (...) -> typing.Dict[str, typing.Any] + time: str, + fmt: str, + now: pendulum.DateTime, + locale: str | None = None, + ) -> dict[str, typing.Any]: """ Parses a time string matching a given format as a tuple. @@ -415,8 +415,8 @@ def parse( return self._check_parsed(parsed, now) def _check_parsed( - self, parsed, now - ): # type: (typing.Dict[str, typing.Any], pendulum.DateTime) -> typing.Dict[str, typing.Any] + self, parsed: dict[str, typing.Any], now: pendulum.DateTime + ) -> dict[str, typing.Any]: """ Checks validity of parsed elements. @@ -537,8 +537,8 @@ def _check_parsed( return validated def _get_parsed_values( - self, m, parsed, locale, now - ): # type: (typing.Match[str], typing.Dict[str, typing.Any], Locale, pendulum.DateTime) -> None + self, m: typing.Match[str], parsed: dict[str, typing.Any], locale: Locale, now: pendulum.DateTime + ) -> None: for token, index in m.re.groupindex.items(): if token in self._LOCALIZABLE_TOKENS: self._get_parsed_locale_value(token, m.group(index), parsed, locale) @@ -546,8 +546,8 @@ def _get_parsed_values( self._get_parsed_value(token, m.group(index), parsed, now) def _get_parsed_value( - self, token, value, parsed, now - ): # type: (str, str, typing.Dict[str, typing.Any], pendulum.DateTime) -> None + self, token: str, value: str, parsed: dict[str, typing.Any], now: pendulum.DateTime + ) -> None: parsed_token = self._PARSE_TOKENS[token](value) if "Y" in token: @@ -606,8 +606,8 @@ def _get_parsed_value( parsed["tz"] = pendulum.timezone(value) def _get_parsed_locale_value( - self, token, value, parsed, locale - ): # type: (str, str, typing.Dict[str, typing.Any], Locale) -> None + self, token: str, value: str, parsed: dict[str, typing.Any], locale: Locale + ) -> None: if token == "MMMM": unit = "month" match = "months.wide" @@ -650,7 +650,7 @@ def _get_parsed_locale_value( if value is None: raise ValueError("Invalid date") - def _replace_tokens(self, token, locale): # type: (str, Locale) -> str + def _replace_tokens(self, token: str, locale: Locale) -> str: if token.startswith("[") and token.endswith("]"): return token[1:-1] elif token.startswith("\\"): diff --git a/pendulum/helpers.py b/pendulum/helpers.py index 0e85f548..4806393c 100644 --- a/pendulum/helpers.py +++ b/pendulum/helpers.py @@ -56,27 +56,27 @@ @overload def add_duration( - dt, # type: _DT - years=0, # type: int - months=0, # type: int - weeks=0, # type: int - days=0, # type: int - hours=0, # type: int - minutes=0, # type: int - seconds=0, # type: int - microseconds=0, # type: int -): # type: (...) -> _DT + dt: _DT, + years: int = 0, + months: int = 0, + weeks: int = 0, + days: int = 0, + hours: int = 0, + minutes: int = 0, + seconds: int = 0, + microseconds: int = 0, +) -> _DT: pass @overload def add_duration( - dt, # type: _D - years=0, # type: int - months=0, # type: int - weeks=0, # type: int - days=0, # type: int -): # type: (...) -> _D + dt: _D, + years: int = 0, + months: int = 0, + weeks: int = 0, + days: int = 0, +) -> _D: pass @@ -160,8 +160,8 @@ def add_duration( def format_diff( - diff, is_now=True, absolute=False, locale=None -): # type: (Period, bool, bool, Optional[str]) -> str + diff: Period, is_now: bool = True, absolute: bool = False, locale: str | None = None +) -> str: if locale is None: locale = get_locale() @@ -176,7 +176,7 @@ def _sign(x): @contextmanager -def test(mock): # type: (pendulum.DateTime) -> Iterator[None] +def test(mock: pendulum.DateTime) -> Iterator[None]: set_test_now(mock) try: yield @@ -184,40 +184,40 @@ def test(mock): # type: (pendulum.DateTime) -> Iterator[None] set_test_now() -def set_test_now(test_now=None): # type: (Optional[pendulum.DateTime]) -> None +def set_test_now(test_now: pendulum.DateTime | None = None) -> None: pendulum._TEST_NOW = test_now -def get_test_now(): # type: () -> Optional[pendulum.DateTime] +def get_test_now() -> pendulum.DateTime | None: return pendulum._TEST_NOW -def has_test_now(): # type: () -> bool +def has_test_now() -> bool: return pendulum._TEST_NOW is not None -def locale(name): # type: (str) -> Locale +def locale(name: str) -> Locale: return Locale.load(name) -def set_locale(name): # type: (str) -> None +def set_locale(name: str) -> None: locale(name) pendulum._LOCALE = name -def get_locale(): # type: () -> str +def get_locale() -> str: return pendulum._LOCALE -def week_starts_at(wday): # type: (int) -> None +def week_starts_at(wday: int) -> None: if wday < pendulum.SUNDAY or wday > pendulum.SATURDAY: raise ValueError("Invalid week day as start of week.") pendulum._WEEK_STARTS_AT = wday -def week_ends_at(wday): # type: (int) -> None +def week_ends_at(wday: int) -> None: if wday < pendulum.SUNDAY or wday > pendulum.SATURDAY: raise ValueError("Invalid week day as start of week.") diff --git a/pendulum/locales/locale.py b/pendulum/locales/locale.py index 5569725f..c890a461 100644 --- a/pendulum/locales/locale.py +++ b/pendulum/locales/locale.py @@ -48,7 +48,7 @@ def load(cls, locale: Union[str, "Locale"]) -> "Locale": def normalize_locale(cls, locale: str) -> str: m = re.match("([a-z]{2})[-_]([a-z]{2})", locale, re.I) if m: - return "{}_{}".format(m.group(1).lower(), m.group(2).lower()) + return f"{m.group(1).lower()}_{m.group(2).lower()}" else: return locale.lower() @@ -78,7 +78,7 @@ def ordinal(self, number: int) -> str: return self._data["ordinal"](number) def ordinalize(self, number: int) -> str: - ordinal = self.get("custom.ordinal.{}".format(self.ordinal(number))) + ordinal = self.get(f"custom.ordinal.{self.ordinal(number)}") if not ordinal: return f"{number}" diff --git a/pendulum/parser.py b/pendulum/parser.py index c58781e9..dc9b6bbf 100644 --- a/pendulum/parser.py +++ b/pendulum/parser.py @@ -21,8 +21,8 @@ def parse( - text, **options -): # type: (str, **typing.Any) -> typing.Union[Date, Time, DateTime, Duration] + text: str, **options: typing.Any +) -> Date | Time | DateTime | Duration: # Use the mock now value if it exists options["now"] = options.get("now", pendulum.get_test_now()) diff --git a/pendulum/parsing/_iso8601.c b/pendulum/parsing/_iso8601.c index 87d8b23f..b8c3e091 100644 --- a/pendulum/parsing/_iso8601.c +++ b/pendulum/parsing/_iso8601.c @@ -221,7 +221,7 @@ static PyObject *FixedOffset_dst(FixedOffset *self, PyObject *args) { * sign = '+' * if self.offset < 0: * sign = '-' - * return "%s%d:%d" % (sign, self.offset / 60, self.offset % 60) + * return f"{sign}{self.offset / 60}:{self.offset % 60}" */ static PyObject *FixedOffset_tzname(FixedOffset *self, PyObject *args) { if (self->tzname != NULL) { diff --git a/pendulum/parsing/iso8601.py b/pendulum/parsing/iso8601.py index acdd8278..3097cc33 100644 --- a/pendulum/parsing/iso8601.py +++ b/pendulum/parsing/iso8601.py @@ -182,7 +182,7 @@ def parse_iso8601(text): if ambiguous_date: # We can "safely" assume that the ambiguous date # was actually a time in the form hhmmss - hhmmss = "{}{:0>2}".format(str(year), str(month)) + hhmmss = f"{str(year)}{str(month):0>2}" return datetime.time(int(hhmmss[:2]), int(hhmmss[2:4]), int(hhmmss[4:])) @@ -394,7 +394,7 @@ def _parse_iso8601_duration(text, **options): if "." in _seconds: _seconds, _microseconds = _seconds.split(".") seconds += int(_seconds) - microseconds += int("{:0<6}".format(_microseconds[:6])) + microseconds += int(f"{_microseconds[:6]:0<6}") else: seconds += int(_seconds) diff --git a/pendulum/period.py b/pendulum/period.py index c5e5f457..3b65f036 100644 --- a/pendulum/period.py +++ b/pendulum/period.py @@ -238,16 +238,16 @@ def in_words(self, locale=None, separator=" "): unit, count = period if abs(count) > 0: translation = locale.translation( - "units.{}.{}".format(unit, locale.plural(abs(count))) + f"units.{unit}.{locale.plural(abs(count))}" ) parts.append(translation.format(count)) if not parts: if abs(self.microseconds) > 0: - unit = "units.second.{}".format(locale.plural(1)) - count = "{:.2f}".format(abs(self.microseconds) / 1e6) + unit = f"units.second.{locale.plural(1)}" + count = f"{abs(self.microseconds) / 1e6:.2f}" else: - unit = "units.microsecond.{}".format(locale.plural(0)) + unit = f"units.microsecond.{locale.plural(0)}" count = 0 translation = locale.translation(unit) parts.append(translation.format(count)) diff --git a/pendulum/time.py b/pendulum/time.py index 064c6284..8045b179 100644 --- a/pendulum/time.py +++ b/pendulum/time.py @@ -26,7 +26,7 @@ def __repr__(self): tzinfo = "" if self.tzinfo: - tzinfo = ", tzinfo={}".format(repr(self.tzinfo)) + tzinfo = f", tzinfo={repr(self.tzinfo)}" return "{}({}, {}, {}{}{})".format( self.__class__.__name__, self.hour, self.minute, self.second, us, tzinfo diff --git a/pendulum/tz/__init__.py b/pendulum/tz/__init__.py index 5477393e..c70cd5d0 100644 --- a/pendulum/tz/__init__.py +++ b/pendulum/tz/__init__.py @@ -34,7 +34,7 @@ def timezones(): return _timezones -def timezone(name: Union[str, int]) -> Union[Timezone, FixedTimezone]: +def timezone(name: str | int) -> Timezone | FixedTimezone: """ Return a Timezone instance given its name. """ diff --git a/pendulum/tz/local_timezone.py b/pendulum/tz/local_timezone.py index b2e11088..5d6f0bef 100644 --- a/pendulum/tz/local_timezone.py +++ b/pendulum/tz/local_timezone.py @@ -27,7 +27,7 @@ _local_timezone = None -def get_local_timezone() -> Union[Timezone, FixedTimezone]: +def get_local_timezone() -> Timezone | FixedTimezone: global _local_timezone if _mock_local_timezone is not None: @@ -41,7 +41,7 @@ def get_local_timezone() -> Union[Timezone, FixedTimezone]: return _local_timezone -def set_local_timezone(mock=None): # type: (Optional[Union[str, Timezone]]) -> None +def set_local_timezone(mock: str | Timezone | None = None) -> None: global _mock_local_timezone _mock_local_timezone = mock @@ -152,7 +152,7 @@ def _get_darwin_timezone() -> Timezone: return Timezone(tzname) -def _get_unix_timezone(_root="/"): # type: (str) -> Timezone +def _get_unix_timezone(_root: str = "/") -> Timezone: tzenv = os.environ.get("TZ") if tzenv: try: diff --git a/pendulum/tz/timezone.py b/pendulum/tz/timezone.py index e657243a..26ed8bab 100644 --- a/pendulum/tz/timezone.py +++ b/pendulum/tz/timezone.py @@ -30,7 +30,7 @@ def name(self) -> str: raise NotImplementedError @abstractmethod - def convert(self, dt: datetime, dst_rule: Optional[str] = None) -> datetime: + def convert(self, dt: datetime, dst_rule: str | None = None) -> datetime: raise NotImplementedError @abstractmethod @@ -57,7 +57,7 @@ class Timezone(zoneinfo.ZoneInfo, PendulumTimezone): >>> tz = Timezone('Europe/Paris') """ - def __new__(cls, key: str) -> "Timezone": + def __new__(cls, key: str) -> Timezone: try: return super().__new__(cls, key) except zoneinfo.ZoneInfoNotFoundError: @@ -137,7 +137,7 @@ def __repr__(self) -> str: class FixedTimezone(tzinfo, PendulumTimezone): - def __init__(self, offset: int, name: Optional[str] = None) -> None: + def __init__(self, offset: int, name: str | None = None) -> None: sign = "-" if offset < 0 else "+" minutes = offset / 60 @@ -188,20 +188,20 @@ def datetime( def offset(self) -> int: return self._offset - def utcoffset(self, dt: Optional[datetime]) -> timedelta: + def utcoffset(self, dt: datetime | None) -> timedelta: return self._utcoffset - def dst(self, dt: Optional[_datetime]): + def dst(self, dt: _datetime | None): return timedelta() def fromutc(self, dt: datetime) -> datetime: # Use the stdlib datetime's add method to avoid infinite recursion return (datetime.__add__(dt, self._utcoffset)).replace(tzinfo=self) - def tzname(self, dt: Optional[datetime]) -> Optional[str]: + def tzname(self, dt: datetime | None) -> str | None: return self._name - def __getinitargs__(self): # type: () -> tuple + def __getinitargs__(self) -> tuple: return self._offset, self._name def __repr__(self) -> str: diff --git a/tests/datetime/test_strings.py b/tests/datetime/test_strings.py index 5ce6ed06..e61ed412 100644 --- a/tests/datetime/test_strings.py +++ b/tests/datetime/test_strings.py @@ -109,7 +109,7 @@ def test_to_string_invalid(): def test_repr(): d = pendulum.datetime(1975, 12, 25, 14, 15, 16, tz="local") - expected = "DateTime(1975, 12, 25, 14, 15, 16, tzinfo={})".format(repr(d.tzinfo)) + expected = f"DateTime(1975, 12, 25, 14, 15, 16, tzinfo={repr(d.tzinfo)})" assert repr(d) == expected d = pendulum.datetime(1975, 12, 25, 14, 15, 16, 123456, tz="local") From 5b47ec4a54cb107168d9fe59e553d3330b801f1d Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Thu, 4 Aug 2022 00:40:47 +0200 Subject: [PATCH 038/177] Format with black --- pendulum/__init__.py | 12 +++--------- pendulum/datetime.py | 12 +++--------- pendulum/formatting/difference_formatter.py | 6 +++++- pendulum/formatting/formatter.py | 16 +++++++++++----- pendulum/parser.py | 4 +--- 5 files changed, 23 insertions(+), 27 deletions(-) diff --git a/pendulum/__init__.py b/pendulum/__init__.py index 6916ec3e..85e84f7d 100644 --- a/pendulum/__init__.py +++ b/pendulum/__init__.py @@ -61,9 +61,7 @@ _formatter = Formatter() -def _safe_timezone( - obj: str | float | _datetime.tzinfo | Timezone | None -) -> Timezone: +def _safe_timezone(obj: str | float | _datetime.tzinfo | Timezone | None) -> Timezone: """ Creates a timezone instance from a string, Timezone, TimezoneInfo or integer offset. @@ -170,9 +168,7 @@ def time(hour: int, minute: int = 0, second: int = 0, microsecond: int = 0) -> T return Time(hour, minute, second, microsecond) -def instance( - dt: _datetime.datetime, tz: str | Timezone | None = UTC -) -> DateTime: +def instance(dt: _datetime.datetime, tz: str | Timezone | None = UTC) -> DateTime: """ Create a DateTime instance from a datetime one. """ @@ -244,9 +240,7 @@ def from_format( return datetime(**parts) -def from_timestamp( - timestamp: int | float, tz: str | Timezone = UTC -) -> DateTime: +def from_timestamp(timestamp: int | float, tz: str | Timezone = UTC) -> DateTime: """ Create a DateTime instance from a timestamp. """ diff --git a/pendulum/datetime.py b/pendulum/datetime.py index af0d00c8..0887aca2 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -890,9 +890,7 @@ def _end_of_week(self) -> DateTime: return dt.end_of("day") - def next( - self, day_of_week: int | None = None, keep_time: bool = False - ) -> DateTime: + def next(self, day_of_week: int | None = None, keep_time: bool = False) -> DateTime: """ Modify to the next occurrence of a given day of the week. If no day_of_week is provided, modify to the next occurrence @@ -1080,9 +1078,7 @@ def _last_of_quarter(self, day_of_week: int | None = None) -> DateTime: """ return self.on(self.year, self.quarter * 3, 1).last_of("month", day_of_week) - def _nth_of_quarter( - self, nth: int, day_of_week: int | None = None - ) -> DateTime: + def _nth_of_quarter(self, nth: int, day_of_week: int | None = None) -> DateTime: """ Modify to the given occurrence of a given day of the week in the current quarter. If the calculated occurrence is outside, @@ -1234,9 +1230,7 @@ def __radd__(self, other: datetime.timedelta) -> DateTime: # Native methods override @classmethod - def fromtimestamp( - cls, t: float, tz: datetime.tzinfo | None = None - ) -> DateTime: + def fromtimestamp(cls, t: float, tz: datetime.tzinfo | None = None) -> DateTime: return pendulum.instance(datetime.datetime.fromtimestamp(t, tz=tz), tz=tz) @classmethod diff --git a/pendulum/formatting/difference_formatter.py b/pendulum/formatting/difference_formatter.py index f6dfe4a8..1259b8d2 100644 --- a/pendulum/formatting/difference_formatter.py +++ b/pendulum/formatting/difference_formatter.py @@ -16,7 +16,11 @@ def __init__(self, locale="en"): self._locale = Locale.load(locale) def format( - self, diff: pendulum.Period, is_now: bool = True, absolute: bool = False, locale: str | None = None + self, + diff: pendulum.Period, + is_now: bool = True, + absolute: bool = False, + locale: str | None = None, ) -> str: """ Formats a difference. diff --git a/pendulum/formatting/formatter.py b/pendulum/formatting/formatter.py index 1798772d..4aad0fd3 100644 --- a/pendulum/formatting/formatter.py +++ b/pendulum/formatting/formatter.py @@ -260,9 +260,7 @@ def format( return result - def _format_token( - self, dt: pendulum.DateTime, token: str, locale: Locale - ) -> str: + def _format_token(self, dt: pendulum.DateTime, token: str, locale: Locale) -> str: """ Formats a DateTime instance with a given token and locale. @@ -537,7 +535,11 @@ def _check_parsed( return validated def _get_parsed_values( - self, m: typing.Match[str], parsed: dict[str, typing.Any], locale: Locale, now: pendulum.DateTime + self, + m: typing.Match[str], + parsed: dict[str, typing.Any], + locale: Locale, + now: pendulum.DateTime, ) -> None: for token, index in m.re.groupindex.items(): if token in self._LOCALIZABLE_TOKENS: @@ -546,7 +548,11 @@ def _get_parsed_values( self._get_parsed_value(token, m.group(index), parsed, now) def _get_parsed_value( - self, token: str, value: str, parsed: dict[str, typing.Any], now: pendulum.DateTime + self, + token: str, + value: str, + parsed: dict[str, typing.Any], + now: pendulum.DateTime, ) -> None: parsed_token = self._PARSE_TOKENS[token](value) diff --git a/pendulum/parser.py b/pendulum/parser.py index dc9b6bbf..509348fb 100644 --- a/pendulum/parser.py +++ b/pendulum/parser.py @@ -20,9 +20,7 @@ CDuration = None -def parse( - text: str, **options: typing.Any -) -> Date | Time | DateTime | Duration: +def parse(text: str, **options: typing.Any) -> Date | Time | DateTime | Duration: # Use the mock now value if it exists options["now"] = options.get("now", pendulum.get_test_now()) From 1f96eb351168d2acd8b3e57ff80eb74279f8a8ec Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Thu, 4 Aug 2022 00:47:11 +0200 Subject: [PATCH 039/177] Lint with pycln --- pendulum/_extensions/helpers.py | 1 - pendulum/datetime.py | 5 ----- pendulum/formatting/difference_formatter.py | 2 -- pendulum/helpers.py | 2 +- pendulum/tz/local_timezone.py | 2 -- pendulum/tz/timezone.py | 1 - 6 files changed, 1 insertion(+), 12 deletions(-) diff --git a/pendulum/_extensions/helpers.py b/pendulum/_extensions/helpers.py index 8d493263..9342351d 100644 --- a/pendulum/_extensions/helpers.py +++ b/pendulum/_extensions/helpers.py @@ -2,7 +2,6 @@ import datetime import math -import typing from collections import namedtuple diff --git a/pendulum/datetime.py b/pendulum/datetime.py index 0887aca2..037cae36 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -4,11 +4,6 @@ import datetime from typing import Callable -from typing import Dict -from typing import List -from typing import Optional -from typing import Tuple -from typing import Union import pendulum diff --git a/pendulum/formatting/difference_formatter.py b/pendulum/formatting/difference_formatter.py index 1259b8d2..0325d303 100644 --- a/pendulum/formatting/difference_formatter.py +++ b/pendulum/formatting/difference_formatter.py @@ -1,7 +1,5 @@ from __future__ import annotations -import typing - import pendulum from ..locales.locale import Locale diff --git a/pendulum/helpers.py b/pendulum/helpers.py index 4806393c..7653c333 100644 --- a/pendulum/helpers.py +++ b/pendulum/helpers.py @@ -10,7 +10,6 @@ from math import copysign from typing import TYPE_CHECKING from typing import Iterator -from typing import Optional from typing import TypeVar from typing import overload @@ -31,6 +30,7 @@ _D = TypeVar("_D", bound=date) try: + # nopycln: file if not with_extensions or struct.calcsize("P") == 4: raise ImportError() diff --git a/pendulum/tz/local_timezone.py b/pendulum/tz/local_timezone.py index 5d6f0bef..4e92ef7b 100644 --- a/pendulum/tz/local_timezone.py +++ b/pendulum/tz/local_timezone.py @@ -6,8 +6,6 @@ from contextlib import contextmanager from typing import Iterator -from typing import Optional -from typing import Union from .exceptions import InvalidTimezone from .timezone import FixedTimezone diff --git a/pendulum/tz/timezone.py b/pendulum/tz/timezone.py index 26ed8bab..47fa3f9e 100644 --- a/pendulum/tz/timezone.py +++ b/pendulum/tz/timezone.py @@ -5,7 +5,6 @@ from datetime import datetime from datetime import timedelta from datetime import tzinfo -from typing import Optional from typing import TypeVar from pendulum.utils._compat import zoneinfo From e43c53a9af468d2836cbdc7fea009aaea214c490 Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Thu, 4 Aug 2022 00:54:22 +0200 Subject: [PATCH 040/177] Update .flake8 --- .flake8 | 27 ++++++--------------------- 1 file changed, 6 insertions(+), 21 deletions(-) diff --git a/.flake8 b/.flake8 index 322a90e5..fe0ad3e8 100644 --- a/.flake8 +++ b/.flake8 @@ -1,12 +1,5 @@ [flake8] max-line-length = 88 -ignore = - # E501: Line too long - E501, - # E203: Whitespace before ':' - E203, - #W503: Line break occurred before a binary operator - W503 per-file-ignores = # F401: Module imported but unused __init__.py:F401 @@ -21,22 +14,14 @@ enable-extensions = TC, TC1 type-checking-exempt-modules = typing, typing-extensions eradicate-whitelist-extend = ^-.*; extend-ignore = + # E501: Line too long + E501, + # E203: Whitespace before ':' + E203, # SIM106: Handle error-cases first SIM106, extend-exclude = # External to the project's coding standards: docs/*, -exclude = - .git - __pycache__ - setup.py - build - dist - releases - .idea - .venv - .tox - .mypy_cache - .pytest_cache - .vscode - .github + # Machine-generated, too many false-positives + pendulum/locales/*, From f0aa8f9901f78ca898bb1e764ea0e59cbe188b1e Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Thu, 4 Aug 2022 00:55:53 +0200 Subject: [PATCH 041/177] Remove redundant isort configs --- pyproject.toml | 3 --- 1 file changed, 3 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index eaee5a91..c2e3108d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,17 +60,14 @@ script = "build.py" profile = "black" force_single_line = true atomic = true -include_trailing_comma = true lines_after_imports = 2 lines_between_types = 1 -use_parentheses = true skip_glob = [ "pendulum/locales/**", "build.py", "pendulum/__version__.py", ] filter_files = true - known_first_party = "pendulum" known_third_party = [ "babel", From efad336bea3a77d7429dd2197cc33203f237ebc3 Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Thu, 4 Aug 2022 01:34:51 +0200 Subject: [PATCH 042/177] Add mypy typing ignore list for incremental typing --- pyproject.toml | 95 +++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 94 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index c2e3108d..81ff677e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -81,7 +81,100 @@ known_third_party = [ strict = true files = "pendulum, tests" show_error_codes = true -pretty = true +#pretty = true + +# The following whitelist is used to allow for incremental adoption +# of Mypy. Modules should be removed from this whitelist as and when +# their respective type errors have been addressed. No new modules +# should be added to this whitelist. + +[[tool.mypy.overrides]] +module = [ + "pendulum", + "pendulum._extensions.helpers", + "pendulum.date", + "pendulum.datetime", + "pendulum.duration", + "pendulum.formatting.formatter", + "pendulum.formatting.difference_formatter", + "pendulum.helpers", + "pendulum.locales.locale", + "pendulum.mixins.default", + "pendulum.parser", + "pendulum.parsing", + "pendulum.parsing.iso8601", + "pendulum.period", + "pendulum.time", + "pendulum.tz", + "pendulum.tz.exceptions", + "pendulum.tz.local_timezone", + "pendulum.tz.timezone", + "pendulum.utils._compat", + "tests.conftest", + "tests.test_helpers", + "tests.test_main", + "tests.test_parsing", + "tests.date.test_add", + "tests.date.test_behavior", + "tests.date.test_construct", + "tests.date.test_comparison", + "tests.date.test_day_of_week_modifiers", + "tests.date.test_diff", + "tests.date.test_fluent_setters", + "tests.date.test_getters", + "tests.date.test_start_end_of", + "tests.date.test_strings", + "tests.date.test_sub", + "tests.datetime.test_add", + "tests.datetime.test_behavior", + "tests.datetime.test_construct", + "tests.datetime.test_comparison", + "tests.datetime.test_create_from_timestamp", + "tests.datetime.test_day_of_week_modifiers", + "tests.datetime.test_diff", + "tests.datetime.test_fluent_setters", + "tests.datetime.test_from_format", + "tests.datetime.test_getters", + "tests.datetime.test_naive", + "tests.datetime.test_replace", + "tests.datetime.test_start_end_of", + "tests.datetime.test_strings", + "tests.datetime.test_sub", + "tests.datetime.test_timezone", + "tests.duration.test_add_sub", + "tests.duration.test_arithmetic", + "tests.duration.test_behavior", + "tests.duration.test_construct", + "tests.duration.test_in_methods", + "tests.duration.test_in_words", + "tests.duration.test_total_methods", + "tests.formatting.test_formatter", + "tests.helpers.test_local_time", + "tests.localization.*", + "tests.parsing.test_parsing", + "tests.parsing.test_parsing_duration", + "tests.parsing.test_parse_iso8601", + "tests.period.test_add_subtract", + "tests.period.test_arithmetic", + "tests.period.test_behavior", + "tests.period.test_construct", + "tests.period.test_hashing", + "tests.period.test_in_words", + "tests.period.test_range", + "tests.time.test_add", + "tests.time.test_behavior", + "tests.time.test_comparison", + "tests.time.test_construct", + "tests.time.test_diff", + "tests.time.test_fluent_setters", + "tests.time.test_strings", + "tests.time.test_sub", + "tests.tz.test_helpers", + "tests.tz.test_local_timezone", + "tests.tz.test_timezone", + "tests.tz.test_timezones", +] +ignore_errors = true [tool.coverage.run] omit = [ From df88b0e451732fb11267c8cbd38cc811dfcac094 Mon Sep 17 00:00:00 2001 From: Dimsi Date: Thu, 4 Aug 2022 15:10:59 +0300 Subject: [PATCH 043/177] Add Czech [cs] localization (#540) * Add cs localization * Apply pre-commit hooks * Apply pre-commit --all-files Co-authored-by: Bartosz Sokorski --- pendulum/locales/cs/__init__.py | 0 pendulum/locales/cs/custom.py | 23 +++ pendulum/locales/cs/locale.py | 266 ++++++++++++++++++++++++++++++++ tests/localization/test_cs.py | 108 +++++++++++++ 4 files changed, 397 insertions(+) create mode 100644 pendulum/locales/cs/__init__.py create mode 100644 pendulum/locales/cs/custom.py create mode 100644 pendulum/locales/cs/locale.py create mode 100644 tests/localization/test_cs.py diff --git a/pendulum/locales/cs/__init__.py b/pendulum/locales/cs/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/pendulum/locales/cs/custom.py b/pendulum/locales/cs/custom.py new file mode 100644 index 00000000..5f66b690 --- /dev/null +++ b/pendulum/locales/cs/custom.py @@ -0,0 +1,23 @@ +""" +cs custom locale file. +""" + +translations = { + "units": {"few_second": "pár vteřin"}, + # Relative time + "ago": "{} zpět", + "from_now": "za {}", + "after": "{0} po", + "before": "{0} zpět", + # Ordinals + "ordinal": {"one": ".", "two": ".", "few": ".", "other": "."}, + # Date formats + "date_formats": { + "LTS": "h:mm:ss", + "LT": "h:mm", + "L": "DD. M. YYYY", + "LL": "D. MMMM, YYYY", + "LLL": "D. MMMM, YYYY h:mm", + "LLLL": "dddd, D. MMMM, YYYY h:mm", + }, +} diff --git a/pendulum/locales/cs/locale.py b/pendulum/locales/cs/locale.py new file mode 100644 index 00000000..2c51c786 --- /dev/null +++ b/pendulum/locales/cs/locale.py @@ -0,0 +1,266 @@ +from .custom import translations as custom_translations + + +""" +cs locale file. + +It has been generated automatically and must not be modified directly. +""" + + +locale = { + "plural": lambda n: "few" + if ((n == n and (n >= 2 and n <= 4)) and (0 == 0 and (0 == 0))) + else "many" + if (not (0 == 0 and (0 == 0))) + else "one" + if ((n == n and (n == 1)) and (0 == 0 and (0 == 0))) + else "other", + "ordinal": lambda n: "other", + "translations": { + "days": { + "abbreviated": { + 0: "ne", + 1: "po", + 2: "út", + 3: "st", + 4: "čt", + 5: "pá", + 6: "so", + }, + "narrow": { + 0: "N", + 1: "P", + 2: "Ú", + 3: "S", + 4: "Č", + 5: "P", + 6: "S", + }, + "short": { + 0: "ne", + 1: "po", + 2: "út", + 3: "st", + 4: "čt", + 5: "pá", + 6: "so", + }, + "wide": { + 0: "neděle", + 1: "pondělí", + 2: "úterý", + 3: "středa", + 4: "čtvrtek", + 5: "pátek", + 6: "sobota", + }, + }, + "months": { + "abbreviated": { + 1: "led", + 2: "úno", + 3: "bře", + 4: "dub", + 5: "kvě", + 6: "čvn", + 7: "čvc", + 8: "srp", + 9: "zář", + 10: "říj", + 11: "lis", + 12: "pro", + }, + "narrow": { + 1: "1", + 2: "2", + 3: "3", + 4: "4", + 5: "5", + 6: "6", + 7: "7", + 8: "8", + 9: "9", + 10: "10", + 11: "11", + 12: "12", + }, + "wide": { + 1: "ledna", + 2: "února", + 3: "března", + 4: "dubna", + 5: "května", + 6: "června", + 7: "července", + 8: "srpna", + 9: "září", + 10: "října", + 11: "listopadu", + 12: "prosince", + }, + }, + "units": { + "year": { + "one": "{0} rok", + "few": "{0} roky", + "many": "{0} roku", + "other": "{0} let", + }, + "month": { + "one": "{0} měsíc", + "few": "{0} měsíce", + "many": "{0} měsíce", + "other": "{0} měsíců", + }, + "week": { + "one": "{0} týden", + "few": "{0} týdny", + "many": "{0} týdne", + "other": "{0} týdnů", + }, + "day": { + "one": "{0} den", + "few": "{0} dny", + "many": "{0} dne", + "other": "{0} dní", + }, + "hour": { + "one": "{0} hodina", + "few": "{0} hodiny", + "many": "{0} hodiny", + "other": "{0} hodin", + }, + "minute": { + "one": "{0} minuta", + "few": "{0} minuty", + "many": "{0} minuty", + "other": "{0} minut", + }, + "second": { + "one": "{0} sekunda", + "few": "{0} sekundy", + "many": "{0} sekundy", + "other": "{0} sekund", + }, + "microsecond": { + "one": "{0} mikrosekunda", + "few": "{0} mikrosekundy", + "many": "{0} mikrosekundy", + "other": "{0} mikrosekund", + }, + }, + "relative": { + "year": { + "future": { + "other": "za {0} let", + "one": "za {0} rok", + "few": "za {0} roky", + "many": "za {0} roku", + }, + "past": { + "other": "před {0} lety", + "one": "před {0} rokem", + "few": "před {0} lety", + "many": "před {0} roku", + }, + }, + "month": { + "future": { + "other": "za {0} měsíců", + "one": "za {0} měsíc", + "few": "za {0} měsíce", + "many": "za {0} měsíce", + }, + "past": { + "other": "před {0} měsíci", + "one": "před {0} měsícem", + "few": "před {0} měsíci", + "many": "před {0} měsíce", + }, + }, + "week": { + "future": { + "other": "za {0} týdnů", + "one": "za {0} týden", + "few": "za {0} týdny", + "many": "za {0} týdne", + }, + "past": { + "other": "před {0} týdny", + "one": "před {0} týdnem", + "few": "před {0} týdny", + "many": "před {0} týdne", + }, + }, + "day": { + "future": { + "other": "za {0} dní", + "one": "za {0} den", + "few": "za {0} dny", + "many": "za {0} dne", + }, + "past": { + "other": "před {0} dny", + "one": "před {0} dnem", + "few": "před {0} dny", + "many": "před {0} dne", + }, + }, + "hour": { + "future": { + "other": "za {0} hodin", + "one": "za {0} hodinu", + "few": "za {0} hodiny", + "many": "za {0} hodiny", + }, + "past": { + "other": "před {0} hodinami", + "one": "před {0} hodinou", + "few": "před {0} hodinami", + "many": "před {0} hodiny", + }, + }, + "minute": { + "future": { + "other": "za {0} minut", + "one": "za {0} minutu", + "few": "za {0} minuty", + "many": "za {0} minuty", + }, + "past": { + "other": "před {0} minutami", + "one": "před {0} minutou", + "few": "před {0} minutami", + "many": "před {0} minuty", + }, + }, + "second": { + "future": { + "other": "za {0} sekund", + "one": "za {0} sekundu", + "few": "za {0} sekundy", + "many": "za {0} sekundy", + }, + "past": { + "other": "před {0} sekundami", + "one": "před {0} sekundou", + "few": "před {0} sekundami", + "many": "před {0} sekundy", + }, + }, + }, + "day_periods": { + "midnight": "půlnoc", + "am": "dop.", + "noon": "poledne", + "pm": "odp.", + "morning1": "ráno", + "morning2": "dopoledne", + "afternoon1": "odpoledne", + "evening1": "večer", + "night1": "v noci", + }, + }, + "custom": custom_translations, +} diff --git a/tests/localization/test_cs.py b/tests/localization/test_cs.py new file mode 100644 index 00000000..f1c6b941 --- /dev/null +++ b/tests/localization/test_cs.py @@ -0,0 +1,108 @@ +import pendulum + + +locale = "cs" + + +def test_diff_for_humans(): + with pendulum.test(pendulum.datetime(2016, 8, 29)): + diff_for_humans() + + +def diff_for_humans(): + d = pendulum.now().subtract(seconds=1) + assert d.diff_for_humans(locale=locale) == "pár vteřin zpět" + + d = pendulum.now().subtract(seconds=2) + assert d.diff_for_humans(locale=locale) == "pár vteřin zpět" + + d = pendulum.now().subtract(seconds=20) + assert d.diff_for_humans(locale=locale) == "před 20 sekundami" + + d = pendulum.now().subtract(minutes=1) + assert d.diff_for_humans(locale=locale) == "před 1 minutou" + + d = pendulum.now().subtract(minutes=2) + assert d.diff_for_humans(locale=locale) == "před 2 minutami" + + d = pendulum.now().subtract(minutes=5) + assert d.diff_for_humans(locale=locale) == "před 5 minutami" + + d = pendulum.now().subtract(hours=1) + assert d.diff_for_humans(locale=locale) == "před 1 hodinou" + + d = pendulum.now().subtract(hours=2) + assert d.diff_for_humans(locale=locale) == "před 2 hodinami" + + d = pendulum.now().subtract(hours=5) + assert d.diff_for_humans(locale=locale) == "před 5 hodinami" + + d = pendulum.now().subtract(days=1) + assert d.diff_for_humans(locale=locale) == "před 1 dnem" + + d = pendulum.now().subtract(days=2) + assert d.diff_for_humans(locale=locale) == "před 2 dny" + + d = pendulum.now().subtract(weeks=1) + assert d.diff_for_humans(locale=locale) == "před 1 týdnem" + + d = pendulum.now().subtract(weeks=2) + assert d.diff_for_humans(locale=locale) == "před 2 týdny" + + d = pendulum.now().subtract(months=1) + assert d.diff_for_humans(locale=locale) == "před 1 měsícem" + + d = pendulum.now().subtract(months=2) + assert d.diff_for_humans(locale=locale) == "před 2 měsíci" + + d = pendulum.now().subtract(months=5) + assert d.diff_for_humans(locale=locale) == "před 5 měsíci" + + d = pendulum.now().subtract(years=1) + assert d.diff_for_humans(locale=locale) == "před 1 rokem" + + d = pendulum.now().subtract(years=2) + assert d.diff_for_humans(locale=locale) == "před 2 lety" + + d = pendulum.now().subtract(years=5) + assert d.diff_for_humans(locale=locale) == "před 5 lety" + + d = pendulum.now().add(seconds=1) + assert d.diff_for_humans(locale=locale) == "za pár vteřin" + + d = pendulum.now().add(seconds=1) + d2 = pendulum.now() + assert d.diff_for_humans(d2, locale=locale) == "pár vteřin po" + assert d2.diff_for_humans(d, locale=locale) == "pár vteřin zpět" + + assert d.diff_for_humans(d2, True, locale=locale) == "pár vteřin" + assert d2.diff_for_humans(d.add(seconds=1), True, locale=locale) == "pár vteřin" + + d = pendulum.now().add(seconds=20) + d2 = pendulum.now() + assert d.diff_for_humans(d2, locale=locale) == "20 sekund po" + assert d2.diff_for_humans(d, locale=locale) == "20 sekund zpět" + + d = pendulum.now().add(seconds=10) + d2 = pendulum.now() + assert d.diff_for_humans(d2, True, locale=locale) == "pár vteřin" + assert d2.diff_for_humans(d.add(seconds=1), True, locale=locale) == "11 sekund" + + +def test_format(): + d = pendulum.datetime(2016, 8, 29, 7, 3, 6, 123456) + assert d.format("dddd", locale=locale) == "pondělí" + assert d.format("ddd", locale=locale) == "po" + assert d.format("MMMM", locale=locale) == "srpna" + assert d.format("MMM", locale=locale) == "srp" + assert d.format("A", locale=locale) == "dop." + assert d.format("Qo", locale=locale) == "3." + assert d.format("Mo", locale=locale) == "8." + assert d.format("Do", locale=locale) == "29." + + assert d.format("LT", locale=locale) == "7:03" + assert d.format("LTS", locale=locale) == "7:03:06" + assert d.format("L", locale=locale) == "29. 8. 2016" + assert d.format("LL", locale=locale) == "29. srpna, 2016" + assert d.format("LLL", locale=locale) == "29. srpna, 2016 7:03" + assert d.format("LLLL", locale=locale) == "pondělí, 29. srpna, 2016 7:03" From 2a538f90de99188d78c30672413cb7a905bf5e04 Mon Sep 17 00:00:00 2001 From: "Edgar R. M" Date: Thu, 4 Aug 2022 17:33:49 -0500 Subject: [PATCH 044/177] feat: Use importlib.resources to load package files (#633) * feat: Use importlib.resources to load package files * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- pendulum/locales/locale.py | 12 +++++++--- pendulum/tz/__init__.py | 10 ++++++-- poetry.lock | 47 ++++++++++++++++++++++++++------------ pyproject.toml | 1 + 4 files changed, 51 insertions(+), 19 deletions(-) diff --git a/pendulum/locales/locale.py b/pendulum/locales/locale.py index 5569725f..c3a80e12 100644 --- a/pendulum/locales/locale.py +++ b/pendulum/locales/locale.py @@ -1,5 +1,5 @@ -import os import re +import sys from importlib import import_module from typing import Any @@ -8,6 +8,12 @@ from typing import Union +if sys.version_info >= (3, 9): + from importlib import resources +else: + import importlib_resources as resources + + class Locale: """ Represent a specific locale. @@ -31,8 +37,8 @@ def load(cls, locale: Union[str, "Locale"]) -> "Locale": # Checking locale existence actual_locale = locale - locale_path = os.path.join(os.path.dirname(__file__), actual_locale) - while not os.path.exists(locale_path): + locale_path = resources.files(__package__).joinpath(actual_locale) + while not locale_path.exists(): if actual_locale == locale: raise ValueError(f"Locale [{locale}] does not exist.") diff --git a/pendulum/tz/__init__.py b/pendulum/tz/__init__.py index ba4af1b1..3fd9a539 100644 --- a/pendulum/tz/__init__.py +++ b/pendulum/tz/__init__.py @@ -1,4 +1,4 @@ -import os +import sys from typing import Union @@ -12,6 +12,12 @@ from .timezone import Timezone +if sys.version_info >= (3, 9): + from importlib import resources +else: + import importlib_resources as resources + + PRE_TRANSITION = "pre" POST_TRANSITION = "post" TRANSITION_ERROR = "error" @@ -26,7 +32,7 @@ def timezones(): global _timezones if _timezones is None: - with open(os.path.join(os.path.dirname(tzdata.__file__), "zones")) as f: + with open(resources.files(tzdata).joinpath("zones")) as f: _timezones = tuple(tz.strip() for tz in f.readlines()) return _timezones diff --git a/poetry.lock b/poetry.lock index b449c16e..6d12e599 100644 --- a/poetry.lock +++ b/poetry.lock @@ -15,9 +15,9 @@ optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" [package.extras] -dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] -docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] -tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface"] +dev = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope-interface", "furo", "sphinx", "sphinx-notfound-page", "pre-commit"] +docs = ["furo", "sphinx", "zope-interface", "sphinx-notfound-page"] +tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope-interface"] tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins"] [[package]] @@ -32,7 +32,7 @@ python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" pytz = ">=2015.7" [[package]] -name = "backports.entry-points-selectable" +name = "backports-entry-points-selectable" version = "1.1.1" description = "Compatibility shim providing selectable entry points for older implementations" category = "dev" @@ -43,11 +43,11 @@ python-versions = ">=2.7" importlib-metadata = {version = "*", markers = "python_version < \"3.8\""} [package.extras] -docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest", "pytest-flake8", "pytest-cov", "pytest-black (>=0.3.7)", "pytest-mypy", "pytest-checkdocs (>=2.4)", "pytest-enabler (>=1.0.1)"] +testing = ["pytest-enabler (>=1.0.1)", "pytest-checkdocs (>=2.4)", "pytest-mypy", "pytest-black (>=0.3.7)", "pytest-cov", "pytest-flake8", "pytest"] +docs = ["rst.linker (>=1.9)", "jaraco.packaging (>=8.2)", "sphinx"] [[package]] -name = "backports.zoneinfo" +name = "backports-zoneinfo" version = "0.2.1" description = "Backport of the standard library zoneinfo module" category = "main" @@ -175,7 +175,7 @@ python-versions = "*" python-dateutil = ">=2.8.1" [package.extras] -dev = ["twine", "markdown", "flake8", "wheel"] +dev = ["wheel", "flake8", "markdown", "twine"] [[package]] name = "identify" @@ -203,7 +203,22 @@ zipp = ">=0.5" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] perf = ["ipython"] -testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl.flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "packaging", "pyfakefs", "flufl-flake8", "pytest-perf (>=0.9.2)", "pytest-black (>=0.3.7)", "pytest-mypy", "importlib-resources (>=1.3)"] + +[[package]] +name = "importlib-resources" +version = "5.9.0" +description = "Read resources from Python packages" +category = "main" +optional = false +python-versions = ">=3.7" + +[package.dependencies] +zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} + +[package.extras] +docs = ["sphinx", "jaraco.packaging (>=9)", "rst.linker (>=1.9)", "jaraco.tidelift (>=1.4)"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.3)", "pytest-black (>=0.3.7)", "pytest-mypy (>=0.9.1)"] [[package]] name = "iniconfig" @@ -623,18 +638,18 @@ watchmedo = ["PyYAML (>=3.10)"] name = "zipp" version = "3.6.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "dev" +category = "main" optional = false python-versions = ">=3.6" [package.extras] docs = ["sphinx", "jaraco.packaging (>=8.2)", "rst.linker (>=1.9)"] -testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco.itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] +testing = ["pytest (>=4.6)", "pytest-checkdocs (>=2.4)", "pytest-flake8", "pytest-cov", "pytest-enabler (>=1.0.1)", "jaraco-itertools", "func-timeout", "pytest-black (>=0.3.7)", "pytest-mypy"] [metadata] lock-version = "1.1" python-versions = "^3.7" -content-hash = "09a75ed923554d44c6f1195434ae31c4467b2364fb24e31c98df0654ae6023cd" +content-hash = "9be27b704fa562cdb98317d59458801aa96e0b2896f559dbb1bba725c1e86b93" [metadata.files] atomicwrites = [ @@ -649,11 +664,11 @@ babel = [ {file = "Babel-2.9.1-py2.py3-none-any.whl", hash = "sha256:ab49e12b91d937cd11f0b67cb259a57ab4ad2b59ac7a3b41d6c06c0ac5b0def9"}, {file = "Babel-2.9.1.tar.gz", hash = "sha256:bc0c176f9f6a994582230df350aa6e05ba2ebe4b3ac317eab29d9be5d2768da0"}, ] -"backports.entry-points-selectable" = [ +backports-entry-points-selectable = [ {file = "backports.entry_points_selectable-1.1.1-py2.py3-none-any.whl", hash = "sha256:7fceed9532a7aa2bd888654a7314f864a3c16a4e710b34a58cfc0f08114c663b"}, {file = "backports.entry_points_selectable-1.1.1.tar.gz", hash = "sha256:914b21a479fde881635f7af5adc7f6e38d6b274be32269070c53b698c60d5386"}, ] -"backports.zoneinfo" = [ +backports-zoneinfo = [ {file = "backports.zoneinfo-0.2.1-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:da6013fd84a690242c310d77ddb8441a559e9cb3d3d59ebac9aca1a57b2e18bc"}, {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_i686.whl", hash = "sha256:89a48c0d158a3cc3f654da4c2de1ceba85263fafb861b98b59040a5086259722"}, {file = "backports.zoneinfo-0.2.1-cp36-cp36m-manylinux1_x86_64.whl", hash = "sha256:1c5742112073a563c81f786e77514969acb58649bcdf6cdf0b4ed31a348d4546"}, @@ -764,6 +779,10 @@ importlib-metadata = [ {file = "importlib_metadata-4.10.0-py3-none-any.whl", hash = "sha256:b7cf7d3fef75f1e4c80a96ca660efbd51473d7e8f39b5ab9210febc7809012a4"}, {file = "importlib_metadata-4.10.0.tar.gz", hash = "sha256:92a8b58ce734b2a4494878e0ecf7d79ccd7a128b5fc6014c401e0b61f006f0f6"}, ] +importlib-resources = [ + {file = "importlib_resources-5.9.0-py3-none-any.whl", hash = "sha256:f78a8df21a79bcc30cfd400bdc38f314333de7c0fb619763f6b9dabab8268bb7"}, + {file = "importlib_resources-5.9.0.tar.gz", hash = "sha256:5481e97fb45af8dcf2f798952625591c58fe599d0735d86b10f54de086a61681"}, +] iniconfig = [ {file = "iniconfig-1.1.1-py2.py3-none-any.whl", hash = "sha256:011e24c64b7f47f6ebd835bb12a743f2fbe9a26d4cecaa7f53bc4f35ee9da8b3"}, {file = "iniconfig-1.1.1.tar.gz", hash = "sha256:bc3af051d7d14b2ee5ef9969666def0cd1a000e121eaea580d4a313df4b37f32"}, diff --git a/pyproject.toml b/pyproject.toml index 748cae9b..4b6718e7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -29,6 +29,7 @@ python = "^3.7" python-dateutil = "^2.6" "backports.zoneinfo" = {version = "^0.2.1", python = ">=3.7,<3.9"} tzdata = ">=2020.1" +importlib-resources = {version = "^5.9.0", python = ">=3.7,<3.9"} [tool.poetry.group.test.dependencies] pytest = "^6.2.5" From 7c092edbe1d89583375157a0b6c1fa69165c01e0 Mon Sep 17 00:00:00 2001 From: Bartek Sokorski Date: Fri, 5 Aug 2022 15:59:51 +0200 Subject: [PATCH 045/177] Apply changes required by flake8 plugins --- .flake8 | 3 +- build.py | 6 +- clock | 2 +- pendulum/__init__.py | 92 +-- pendulum/_extensions/helpers.py | 52 +- pendulum/date.py | 50 +- pendulum/datetime.py | 69 +- pendulum/duration.py | 9 +- pendulum/formatting/__init__.py | 2 +- pendulum/formatting/difference_formatter.py | 15 +- pendulum/formatting/formatter.py | 18 +- pendulum/helpers.py | 38 +- pendulum/mixins/default.py | 2 +- pendulum/parser.py | 23 +- pendulum/parsing/__init__.py | 23 +- pendulum/parsing/iso8601.py | 32 +- pendulum/period.py | 17 +- pendulum/time.py | 21 +- pendulum/tz/__init__.py | 12 +- pendulum/tz/local_timezone.py | 29 +- pendulum/tz/timezone.py | 12 +- tests/date/test_add.py | 2 +- tests/date/test_comparison.py | 4 +- tests/date/test_construct.py | 3 +- tests/date/test_day_of_week_modifiers.py | 3 +- tests/date/test_diff.py | 170 ++--- tests/date/test_fluent_setters.py | 2 +- tests/date/test_start_end_of.py | 3 +- tests/date/test_sub.py | 2 +- tests/datetime/test_add.py | 16 +- tests/datetime/test_comparison.py | 2 +- tests/datetime/test_construct.py | 5 +- tests/datetime/test_create_from_timestamp.py | 3 +- tests/datetime/test_day_of_week_modifiers.py | 3 +- tests/datetime/test_diff.py | 456 +++++++------ tests/datetime/test_fluent_setters.py | 82 +-- tests/datetime/test_from_format.py | 19 +- tests/datetime/test_getters.py | 5 +- tests/datetime/test_naive.py | 2 +- tests/datetime/test_replace.py | 2 +- tests/datetime/test_start_end_of.py | 2 +- tests/datetime/test_strings.py | 10 +- tests/datetime/test_sub.py | 16 +- tests/datetime/test_timezone.py | 2 +- tests/duration/test_add_sub.py | 2 +- tests/duration/test_arithmetic.py | 2 +- tests/duration/test_construct.py | 21 +- tests/parsing/test_parsing.py | 652 +++++++++---------- tests/period/test_arithmetic.py | 2 +- tests/period/test_construct.py | 2 +- tests/period/test_range.py | 5 +- tests/test_helpers.py | 18 +- tests/test_main.py | 2 +- tests/test_parsing.py | 24 +- tests/time/test_comparison.py | 2 +- tests/time/test_construct.py | 2 +- tests/time/test_fluent_setters.py | 3 +- tests/time/test_sub.py | 3 +- tests/tz/test_timezone.py | 7 +- tests/tz/test_timezones.py | 2 +- 60 files changed, 1050 insertions(+), 1040 deletions(-) diff --git a/.flake8 b/.flake8 index fe0ad3e8..d5712859 100644 --- a/.flake8 +++ b/.flake8 @@ -2,7 +2,8 @@ max-line-length = 88 per-file-ignores = # F401: Module imported but unused - __init__.py:F401 + # TC001: Move import into type checking block + __init__.py:F401, TC001 # F811: Redefinition of unused name from line n pendulum/tz/timezone.py:F811 min_python_version = 3.7.0 diff --git a/build.py b/build.py index 885b1c3b..ae98d976 100644 --- a/build.py +++ b/build.py @@ -51,10 +51,8 @@ def build_extension(self, ext): build_ext.build_extension(self, ext) except (CCompilerError, DistutilsExecError, DistutilsPlatformError, ValueError): print( - ' Unable to build the "{}" C extension, ' - "Pendulum will use the pure python version of the extension.".format( - ext.name - ) + f' Unable to build the "{ext.name}" C extension, ' + "Pendulum will use the pure python version of the extension." ) diff --git a/clock b/clock index d549e21d..17f35a32 100755 --- a/clock +++ b/clock @@ -252,7 +252,7 @@ class WindowsTzDump(Command): def handle(self): raw_tznames = get_global("windows_zone_mapping") - sorted_names = sorted(list(raw_tznames.keys())) + sorted_names = sorted(raw_tznames.keys()) tznames = {} for name in sorted_names: diff --git a/pendulum/__init__.py b/pendulum/__init__.py index 85e84f7d..bbe284b9 100644 --- a/pendulum/__init__.py +++ b/pendulum/__init__.py @@ -5,52 +5,52 @@ from typing import Optional from typing import Union -from .__version__ import __version__ -from .constants import DAYS_PER_WEEK -from .constants import FRIDAY -from .constants import HOURS_PER_DAY -from .constants import MINUTES_PER_HOUR -from .constants import MONDAY -from .constants import MONTHS_PER_YEAR -from .constants import SATURDAY -from .constants import SECONDS_PER_DAY -from .constants import SECONDS_PER_HOUR -from .constants import SECONDS_PER_MINUTE -from .constants import SUNDAY -from .constants import THURSDAY -from .constants import TUESDAY -from .constants import WEDNESDAY -from .constants import WEEKS_PER_YEAR -from .constants import YEARS_PER_CENTURY -from .constants import YEARS_PER_DECADE -from .date import Date -from .datetime import DateTime -from .duration import Duration -from .formatting import Formatter -from .helpers import format_diff -from .helpers import get_locale -from .helpers import get_test_now -from .helpers import has_test_now -from .helpers import locale -from .helpers import set_locale -from .helpers import set_test_now -from .helpers import test -from .helpers import week_ends_at -from .helpers import week_starts_at -from .parser import parse -from .period import Period -from .time import Time -from .tz import POST_TRANSITION -from .tz import PRE_TRANSITION -from .tz import TRANSITION_ERROR -from .tz import UTC -from .tz import local_timezone -from .tz import set_local_timezone -from .tz import test_local_timezone -from .tz import timezone -from .tz import timezones -from .tz.timezone import FixedTimezone -from .tz.timezone import Timezone +from pendulum.__version__ import __version__ +from pendulum.constants import DAYS_PER_WEEK +from pendulum.constants import FRIDAY +from pendulum.constants import HOURS_PER_DAY +from pendulum.constants import MINUTES_PER_HOUR +from pendulum.constants import MONDAY +from pendulum.constants import MONTHS_PER_YEAR +from pendulum.constants import SATURDAY +from pendulum.constants import SECONDS_PER_DAY +from pendulum.constants import SECONDS_PER_HOUR +from pendulum.constants import SECONDS_PER_MINUTE +from pendulum.constants import SUNDAY +from pendulum.constants import THURSDAY +from pendulum.constants import TUESDAY +from pendulum.constants import WEDNESDAY +from pendulum.constants import WEEKS_PER_YEAR +from pendulum.constants import YEARS_PER_CENTURY +from pendulum.constants import YEARS_PER_DECADE +from pendulum.date import Date +from pendulum.datetime import DateTime +from pendulum.duration import Duration +from pendulum.formatting import Formatter +from pendulum.helpers import format_diff +from pendulum.helpers import get_locale +from pendulum.helpers import get_test_now +from pendulum.helpers import has_test_now +from pendulum.helpers import locale +from pendulum.helpers import set_locale +from pendulum.helpers import set_test_now +from pendulum.helpers import test +from pendulum.helpers import week_ends_at +from pendulum.helpers import week_starts_at +from pendulum.parser import parse +from pendulum.period import Period +from pendulum.time import Time +from pendulum.tz import POST_TRANSITION +from pendulum.tz import PRE_TRANSITION +from pendulum.tz import TRANSITION_ERROR +from pendulum.tz import UTC +from pendulum.tz import local_timezone +from pendulum.tz import set_local_timezone +from pendulum.tz import test_local_timezone +from pendulum.tz import timezone +from pendulum.tz import timezones +from pendulum.tz.timezone import FixedTimezone +from pendulum.tz.timezone import Timezone _TEST_NOW: DateTime | None = None diff --git a/pendulum/_extensions/helpers.py b/pendulum/_extensions/helpers.py index 9342351d..992ea06b 100644 --- a/pendulum/_extensions/helpers.py +++ b/pendulum/_extensions/helpers.py @@ -5,21 +5,21 @@ from collections import namedtuple -from ..constants import DAY_OF_WEEK_TABLE -from ..constants import DAYS_PER_L_YEAR -from ..constants import DAYS_PER_MONTHS -from ..constants import DAYS_PER_N_YEAR -from ..constants import EPOCH_YEAR -from ..constants import MONTHS_OFFSETS -from ..constants import SECS_PER_4_YEARS -from ..constants import SECS_PER_100_YEARS -from ..constants import SECS_PER_400_YEARS -from ..constants import SECS_PER_DAY -from ..constants import SECS_PER_HOUR -from ..constants import SECS_PER_MIN -from ..constants import SECS_PER_YEAR -from ..constants import TM_DECEMBER -from ..constants import TM_JANUARY +from pendulum.constants import DAY_OF_WEEK_TABLE +from pendulum.constants import DAYS_PER_L_YEAR +from pendulum.constants import DAYS_PER_MONTHS +from pendulum.constants import DAYS_PER_N_YEAR +from pendulum.constants import EPOCH_YEAR +from pendulum.constants import MONTHS_OFFSETS +from pendulum.constants import SECS_PER_4_YEARS +from pendulum.constants import SECS_PER_100_YEARS +from pendulum.constants import SECS_PER_400_YEARS +from pendulum.constants import SECS_PER_DAY +from pendulum.constants import SECS_PER_HOUR +from pendulum.constants import SECS_PER_MIN +from pendulum.constants import SECS_PER_YEAR +from pendulum.constants import TM_DECEMBER +from pendulum.constants import TM_JANUARY class PreciseDiff( @@ -30,21 +30,13 @@ class PreciseDiff( ): def __repr__(self): return ( - "{years} years " - "{months} months " - "{days} days " - "{hours} hours " - "{minutes} minutes " - "{seconds} seconds " - "{microseconds} microseconds" - ).format( - years=self.years, - months=self.months, - days=self.days, - hours=self.hours, - minutes=self.minutes, - seconds=self.seconds, - microseconds=self.microseconds, + f"{self.years} years " + f"{self.months} months " + f"{self.days} days " + f"{self.hours} hours " + f"{self.minutes} minutes " + f"{self.seconds} seconds " + f"{self.microseconds} microseconds" ) diff --git a/pendulum/date.py b/pendulum/date.py index 1d2e6ce9..925f7a87 100644 --- a/pendulum/date.py +++ b/pendulum/date.py @@ -8,20 +8,20 @@ import pendulum -from .constants import FRIDAY -from .constants import MONDAY -from .constants import MONTHS_PER_YEAR -from .constants import SATURDAY -from .constants import SUNDAY -from .constants import THURSDAY -from .constants import TUESDAY -from .constants import WEDNESDAY -from .constants import YEARS_PER_CENTURY -from .constants import YEARS_PER_DECADE -from .exceptions import PendulumException -from .helpers import add_duration -from .mixins.default import FormattableMixin -from .period import Period +from pendulum.constants import FRIDAY +from pendulum.constants import MONDAY +from pendulum.constants import MONTHS_PER_YEAR +from pendulum.constants import SATURDAY +from pendulum.constants import SUNDAY +from pendulum.constants import THURSDAY +from pendulum.constants import TUESDAY +from pendulum.constants import WEDNESDAY +from pendulum.constants import YEARS_PER_CENTURY +from pendulum.constants import YEARS_PER_DECADE +from pendulum.exceptions import PendulumException +from pendulum.helpers import add_duration +from pendulum.mixins.default import FormattableMixin +from pendulum.period import Period class Date(FormattableMixin, date): @@ -105,16 +105,7 @@ def to_formatted_date_string(self): return self.strftime("%b %d, %Y") def __repr__(self): - return ( - "{klass}(" - "{year}, {month}, {day}" - ")".format( - klass=self.__class__.__name__, - year=self.year, - month=self.month, - day=self.day, - ) - ) + return f"{self.__class__.__name__}({self.year}, {self.month}, {self.day})" # COMPARISONS @@ -652,9 +643,8 @@ def nth_of(self, unit, nth, day_of_week): dt = getattr(self, f"_nth_of_{unit}")(nth, day_of_week) if dt is False: raise PendulumException( - "Unable to find occurence {} of {} in {}".format( - nth, self._days[day_of_week], unit - ) + f"Unable to find occurence {nth}" + f" of {self._days[day_of_week]} in {unit}" ) return dt @@ -732,7 +722,7 @@ def _nth_of_month(self, nth, day_of_week): dt = self.first_of("month") check = dt.format("YYYY-MM") - for i in range(nth - (1 if dt.day_of_week == day_of_week else 0)): + for _ in range(nth - (1 if dt.day_of_week == day_of_week else 0)): dt = dt.next(day_of_week) if dt.format("YYYY-MM") == check: @@ -789,7 +779,7 @@ def _nth_of_quarter(self, nth, day_of_week): last_month = dt.month year = dt.year dt = dt.first_of("quarter") - for i in range(nth - (1 if dt.day_of_week == day_of_week else 0)): + for _ in range(nth - (1 if dt.day_of_week == day_of_week else 0)): dt = dt.next(day_of_week) if last_month < dt.month or year != dt.year: @@ -842,7 +832,7 @@ def _nth_of_year(self, nth, day_of_week): dt = self.first_of("year") year = dt.year - for i in range(nth - (1 if dt.day_of_week == day_of_week else 0)): + for _ in range(nth - (1 if dt.day_of_week == day_of_week else 0)): dt = dt.next(day_of_week) if year != dt.year: diff --git a/pendulum/datetime.py b/pendulum/datetime.py index 037cae36..03fb28d8 100644 --- a/pendulum/datetime.py +++ b/pendulum/datetime.py @@ -7,35 +7,35 @@ import pendulum -from .constants import ATOM -from .constants import COOKIE -from .constants import MINUTES_PER_HOUR -from .constants import MONTHS_PER_YEAR -from .constants import RFC822 -from .constants import RFC850 -from .constants import RFC1036 -from .constants import RFC1123 -from .constants import RFC2822 -from .constants import RSS -from .constants import SATURDAY -from .constants import SECONDS_PER_DAY -from .constants import SECONDS_PER_MINUTE -from .constants import SUNDAY -from .constants import W3C -from .constants import YEARS_PER_CENTURY -from .constants import YEARS_PER_DECADE -from .date import Date -from .exceptions import PendulumException -from .helpers import add_duration -from .helpers import get_test_now -from .helpers import has_test_now -from .period import Period -from .time import Time -from .tz import UTC -from .tz import local_timezone -from .tz.timezone import FixedTimezone -from .tz.timezone import Timezone -from .utils._compat import PY38 +from pendulum.constants import ATOM +from pendulum.constants import COOKIE +from pendulum.constants import MINUTES_PER_HOUR +from pendulum.constants import MONTHS_PER_YEAR +from pendulum.constants import RFC822 +from pendulum.constants import RFC850 +from pendulum.constants import RFC1036 +from pendulum.constants import RFC1123 +from pendulum.constants import RFC2822 +from pendulum.constants import RSS +from pendulum.constants import SATURDAY +from pendulum.constants import SECONDS_PER_DAY +from pendulum.constants import SECONDS_PER_MINUTE +from pendulum.constants import SUNDAY +from pendulum.constants import W3C +from pendulum.constants import YEARS_PER_CENTURY +from pendulum.constants import YEARS_PER_DECADE +from pendulum.date import Date +from pendulum.exceptions import PendulumException +from pendulum.helpers import add_duration +from pendulum.helpers import get_test_now +from pendulum.helpers import has_test_now +from pendulum.period import Period +from pendulum.time import Time +from pendulum.tz import UTC +from pendulum.tz import local_timezone +from pendulum.tz.timezone import FixedTimezone +from pendulum.tz.timezone import Timezone +from pendulum.utils._compat import PY38 class DateTime(datetime.datetime, Date): @@ -979,9 +979,8 @@ def nth_of(self, unit: str, nth: int, day_of_week: int) -> DateTime: dt = getattr(self, f"_nth_of_{unit}")(nth, day_of_week) if dt is False: raise PendulumException( - "Unable to find occurence {} of {} in {}".format( - nth, self._days[day_of_week], unit - ) + f"Unable to find occurence {nth}" + f" of {self._days[day_of_week]} in {unit}" ) return dt @@ -1045,7 +1044,7 @@ def _nth_of_month(self, nth: int, day_of_week: int | None = None) -> DateTime: dt = self.first_of("month") check = dt.format("%Y-%M") - for i in range(nth - (1 if dt.day_of_week == day_of_week else 0)): + for _ in range(nth - (1 if dt.day_of_week == day_of_week else 0)): dt = dt.next(day_of_week) if dt.format("%Y-%M") == check: @@ -1094,7 +1093,7 @@ def _nth_of_quarter(self, nth: int, day_of_week: int | None = None) -> DateTime: last_month = dt.month year = dt.year dt = dt.first_of("quarter") - for i in range(nth - (1 if dt.day_of_week == day_of_week else 0)): + for _ in range(nth - (1 if dt.day_of_week == day_of_week else 0)): dt = dt.next(day_of_week) if last_month < dt.month or year != dt.year: @@ -1133,7 +1132,7 @@ def _nth_of_year(self, nth: int, day_of_week: int | None = None) -> DateTime: dt = self.first_of("year") year = dt.year - for i in range(nth - (1 if dt.day_of_week == day_of_week else 0)): + for _ in range(nth - (1 if dt.day_of_week == day_of_week else 0)): dt = dt.next(day_of_week) if year != dt.year: diff --git a/pendulum/duration.py b/pendulum/duration.py index 411b2e9e..88414ff3 100644 --- a/pendulum/duration.py +++ b/pendulum/duration.py @@ -4,13 +4,12 @@ import pendulum +from pendulum.constants import SECONDS_PER_DAY +from pendulum.constants import SECONDS_PER_HOUR +from pendulum.constants import SECONDS_PER_MINUTE +from pendulum.constants import US_PER_SECOND from pendulum.utils._compat import PYPY -from .constants import SECONDS_PER_DAY -from .constants import SECONDS_PER_HOUR -from .constants import SECONDS_PER_MINUTE -from .constants import US_PER_SECOND - def _divide_and_round(a, b): """divide a by b and round result to the nearest integer diff --git a/pendulum/formatting/__init__.py b/pendulum/formatting/__init__.py index 8e33afd5..0c6e725d 100644 --- a/pendulum/formatting/__init__.py +++ b/pendulum/formatting/__init__.py @@ -1,6 +1,6 @@ from __future__ import annotations -from .formatter import Formatter +from pendulum.formatting.formatter import Formatter __all__ = ["Formatter"] diff --git a/pendulum/formatting/difference_formatter.py b/pendulum/formatting/difference_formatter.py index 0325d303..4d738fa4 100644 --- a/pendulum/formatting/difference_formatter.py +++ b/pendulum/formatting/difference_formatter.py @@ -1,8 +1,12 @@ from __future__ import annotations -import pendulum +import typing as t -from ..locales.locale import Locale +from pendulum.locales.locale import Locale + + +if t.TYPE_CHECKING: + from pendulum import Period class DifferenceFormatter: @@ -15,7 +19,7 @@ def __init__(self, locale="en"): def format( self, - diff: pendulum.Period, + diff: Period, is_now: bool = True, absolute: bool = False, locale: str | None = None, @@ -136,9 +140,8 @@ def format( trans = locale.get(key) if not trans: # No special rule - time = locale.get( - f"translations.units.{unit}.{locale.plural(count)}" - ).format(count) + key = f"translations.units.{unit}.{locale.plural(count)}" + time = locale.get(key).format(count) else: time = trans[locale.plural(count)].format(count) diff --git a/pendulum/formatting/formatter.py b/pendulum/formatting/formatter.py index 4aad0fd3..29d1acf6 100644 --- a/pendulum/formatting/formatter.py +++ b/pendulum/formatting/formatter.py @@ -125,8 +125,8 @@ class Formatter: "X": lambda dt: f"{dt.int_timestamp:d}", "x": lambda dt: f"{dt.int_timestamp * 1000 + dt.microsecond // 1000:d}", # Timezone - "zz": lambda dt: "{}".format(dt.tzname() if dt.tzinfo is not None else ""), - "z": lambda dt: "{}".format(dt.timezone_name or ""), + "zz": lambda dt: f'{dt.tzname() if dt.tzinfo is not None else ""}', + "z": lambda dt: f'{dt.timezone_name or ""}', } _DATE_FORMATS = { @@ -438,7 +438,7 @@ def _check_parsed( if parsed["timestamp"] is not None: str_us = str(parsed["timestamp"]) if "." in str_us: - microseconds = int("{}".format(str_us.split(".")[1].ljust(6, "0"))) + microseconds = int(f'{str_us.split(".")[1].ljust(6, "0")}') else: microseconds = 0 @@ -474,9 +474,7 @@ def _check_parsed( validated["year"] = now.year if parsed["day_of_year"] is not None: - dt = pendulum.parse( - "{}-{:>03d}".format(validated["year"], parsed["day_of_year"]) - ) + dt = pendulum.parse(f'{validated["year"]}-{parsed["day_of_year"]:>03d}') validated["month"] = dt.month validated["day"] = dt.day @@ -561,7 +559,7 @@ def _get_parsed_value( parsed_token = now.year // 100 * 100 + parsed_token parsed["year"] = parsed_token - elif "Q" == token: + elif token == "Q": parsed["quarter"] = parsed_token elif token in ["MM", "M"]: parsed["month"] = parsed_token @@ -587,7 +585,7 @@ def _get_parsed_value( elif token in ["X", "x"]: parsed["timestamp"] = parsed_token elif token in ["ZZ", "Z"]: - negative = True if value.startswith("-") else False + negative = bool(value.startswith("-")) tz = value[1:] if ":" not in tz: if len(tz) == 2: @@ -641,7 +639,7 @@ def _get_parsed_locale_value( if token == "a": value = value.lower() - valid_values = list(map(lambda x: x.lower(), valid_values)) + valid_values = [x.lower() for x in valid_values] if value not in valid_values: raise ValueError("Invalid date") @@ -684,6 +682,6 @@ def _replace_tokens(self, token: str, locale: Locale) -> str: if not isinstance(candidates, tuple): candidates = (candidates,) - pattern = "(?P<{}>{})".format(token, "|".join(candidates)) + pattern = f'(?P<{token}>{"|".join(candidates)})' return pattern diff --git a/pendulum/helpers.py b/pendulum/helpers.py index 7653c333..7d6f831f 100644 --- a/pendulum/helpers.py +++ b/pendulum/helpers.py @@ -15,14 +15,14 @@ import pendulum -from .constants import DAYS_PER_MONTHS -from .formatting.difference_formatter import DifferenceFormatter -from .locales.locale import Locale +from pendulum.constants import DAYS_PER_MONTHS +from pendulum.formatting.difference_formatter import DifferenceFormatter +from pendulum.locales.locale import Locale if TYPE_CHECKING: # Prevent import cycles - from .period import Period + from pendulum.period import Period with_extensions = os.getenv("PENDULUM_EXTENSIONS", "1") == "1" @@ -30,25 +30,25 @@ _D = TypeVar("_D", bound=date) try: - # nopycln: file + # nopycln: file # noqa: E800 if not with_extensions or struct.calcsize("P") == 4: raise ImportError() - from ._extensions._helpers import days_in_year - from ._extensions._helpers import is_leap - from ._extensions._helpers import is_long_year - from ._extensions._helpers import local_time - from ._extensions._helpers import precise_diff - from ._extensions._helpers import timestamp - from ._extensions._helpers import week_day + from pendulum._extensions._helpers import days_in_year + from pendulum._extensions._helpers import is_leap + from pendulum._extensions._helpers import is_long_year + from pendulum._extensions._helpers import local_time + from pendulum._extensions._helpers import precise_diff + from pendulum._extensions._helpers import timestamp + from pendulum._extensions._helpers import week_day except ImportError: - from ._extensions.helpers import days_in_year # noqa - from ._extensions.helpers import is_leap # noqa - from ._extensions.helpers import is_long_year # noqa - from ._extensions.helpers import local_time # noqa - from ._extensions.helpers import precise_diff # noqa - from ._extensions.helpers import timestamp # noqa - from ._extensions.helpers import week_day # noqa + from pendulum._extensions.helpers import days_in_year # noqa + from pendulum._extensions.helpers import is_leap + from pendulum._extensions.helpers import is_long_year # noqa + from pendulum._extensions.helpers import local_time # noqa + from pendulum._extensions.helpers import precise_diff # noqa + from pendulum._extensions.helpers import timestamp # noqa + from pendulum._extensions.helpers import week_day # noqa difference_formatter = DifferenceFormatter() diff --git a/pendulum/mixins/default.py b/pendulum/mixins/default.py index cff9cc9c..f6f0315c 100644 --- a/pendulum/mixins/default.py +++ b/pendulum/mixins/default.py @@ -1,6 +1,6 @@ from __future__ import annotations -from ..formatting import Formatter +from pendulum.formatting import Formatter _formatter = Formatter() diff --git a/pendulum/parser.py b/pendulum/parser.py index 509348fb..dc3ab489 100644 --- a/pendulum/parser.py +++ b/pendulum/parser.py @@ -1,26 +1,29 @@ from __future__ import annotations import datetime -import typing +import typing as t import pendulum -from .date import Date -from .datetime import DateTime -from .parsing import _Interval -from .parsing import parse as base_parse -from .time import Duration -from .time import Time -from .tz import UTC +from pendulum.parsing import _Interval +from pendulum.parsing import parse as base_parse +from pendulum.tz import UTC + + +if t.TYPE_CHECKING: + from pendulum.date import Date + from pendulum.datetime import DateTime + from pendulum.time import Duration + from pendulum.time import Time try: - from .parsing._iso8601 import Duration as CDuration + from pendulum.parsing._iso8601 import Duration as CDuration except ImportError: CDuration = None -def parse(text: str, **options: typing.Any) -> Date | Time | DateTime | Duration: +def parse(text: str, **options: t.Any) -> Date | Time | DateTime | Duration: # Use the mock now value if it exists options["now"] = options.get("now", pendulum.get_test_now()) diff --git a/pendulum/parsing/__init__.py b/pendulum/parsing/__init__.py index 352f68c8..58554630 100644 --- a/pendulum/parsing/__init__.py +++ b/pendulum/parsing/__init__.py @@ -1,5 +1,6 @@ from __future__ import annotations +import contextlib import copy import os import re @@ -11,7 +12,7 @@ from dateutil import parser -from .exceptions import ParserError +from pendulum.parsing.exceptions import ParserError with_extensions = os.getenv("PENDULUM_EXTENSIONS", "1") == "1" @@ -20,13 +21,13 @@ if not with_extensions or struct.calcsize("P") == 4: raise ImportError() - from ._iso8601 import parse_iso8601 + from pendulum.parsing._iso8601 import parse_iso8601 except ImportError: - from .iso8601 import parse_iso8601 + from pendulum.parsing.iso8601 import parse_iso8601 COMMON = re.compile( - # Date (optional) + # Date (optional) # noqa: E800 "^" "(?P" " (?P" # Classic date (YYYY-MM-DD) @@ -37,7 +38,7 @@ " )?" " )" ")?" - # Time (optional) + # Time (optional) # noqa: E800 "(?P