Skip to content

Commit e620e5f

Browse files
tomschrtlaferriere
andcommitted
Fix #176: Create semver 3.0.0-dev.1
* 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 * Split test suite into separate files under tests/ dir * 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 <t.laferriere@hotmail.ca>
1 parent 4090b94 commit e620e5f

34 files changed

+1729
-1628
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
end_of_line = lf
6+
charset = utf-8
7+
8+
[*.py]
9+
indent_style = space
10+
indent_size = 4
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
14+
[docs/Makefile]
15+
indent_style = tab

.travis.yml

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,24 @@ language: python
33
cache: pip
44

55
before_install:
6-
sudo apt-get install -y python3-dev
6+
- sudo apt-get install -y python3-dev
77

88
install:
99
- pip install --upgrade pip setuptools
10-
- pip install virtualenv tox
10+
- pip install virtualenv tox wheel
11+
- tox --version
1112

1213
script: tox -v
1314

1415
matrix:
1516
include:
16-
- python: "2.7"
17-
env: TOXENV=py27
18-
19-
- python: "3.4"
20-
env: TOXENV=py34
2117

2218
- python: "3.6"
2319
env: TOXENV=checks
2420

25-
- python: "3.5"
26-
env: TOXENV=py35
21+
- python: "3.8"
22+
dist: xenial
23+
env: TOXENV=mypy
2724

2825
- python: "3.6"
2926
env: TOXENV=py36
@@ -32,5 +29,22 @@ matrix:
3229
dist: xenial
3330
env: TOXENV=py37
3431

35-
- python: "pypy"
36-
env: TOXENV=pypy
32+
- python: "3.8"
33+
dist: xenial
34+
env: TOXENV=py38
35+
36+
- python: "3.9-dev"
37+
dist: bionic
38+
env: TOXENV=py39
39+
40+
- python: "nightly"
41+
dist: bionic
42+
env: TOXENV=py310
43+
44+
- python: "3.8"
45+
dist: xenial
46+
env: TOXENV=mypy
47+
48+
jobs:
49+
allow_failures:
50+
- python: "nightly"

CHANGELOG.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ Features
3939

4040
n/a
4141

42-
4342
Bug Fixes
4443
---------
4544

README.rst

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,22 @@ A Python module for `semantic versioning`_. Simplifies comparing versions.
99

1010
.. teaser-end
1111
12-
.. warning::
12+
.. note::
1313

14-
As anything comes to an end, this project will focus on Python 3.x only.
15-
New features and bugfixes will be integrated into the 3.x.y branch only.
14+
This project works for Python 3.6 and greater only. If you are
15+
looking for a compatible version for Python 2, use the
16+
maintenance branch |MAINT|_.
1617

17-
Major version 3 of semver will contain some incompatible changes:
18-
19-
* removes support for Python 2.7 and 3.3
20-
* removes deprecated functions.
21-
22-
The last version of semver which supports Python 2.7 and 3.4 will be
23-
2.10.x. However, keep in mind, version 2.10.x is frozen: no new
18+
The last version of semver which supports Python 2.7 to 3.5 will be
19+
2.11.x. However, keep in mind, version 2.11.x is frozen: no new
2420
features nor backports will be integrated.
2521

2622
We recommend to upgrade your workflow to Python 3.x to gain support,
2723
bugfixes, and new features.
2824

25+
.. |MAINT| replace:: ``maint/v2``
26+
.. _MAINT: https://github.com/python-semver/python-semver/tree/maint/v2
27+
2928
The module follows the ``MAJOR.MINOR.PATCH`` style:
3029

3130
* ``MAJOR`` version when you make incompatible API changes,

changelog.d/pr290.trivial.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Add supported Python versions to :command:`black`.

docs/_static/css/default.css

Lines changed: 0 additions & 6 deletions
This file was deleted.

docs/_static/css/semver.css

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
*/
3+
4+
.py.method {
5+
padding-top: 0.25em;
6+
padding-bottom: 1.25em;
7+
border-top: 1px solid #EEE;
8+
}
9+
10+
.py.function{
11+
padding-top: 1.25em;
12+
}
13+
14+
.related.bottom {
15+
margin-top: 1em;
16+
}
17+
18+
nav#rellinks {
19+
float: left;
20+
}

