Skip to content

Prepare semver 3 #247

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

Closed
wants to merge 3 commits into from

Conversation

tomschr
Copy link
Member

@tomschr tomschr commented May 5, 2020

First attempt to prepare for #176

Generally, remove everything related to Python 2.7 & 3.4 and add missing 3.8 & 3.9:

  • Raise version to indicate that it's different from 2.10.0
  • Prepare (empty) CHANGELOG for 2.99.99 3.0.0-dev.1
  • Correct Trove categories and python_requires in setup.py
  • Adapt tox.ini & .travis.yml: remove old stuff, add missing (see above)
  • Adapt semver.py:
    • Remove if clause for cmp
    • Don't check for __name__, use __qualname__ instead
    • Use yield from ... (for loop is not necessary anymore)

@python-semver/reviewers As 2.10.0 is released now, this is the first attempt to keep the ball rolling toward semver 3! 😄

It's a small change, but when merging it to master, we open the development for semver3. All changes will be on top of this.

Question: I used version 3.0.0-dev1 for this, ok?

Let me know what you think about. Thanks.

@tomschr tomschr added Infra All about infrastructure (GitHub Action, project build etc.) Question Unclear or open issue subject for debate Enhancement Not a bug, but increases or improves in value, quality, desirability, or attractiveness labels May 5, 2020
@tomschr tomschr self-assigned this May 5, 2020
@tomschr tomschr force-pushed the feature/176-prepare-py3 branch from aa4da51 to 1117551 Compare May 5, 2020 19:39
@tomschr tomschr requested a review from a team May 5, 2020 20:17
@tomschr tomschr force-pushed the feature/176-prepare-py3 branch from fb9e63e to 2a1db1e Compare May 7, 2020 11:09
tomschr added 3 commits May 14, 2020 10:14
Generally, remove everything related to Python 2.7 & 3.4 and
add missing 3.8 & 3.9:

* Raise version to 2.99.99 (to indicate that it's different from 2.10.0)
* Prepare (empty) CHANGELOG for 2.99.99
* Correct Trove categories and python_requires in setup.py
* Adapt tox.ini & .travis.yml: remove old stuff, add missing (see above)
* Adapt semver.py
  - Remove if clause for cmp
  - Don't check for `__name__`, use `__qualname__` instead
  - Use yield from ... (for loop is not necessary anymore)
This makes it possible to distinguish between version 2
and version 3. For example, >=2.8,<3
@tomschr tomschr force-pushed the feature/176-prepare-py3 branch from 2a1db1e to 77348f7 Compare May 14, 2020 20:56
@tlaferriere
Copy link
Contributor

I may not be an official reviewer, but I am excited about this.

Question: I used version 3.0.0-dev1 for this, ok?

Sounds good to me

Since this now supports python >=3.5, it now supports type annotations (on functions only until 3.6). I thought this may be a good moment to start adding type hints to the functions you touch, unless you wanted to type hint everything at once in a single PR. I don't know if it would be the right moment to start thinking about #213 .

Anyway, IMHO this is clean and good to go, but that's just me saying that.

@tomschr
Copy link
Member Author

tomschr commented Jun 10, 2020

@tlaferriere Thanks for your feedback. 👍 It doesn't matter if you are an "official reviewer", everybody is welcome. 😃

Since this now supports python >=3.5, it now supports type annotations (on functions only until 3.6). I thought this may be a good moment to start adding type hints to the functions you touch, unless you wanted to type hint everything at once in a single PR. I don't know if it would be the right moment to start thinking about #213 .

Yes, my idea was to introduce this when we "officially" work on version 3 of semver. I have another (local) branch where I did some experiments with it.

Or do you think this is something that you would introduce into the semver 2 line?

@tlaferriere
Copy link
Contributor

Or do you think this is something that you would introduce into the semver 2 line?

Adding type annotations is a breaking change, since python versions prior to 3.5 will give you a hard syntax error for these, so that's a no for including it in the semver 2 line.
Also, the current way of doing things (types in the docstrings) actually works ok with my IDE (pycharm), I'm not sure how they are parsed in other IDEs.

I would be interested to start type hinting things, I might open a PR tonight (I live in EDT) if I have some spare time.

@tomschr
Copy link
Member Author

tomschr commented Jun 10, 2020

Thanks for your answer. 👍

Adding type annotations is a breaking change

Well, it depends. 😉 You can add type annotations into comments with these # type: lines. Usually you can see that in Python 2 and <3.5. I'm not completely sure whether IDEs see them.

Of course, for modern Python versions, this is a no-go. For these, we need to use the correct type annotation syntax.

@tlaferriere tlaferriere mentioned this pull request Jun 11, 2020
@tomschr
Copy link
Member Author

tomschr commented Oct 18, 2020

I close this issue in favor of #290; integrated the changes here already in the other PR.

@tomschr tomschr closed this Oct 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Not a bug, but increases or improves in value, quality, desirability, or attractiveness Infra All about infrastructure (GitHub Action, project build etc.) Question Unclear or open issue subject for debate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants