Skip to content

Commit c47e3ac

Browse files
authored
update version to 2.2.2; add PROJ version in wheel update in history (#370)
* update version to 2.2.2; add PROJ version in wheel update in history * FutureWarning->DeprecationWarning for +init= syntax
1 parent dab6f32 commit c47e3ac

File tree

7 files changed

+27
-26
lines changed

7 files changed

+27
-26
lines changed

docs/history.rst

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ Change Log
33

44
2.2.2
55
~~~~~
6+
* Update wheels to PROJ 6.1.1
67
* Add deprecation warning when using +init= syntax (pull #358)
78
* Added :meth:`~pyproj.crs.is_proj` (pull #359)
89
* Fixed case in :meth:`~pyproj.crs.CRS.to_dict` with :meth:`~pyproj.crs.CRS.to_proj4` returning None (pull #359)

pyproj/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
4848
NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
4949
CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. """
50-
__version__ = "2.2.1"
50+
__version__ = "2.2.2"
5151
__all__ = [
5252
"Proj",
5353
"Geod",

pyproj/crs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def _prepare_from_string(in_crs_string):
112112
warnings.warn(
113113
"'+init=<authority>:<code>' syntax is deprecated."
114114
" '<authority>:<code>' is the preferred initialization method.",
115-
FutureWarning,
115+
DeprecationWarning,
116116
)
117117
return in_crs_string
118118

test/test_crs.py

+12-12
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def test_from_string():
5656
assert wgs84_crs.to_proj4() == "+proj=longlat +datum=WGS84 +no_defs +type=crs"
5757
# Make sure this doesn't get handled using the from_epsg()
5858
# even though 'epsg' is in the string
59-
with pytest.warns(FutureWarning):
59+
with pytest.warns(DeprecationWarning):
6060
epsg_init_crs = CRS.from_string("+init=epsg:26911 +units=m +no_defs=True")
6161
assert (
6262
epsg_init_crs.to_proj4()
@@ -143,7 +143,7 @@ def test_to_proj4():
143143

144144

145145
def test_is_valid():
146-
with pytest.warns(FutureWarning):
146+
with pytest.warns(DeprecationWarning):
147147
assert CRS(init="EPSG:4326").is_valid
148148

149149

@@ -157,7 +157,7 @@ def test_empty_json():
157157

158158

159159
def test_has_wkt_property():
160-
with pytest.warns(FutureWarning):
160+
with pytest.warns(DeprecationWarning):
161161
assert (
162162
CRS({"init": "EPSG:4326"})
163163
.to_wkt("WKT1_GDAL")
@@ -172,7 +172,7 @@ def test_to_wkt_pretty():
172172

173173

174174
def test_repr():
175-
with pytest.warns(FutureWarning):
175+
with pytest.warns(DeprecationWarning):
176176
assert repr(CRS({"init": "EPSG:4326"})) == (
177177
"<Geographic 2D CRS: +init=epsg:4326 +type=crs>\n"
178178
"Name: WGS 84\n"
@@ -189,7 +189,7 @@ def test_repr():
189189

190190

191191
def test_repr__long():
192-
with pytest.warns(FutureWarning):
192+
with pytest.warns(DeprecationWarning):
193193
assert repr(CRS(CRS({"init": "EPSG:4326"}).to_wkt())) == (
194194
'<Geographic 2D CRS: GEOGCRS["WGS 84",'
195195
'DATUM["World Geodetic System 1984 ...>\n'
@@ -267,12 +267,12 @@ def test_repr_compound():
267267

268268

269269
def test_dunder_str():
270-
with pytest.warns(FutureWarning):
270+
with pytest.warns(DeprecationWarning):
271271
assert str(CRS({"init": "EPSG:4326"})) == CRS({"init": "EPSG:4326"}).srs
272272

273273

274274
def test_epsg():
275-
with pytest.warns(FutureWarning):
275+
with pytest.warns(DeprecationWarning):
276276
assert CRS({"init": "EPSG:4326"}).to_epsg(20) == 4326
277277
assert CRS({"init": "EPSG:4326"}).to_epsg() is None
278278
assert CRS.from_user_input(4326).to_epsg() == 4326
@@ -322,7 +322,7 @@ def test_epsg__no_code_available():
322322
def test_crs_OSR_equivalence():
323323
crs1 = CRS.from_string("+proj=longlat +datum=WGS84 +no_defs")
324324
crs2 = CRS.from_string("+proj=latlong +datum=WGS84 +no_defs")
325-
with pytest.warns(FutureWarning):
325+
with pytest.warns(DeprecationWarning):
326326
crs3 = CRS({"init": "EPSG:4326"})
327327
assert crs1 == crs2
328328
# these are not equivalent in proj.4 now as one uses degrees and the othe radians
@@ -814,14 +814,14 @@ def test_is_exact_same_different_type():
814814
def test_compare_crs_non_crs():
815815
assert CRS.from_epsg(4326) != 4.2
816816
assert CRS.from_epsg(4326) == 4326
817-
with pytest.warns(FutureWarning):
817+
with pytest.warns(DeprecationWarning):
818818
assert CRS.from_dict({"init": "epsg:4326"}) == {"init": "epsg:4326"}
819819
assert CRS.from_dict({"init": "epsg:4326"}) != "epsg:4326"
820820
assert CRS("epsg:4326") == CustomCRS()
821821

822822

823823
def test_is_geocentric__bound():
824-
with pytest.warns(FutureWarning):
824+
with pytest.warns(DeprecationWarning):
825825
ccs = CRS("+init=epsg:4328 +towgs84=0,0,0")
826826
assert ccs.is_geocentric
827827

@@ -849,7 +849,7 @@ def test_is_engineering():
849849

850850

851851
def test_source_crs__bound():
852-
with pytest.warns(FutureWarning):
852+
with pytest.warns(DeprecationWarning):
853853
assert CRS("+init=epsg:4328 +towgs84=0,0,0").source_crs.name == "unknown"
854854

855855

@@ -858,7 +858,7 @@ def test_source_crs__missing():
858858

859859

860860
def test_target_crs__bound():
861-
with pytest.warns(FutureWarning):
861+
with pytest.warns(DeprecationWarning):
862862
assert CRS("+init=epsg:4328 +towgs84=0,0,0").target_crs.name == "WGS 84"
863863

864864

test/test_datum_shift.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
WGS84_PROJ = Proj(proj="latlong", datum="WGS84")
3232
UTM_33_PROJ = Proj(proj="utm", zone="33")
3333
with warnings.catch_warnings():
34-
warnings.simplefilter("ignore", FutureWarning)
34+
warnings.simplefilter("ignore", DeprecationWarning)
3535
GAUSSSB_PROJ = Proj(
3636
init="epsg:3004", towgs84="-122.74,-34.27,-22.83,-1.884,-3.400,-3.030,-15.62"
3737
)

test/test_proj.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ class TypeError_Transform_Issue8_Test(unittest.TestCase):
117117
# https://github.com/jswhit/pyproj/issues/8
118118

119119
def setUp(self):
120-
with pytest.warns(FutureWarning):
120+
with pytest.warns(DeprecationWarning):
121121
self.p = Proj(init="epsg:4269")
122122

123123
def test_tranform_none_1st_parmeter(self):

test/test_transformer.py

+10-10
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def test_tranform_wgs84_to_custom():
2020

2121

2222
def test_transform_wgs84_to_alaska():
23-
with pytest.warns(FutureWarning):
23+
with pytest.warns(DeprecationWarning):
2424
lat_lon_proj = pyproj.Proj(init="epsg:4326", preserve_units=False)
2525
alaska_aea_proj = pyproj.Proj(init="epsg:2964", preserve_units=False)
2626
test = (-179.72638, 49.752533)
@@ -30,7 +30,7 @@ def test_transform_wgs84_to_alaska():
3030

3131
def test_illegal_transformation():
3232
# issue 202
33-
with pytest.warns(FutureWarning):
33+
with pytest.warns(DeprecationWarning):
3434
p1 = pyproj.Proj(init="epsg:4326")
3535
p2 = pyproj.Proj(init="epsg:3857")
3636
xx, yy = pyproj.transform(
@@ -46,7 +46,7 @@ def test_illegal_transformation():
4646

4747
def test_lambert_conformal_transform():
4848
# issue 207
49-
with pytest.warns(FutureWarning):
49+
with pytest.warns(DeprecationWarning):
5050
Midelt = pyproj.Proj(init="epsg:26191")
5151
WGS84 = pyproj.Proj(init="epsg:4326")
5252

@@ -80,7 +80,7 @@ def test_equivalent_crs__different():
8080

8181

8282
def test_equivalent_proj():
83-
with pytest.warns(FutureWarning):
83+
with pytest.warns(DeprecationWarning):
8484
transformer = Transformer.from_proj(
8585
"+init=epsg:4326", pyproj.Proj(4326).crs.to_proj4(), skip_equivalent=True
8686
)
@@ -231,35 +231,35 @@ def test_itransform_time_3rd_invalid():
231231

232232

233233
def test_transform_no_error():
234-
with pytest.warns(FutureWarning):
234+
with pytest.warns(DeprecationWarning):
235235
pj = Proj(init="epsg:4555")
236236
pjx, pjy = pj(116.366, 39.867)
237237
transform(pj, Proj(4326), pjx, pjy, radians=True, errcheck=True)
238238

239239

240240
def test_itransform_no_error():
241-
with pytest.warns(FutureWarning):
241+
with pytest.warns(DeprecationWarning):
242242
pj = Proj(init="epsg:4555")
243243
pjx, pjy = pj(116.366, 39.867)
244244
list(itransform(pj, Proj(4326), [(pjx, pjy)], radians=True, errcheck=True))
245245

246246

247247
def test_transform_no_exception():
248248
# issue 249
249-
with pytest.warns(FutureWarning):
249+
with pytest.warns(DeprecationWarning):
250250
transformer = Transformer.from_proj("+init=epsg:4326", "+init=epsg:27700")
251251
transformer.transform(1.716073972, 52.658007833, errcheck=True)
252252
transformer.itransform([(1.716073972, 52.658007833)], errcheck=True)
253253

254254

255255
def test_transform__out_of_bounds():
256-
with pytest.warns(FutureWarning):
256+
with pytest.warns(DeprecationWarning):
257257
transformer = Transformer.from_proj("+init=epsg:4326", "+init=epsg:27700")
258258
assert np.all(np.isinf(transformer.transform(100000, 100000, errcheck=True)))
259259

260260

261261
def test_transform_radians():
262-
with pytest.warns(FutureWarning):
262+
with pytest.warns(DeprecationWarning):
263263
WGS84 = pyproj.Proj("+init=EPSG:4326")
264264
ECEF = pyproj.Proj(proj="geocent", ellps="WGS84", datum="WGS84")
265265
assert_almost_equal(
@@ -283,7 +283,7 @@ def test_transform_radians():
283283

284284

285285
def test_itransform_radians():
286-
with pytest.warns(FutureWarning):
286+
with pytest.warns(DeprecationWarning):
287287
WGS84 = pyproj.Proj("+init=EPSG:4326")
288288
ECEF = pyproj.Proj(proj="geocent", ellps="WGS84", datum="WGS84")
289289
assert_almost_equal(

0 commit comments

Comments
 (0)