docs/_templates/layout.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{#
2+
Import the theme's layout.
3+
#}
4+
{% extends "!layout.html" %}

docs/conf.py

Lines changed: 65 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323

2424
from semver import __version__ # noqa: E402
2525

26+
2627
# -- General configuration ------------------------------------------------
2728

2829
# If your documentation needs a minimal Sphinx version, state it here.
@@ -94,38 +95,74 @@
9495
# The theme to use for HTML and HTML Help pages. See the documentation for
9596
# a list of builtin themes.
9697
#
97-
# html_theme = 'alabaster'
98-
html_theme = "sphinx_rtd_theme"
98+
html_theme = "alabaster"
99+
templates_path = ["_templates"]
99100

100-
# Theme options are theme-specific and customize the look and feel of a theme
101-
# further. For a list of options available for each theme, see the
102-
# documentation.
103-
#
104-
# html_theme_options = {}
101+
GITHUB_URL = "https://github.com/python-semver/python-semver"
102+
103+
html_theme_options = {
104+
# -- Basics
105+
#: Text blurb about your project to appear under the logo:
106+
# "description": "Semantic versioning",
107+
#: Makes the sidebar "fixed" or pinned in place:
108+
"fixed_sidebar": True,
109+
#: Relative path to $PROJECT/_static to logo image:
110+
# "logo": "logo.svg",
111+
#: Set to true to insert your site's project name under
112+
#: the logo:
113+
# "logo_name": True,
114+
#: CSS width specifier controller default sidebar width:
115+
"sidebar_width": "25%",
116+
#: CSS width specifier controlling default content/page width:
117+
"page_width": "auto",
118+
#: CSS width specifier controlling default body text width:
119+
"body_max_width": "auto",
120+
#
121+
# -- Service Links and Badges
122+
#: Contains project name and user of GitHub:
123+
"github_user": "python-semver",
124+
"github_repo": "python-semver",
125+
#: whether to link to your GitHub:
126+
"github_button": True,
127+
#:
128+
"github_type": "star",
129+
#: whether to apply a ‘Fork me on Github’ banner
130+
#: in the top right corner of the page:
131+
# "github_banner": True,
132+
#
133+
# -- Non-service sidebar control
134+
#: Dictionary mapping link names to link targets:
135+
"extra_nav_links": {
136+
"PyPI": "https://pypi.org/project/semver/",
137+
"Libraries.io": "https://libraries.io/pypi/semver",
138+
},
139+
#: Boolean determining whether all TOC entries that
140+
#: are not ancestors of the current page are collapsed:
141+
"sidebar_collapse": True,
142+
#
143+
# -- Header/footer options
144+
#: used to display next and previous links above and
145+
#: below the main page content
146+
"show_relbars": True,
147+
"show_relbar_top": True,
148+
#
149+
# -- Style colors
150+
# "anchor": "",
151+
# "anchor_hover_bg": "",
152+
# "anchor_hover_fg": "",
153+
"narrow_sidebar_fg": "lightgray",
154+
#
155+
# -- Fonts
156+
# "code_font_size": "",
157+
"font_family": "",
158+
"head_font_family": "",
159+
"font_size": "1.25rem",
160+
}
105161

106-
# Add any paths that contain custom static files (such as style sheets) here,
107-
# relative to this directory. They are copied after the builtin static files,
108-
# so a file named "default.css" will overwrite the builtin "default.css".
109162
html_static_path = ["_static"]
163+
html_css_files = ["css/semver.css"]
110164

111-
html_css_files = ["css/default.css"]
112-
113-
# Custom sidebar templates, must be a dictionary that maps document names
114-
# to template names.
115-
#
116-
# This is required for the alabaster theme
117-
# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars
118-
html_sidebars = {
119-
"**": [
120-
"about.html",
121-
"navigation.html",
122-
"relations.html", # needs 'show_related': True theme option to display
123-
"searchbox.html",
124-
"donate.html",
125-
]
126-
}
127-
128-
html_logo = "logo.svg"
165+
# html_logo = "logo.svg"
129166

130167
# -- Options for HTMLHelp output ------------------------------------------
131168

docs/requirements.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# requirements file for documentation
22
sphinx
3-
sphinx_rtd_theme
43
sphinx-argparse
4+
# sphinx_rtd_theme
5+
guzzle_sphinx_theme

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy