Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft: updates for rethinkdb 2.4.9 #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions doublethink/orm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
doublethink/orm.py - rethinkdb ORM

Copyright (C) 2017-2019 Internet Archive
Copyright (C) 2017-2023 Internet Archive

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -16,10 +16,12 @@
limitations under the License.
'''

import rethinkdb as r
import rethinkdb as rdb
import logging
import doublethink

r = rdb.RethinkDB()

class classproperty(object):
def __init__(self, fget):
self.fget = fget
Expand Down
6 changes: 4 additions & 2 deletions doublethink/rethinker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
doublethink/rethinker.py - rethinkdb connection-manager

Copyright (C) 2015-2018 Internet Archive
Copyright (C) 2015-2023 Internet Archive

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -16,13 +16,15 @@
limitations under the License.
'''

import rethinkdb as r
import rethinkdb as rdb
import logging
import random
import time
import types
import re

r = rdb.RethinkDB()

class RethinkerWrapper(object):
logger = logging.getLogger('doublethink.RethinkerWrapper')
def __init__(self, rr, wrapped):
Expand Down
6 changes: 4 additions & 2 deletions doublethink/services.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
doublethink/services.py - rethinkdb service registry

Copyright (C) 2015-2017 Internet Archive
Copyright (C) 2015-2023 Internet Archive

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -16,12 +16,14 @@
limitations under the License.
'''

import rethinkdb as r
import rethinkdb as rdb
import logging
import socket
import os
import doublethink

r = rdb.RethinkDB()

class ServiceRegistry(object):
'''
Simple rethinkdb service registry.
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setuptools.setup(
name='doublethink',
version='0.3.0',
version='0.4.0',
packages=['doublethink'],
classifiers=[
'Programming Language :: Python :: 2.7',
Expand All @@ -19,7 +19,7 @@
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: 3.7',
],
install_requires=['rethinkdb>=2.3,<2.4'],
install_requires=['rethinkdb>=2.4,<2.5'],
extras_require={'test': test_deps},
url='https://github.com/internetarchive/doublethink',
author='Noah Levitt',
Expand Down
6 changes: 4 additions & 2 deletions tests/test_cli.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
test_cli.py - unit tests for doublethink CLI

Copyright (C) 2015-2017 Internet Archive
Copyright (C) 2015-2023 Internet Archive

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -21,9 +21,11 @@
import logging
import sys
import pytest
import rethinkdb as r
import rethinkdb as rdb
import pkg_resources

r = rdb.RethinkDB()

logging.basicConfig(stream=sys.stderr, level=logging.INFO,
format="%(asctime)s %(process)d %(levelname)s %(threadName)s %(name)s.%(funcName)s(%(filename)s:%(lineno)d) %(message)s")

Expand Down
4 changes: 3 additions & 1 deletion tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@
import logging
import sys
import pytest
import rethinkdb as r
import rethinkdb as rdb
from doublethink import parse_rethinkdb_url

r = rdb.RethinkDB()

logging.basicConfig(
stream=sys.stderr, level=logging.INFO, format=(
'%(asctime)s %(process)d %(levelname)s %(threadName)s '
Expand Down
6 changes: 4 additions & 2 deletions tests/test_orm.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
tests_orm.py - unit tests for doublethink ORM

Copyright (C) 2015-2017 Internet Archive
Copyright (C) 2015-2023 Internet Archive

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -20,7 +20,9 @@
import logging
import sys
import pytest
import rethinkdb as r
import rethinkdb as rdb

r = rdb.RethinkDB()

logging.basicConfig(stream=sys.stderr, level=logging.INFO,
format="%(asctime)s %(process)d %(levelname)s %(threadName)s %(name)s.%(funcName)s(%(filename)s:%(lineno)d) %(message)s")
Expand Down
6 changes: 4 additions & 2 deletions tests/test_rethinker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
tests_rethinker.py - unit tests for doublethink connection manager

Copyright (C) 2015-2018 Internet Archive
Copyright (C) 2015-2023 Internet Archive

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,13 +22,15 @@
import types
import gc
import pytest
import rethinkdb as r
import rethinkdb as rdb
import datetime
try:
from unittest import mock
except:
import mock

r = rdb.RethinkDB()

logging.basicConfig(stream=sys.stderr, level=logging.INFO,
format="%(asctime)s %(process)d %(levelname)s %(threadName)s %(name)s.%(funcName)s(%(filename)s:%(lineno)d) %(message)s")

Expand Down
6 changes: 4 additions & 2 deletions tests/test_svcreg.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
'''
tests_rethinker.py - unit tests for doublethink

Copyright (C) 2015-2017 Internet Archive
Copyright (C) 2015-2023 Internet Archive

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -22,12 +22,14 @@
import types
import gc
import pytest
import rethinkdb as r
import rethinkdb as rdb
import time
import socket
import os
import datetime

r = rdb.RethinkDB()

logging.basicConfig(stream=sys.stderr, level=logging.INFO,
format="%(asctime)s %(process)d %(levelname)s %(threadName)s %(name)s.%(funcName)s(%(filename)s:%(lineno)d) %(message)s")

Expand Down