Closed adityadharne closed 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)
@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.
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
yes, I'm running the tests in launchpad/lp/ui/tests
thanks for running the casperjs tests, @cummingsm
You can see the test errors in the Travis build fail as well.
@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.
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
@adityadharne ah got it, thanks.
@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
@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).
This branch includes all the changes required to upgrade Django to 1.8.13.