Skip to content
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

Fix requirements. #15

Merged
merged 3 commits into from
Oct 27, 2021
Merged

Fix requirements. #15

merged 3 commits into from
Oct 27, 2021

Conversation

CalOmnie
Copy link

I just tried to install mr_proper in a clean environment and added the package that prevented the mr_proper command to run.

@KyleKing
Copy link
Contributor

If fixing #13, you might want to consider making mypy/typing_extensions required only for Python 3.7 and below. Literal can be imported from typing in Python 3.8 and above (See MyPy docs)

install_requires=[
    'click==7.1.2',
    'mypy-extensions==0.4.3;python_version<"3.8"',
    'setuptools',
    'stdlib-list>=0.5.0',
    'typing-extensions==3.7.4.3;python_version<"3.8"',
],
try:
    from typing import Literal
except ImportError:
    from typing_extensions import Literal

Also, it looks like you haven't made any changes to the description, but I guess you may have it locally pending a push?

@CalOmnie
Copy link
Author

CalOmnie commented Jan 22, 2021

Good call, I'll make that change. Sorry about the reply to your issue, that's an error on my part I meant to reply to #13 instead. I've deleted it.

@KyleKing
Copy link
Contributor

KyleKing commented Feb 13, 2021

@CalOmnie can you update your PR with the code (#15 (comment)) so that the requirements will work on Python >3.7?

#13 issue is blocking me from using the latest flake8-functions in a Python 3.8 project (see best-doctor/flake8-functions#7)

@KyleKing
Copy link
Contributor

KyleKing commented Feb 20, 2021

Some corrections on my last advice. In order to pass the MyPy test, the official docs recommend "look before you leap" by checking the Python version: https://mypy.readthedocs.io/en/stable/runtime_troubles.html#using-new-additions-to-the-typing-module

You can also drop the mypy_extensions dependency and loosen the requirements. I prepped a commit here of all the changes that pass on my local test environment: https://github.com/KyleKing/mr_proper/commit/b1db5511df21547de36061172f17b976b3f36f62

@CalOmnie
Copy link
Author

Done.

@vQuadX
Copy link
Contributor

vQuadX commented Mar 24, 2021

If fixing #13, you might want to consider making mypy/typing_extensions required only for Python 3.7 and below. Literal can be imported from typing in Python 3.8 and above (See MyPy docs)

install_requires=[
    'click==7.1.2',
    'mypy-extensions==0.4.3;python_version<"3.8"',
    'setuptools',
    'stdlib-list>=0.5.0',
    'typing-extensions==3.7.4.3;python_version<"3.8"',
],
try:
    from typing import Literal
except ImportError:
    from typing_extensions import Literal

Also, it looks like you haven't made any changes to the description, but I guess you may have it locally pending a push?

Why you add click into install_requires?

@KyleKing
Copy link
Contributor

It looks like click is imported and used in the main package file:

import click

@SerhiyRomanov
Copy link

Any updates? The issue is still here for Python 3.8

@KyleKing
Copy link
Contributor

No, these changes work and are just pending review and merge

@KyleKing
Copy link
Contributor

KyleKing commented Jun 30, 2021

Also, does Click 7 need to be pinned? I’m using Click 8 in many of my projects and wouldn’t be able to use these fixes. See: https://github.com/KyleKing/mr_proper/commit/b1db5511df21547de36061172f17b976b3f36f62. I think the requirements should use “>=“

@korneevm korneevm merged commit 365084c into best-doctor:master Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants