Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Fix #176: Create semver 3.0.0-dev.1 #290

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 4 commits into from
Oct 26, 2020

Conversation

tomschr
Copy link
Member

@tomschr tomschr commented Oct 17, 2020

This branch contains a first alpha version of the upcoming 3 release of semver. It contains the following changes:

  • Update README.rst and remove anything related to Python2
    Mention maintenance branch maint/v2
  • setup.py
    • Update Trove classifiers
    • Require now Python >=3.6.*
    • Remove Tox and Clean classes, try to make it as simple as possible
  • semver.py
    • Change version number to "3.0.0-alpha0"
    • Remove old code related to Python2
  • .travis.yml and tox.ini:
    • Remove targets py27, py34, py35, and pypy
    • Add py38, py39, and nightly (allow to fail)
  • Configure and add Towncrier and the changelog.d/ directory
  • Improve semver documentation
  • Rework .gitignore file

HINT

  • The commits may be disorganized. I will organize them later.
  • I will update the above description when more corrections/additions are added

@tomschr tomschr added Release_3.x.y Only for the major release 3 Enhancement Not a bug, but increases or improves in value, quality, desirability, or attractiveness labels Oct 17, 2020
@tomschr tomschr self-assigned this Oct 17, 2020
@tomschr tomschr force-pushed the feature/3.0.0-alpha0 branch 3 times, most recently from a7bf108 to ad6317e Compare October 17, 2020 21:53
@tomschr tomschr mentioned this pull request Oct 18, 2020
@tomschr tomschr force-pushed the feature/3.0.0-alpha0 branch 3 times, most recently from 367b010 to 6ae4839 Compare October 18, 2020 15:03
@tomschr
Copy link
Member Author

tomschr commented Oct 18, 2020

@tlaferriere Thanks for your suggestions, much appreciated! ❤️ 👍 I committed all except the Travis part. Im not sure about that, it gave me an error.

I'm not completely finished with all, I'm currently working on separating the tests into different files. Seems I discovered a different (blocker?) bug.

@tomschr tomschr force-pushed the feature/3.0.0-alpha0 branch from b829ff4 to b9c42d5 Compare October 19, 2020 09:20
This was referenced Oct 19, 2020
@tomschr tomschr force-pushed the feature/3.0.0-alpha0 branch 3 times, most recently from 043a715 to 6869922 Compare October 21, 2020 15:34
@tomschr tomschr marked this pull request as ready for review October 21, 2020 15:37
@tomschr tomschr requested a review from a team October 21, 2020 15:40
@tomschr
Copy link
Member Author

tomschr commented Oct 21, 2020

@tlaferriere @python-semver/reviewers @gsakkis @ppkt
This is the first attempt of a 3.0.0 alpha0!

I've condensed the commits into more manageable units. Hope all the changes that I did make sense. That's why I've integrated some (hopefully) helpful commit messages. 😉

Sorry, I know it's a big change, but I guess, this was inevitable. I don't expect that you look into all lines, but it would be helpful if you would have a quick look. Hope I didn't make any major mistakes.

I hope we can release the alpha version soon. My plan is if you don't have any major objections, I'd would like to merge it to master. From there and if all goes well, we can create a next alpha or beta versions.

I haven't removed any deprecated functions yet. The changes are already big enough. I will do so probably in the next alpha.

What do you think?

@tomschr tomschr force-pushed the feature/3.0.0-alpha0 branch 4 times, most recently from 3b04a70 to f525bb4 Compare October 21, 2020 19:52
@tomschr tomschr force-pushed the feature/3.0.0-alpha0 branch 4 times, most recently from c94e72a to e804eed Compare October 22, 2020 20:59
@tomschr tomschr force-pushed the feature/3.0.0-alpha0 branch 2 times, most recently from 32b0c3d to 8d61c9a Compare October 23, 2020 21:55
@tomschr tomschr changed the title Fix #176: Prepare semver 3.0.0-alpha0 Fix #176: Create semver 3.0.0-dev.1 Oct 23, 2020
@tomschr
Copy link
Member Author

tomschr commented Oct 23, 2020

I've integrated all the changes from @tlaferriere regarding type hints now. Thank you very much! You're awesome! 👏

As we also deprecated some function, I'm thinking about removing them in the next 3.0.0-dev.2 release (this keeps things a bit organized). What do you think?

If noone objects, I would like to merge that on Sunday.

@tomschr tomschr force-pushed the feature/3.0.0-alpha0 branch from 8d61c9a to 77f7565 Compare October 25, 2020 13:42
tomschr and others added 4 commits October 25, 2020 14:55
* Remove targets py27, py34, py35, and pypy from `tox.ini`
* Update `README.rst` and remove anything related to Python2
  Mention maintenance branch `maint/v2`
* `setup.py`
  - Update Trove classifiers
  - Require now Python >=3.6.*
  - Remove Tox and Clean classes, try to make it
    as simple as possible
  - Extract metadata directly from source (affects all the __version__,
    __author__ etc. variables)
* `setup.cfg`
  - Add pycodestyle section
  - Ignore venv directory
* `semver.py`
  - Change version number to "3.0.0-dev.1"
  - Remove old code related to Python2
  - Adjust Python2 vs. Python3 str/bytes
  - Add wheel as another test requirement
  - Add type annotations
  - Remove data types and return types from docstring
* `tox.ini`
  - Remove py27, py34, and py35 (out of maintenance)
  - Add docs to default testenv
  - Remove --universal from bdist_wheel
  - Add mypy target
* test suite:
  - Split test suite into separate files under tests/ dir
  - Move conftests.py -> tests
* Travis: Remove old versions, integrate new
  - Remove 2.7, 3.4, 3.5, and pypy
  - Integrate 3.8, 3.9-dev and nightly builds
  - Allow nightly to fail
  - Add mypy test
* Add .editorconfig to have a consistent editor setup
* Add supported python versions to black config
  (cherry picked from commit d9394af)

Co-authored-by: Thomas Laferriere <[email protected]>
Completely revamp file. Mostly update from
gh://github/gitignore/ and integrate:

* Python
* Global/Kate
* Global/Vim
* Global/VisualStudio
* Global/JetBrains
* Remove Python2
* Use Roboto font family
  Sans: Roboto (for text)
  "Serif": Roboto Slab (for headings)
  Monospace: Roboto Mono (for code)
* Improve CSS navigation
* Create new logo and move it to docs/_static
* Add new section about how to get the version of semver
* Use a more general term (2.x.y) instead of specific versions
* Number sections
* Rework deps for doc build
* Rework release procedure
* Add sphinx-autodoc-typehints dependency for type hints
* Add `changelog.d/.gitignore` to keep this directory
* Create `changelog.d/README.rst` with some descriptions
* Add `changelog.d/_template.rst` as Towncrier template
* Add `[tool.towncrier]` section in pyproject.toml
* Add "changelog" target into `tox.ini`. Use it like "tox -e changes -- CMD"
  whereas CMD is a towncrier command. The default "tox -e changes"
  calls towncrier to create a draft of the changelog file and
  output it to stdout.
* Update documentation and add include a new section "Changelog"
  included from `changelog.d/README.rst`
* Update changelog.d directory and add new files
* Add news file in changelog.d

Co-authored-by: Thomas Laferriere <[email protected]>
@tomschr tomschr force-pushed the feature/3.0.0-alpha0 branch from 77f7565 to cbd4335 Compare October 25, 2020 13:55
@tomschr tomschr merged commit 5e02f12 into python-semver:master Oct 26, 2020
@sbrudenell
Copy link
Contributor

NB: There's a particular gotcha with type hints. By default mypy will not typecheck functions with no annotations.

Note that

def test_foo(self):
    ...

is not annotated, so it won't be checked. This is the really common way of writing test functions, so by default you have a pretty big gap in type-checking coverage.

You can either enable mypy's check_untyped_defs option (which is "nuclear", and may not be what you want), or add annotations everywhere. The following will be checked:

def test_foo(self) -> None:
    ...

@tlaferriere
Copy link
Contributor

@sbrudenell I tried to type hint as completely as possible except the deprecated functions. I think we will add check_untyped_defs to tox when we remove them. Thanks for the suggestion 👍

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 Release_3.x.y Only for the major release 3
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants