From 885cc94b63c16015e491e574f072f7ed88a766ae Mon Sep 17 00:00:00 2001 From: Jeremy Fee <jmfee@usgs.gov> Date: Thu, 2 Jan 2020 11:58:24 -0700 Subject: [PATCH] Add type to login.py method, update version to 1.0.x, breaking change to drop python2 --- .travis.yml | 2 +- geomagio/webservice/login.py | 3 ++- package.json | 2 +- setup.py | 2 +- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 3d572150..3c0b60fc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,8 @@ language: python python: - - 2.7 - 3.5 - 3.6 + - 3.7 before_install: ## courtesy of http://conda.pydata.org/docs/travis.html - if [[ "$TRAVIS_PYTHON_VERSION" == "2.7" ]]; then diff --git a/geomagio/webservice/login.py b/geomagio/webservice/login.py index ad04a0d8..7281a6e2 100644 --- a/geomagio/webservice/login.py +++ b/geomagio/webservice/login.py @@ -1,4 +1,5 @@ from __future__ import absolute_import, unicode_literals, print_function +from builtins import str import flask import flask_login @@ -60,7 +61,7 @@ class User(db.Model, flask_login.UserMixin): @login_manager.user_loader -def _load_user(user_id): +def _load_user(user_id: str): return User.query.filter_by(openid=user_id).first() diff --git a/package.json b/package.json index 3eb2a772..270fc827 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "geomag-algorithms", - "version": "0.9.0", + "version": "1.0.0", "homepage": "http://geomag.usgs.gov/", "repository": "https://github.com/usgs/geomag-algorithms.git", "description": "Geomagnetism algorithms.", diff --git a/setup.py b/setup.py index 22119cbf..bad5d3ab 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,7 @@ from distutils.core import setup setup( name='geomag-algorithms', - version='0.9.0', + version='1.0.0', description='USGS Geomag IO Library', url='https://github.com/usgs/geomag-algorithms', packages=[ -- GitLab