-
-
Notifications
You must be signed in to change notification settings - Fork 587
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Updates round 3 #2334
base: main
Are you sure you want to change the base?
Updates round 3 #2334
Conversation
c2c654a
to
677d368
Compare
@staticdev since I saw you merge my previous PR, I raised this just in case you wanted some more dependency updates since it was just a matter of cherry-picking from my fork |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2334 +/- ##
==========================================
+ Coverage 99.12% 99.16% +0.03%
==========================================
Files 40 40
Lines 3098 3098
Branches 788 788
==========================================
+ Hits 3071 3072 +1
Misses 15 15
+ Partials 12 11 -1 |
@@ -29,7 +29,7 @@ | |||
from pip_api import parse_requirements # type: ignore | |||
|
|||
except ImportError: | |||
parse_requirements = None | |||
parse_requirements = None # type: ignore[assignment] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be fixed by initialising parse_requirements
on line 27 as parse_requirements: types.ModelType | None
right? Or does mypy
no longer support that pattern?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be fixed by initialising
parse_requirements
on line 27 asparse_requirements: types.ModelType | None
right? Or doesmypy
no longer support that pattern?
Sorry, what is types.ModelType
?
I think the typing would have to be something like (from a glance at /~https://github.com/di/pip-api/blob/21eea42e37b29e18c004a922f8989108a006a203/pip_api/_parse_requirements.py#L484):
parse_requirements: (
Callable[
[os.PathLike[str], Optional[Any], bool, bool],
Dict[str, Union[pip_api.Requirement, pip_api.UnparsedRequirement]],
]
| None
)
but that's a bit tricky, because at this point pip_api
isn't imported, so pip_api.UnparsedRequirement
is unknown
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah my bad, didn't read this correctly.
Indeed seems like fixing this is more trouble than it is worth
pyproject.toml
Outdated
httpx = ">=0.13.3" | ||
hypothesmith = ">=0.1.3" | ||
hypothesis = ">=6.10.1" | ||
mypy = ">=0.902,<1.0.0" | ||
mypy = ">=0.902,<2.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why limit this to below 2?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why limit this to below 2?
The original commit was from dependabot
(matthewhughes934/isort-fork@390f27e) and that's how it handled it, happy to drop the restriction
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would probably remove it, but @staticdev might have a different opinion
pyproject.toml
Outdated
httpx = ">=0.13.3" | ||
hypothesmith = ">=0.1.3" | ||
hypothesis = ">=6.10.1" | ||
mypy = ">=0.902,<1.0.0" | ||
mypy = ">=0.902,<2.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to change to:
mypy = ">=0.902,<2.0.0" | |
mypy = ">=1.14.1" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would suggest to change to:
updated while rebasing on main
: 01afb2e
pyproject.toml
Outdated
@@ -56,11 +56,11 @@ cruft = ">=2.12.0" | |||
example-isort-sorting-plugin = ">=0.1.0" | |||
example-shared-isort-profile = ">=0.1.0" | |||
flake8 = ">=3.8.4" | |||
flake8-bugbear = ">=22.12.6,<23.0.0" | |||
flake8-bugbear = ">=22.12.6,<25.0.0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I would do:
flake8-bugbear = ">=22.12.6,<25.0.0" | |
flake8-bugbear = ">=24.12.12" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here I would do:
squashed in with my rebase: a8dbecf
677d368
to
a8dbecf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
@staticdev I think we can merge this already, it doesn't break main
more than it already is
a8dbecf
to
e316b9b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matthewhughes934 still we have to figure out what is the issue now with Python 3.13, since tests still are not passing.
👍 I will have a deeper look later today |
001d910
to
544d4db
Compare
A bunch of updates that required no additional changes: * Update `setuptools` * Update `bandit` * Update `httpx` * Update `pytest-mock` * Update `pep8-naming` * Update `pip_api` * Update `pip` * Update `safety` * Update `types-toml` * Update `vulture` * Update `coverage` * Update `types-colorama` A manual adjustment was made to the version of `safety-schemas` to avoid a version of `pydantic` that is incompatibility with Python 3.13[1] Link: pyupio/safety#620 [1]
This includes removing some now unused ignores, and fixing some new errors: isort/sorting.py:120: error: Unused "type: ignore" comment [unused-ignore] isort/settings.py:869: error: Unused "type: ignore" comment [unused-ignore] isort/literal.py:89: error: Unused "type: ignore" comment [unused-ignore] isort/deprecated/finders.py:32: error: Incompatible types in assignment (expression has type "None", variable has type "Callable[[PathLike[Any], Optional[Any], bool, bool], Dict[str, Union[Requirement, UnparsedRequirement]]]") [assignment] isort/api.py:196: error: No overload variant of "compile" matches argument types "str", "str", "str", "int", "int" [call-overload] isort/api.py:196: note: Possible overload variants: isort/api.py:196: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: Literal[0], dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> CodeType isort/api.py:196: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, *, dont_inherit: bool = ..., optimize: int = ..., _feature_version: int = ...) -> CodeType isort/api.py:196: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: Literal[1024], dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> AST isort/api.py:196: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: int, dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> Any isort/api.py:223: error: No overload variant of "compile" matches argument types "str", "str", "str", "int", "int" [call-overload] isort/api.py:223: note: Possible overload variants: isort/api.py:223: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: Literal[0], dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> CodeType isort/api.py:223: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, *, dont_inherit: bool = ..., optimize: int = ..., _feature_version: int = ...) -> CodeType isort/api.py:223: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: Literal[1024], dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> AST isort/api.py:223: note: def compile(source: Union[str, Buffer, Module, Expression, Interactive], filename: Union[str, Buffer, _PathLike[Any]], mode: str, flags: int, dont_inherit: bool = ..., optimize: int = ..., *, _feature_version: int = ...) -> Any tests/integration/test_setting_combinations.py:64: error: Unused "type: ignore" comment [unused-ignore] tests/unit/test_isort.py:5550: error: Signature of "seek" incompatible with supertype "TextIOWrapper" [override] tests/unit/test_isort.py:5550: note: Superclass: tests/unit/test_isort.py:5550: note: def seek(self, int, int = ..., /) -> int tests/unit/test_isort.py:5550: note: Subclass: tests/unit/test_isort.py:5550: note: def seek(self, position: Any) -> Any tests/unit/test_isort.py:5550: error: Signature of "seek" incompatible with supertype "IOBase" [override] tests/unit/test_isort.py:5550: note: Superclass: tests/unit/test_isort.py:5550: note: def seek(self, int, int = ..., /) -> int tests/unit/test_isort.py:5550: note: Subclass: tests/unit/test_isort.py:5550: note: def seek(self, position: Any) -> Any tests/unit/test_isort.py:5550: error: Signature of "seek" incompatible with supertype "IO" [override] tests/unit/test_isort.py:5550: note: Superclass: tests/unit/test_isort.py:5550: note: def seek(self, int, int = ..., /) -> int tests/unit/test_isort.py:5550: note: Subclass: tests/unit/test_isort.py:5550: note: def seek(self, position: Any) -> Any tests/integration/test_hypothesmith.py:69: error: Unused "type: ignore" comment [unused-ignore] Found 11 errors in 8 files (checked 88 source files)
And fix some issues from new `bugbear`: tests/unit/test_setuptools_command.py:15:5: B036 Don't except `BaseException` unless you plan to re-raise it. tests/unit/test_setuptools_command.py:30:5: B036 Don't except `BaseException` unless you plan to re-raise it.
544d4db
to
4f38a97
Compare
the failure was a built time, I've fixed it up and rebased, see commit faf22ce for details (the last bit of the body) |
Sorry @matthewhughes934 due to a merge of new Poetry this lock got obsolete. Could you please rebase and lock again? |
Final round of updates from my fork. After this I think all dependencies
should be close to their latest release, in my fork I added
dependabot
after these changes to keep things up to date.
Context, other PRs were from 26cf27d,
78c30dc and comment
#2320 (comment)
Update remaining dependencies
A bunch of updates that required no additional changes:
setuptools
bandit
httpx
pytest-mock
pep8-naming
pip_api
pip
safety
types-toml
vulture
coverage
types-colorama
Update
mypy
tov1
+This includes removing some now unused ignores, and fixing some new
errors:
Update
bugbear
And fix some issues from new
bugbear
: