Skip to content

Commit

Permalink
Merge pull request #75 from dimagi/je/fix-view
Browse files Browse the repository at this point in the history
Create view without fetching
  • Loading branch information
snopoke authored Aug 5, 2019
2 parents f844cc2 + dd37a36 commit d0701cc
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 10 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
dist: bionic
language: python

services:
- docker

python:
- 2.7
- 3.5
- 3.6
- 3.7

install:
- pip install -r requirements_dev.txt
Expand Down
5 changes: 2 additions & 3 deletions couchdbkit/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
from cloudant.document import Document
from cloudant.error import CloudantClientException
from cloudant.security_document import SecurityDocument
from cloudant.view import View
from requests.exceptions import HTTPError
import six
from six.moves import filter
Expand Down Expand Up @@ -753,9 +754,7 @@ def raw_view(self, view_path, params):
else:
view_path = view_path.split('/')
assert len(view_path) == 4
ddoc = DesignDocument(self.cloudant_database, view_path[1])
ddoc.fetch()
view = ddoc.get_view(view_path[3])
view = View(DesignDocument(self.cloudant_database, view_path[1]), view_path[3])
return view(**params)

def view(self, view_name, schema=None, wrapper=None, **params):
Expand Down
2 changes: 1 addition & 1 deletion couchdbkit/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# See the NOTICE for more information.

from __future__ import absolute_import
version_info = (0, 9, 16)
version_info = (1, 0, 0, 'a')
__version__ = ".".join([str(vi) for vi in version_info])
11 changes: 7 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
import os
import sys

if not hasattr(sys, 'version_info') or sys.version_info < (2, 7, 0, 'final'):
raise SystemExit("couchdbkit requires Python 2.7 or later.")
if not hasattr(sys, 'version_info') or sys.version_info < (3, 5, 0):
raise SystemExit("couchdbkit requires Python 3.5 or later.")

from setuptools import setup, find_packages

Expand Down Expand Up @@ -39,8 +39,11 @@
'Intended Audience :: Developers',
'License :: OSI Approved :: Apache Software License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3 :: Only',
'Topic :: Database',
'Topic :: Utilities',
'Topic :: Software Development :: Libraries :: Python Modules',
Expand Down

0 comments on commit d0701cc

Please sign in to comment.