Skip to content

Commit f315650

Browse files
authored
Drop support for python 3.5 (#617)
1 parent f30143b commit f315650

27 files changed

+196
-307
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ repos:
99
rev: 19.10b0
1010
hooks:
1111
- id: black
12+
args: [--target-version, py36]
1213
- repo: https://github.com/timothycrosley/isort
1314
rev: 4.3.21
1415
hooks:

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ matrix:
2626
os: osx
2727
env:
2828
- PYTHON=3.6.8
29-
- python: 3.5
3029
- python: 3.6
3130
- python: 3.6
3231
env:

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,14 @@ check-type:
6868
mypy pyproj
6969

7070
check: lint check-type ## flake8 black isort check
71-
black --check setup.py pyproj/ test/ docs/
71+
black --check --target-version py36 setup.py pyproj/ test/ docs/
7272
isort --check --recursive setup.py pyproj/ test/ docs/
7373

7474
isort: ## order imports
7575
isort --recursive setup.py pyproj/ test/ docs/
7676

7777
black: ## black format files
78-
black setup.py pyproj/ test/ docs/
78+
black --target-version py36 setup.py pyproj/ test/ docs/
7979

8080
test: ## run tests
8181
py.test

docs/advanced_examples.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ transformations as well as missing transformations.
9393
>>> from pyproj.transformer import TransformerGroup
9494
>>> tg = TransformerGroup("epsg:4326", "+proj=aea +lat_0=50 +lon_0=-154 +lat_1=55 +lat_2=65 +x_0=0 +y_0=0 +datum=NAD27 +no_defs +type=crs +units=m", always_xy=True)
9595
UserWarning: Best transformation is not available due to missing Grid(short_name=ntv2_0.gsb, full_name=, package_name=proj-datumgrid-north-america, url=https://download.osgeo.org/proj/proj-datumgrid-north-america-latest.zip, direct_download=True, open_license=True, available=False)
96-
"{!r}".format(operation.grids[0])
96+
f"{operation.grids[0]!r}"
9797
>>> tg
9898
<TransformerGroup: best_available=False>
9999
- transformers: 37

docs/conf.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,9 @@
5353
master_doc = "index"
5454

5555
# General information about the project.
56-
project = u"pyproj"
57-
copyright = u"2006-2018, Jeffrey Whitaker; 2019-2020, Open source contributors"
58-
author = u"Jeffrey Whitaker"
56+
project = "pyproj"
57+
copyright = "2006-2018, Jeffrey Whitaker; 2019-2020, Open source contributors"
58+
author = "Jeffrey Whitaker"
5959

6060
# The version info for the project you're documenting, acts as replacement
6161
# for |version| and |release|, also used in various other places throughout
@@ -131,15 +131,15 @@
131131
# (source start file, target name, title, author, documentclass
132132
# [howto, manual, or own class]).
133133
latex_documents = [
134-
(master_doc, "pyproj.tex", u"pyproj Documentation", u"Delta", "manual")
134+
(master_doc, "pyproj.tex", "pyproj Documentation", "Delta", "manual")
135135
]
136136

137137

138138
# -- Options for manual page output ------------------------------------
139139

140140
# One entry per manual page. List of tuples
141141
# (source start file, name, description, authors, manual section).
142-
man_pages = [(master_doc, "pyproj", u"pyproj Documentation", [author], 1)]
142+
man_pages = [(master_doc, "pyproj", "pyproj Documentation", [author], 1)]
143143

144144

145145
# -- Options for Texinfo output ----------------------------------------
@@ -151,7 +151,7 @@
151151
(
152152
master_doc,
153153
"pyproj",
154-
u"pyproj Documentation",
154+
"pyproj Documentation",
155155
author,
156156
"pyproj",
157157
"One line description of project.",

docs/examples.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ Calculate the geodesic length of a line (See: :meth:`pyproj.Geod.line_length`):
402402
... 88, 59, 25, -4, -14, -33, -46, -61]
403403
>>> geod = Geod(ellps="WGS84")
404404
>>> total_length = geod.line_length(lons, lats)
405-
>>> "{:.3f}".format(total_length)
405+
>>> f"{total_length:.3f}"
406406
'14259605.611'
407407
408408
Calculate the geodesic length of a shapely geometry (See: :meth:`pyproj.Geod.geometry_length`):
@@ -414,7 +414,7 @@ Calculate the geodesic length of a shapely geometry (See: :meth:`pyproj.Geod.geo
414414
>>> line_string = LineString([Point(1, 2), Point(3, 4)]))
415415
>>> geod = Geod(ellps="WGS84")
416416
>>> total_length = geod.geometry_length(line_string)
417-
>>> "{:.3f}".format(total_length)
417+
>>> f"{total_length:.3f}"
418418
'313588.397'
419419
420420
@@ -432,7 +432,7 @@ Calculate the geodesic area and perimeter of a polygon (See: :meth:`pyproj.Geod.
432432
>>> lons = [-74, -102, -102, -131, -163, 163, 172, 140, 113,
433433
... 88, 59, 25, -4, -14, -33, -46, -61]
434434
>>> poly_area, poly_perimeter = geod.polygon_area_perimeter(lons, lats)
435-
>>> "{:.3f} {:.3f}".format(poly_area, poly_perimeter)
435+
>>> f"{poly_area:.3f} {poly_perimeter:.3f}"
436436
'13376856682207.406 14710425.407'
437437
438438
@@ -450,5 +450,5 @@ Calculate the geodesic area and perimeter of a shapely polygon (See: :meth:`pypr
450450
holes=[LineString([Point(1, 2), Point(3, 4), Point(5, 2)])],
451451
)
452452
)
453-
>>> "{:.3f} {:.3f}".format(poly_area, poly_perimeter)
453+
>>> f"{poly_area:.3f} {poly_perimeter:.3f}"
454454
'-944373881400.339 3979008.036'

docs/history.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Change Log
22
==========
33

4+
3.0.0
5+
-----
6+
* Minimum supported Python version 3.6 (issue #499)
7+
48
2.6.1
59
~~~~~
610
* WHL: Wheels contain PROJ version is 7.0.1

docs/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Python interface to `PROJ <https://proj.org/>`_ (cartographic projections and c
55

66
.. note:: Minimum supported PROJ version is 6.2.0
77

8-
.. note:: Minimum supported Python version is 3.5
8+
.. note:: Minimum supported Python version is 3.6
99

1010
GitHub Repository: https://github.com/pyproj4/pyproj
1111

pyproj/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
Download: http://python.org/pypi/pyproj
66
7-
Requirements: Python 3.5+.
7+
Requirements: Python 3.6+.
88
99
Contact: Jeffrey Whitaker <[email protected]>
1010

pyproj/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,5 +20,5 @@
2020
if args.verbose:
2121
_show_versions.show_versions()
2222
else:
23-
print("pyproj version: {} [PROJ version: {}]".format(__version__, __proj_version__))
23+
print(f"pyproj version: {__version__} [PROJ version: {__proj_version__}]")
2424
parser.print_help()

0 commit comments

Comments
 (0)