Skip to content

WIP Issue 388 #390

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

Merged
merged 10 commits into from
Jun 6, 2020
Merged

WIP Issue 388 #390

merged 10 commits into from
Jun 6, 2020

Conversation

kszmigiel
Copy link
Member

@kszmigiel kszmigiel requested a review from sobolevn June 4, 2020 22:42
@kszmigiel kszmigiel changed the title Issue 388 WIP Issue 388 Jun 4, 2020
@kszmigiel
Copy link
Member Author

I'm not sure if I updated README properly, review required
I'll also appreciate all tips on fixing failing tests, as I have little experience on those.

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot!

README.md Outdated
@@ -47,6 +47,7 @@ We rely on different `django` and `mypy` versions:

| django-stubs | mypy version | django version | python version
| ------------ | ---- | ---- | ---- |
| 1.5.0 | ^0.770 | 3.0.x | ^3.7.7
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. 1.4.0 is missing
  2. python version is always ^3.6
  3. django version is 2.2 || 3.x
  4. mypy should be 0.780

Copy link
Member Author

@kszmigiel kszmigiel Jun 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please check if it's correct now, I was basing on https://github.com/typeddjango/django-stubs/releases

@kszmigiel
Copy link
Member Author

kszmigiel commented Jun 4, 2020

Also I had troubles running pytest with pytest-mypy-plugins updated to version 1.3.0, here's the error log:

Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 244, in from_call
    result = func()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 217, in <lambda>
    lambda: ihook(item=item, **kwds), when=when, reraise=reraise
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pluggy/hooks.py", line 286, in __call__
    return self._hookexec(self, self.get_hookimpls(), kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pluggy/manager.py", line 93, in _hookexec
    return self._inner_hookexec(hook, methods, kwargs)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pluggy/manager.py", line 87, in <lambda>
    firstresult=hook.spec.opts.get("firstresult") if hook.spec else False,
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pluggy/callers.py", line 208, in _multicall
    return outcome.get_result()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pluggy/callers.py", line 80, in get_result
    raise ex[1].with_traceback(ex[2])
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pluggy/callers.py", line 187, in _multicall
    res = hook_impl.function(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 143, in pytest_runtest_call
    raise e
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/_pytest/runner.py", line 135, in pytest_runtest_call
    item.runtest()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_mypy_plugins/item.py", line 228, in runtest
    self.execute_extension_hook()
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/pytest_mypy_plugins/item.py", line 211, in execute_extension_hook
    module = importlib.import_module(module_name)
  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
  File "<frozen importlib._bootstrap>", line 983, in _find_and_load
  File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "/Users/kacperszmigiel/Projects/django-stubs/scripts/tests_extension_hook.py", line 1, in <module>
    from pytest_mypy.collect import File
ModuleNotFoundError: No module named 'pytest_mypy.collect'

So I decided to leave this part unchanged for now:

pytest-mypy-plugins==1.2.0

It would be great if anyone could check if such errors occur on his/hers machine, as I'm having troubles with my Python environment recently, and can't purge it due to Uni work :/

@sobolevn
Copy link
Member

sobolevn commented Jun 4, 2020

@kszmigiel kszmigiel added the help wanted Extra attention is needed label Jun 5, 2020
@sobolevn sobolevn merged commit 4c5723d into typeddjango:master Jun 6, 2020
bullfest pushed a commit to bullfest/django-stubs that referenced this pull request Jul 6, 2020
* updated mypy dependency

* update readme

* readme update v2

* pytest-mypy-plugins newer version

* updated pytest_mypy_plugins name

* update ignored errors for typechecking django test suite

Co-authored-by: Kacper Szmigiel <[email protected]>
@AndreyMZ AndreyMZ mentioned this pull request Aug 14, 2020
@kszmigiel kszmigiel mentioned this pull request Aug 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Development

Successfully merging this pull request may close these issues.

[email protected] is out
2 participants