gwu-libraries / launchpad

A django based system that provides a stable URL for every item in the library's catalog. Various discovery services will link to these URLs. The page for each item will in turn link out to various other resources that provide methods for accessing the content of the items.
MIT License
15 stars 9 forks source link

Django 1.8.13 #1159

Closed adityadharne closed 8 years ago

adityadharne commented 8 years ago

This branch includes all the changes required to upgrade Django to 1.8.13.

kerchner commented 8 years ago

@adityadharne In the case of the django python requirement, I would recommending just pinning the Django version to ==1.8.13 (rather than <1.9)

lwrubel commented 8 years ago

@adityadharne have you run tests successfully? ./manage.py test Several tests are failing, I think because of the database settings. But I'm trying to figure out if it's something with my install or not.

cummingsm commented 8 years ago

when you run manage.py test, does it actually run any tests? when i try it on my dev, it seems to only run against the default db. by the way, casperjs tests against your instance worked ok

lwrubel commented 8 years ago

yes, I'm running the tests in launchpad/lp/ui/tests

thanks for running the casperjs tests, @cummingsm

lwrubel commented 8 years ago

You can see the test errors in the Travis build fail as well.

lwrubel commented 8 years ago

@adityadharne you could probably just use a try/except block instead of the if, since it's a KeyError on settings.DATABASES['voyager'] that's causing the problems.

kerchner commented 8 years ago

A fresh install of the app seems to result in Django 1.9c1 being installed. May want to pin to 1.8.13:

$ pip freeze
Django==1.9c1
PyZ3950==2.04
argparse==1.2.1
bibjsontools==0.3
cx-Oracle==5.2.1
django-crispy-forms==1.6.0
django-nose==1.4.4
lxml==3.6.1
nose==1.3.7
ply==3.8
psycopg2==2.6.2
pycountry==1.20
pymarc==2.9.0
python-memcached==1.58
pytz==2016.6.1
requests==2.10.0
six==1.10.0
summoner==0.0.4
wsgiref==0.1.2

Then, manage.py results in the following error:

$ ./manage.py 

Traceback (most recent call last):
  File "./manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/kerchner/projects/launchpad/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 350, in execute_from_command_line
    utility.execute()
  File "/home/kerchner/projects/launchpad/ENV/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 324, in execute
    django.setup()
  File "/home/kerchner/projects/launchpad/ENV/local/lib/python2.7/site-packages/django/__init__.py", line 17, in setup
    configure_logging(settings.LOGGING_CONFIG, settings.LOGGING)
  File "/home/kerchner/projects/launchpad/ENV/local/lib/python2.7/site-packages/django/utils/log.py", line 71, in configure_logging
    logging_config_func(logging_settings)
  File "/usr/lib/python2.7/logging/config.py", line 777, in dictConfig
    dictConfigClass(config).configure()
  File "/usr/lib/python2.7/logging/config.py", line 575, in configure
    '%r: %s' % (name, e))
ValueError: Unable to configure handler 'null': Cannot resolve 'django.utils.log.NullHandler': No module named NullHandler
kerchner commented 8 years ago

@adityadharne ah got it, thanks.

kerchner commented 8 years ago

@adityadharne The issue above was resolved by the update to requirements.txt that pinned django to 1.8.13. However, be aware that django.utils.log.NullHandler (referenced in settings.py) appears to have been removed in Django 1.9

lwrubel commented 8 years ago

@adityadharne I was able to switch to sqlite, run tests, and it seems to work for me. Before merging, looks like you need to remove from requirements.txt:

psycopg2>=2.6.1,<2.7

I also ran launchpad-autotest and some didn't pass, but maybe they just need updating? @cummingsm might have insight into this already from running it (just let me know if you'd like me to look into any in particular, Mike).