Skip to content

Commit

Permalink
Merge pull request uw-it-aca#7 from uw-it-aca/develop
Browse files Browse the repository at this point in the history
drops python2 support
  • Loading branch information
jlaney committed Sep 25, 2018
2 parents e0f3795 + 0078204 commit f3eb7cd
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 27 deletions.
9 changes: 3 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
sudo: false
language: python
python:
- '2.7'
- '3.4'
- '3.5'
- '3.6'
before_script:
- pip install -e .
- pip install pycodestyle
- pip install nose2
- pip install coverage
- pip install commonconf
- pip install python-coveralls
- pip install coveralls
script:
- pycodestyle uw_r25/ --exclude=uw_r25/tests
- pycodestyle uw_r25/
- coverage run --source=uw_r25 uw_r25/test.py -v
after_script:
- coveralls
Expand All @@ -28,4 +25,4 @@ deploy:
secure: qq5MdWsQd6/d/6oKOLTPcgxJ8i0d3ZAuvJcEx3UiHwEc4AQ7wRPnLkx6LfHaE6qJTbzuNPkDfa5MPBu2fN0wsWYqONg4ulY8sTKDVMuCxl0lMiwLXogYxFjNkDkgsn+8pdc9FfI9PozP4cEQAR62S2aoDdP5Fmpxv9vg/o5/NDXdQtw3qmkQTfAnqYRIA/868/hKhwKumdOP9IMKYS2VaxVNyw8oUWk8o8Xv1bI6wCteej3+RpsHblIyvQIfXXOPGIXLGD9m4K0yTAM16ibXhztr5Xo9VXiuWiT0P39mL6sJLzGor4rNvoyNrw0ikWW3e4B579brYwvPYljZGbzcIY9+WjwJZmfMAVVvPpm++kALcs+FT5CBRK+NICz0QmSvCHOZ4gLqIKLEDXGAwBmJ6ndkQzKDcQM+pSZVzVrTVASEGHYcneNzBYNWmwMh0bmfb5zvNoYtcE5FswVc82EoWRBxRzTTt2ef+4YW7zVqy4YYVIYP/vAixw+xHj+gcSD7WMbon+ZiydX2zM39vFnxpJXS9V+1ILDkdaFR22cSdC4Syka3VO2/Ylk/raRWKrzaTLtmuKXw4Usyn0mbuN7YdEJAJTyA6JklUvDCh04ny4L2rHGnQjLHP+xIhSu7flDipA87/bi2zUDn7T53Tddy4+NFJ+F2az2FpLiEBPq/V08=
on:
tags: true
python: '3.5'
python: '3.6'
9 changes: 4 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
author="UW-IT AXDD",
author_email="aca-it@uw.edu",
include_package_data=True,
install_requires=['UW-RestClients-Core>0.8,<1.0',
'lxml',
'unittest2',
],
install_requires=[
'UW-RestClients-Core>=1.0,<2.0',
'lxml',
],
license='Apache License, Version 2.0',
description=('A library for connecting to the UW R25 API'),
long_description=README,
Expand All @@ -34,7 +34,6 @@
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.6',
],
)
5 changes: 1 addition & 4 deletions uw_r25/events.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from uw_r25.models import Event, BindingReservation
from uw_r25 import nsmap, get_resource
from uw_r25.reservations import reservations_from_xml
try:
from urllib import urlencode, quote
except ImportError:
from urllib.parse import urlencode, quote
from urllib.parse import urlencode, quote


def get_event_by_id(event_id):
Expand Down
5 changes: 1 addition & 4 deletions uw_r25/reservations.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
from uw_r25.models import Reservation
from uw_r25 import nsmap, get_resource
from uw_r25.spaces import space_reservation_from_xml
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from urllib.parse import urlencode


def get_reservation_by_id(reservation_id):
Expand Down
5 changes: 1 addition & 4 deletions uw_r25/spaces.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from uw_r25.models import Space
from uw_r25 import nsmap, get_resource
try:
from urllib import urlencode
except ImportError:
from urllib.parse import urlencode
from urllib.parse import urlencode


def get_space_by_id(space_id):
Expand Down
8 changes: 4 additions & 4 deletions uw_r25/tests/test_events.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
from unittest import TestCase
from unittest import TestCase, skipIf
from commonconf import settings
from uw_r25.events import get_event_by_id, get_events
from restclients_core.exceptions import DataFailureException
from unittest2 import skipIf
from uw_r25.util import fdao_r25_override
from restclients_core.exceptions import DataFailureException


@fdao_r25_override
Expand All @@ -23,7 +22,8 @@ def test_event_by_id(self):
self.assertEquals(event.cabinet_name, event.name, "cabinet_name")
self.assertEquals(event.state_name(), "Tentative", "state_name")
self.assertEquals(len(event.reservations), 1, "reservations")
self.assertEquals(len(event.binding_reservations), 1, "binding_reservations")
self.assertEquals(
len(event.binding_reservations), 1, "binding_reservations")

def test_parent_event(self):
event = get_event_by_id("100002")
Expand Down

0 comments on commit f3eb7cd

Please sign in to comment.