Search is not available for this dataset
id stringlengths 1 8 | text stringlengths 72 9.81M | addition_count int64 0 10k | commit_subject stringlengths 0 3.7k | deletion_count int64 0 8.43k | file_extension stringlengths 0 32 | lang stringlengths 1 94 | license stringclasses 10
values | repo_name stringlengths 9 59 |
|---|---|---|---|---|---|---|---|---|
1400 | <NME> utils_tests.py
<BEF> """
Tests for functionality in the utils module
"""
import platform
import unittest
import mock
import queries
from queries import utils
class GetCurrentUserTests(unittest.TestCase):
@mock.patch('pwd.getpwuid')
def test_get_current_user(self, getpwuid):
"""get_current_us... | 3 | Change the pgsql scheme to postgresql | 3 | .py | py | bsd-3-clause | gmr/queries |
1401 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import datetime
import logging
import os
import threading
import time
import weakref
import psycopg2
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = int(os.environ.get('QUERIES_MAX_POOL_SIZE', 1))
class Connection(object):
"""Contain... | 0 | Whitespace cleanup | 1 | .py | py | bsd-3-clause | gmr/queries |
1402 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import datetime
import logging
import os
import threading
import time
import weakref
import psycopg2
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = int(os.environ.get('QUERIES_MAX_POOL_SIZE', 1))
class Connection(object):
"""Contain... | 0 | Whitespace cleanup | 1 | .py | py | bsd-3-clause | gmr/queries |
1403 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Handle exceptions raised when creating async connection | 1 | .py | py | bsd-3-clause | gmr/queries |
1404 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Handle exceptions raised when creating async connection | 1 | .py | py | bsd-3-clause | gmr/queries |
1405 | <NME> pool_manager_tests.py
<BEF> ADDFILE
<MSG> start the pool manager tests
<DFF> @@ -0,0 +1,37 @@
+"""
+Tests for Manager class in the pool module
+
+"""
+import mock
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+import uuid
+
+from queries import pool
+
+
+class ManagerTests(uni... | 37 | start the pool manager tests | 0 | .py | py | bsd-3-clause | gmr/queries |
1406 | <NME> pool_manager_tests.py
<BEF> ADDFILE
<MSG> start the pool manager tests
<DFF> @@ -0,0 +1,37 @@
+"""
+Tests for Manager class in the pool module
+
+"""
+import mock
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+import uuid
+
+from queries import pool
+
+
+class ManagerTests(uni... | 37 | start the pool manager tests | 0 | .py | py | bsd-3-clause | gmr/queries |
1407 | <NME> pool_manager_tests.py
<BEF> """
Tests for Manager class in the pool module
"""
import unittest
import uuid
import mock
from queries import pool
def mock_connection():
conn = mock.MagicMock('psycopg2.extensions.connection')
conn.close = mock.Mock()
conn.closed = True
conn.isexecuting = mock.Mo... | 2 | Remove future-proofing with pool_type | 16 | .py | py | bsd-3-clause | gmr/queries |
1408 | <NME> pool_manager_tests.py
<BEF> """
Tests for Manager class in the pool module
"""
import unittest
import uuid
import mock
from queries import pool
def mock_connection():
conn = mock.MagicMock('psycopg2.extensions.connection')
conn.close = mock.Mock()
conn.closed = True
conn.isexecuting = mock.Mo... | 2 | Remove future-proofing with pool_type | 16 | .py | py | bsd-3-clause | gmr/queries |
1409 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
"""
import logging
"""
import logging
import socket
import warnings
from tornado import concurrent, ioloop
from psycopg2 import extras, extensions
import psycopg2
from queries import pool, results, ... | 53 | Documentation updates | 43 | .py | py | bsd-3-clause | gmr/queries |
1410 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
"""
import logging
"""
import logging
import socket
import warnings
from tornado import concurrent, ioloop
from psycopg2 import extras, extensions
import psycopg2
from queries import pool, results, ... | 53 | Documentation updates | 43 | .py | py | bsd-3-clause | gmr/queries |
1411 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 2 | Remove indent | 2 | .rst | rst | bsd-3-clause | gmr/queries |
1412 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 2 | Remove indent | 2 | .rst | rst | bsd-3-clause | gmr/queries |
1413 | <NME> tornado_multiple.rst
<BEF> ADDFILE
<MSG> Add a concurrent query example
<DFF> @@ -0,0 +1,34 @@
+Concurrent Queries in Tornado
+=============================
+The following example issues multiple concurrent queries in a single asynchronous
+request and will wait until all queries are complete before progressing:... | 34 | Add a concurrent query example | 0 | .rst | rst | bsd-3-clause | gmr/queries |
1414 | <NME> tornado_multiple.rst
<BEF> ADDFILE
<MSG> Add a concurrent query example
<DFF> @@ -0,0 +1,34 @@
+Concurrent Queries in Tornado
+=============================
+The following example issues multiple concurrent queries in a single asynchronous
+request and will wait until all queries are complete before progressing:... | 34 | Add a concurrent query example | 0 | .rst | rst | bsd-3-clause | gmr/queries |
1415 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 3 | Update the TornadoSession information a bit | 4 | .rst | rst | bsd-3-clause | gmr/queries |
1416 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 3 | Update the TornadoSession information a bit | 4 | .rst | rst | bsd-3-clause | gmr/queries |
1417 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
else:
install_requires = ['psycopg2']
setup(name='pgsql_wrapper',
version='1.1.2',
description="PostgreSQL / psycopg2 caching wrapper class",
maintainer="Gavin M. Ro... | 21 | Updates to distribution support files | 3 | .py | py | bsd-3-clause | gmr/queries |
1418 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
else:
install_requires = ['psycopg2']
setup(name='pgsql_wrapper',
version='1.1.2',
description="PostgreSQL / psycopg2 caching wrapper class",
maintainer="Gavin M. Ro... | 21 | Updates to distribution support files | 3 | .py | py | bsd-3-clause | gmr/queries |
1419 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 1 | Ensure the pool exists on creation too | 0 | .py | py | bsd-3-clause | gmr/queries |
1420 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 1 | Ensure the pool exists on creation too | 0 | .py | py | bsd-3-clause | gmr/queries |
1421 | <NME> utils.py
<BEF> """
Utility functions for access to OS level info and URI parsing
"""
import collections
import getpass
import logging
import os
import platform
# All systems do not support pwd module
try:
import pwd
except ImportError:
pwd = None
# Python 2 & 3 compatibility
try:
from urllib import... | 5 | utils.py: fix a bug with lists of things, add test coverage | 2 | .py | py | bsd-3-clause | gmr/queries |
1422 | <NME> utils.py
<BEF> """
Utility functions for access to OS level info and URI parsing
"""
import collections
import getpass
import logging
import os
import platform
# All systems do not support pwd module
try:
import pwd
except ImportError:
pwd = None
# Python 2 & 3 compatibility
try:
from urllib import... | 5 | utils.py: fix a bug with lists of things, add test coverage | 2 | .py | py | bsd-3-clause | gmr/queries |
1423 | <NME> tornado_session.rst
<BEF> TornadoSession Asynchronous API
===============================
Use a Queries Session asynchronously within the `Tornado <http://www.tornadoweb.org>`_ framework.
The :py:class:`TornadoSession <queries.TornadoSession>` class is optimized for
asynchronous concurrency. Each call to
:py:met... | 2 | Add module directives to fix #35 | 0 | .rst | rst | bsd-3-clause | gmr/queries |
1424 | <NME> tornado_session.rst
<BEF> TornadoSession Asynchronous API
===============================
Use a Queries Session asynchronously within the `Tornado <http://www.tornadoweb.org>`_ framework.
The :py:class:`TornadoSession <queries.TornadoSession>` class is optimized for
asynchronous concurrency. Each call to
:py:met... | 2 | Add module directives to fix #35 | 0 | .rst | rst | bsd-3-clause | gmr/queries |
1425 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import datetime
import logging
import os
import threading
import time
import weakref
import psycopg2
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = int(os.environ.get('QUERIES_MAX_POOL_SIZE', 1))
class Connection(object):
"""Contain... | 12 | Move PoolManager.is_full after PoolManager.has_idle_connection | 11 | .py | py | bsd-3-clause | gmr/queries |
1426 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import datetime
import logging
import os
import threading
import time
import weakref
import psycopg2
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = int(os.environ.get('QUERIES_MAX_POOL_SIZE', 1))
class Connection(object):
"""Contain... | 12 | Move PoolManager.is_full after PoolManager.has_idle_connection | 11 | .py | py | bsd-3-clause | gmr/queries |
1427 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 1 | Try and work around pypy on travis issue | 1 | .py | py | bsd-3-clause | gmr/queries |
1428 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 1 | Try and work around pypy on travis issue | 1 | .py | py | bsd-3-clause | gmr/queries |
1429 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import mock
import uuid
try:
import unittest2 as unittest
except ImportError:
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, ... | 1 | Fix the unittest to reflect the new exception type | 2 | .py | py | bsd-3-clause | gmr/queries |
1430 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import mock
import uuid
try:
import unittest2 as unittest
except ImportError:
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, ... | 1 | Fix the unittest to reflect the new exception type | 2 | .py | py | bsd-3-clause | gmr/queries |
1431 | <NME> utils_tests.py
<BEF> """
Tests for functionality in the utils module
"""
import mock
import platform
import unittest
import queries
from queries import utils
class GetCurrentUserTests(unittest.TestCase):
@mock.patch('pwd.getpwuid')
def test_get_current_user(self, getpwuid):
"""get_current_use... | 2 | More flake8 config and cleanup | 1 | .py | py | bsd-3-clause | gmr/queries |
1432 | <NME> utils_tests.py
<BEF> """
Tests for functionality in the utils module
"""
import mock
import platform
import unittest
import queries
from queries import utils
class GetCurrentUserTests(unittest.TestCase):
@mock.patch('pwd.getpwuid')
def test_get_current_user(self, getpwuid):
"""get_current_use... | 2 | More flake8 config and cleanup | 1 | .py | py | bsd-3-clause | gmr/queries |
1433 | <NME> __init__.py
<BEF> """
Queries: PostgreSQL database access simplified
Queries is an opinionated wrapper for interfacing with PostgreSQL that offers
caching of connections and support for PyPy via psycopg2ct.
The core `queries.Queries` class will automatically register support for UUIDs,
Unicode and Unicode array... | 18 | Add the uri method back | 0 | .py | py | bsd-3-clause | gmr/queries |
1434 | <NME> __init__.py
<BEF> """
Queries: PostgreSQL database access simplified
Queries is an opinionated wrapper for interfacing with PostgreSQL that offers
caching of connections and support for PyPy via psycopg2ct.
The core `queries.Queries` class will automatically register support for UUIDs,
Unicode and Unicode array... | 18 | Add the uri method back | 0 | .py | py | bsd-3-clause | gmr/queries |
1435 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 0 | Revert explicit Python 3.7 support | 1 | .py | py | bsd-3-clause | gmr/queries |
1436 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 0 | Revert explicit Python 3.7 support | 1 | .py | py | bsd-3-clause | gmr/queries |
1437 | <NME> history.rst
<BEF> Version History
===============
- 1.5.0 2014-10-07
- Handle empty query results in the iterator (#4) - Fix by Den T.
- 1.4.0 2014-09-04
- Address exception handling in tornado_session
- Fix Results iterator for Python 3.7 (#31 - `nvllsvm <https://github.com/nvllsvm>`_)
2.0.0 2018-01-29
---... | 1 | Fix attribution | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1438 | <NME> history.rst
<BEF> Version History
===============
- 1.5.0 2014-10-07
- Handle empty query results in the iterator (#4) - Fix by Den T.
- 1.4.0 2014-09-04
- Address exception handling in tornado_session
- Fix Results iterator for Python 3.7 (#31 - `nvllsvm <https://github.com/nvllsvm>`_)
2.0.0 2018-01-29
---... | 1 | Fix attribution | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1439 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 3 | Update features a bit | 3 | .rst | rst | bsd-3-clause | gmr/queries |
1440 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 3 | Update features a bit | 3 | .rst | rst | bsd-3-clause | gmr/queries |
1441 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import mock
import tempfile
import time
try:
import unittest2 as unittest
except ImportError:
import unittest
from psycopg2 import extras
import psycopg2
from tornado import concurrent
from tornado import gen
... | 0 | Update PYPY edge case | 3 | .py | py | bsd-3-clause | gmr/queries |
1442 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import mock
import tempfile
import time
try:
import unittest2 as unittest
except ImportError:
import unittest
from psycopg2 import extras
import psycopg2
from tornado import concurrent
from tornado import gen
... | 0 | Update PYPY edge case | 3 | .py | py | bsd-3-clause | gmr/queries |
1443 | <NME> conf.py
<BEF> # -*- coding: utf-8 -*-
import datetime
import sys
sys.path.insert(0, '../')
import queries
extensions = [
'sphinx.ext.autodoc',
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
# If extensions (or modules to docume... | 7 | Dynamically import the version, use intersphinx for Tornado and psycopg2 | 8 | .py | py | bsd-3-clause | gmr/queries |
1444 | <NME> conf.py
<BEF> # -*- coding: utf-8 -*-
import datetime
import sys
sys.path.insert(0, '../')
import queries
extensions = [
'sphinx.ext.autodoc',
#
# All configuration values have a default; values that are commented out
# serve to show the default.
import sys
import os
# If extensions (or modules to docume... | 7 | Dynamically import the version, use intersphinx for Tornado and psycopg2 | 8 | .py | py | bsd-3-clause | gmr/queries |
1445 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 1 | Fix broken test | 1 | .py | py | bsd-3-clause | gmr/queries |
1446 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 1 | Fix broken test | 1 | .py | py | bsd-3-clause | gmr/queries |
1447 | <NME> bootstrap
<BEF> #!/bin/sh
# vim: set ts=2 sts=2 sw=2 et:
test -n "$SHELLDEBUG" && set -x
if test -e /var/run/docker.sock
then
DOCKER_IP=127.0.0.1
else
echo "Docker environment not detected."
exit 1
fi
set -e
if test -z "$COMPOSE_PROJECT_NAME"
then
CWD=${PWD##*/}
export COMPOSE_PROJECT_NAME=${CWD/_/}
fi... | 1 | Immediately terminate containers in boostrap down | 1 | bootstrap | bsd-3-clause | gmr/queries | |
1448 | <NME> bootstrap
<BEF> #!/bin/sh
# vim: set ts=2 sts=2 sw=2 et:
test -n "$SHELLDEBUG" && set -x
if test -e /var/run/docker.sock
then
DOCKER_IP=127.0.0.1
else
echo "Docker environment not detected."
exit 1
fi
set -e
if test -z "$COMPOSE_PROJECT_NAME"
then
CWD=${PWD##*/}
export COMPOSE_PROJECT_NAME=${CWD/_/}
fi... | 1 | Immediately terminate containers in boostrap down | 1 | bootstrap | bsd-3-clause | gmr/queries | |
1449 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, session, utils
LOGGER = logging.getLo... | 11 | Add a __del__ test | 0 | .py | py | bsd-3-clause | gmr/queries |
1450 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, session, utils
LOGGER = logging.getLo... | 11 | Add a __del__ test | 0 | .py | py | bsd-3-clause | gmr/queries |
1451 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import datetime
import logging
import os
import threading
import time
import weakref
import psycopg2
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = int(os.environ.get('QUERIES_MAX_POOL_SIZE', 1))
class Connection(object):
"""Contain... | 1 | Fix a Python3 compatibility issue | 1 | .py | py | bsd-3-clause | gmr/queries |
1452 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import datetime
import logging
import os
import threading
import time
import weakref
import psycopg2
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = int(os.environ.get('QUERIES_MAX_POOL_SIZE', 1))
class Connection(object):
"""Contain... | 1 | Fix a Python3 compatibility issue | 1 | .py | py | bsd-3-clause | gmr/queries |
1453 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 1 | Update README | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1454 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 1 | Update README | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1455 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the version | 1 | .py | py | bsd-3-clause | gmr/queries |
1456 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the version | 1 | .py | py | bsd-3-clause | gmr/queries |
1457 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
name='queries',
version='2.1.0',
description='Simplified PostgreSQL client built upon P... | 3 | Update setup.py for readthedocs | 0 | .py | py | bsd-3-clause | gmr/queries |
1458 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
else:
install_requires = ['psycopg2']
setup(name='queries',
version='1.2.0',
name='queries',
version='2.1.0',
description='Simplified PostgreSQL client built upon P... | 3 | Update setup.py for readthedocs | 0 | .py | py | bsd-3-clause | gmr/queries |
1459 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- secure: "inURdx4ldkJqQXL1TyvKImC3EnL5TixC1DlNMBYi5ttygwAk+mSSSw8Yc7klB6D1m6q79xUlHRk06vbz23CsXTM4AClC5Emrk6XN2GlUKl5WI+z+A2skI59buEhLWe7e2KzhB/AVx2E3TfKa0oY7raM0UUnaOkpV... | 2 | Add 3.8 to test matrix | 1 | .yml | travis | bsd-3-clause | gmr/queries |
1460 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- secure: "inURdx4ldkJqQXL1TyvKImC3EnL5TixC1DlNMBYi5ttygwAk+mSSSw8Yc7klB6D1m6q79xUlHRk06vbz23CsXTM4AClC5Emrk6XN2GlUKl5WI+z+A2skI59buEhLWe7e2KzhB/AVx2E3TfKa0oY7raM0UUnaOkpV... | 2 | Add 3.8 to test matrix | 1 | .yml | travis | bsd-3-clause | gmr/queries |
1461 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the revision | 1 | .py | py | bsd-3-clause | gmr/queries |
1462 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 1 | Bump the revision | 1 | .py | py | bsd-3-clause | gmr/queries |
1463 | <NME> setup.py
<BEF> import os
import platform
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', None) == 'True':
i... | 4 | Narrow the psycopg2 pin, bump version | 3 | .py | py | bsd-3-clause | gmr/queries |
1464 | <NME> setup.py
<BEF> import os
import platform
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', None) == 'True':
i... | 4 | Narrow the psycopg2 pin, bump version | 3 | .py | py | bsd-3-clause | gmr/queries |
1465 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 15 | Auto-clean a sessions pool | 4 | .py | py | bsd-3-clause | gmr/queries |
1466 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 15 | Auto-clean a sessions pool | 4 | .py | py | bsd-3-clause | gmr/queries |
1467 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', None) == 'True':
install_requires.append('to... | 1 | Set a minimum pin on psycopg2 | 1 | .py | py | bsd-3-clause | gmr/queries |
1468 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if target == 'PyPy':
install_requires = ['psycopg2ct']
else:
install_requires = ['psycopg2']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', None) == 'True':
install_requires.append('to... | 1 | Set a minimum pin on psycopg2 | 1 | .py | py | bsd-3-clause | gmr/queries |
1469 | <NME> .travis.yml
<BEF> ADDFILE
<MSG> Initial travis-ci configuration
<DFF> @@ -0,0 +1,19 @@
+language: python
+
+python:
+ - 2.6
+ - 2.7
+ - pypy
+ - 3.2
+ - 3.3
+ - 3.4
+
+install:
+ - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install psycopg2ct; fi
+ - if [[ $TRAVIS_PYTHON_VERSION ... | 19 | Initial travis-ci configuration | 0 | .yml | travis | bsd-3-clause | gmr/queries |
1470 | <NME> .travis.yml
<BEF> ADDFILE
<MSG> Initial travis-ci configuration
<DFF> @@ -0,0 +1,19 @@
+language: python
+
+python:
+ - 2.6
+ - 2.7
+ - pypy
+ - 3.2
+ - 3.3
+ - 3.4
+
+install:
+ - if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install psycopg2ct; fi
+ - if [[ $TRAVIS_PYTHON_VERSION ... | 19 | Initial travis-ci configuration | 0 | .yml | travis | bsd-3-clause | gmr/queries |
1471 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 21 | Propagate exceptions from PoolManager.add. | 0 | .py | py | bsd-3-clause | gmr/queries |
1472 | <NME> tornado_session_tests.py
<BEF> """
Tests for functionality in the tornado_session module
"""
import unittest
import mock
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, tornado_session
from psycopg2 import extras
from tornado import concurrent, gen, ioloop, testing
class... | 21 | Propagate exceptions from PoolManager.add. | 0 | .py | py | bsd-3-clause | gmr/queries |
1473 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- secure: "inURdx4ldkJqQXL1TyvKImC3EnL5TixC1DlNMBYi5ttygwAk+mSSSw8Yc7klB6D1m6q79xUlHRk06vbz23CsXTM4AClC5Emrk6XN2GlUKl5WI+z+A2skI59buEhLWe7e2KzhB/AVx2E3TfKa0oY7raM0UUnaOkpV... | 1 | Fix travis service reference | 1 | .yml | travis | bsd-3-clause | gmr/queries |
1474 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- secure: "inURdx4ldkJqQXL1TyvKImC3EnL5TixC1DlNMBYi5ttygwAk+mSSSw8Yc7klB6D1m6q79xUlHRk06vbz23CsXTM4AClC5Emrk6XN2GlUKl5WI+z+A2skI59buEhLWe7e2KzhB/AVx2E3TfKa0oY7raM0UUnaOkpV... | 1 | Fix travis service reference | 1 | .yml | travis | bsd-3-clause | gmr/queries |
1475 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 8 | Add inspiration note | 2 | .rst | rst | bsd-3-clause | gmr/queries |
1476 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often repeating the same st... | 8 | Add inspiration note | 2 | .rst | rst | bsd-3-clause | gmr/queries |
1477 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 2 | IOLoop.add_timeout uses an absolute/epoch time. | 1 | .py | py | bsd-3-clause | gmr/queries |
1478 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 2 | IOLoop.add_timeout uses an absolute/epoch time. | 1 | .py | py | bsd-3-clause | gmr/queries |
1479 | <NME> session.py
<BEF> """The Session class allows for a unified (and simplified) view of
interfacing with a PostgreSQL database server.
Connection details are passed in as a PostgreSQL URI and connections are pooled
by default, allowing for reuse of connections across modules in the Python
runtime without having to p... | 3 | Free a connection prior to trying to remove it | 5 | .py | py | bsd-3-clause | gmr/queries |
1480 | <NME> session.py
<BEF> """The Session class allows for a unified (and simplified) view of
interfacing with a PostgreSQL database server.
Connection details are passed in as a PostgreSQL URI and connections are pooled
by default, allowing for reuse of connections across modules in the Python
runtime without having to p... | 3 | Free a connection prior to trying to remove it | 5 | .py | py | bsd-3-clause | gmr/queries |
1481 | <NME> session.py
<BEF> """The Session class allows for a unified (and simplified) view of
interfacing with a PostgreSQL database server.
Connection details are passed in as a PostgreSQL URI and connections are pooled
by default, allowing for reuse of connections across modules in the Python
runtime without having to p... | 17 | Make Session.status private (Session._status) | 17 | .py | py | bsd-3-clause | gmr/queries |
1482 | <NME> session.py
<BEF> """The Session class allows for a unified (and simplified) view of
interfacing with a PostgreSQL database server.
Connection details are passed in as a PostgreSQL URI and connections are pooled
by default, allowing for reuse of connections across modules in the Python
runtime without having to p... | 17 | Make Session.status private (Session._status) | 17 | .py | py | bsd-3-clause | gmr/queries |
1483 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 24 | Additional document updates | 48 | .py | py | bsd-3-clause | gmr/queries |
1484 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 24 | Additional document updates | 48 | .py | py | bsd-3-clause | gmr/queries |
1485 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 129 | Refactor WIP commit, will break tests, just saying. | 112 | .py | py | bsd-3-clause | gmr/queries |
1486 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 129 | Refactor WIP commit, will break tests, just saying. | 112 | .py | py | bsd-3-clause | gmr/queries |
1487 | <NME> history.rst
<BEF> Version History
===============
- Next Release
- Free when tornado_session.Result is ``__del__'d`` without ``free`` being called.
- Auto-clean the pool after Results.free TTL+1 in tornado_session.TornadoSession
- Dont raise NotImplementedError in Results.free for synchronous use, just trea... | 1 | docs/history: Add 1.10.0 | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1488 | <NME> history.rst
<BEF> Version History
===============
- Next Release
- Free when tornado_session.Result is ``__del__'d`` without ``free`` being called.
- Auto-clean the pool after Results.free TTL+1 in tornado_session.TornadoSession
- Dont raise NotImplementedError in Results.free for synchronous use, just trea... | 1 | docs/history: Add 1.10.0 | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1489 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 2 | Bump version | 3 | .py | py | bsd-3-clause | gmr/queries |
1490 | <NME> setup.py
<BEF> import os
import platform
import setuptools
# PYPY vs cpython
if platform.python_implementation() == 'PyPy':
install_requires = ['psycopg2cffi>=2.7.2,<3']
else:
install_requires = ['psycopg2>=2.5.1,<3']
# Install tornado if generating docs on readthedocs
if os.environ.get('READTHEDOCS', ... | 2 | Bump version | 3 | .py | py | bsd-3-clause | gmr/queries |
1491 | <NME> session.py
<BEF> """The Session class allows for a unified (and simplified) view of
interfacing with a PostgreSQL database server.
Connection details are passed in as a PostgreSQL URI and connections are pooled
by default, allowing for reuse of connections across modules in the Python
runtime without having to p... | 14 | Simplify the API even more, add more examples in docs and README | 28 | .py | py | bsd-3-clause | gmr/queries |
1492 | <NME> session.py
<BEF> """The Session class allows for a unified (and simplified) view of
interfacing with a PostgreSQL database server.
Connection details are passed in as a PostgreSQL URI and connections are pooled
by default, allowing for reuse of connections across modules in the Python
runtime without having to p... | 14 | Simplify the API even more, add more examples in docs and README | 28 | .py | py | bsd-3-clause | gmr/queries |
1493 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 4 | Dont raise DeprecationWarning, use warning.warn | 4 | .py | py | bsd-3-clause | gmr/queries |
1494 | <NME> tornado_session.py
<BEF> """
Tornado Session Adapter
Use Queries asynchronously within the Tornado framework.
Example Use:
.. code:: python
class NameListHandler(web.RequestHandler):
def initialize(self):
self.session = queries.TornadoSession(pool_max_size=60)
@gen.coroutine
... | 4 | Dont raise DeprecationWarning, use warning.warn | 4 | .py | py | bsd-3-clause | gmr/queries |
1495 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, session, utils
from queries import re... | 45 | Add skipIf for PYPY, additional tests | 0 | .py | py | bsd-3-clause | gmr/queries |
1496 | <NME> session_tests.py
<BEF> """
Tests for functionality in the session module
"""
import hashlib
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
# Out of order import to ensure psycopg2cffi is registered
from queries import pool, results, session, utils
from queries import re... | 45 | Add skipIf for PYPY, additional tests | 0 | .py | py | bsd-3-clause | gmr/queries |
1497 | <NME> requirements.txt
<BEF> ADDFILE
<MSG> Update to use coveralls for test coverage monitoring/reporting
<DFF> @@ -0,0 +1,3 @@
+psycopg2
+tornado
+python-coveralls
\ No newline at end of file
| 3 | Update to use coveralls for test coverage monitoring/reporting | 0 | .txt | txt | bsd-3-clause | gmr/queries |
1498 | <NME> requirements.txt
<BEF> ADDFILE
<MSG> Update to use coveralls for test coverage monitoring/reporting
<DFF> @@ -0,0 +1,3 @@
+psycopg2
+tornado
+python-coveralls
\ No newline at end of file
| 3 | Update to use coveralls for test coverage monitoring/reporting | 0 | .txt | txt | bsd-3-clause | gmr/queries |
1499 | <NME> session.py
<BEF> """The Session class allows for a unified (and simplified) view of
interfacing with a PostgreSQL database server.
Connection details are passed in as a PostgreSQL URI and connections are pooled
by default, allowing for reuse of connections across modules in the Python
runtime without having to p... | 5 | Add ability to override autocommit option for the session. | 4 | .py | py | bsd-3-clause | gmr/queries |