From 23799085d842f6531a2dff3340cdc9d010b07993 Mon Sep 17 00:00:00 2001 From: Ji Xu Date: Sat, 19 Nov 2022 00:09:44 -0800 Subject: [PATCH 01/10] address issue #1201 --- AUTHORS.md | 1 + CHANGELOG.md | 2 ++ janitor/utils.py | 4 ++-- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 6efebccb8..c3898cba5 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -110,3 +110,4 @@ Contributors - [@apatao](https://github.com/apatao) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues?q=is%3Aclosed+mentions%3Aapatao) - [@OdinTech3](https://github.com/OdinTech3) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/pull/1094) - [@asmirnov69](https://github.com/asmirnov69) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues/1059) +- [@xujiboy](https://github.com/xujiboy) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues/1201) \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index aefb42fec..a1d5c3d19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,8 @@ ## [Unreleased] +- [BUG] address the `TypeError` when importing v0.24.0 (issue #1201 @xujiboy) + ## [v0.24.0] - 2022-11-12 - [ENH] Add lazy imports to speed up the time taken to load pyjanitor (part 2) diff --git a/janitor/utils.py b/janitor/utils.py index 3101bed0f..83b1eb9a5 100644 --- a/janitor/utils.py +++ b/janitor/utils.py @@ -6,7 +6,7 @@ import os import sys import socket -from typing import Callable, Dict, Iterable, Union +from typing import Callable, Dict, Iterable, Union, List from functools import singledispatch, wraps from warnings import warn @@ -213,7 +213,7 @@ def idempotent(func: Callable, df: pd.DataFrame, *args, **kwargs): def deprecated_kwargs( - *arguments: list[str], + *arguments: List[str], message: str = ( "The keyword argument '{argument}' of '{func_name}' is deprecated." ), From ccdcdca6c5174b3fe116299bf1f40e98dda023b1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Sat, 19 Nov 2022 08:13:44 +0000 Subject: [PATCH 02/10] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- AUTHORS.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AUTHORS.md b/AUTHORS.md index c3898cba5..7cf8cb00e 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -110,4 +110,4 @@ Contributors - [@apatao](https://github.com/apatao) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues?q=is%3Aclosed+mentions%3Aapatao) - [@OdinTech3](https://github.com/OdinTech3) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/pull/1094) - [@asmirnov69](https://github.com/asmirnov69) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues/1059) -- [@xujiboy](https://github.com/xujiboy) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues/1201) \ No newline at end of file +- [@xujiboy](https://github.com/xujiboy) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues/1201) From 1f3fe2f7325be2acdb26f31aa53db21603d9d4ae Mon Sep 17 00:00:00 2001 From: Eric Ma Date: Thu, 24 Nov 2022 15:00:24 -0500 Subject: [PATCH 03/10] Add @joranbeasley for contributions --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c06848bc..04e46020f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,7 +4,7 @@ - [INF] Replace `pytest.ini` file with `pyproject.toml` file. PR #1204 @Zeroto521 - [INF] Extract docstrings tests from all tests. PR #1205 @Zeroto521 -- [BUG] address the `TypeError` when importing v0.24.0 (issue #1201 @xujiboy) +- [BUG] address the `TypeError` when importing v0.24.0 (issue #1201 @xujiboy and @joranbeasley) ## [v0.24.0] - 2022-11-12 From 2f1dbb74bd86f3263a17f36b5c40dc092547e732 Mon Sep 17 00:00:00 2001 From: Eric Ma Date: Thu, 24 Nov 2022 15:01:46 -0500 Subject: [PATCH 04/10] Update AUTHORS.md --- AUTHORS.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/AUTHORS.md b/AUTHORS.md index 7cf8cb00e..b59812dad 100644 --- a/AUTHORS.md +++ b/AUTHORS.md @@ -108,6 +108,7 @@ Contributors - [@gahjelle](https://github.com/gahjelle) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues?q=is%3Aclosed+mentions%3Agahjelle) - [@ethompsy](https://github.com/ethompsy) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues?q=is%3Aclosed+mentions%3Aethompsy) - [@apatao](https://github.com/apatao) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues?q=is%3Aclosed+mentions%3Aapatao) -- [@OdinTech3](https://github.com/OdinTech3) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/pull/1094) -- [@asmirnov69](https://github.com/asmirnov69) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues/1059) -- [@xujiboy](https://github.com/xujiboy) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues/1201) +- [@OdinTech3](https://github.com/OdinTech3) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues?q=is%3Aclosed+mentions%OdinTech3) +- [@asmirnov69](https://github.com/asmirnov69) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues?q=is%3Aclosed+mentions%asmirnov69) +- [@xujiboy](https://github.com/xujiboy) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues?q=is%3Aclosed+mentions%xujiboy) +- [@joranbeasley](https://github.com/joranbeasley) | [contributions](https://github.com/pyjanitor-devs/pyjanitor/issues?q=is%3Aclosed+mentions%joranbeasley) From e17a4abc507fcdbf1d8d99c850882b084ef13f4e Mon Sep 17 00:00:00 2001 From: Samuel Oranyeli Date: Sat, 26 Nov 2022 21:56:45 +1100 Subject: [PATCH 05/10] Update utils.py --- janitor/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/janitor/utils.py b/janitor/utils.py index 83b1eb9a5..381f5cf2e 100644 --- a/janitor/utils.py +++ b/janitor/utils.py @@ -7,6 +7,7 @@ import sys import socket from typing import Callable, Dict, Iterable, Union, List +from __future__ import annotations from functools import singledispatch, wraps from warnings import warn From 359bb103313b3c214d358df15d5c201c9adc0e88 Mon Sep 17 00:00:00 2001 From: Samuel Oranyeli Date: Sat, 26 Nov 2022 21:58:25 +1100 Subject: [PATCH 06/10] Update utils.py --- janitor/functions/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/janitor/functions/utils.py b/janitor/functions/utils.py index f51fe9962..df4d194d9 100644 --- a/janitor/functions/utils.py +++ b/janitor/functions/utils.py @@ -3,6 +3,7 @@ import warnings from collections.abc import Callable as dispatch_callable import re +from __future__ import annotations from typing import ( Hashable, Iterable, From ad2b4968f70de50a5992a8de5311018d990c75bf Mon Sep 17 00:00:00 2001 From: Samuel Oranyeli Date: Sat, 26 Nov 2022 21:58:55 +1100 Subject: [PATCH 07/10] Update conditional_join.py --- janitor/functions/conditional_join.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/janitor/functions/conditional_join.py b/janitor/functions/conditional_join.py index 5a0fe2b6a..67267a430 100644 --- a/janitor/functions/conditional_join.py +++ b/janitor/functions/conditional_join.py @@ -1,7 +1,7 @@ import operator from enum import Enum from typing import Union, Any, Optional, Hashable, Literal - +from __future__ import annotations import numpy as np import pandas as pd import pandas_flavor as pf From 31e1edd22e17e811ffec9faba9b6a53b8d0cc484 Mon Sep 17 00:00:00 2001 From: Samuel Oranyeli Date: Sat, 26 Nov 2022 22:02:48 +1100 Subject: [PATCH 08/10] Update conditional_join.py --- janitor/functions/conditional_join.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/janitor/functions/conditional_join.py b/janitor/functions/conditional_join.py index 67267a430..dff1e16c0 100644 --- a/janitor/functions/conditional_join.py +++ b/janitor/functions/conditional_join.py @@ -1,7 +1,7 @@ +from __future__ import annotations import operator from enum import Enum from typing import Union, Any, Optional, Hashable, Literal -from __future__ import annotations import numpy as np import pandas as pd import pandas_flavor as pf From 7bed1bc57d4b076a1514241a269cf06725850a4f Mon Sep 17 00:00:00 2001 From: Samuel Oranyeli Date: Sat, 26 Nov 2022 22:03:06 +1100 Subject: [PATCH 09/10] Update utils.py --- janitor/functions/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/janitor/functions/utils.py b/janitor/functions/utils.py index df4d194d9..e60a38b05 100644 --- a/janitor/functions/utils.py +++ b/janitor/functions/utils.py @@ -1,9 +1,10 @@ """Utility functions for all of the functions submodule.""" + +from __future__ import annotations import fnmatch import warnings from collections.abc import Callable as dispatch_callable import re -from __future__ import annotations from typing import ( Hashable, Iterable, From 33afc9667886b34244baaeafbe14545e373f045f Mon Sep 17 00:00:00 2001 From: Samuel Oranyeli Date: Sat, 26 Nov 2022 22:03:28 +1100 Subject: [PATCH 10/10] Update utils.py --- janitor/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/janitor/utils.py b/janitor/utils.py index 381f5cf2e..1254c8946 100644 --- a/janitor/utils.py +++ b/janitor/utils.py @@ -3,11 +3,11 @@ Lazy loading used here to speed up imports. """ +from __future__ import annotations import os import sys import socket from typing import Callable, Dict, Iterable, Union, List -from __future__ import annotations from functools import singledispatch, wraps from warnings import warn