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 |
|---|---|---|---|---|---|---|---|---|
1200 | <NME> index.rst
<BEF> Queries: PostgreSQL Simplified
==============================
*Queries* is a BSD licensed opinionated wrapper of the psycopg2_ library for
interacting with PostgreSQL.
|Version| |License|
The popular psycopg2_ package is a full-featured python client. Unfortunately
as a developer, you're often r... | 2 | Merge pull request #5 from jchassoul/patch-1 | 2 | .rst | rst | bsd-3-clause | gmr/queries |
1201 | <NME> .codeclimate.yml
<BEF> ADDFILE
<MSG> Add codeclimate
<DFF> @@ -0,0 +1,7 @@
+languages:
+ Python: true
+exclude_paths:
+ - setup.py
+ - docs/*
+ - tests/*
+ - examples/*
| 7 | Add codeclimate | 0 | .yml | codeclimate | bsd-3-clause | gmr/queries |
1202 | <NME> .codeclimate.yml
<BEF> ADDFILE
<MSG> Add codeclimate
<DFF> @@ -0,0 +1,7 @@
+languages:
+ Python: true
+exclude_paths:
+ - setup.py
+ - docs/*
+ - tests/*
+ - examples/*
| 7 | Add codeclimate | 0 | .yml | codeclimate | bsd-3-clause | gmr/queries |
1203 | <NME> .gitignore
<BEF> .DS_Store
.idea
*.pyc
dist
*.egg-info
atlassian-ide-plugin.xml
docs/_build
.coverage
env
<MSG> Ignore the docs/_build dir in git
<DFF> @@ -4,3 +4,4 @@ build
dist
*.egg-info
atlassian-ide-plugin.xml
+docs/_build
\ No newline at end of file
| 1 | Ignore the docs/_build dir in git | 0 | gitignore | bsd-3-clause | gmr/queries | |
1204 | <NME> .gitignore
<BEF> .DS_Store
.idea
*.pyc
dist
*.egg-info
atlassian-ide-plugin.xml
docs/_build
.coverage
env
<MSG> Ignore the docs/_build dir in git
<DFF> @@ -4,3 +4,4 @@ build
dist
*.egg-info
atlassian-ide-plugin.xml
+docs/_build
\ No newline at end of file
| 1 | Ignore the docs/_build dir in git | 0 | gitignore | bsd-3-clause | gmr/queries | |
1205 | <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 | Looks like travis config has changed | 3 | .yml | travis | bsd-3-clause | gmr/queries |
1206 | <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 | Looks like travis config has changed | 3 | .yml | travis | bsd-3-clause | gmr/queries |
1207 | <NME> session.rst
<BEF> .. py:module:: queries.session
Session API
===========
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 ac... | 1 | Fix a missing : in docs | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1208 | <NME> session.rst
<BEF> .. py:module:: queries.session
Session API
===========
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 ac... | 1 | Fix a missing : in docs | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1209 | <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... | 0 | Remove pypy and pypy3 from travis tests | 2 | .yml | travis | bsd-3-clause | gmr/queries |
1210 | <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... | 0 | Remove pypy and pypy3 from travis tests | 2 | .yml | travis | bsd-3-clause | gmr/queries |
1211 | <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 and history | 1 | .py | py | bsd-3-clause | gmr/queries |
1212 | <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 and history | 1 | .py | py | bsd-3-clause | gmr/queries |
1213 | <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... | 2 | Update the examples | 2 | .py | py | bsd-3-clause | gmr/queries |
1214 | <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... | 2 | Update the examples | 2 | .py | py | bsd-3-clause | gmr/queries |
1215 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import logging
import threading
import time
import weakref
import weakref
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = 1
class Connection(object):
class Connection(object):
"""Contains the handle to the connection, the current sta... | 2 | Add support for the QUERIES_MAX_POOL_SIZE env var | 1 | .py | py | bsd-3-clause | gmr/queries |
1216 | <NME> pool.py
<BEF> """
Connection Pooling
"""
import logging
import threading
import time
import weakref
import weakref
LOGGER = logging.getLogger(__name__)
DEFAULT_IDLE_TTL = 60
DEFAULT_MAX_SIZE = 1
class Connection(object):
class Connection(object):
"""Contains the handle to the connection, the current sta... | 2 | Add support for the QUERIES_MAX_POOL_SIZE env var | 1 | .py | py | bsd-3-clause | gmr/queries |
1217 | <NME> session.py
<BEF> """PostgreSQL Class module
"""
import logging
import psycopg2
from psycopg2 import extensions
from psycopg2 import extras
from queries import pool, PYPY
LOGGER = logging.getLogger(__name__)
class Session(object):
"""Core queries
Uses a module level cache of connections to reduce ... | 209 | Updated documentation and class functions | 53 | .py | py | bsd-3-clause | gmr/queries |
1218 | <NME> session.py
<BEF> """PostgreSQL Class module
"""
import logging
import psycopg2
from psycopg2 import extensions
from psycopg2 import extras
from queries import pool, PYPY
LOGGER = logging.getLogger(__name__)
class Session(object):
"""Core queries
Uses a module level cache of connections to reduce ... | 209 | Updated documentation and class functions | 53 | .py | py | bsd-3-clause | gmr/queries |
1219 | <NME> setup.cfg
<BEF> ADDFILE
<MSG> Add deployment via travis, add wheel distribution
<DFF> @@ -0,0 +1,2 @@
+[bdist_wheel]
+universal = 1
\ No newline at end of file
| 2 | Add deployment via travis, add wheel distribution | 0 | .cfg | cfg | bsd-3-clause | gmr/queries |
1220 | <NME> setup.cfg
<BEF> ADDFILE
<MSG> Add deployment via travis, add wheel distribution
<DFF> @@ -0,0 +1,2 @@
+[bdist_wheel]
+universal = 1
\ No newline at end of file
| 2 | Add deployment via travis, add wheel distribution | 0 | .cfg | cfg | bsd-3-clause | gmr/queries |
1221 | <NME> history.rst
<BEF> Version History
===============
- 1.9.1 2016-10-25
- Handle exceptions raised when creating the connection
- 1.9.0 2016-07-01
- Handle a potential race condition in TornadoSession when too many simultaneous new connections are made and a pool fills up
- Increase logging in various places t... | 2 | Update history | 2 | .rst | rst | bsd-3-clause | gmr/queries |
1222 | <NME> history.rst
<BEF> Version History
===============
- 1.9.1 2016-10-25
- Handle exceptions raised when creating the connection
- 1.9.0 2016-07-01
- Handle a potential race condition in TornadoSession when too many simultaneous new connections are made and a pool fills up
- Increase logging in various places t... | 2 | Update history | 2 | .rst | rst | bsd-3-clause | gmr/queries |
1223 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- 3.4
install:
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install psycopg2ct; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install psycopg... | 6 | Require tornado for testing | 6 | .yml | travis | bsd-3-clause | gmr/queries |
1224 | <NME> .travis.yml
<BEF> sudo: false
language: python
dist: xenial
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- 3.4
install:
- if [[ $TRAVIS_PYTHON_VERSION == 'pypy' ]]; then pip install psycopg2ct; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install psycopg... | 6 | Require tornado for testing | 6 | .yml | travis | bsd-3-clause | gmr/queries |
1225 | <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... | 2 | Update the documentaiton | 2 | .py | py | bsd-3-clause | gmr/queries |
1226 | <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... | 2 | Update the documentaiton | 2 | .py | py | bsd-3-clause | gmr/queries |
1227 | <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... | 10 | A few more pool manager tests | 0 | .py | py | bsd-3-clause | gmr/queries |
1228 | <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... | 10 | A few more pool manager tests | 0 | .py | py | bsd-3-clause | gmr/queries |
1229 | <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... | 1 | Merge pull request #38 from tanveerg/master | 1 | .py | py | bsd-3-clause | gmr/queries |
1230 | <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... | 1 | Merge pull request #38 from tanveerg/master | 1 | .py | py | bsd-3-clause | gmr/queries |
1231 | <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 no longer accurate info about LISTEN/NOTIFY [skip ci] | 5 | .rst | rst | bsd-3-clause | gmr/queries |
1232 | <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 no longer accurate info about LISTEN/NOTIFY [skip ci] | 5 | .rst | rst | bsd-3-clause | gmr/queries |
1233 | <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
... | 6 | More exception handling | 2 | .py | py | bsd-3-clause | gmr/queries |
1234 | <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
... | 6 | More exception handling | 2 | .py | py | bsd-3-clause | gmr/queries |
1235 | <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
except ImportError:
import urlparse as _urlparse
Parsed = collections.namedtuple('Parsed',
'scheme,netloc,path,param... | 48 | Add supported query string keyword values | 10 | .py | py | bsd-3-clause | gmr/queries |
1236 | <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
except ImportError:
import urlparse as _urlparse
Parsed = collections.namedtuple('Parsed',
'scheme,netloc,path,param... | 48 | Add supported query string keyword values | 10 | .py | py | bsd-3-clause | gmr/queries |
1237 | <NME> history.rst
<BEF> Version History
===============
- Next Release
- Log a warning when a tornado_session.Result is ``__del__'d`` without ``free`` being called.
- 1.9.1 2016-10-25
- Add better exception handling around connections and getting the logged in user
- 1.9.0 2016-07-01
-----------------
- REMOVED su... | 3 | Update doc history | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1238 | <NME> history.rst
<BEF> Version History
===============
- Next Release
- Log a warning when a tornado_session.Result is ``__del__'d`` without ``free`` being called.
- 1.9.1 2016-10-25
- Add better exception handling around connections and getting the logged in user
- 1.9.0 2016-07-01
-----------------
- REMOVED su... | 3 | Update doc history | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1239 | <NME> session_tests.py
<BEF> """
Tests for the core Queries class
"""
import mock
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
from psycopg2 import extensions
from queries import core
from queries import pool
from queries import PYPY
class PostgresTests(unittest.TestCase):... | 29 | Refactor core.Postgres -> session.Session | 29 | .py | py | bsd-3-clause | gmr/queries |
1240 | <NME> session_tests.py
<BEF> """
Tests for the core Queries class
"""
import mock
import logging
import unittest
import mock
from psycopg2 import extras
import psycopg2
from psycopg2 import extensions
from queries import core
from queries import pool
from queries import PYPY
class PostgresTests(unittest.TestCase):... | 29 | Refactor core.Postgres -> session.Session | 29 | .py | py | bsd-3-clause | gmr/queries |
1241 | <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... | 2 | Add query_all and callproc_all to queries.simple | 0 | .py | py | bsd-3-clause | gmr/queries |
1242 | <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... | 2 | Add query_all and callproc_all to queries.simple | 0 | .py | py | bsd-3-clause | gmr/queries |
1243 | <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... | 2 | Add additional cursor types | 0 | .py | py | bsd-3-clause | gmr/queries |
1244 | <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... | 2 | Add additional cursor types | 0 | .py | py | bsd-3-clause | gmr/queries |
1245 | <NME> .gitignore
<BEF> .DS_Store
.idea
*.pyc
build
dist
*.egg-info
atlassian-ide-plugin.xml
docs/_build
env
<MSG> Ignore .coverage
<DFF> @@ -6,3 +6,4 @@ dist
*.egg-info
atlassian-ide-plugin.xml
docs/_build
+.coverage
| 1 | Ignore .coverage | 0 | gitignore | bsd-3-clause | gmr/queries | |
1246 | <NME> .gitignore
<BEF> .DS_Store
.idea
*.pyc
build
dist
*.egg-info
atlassian-ide-plugin.xml
docs/_build
env
<MSG> Ignore .coverage
<DFF> @@ -6,3 +6,4 @@ dist
*.egg-info
atlassian-ide-plugin.xml
docs/_build
+.coverage
| 1 | Ignore .coverage | 0 | gitignore | bsd-3-clause | gmr/queries | |
1247 | <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 | Additional README updates | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1248 | <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 | Additional README updates | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1249 | <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
... | 84 | Documentation updates | 30 | .py | py | bsd-3-clause | gmr/queries |
1250 | <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
... | 84 | Documentation updates | 30 | .py | py | bsd-3-clause | gmr/queries |
1251 | <NME> README.rst
<BEF> ADDFILE
<MSG> Move to rst for README
<DFF> @@ -0,0 +1,41 @@
+pgsql_wrapper
+=============
+An opinionated wrapper for interfacing with PostgreSQL that offers caching of
+connections and support for PyPy via psycopg2ct. By default the PgSQL class
+sets the cursor type to extras.DictCursor, and tu... | 41 | Move to rst for README | 0 | .rst | rst | bsd-3-clause | gmr/queries |
1252 | <NME> README.rst
<BEF> ADDFILE
<MSG> Move to rst for README
<DFF> @@ -0,0 +1,41 @@
+pgsql_wrapper
+=============
+An opinionated wrapper for interfacing with PostgreSQL that offers caching of
+connections and support for PyPy via psycopg2ct. By default the PgSQL class
+sets the cursor type to extras.DictCursor, and tu... | 41 | Move to rst for README | 0 | .rst | rst | bsd-3-clause | gmr/queries |
1253 | <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 | Reflect the API update | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1254 | <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 | Reflect the API update | 1 | .rst | rst | bsd-3-clause | gmr/queries |
1255 | <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 | Use container's psql Especially useful on systems that don't have postgresql locally | 1 | bootstrap | bsd-3-clause | gmr/queries | |
1256 | <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 | Use container's psql Especially useful on systems that don't have postgresql locally | 1 | bootstrap | bsd-3-clause | gmr/queries | |
1257 | <NME> results.py
<BEF> """
query or callproc Results
"""
import logging
import psycopg2
LOGGER = logging.getLogger(__name__)
class Results(object):
"""The :py:class:`Results` class contains the results returned from
:py:meth:`Session.query <queries.Session.query>` and
:py:meth:`Session.callproc <queries... | 4 | Update generator for Python 3.7 StopIteration is a runtime error in Python 3.7. This change eliminates that while preserving compatibility down to Python 2.7. | 6 | .py | py | bsd-3-clause | gmr/queries |
1258 | <NME> results.py
<BEF> """
query or callproc Results
"""
import logging
import psycopg2
LOGGER = logging.getLogger(__name__)
class Results(object):
"""The :py:class:`Results` class contains the results returned from
:py:meth:`Session.query <queries.Session.query>` and
:py:meth:`Session.callproc <queries... | 4 | Update generator for Python 3.7 StopIteration is a runtime error in Python 3.7. This change eliminates that while preserving compatibility down to Python 2.7. | 6 | .py | py | bsd-3-clause | gmr/queries |
1259 | <NME> requirements.pypy
<BEF> ADDFILE
<MSG> Update the requirements files breaking out for pypy and non-pypy installs
<DFF> @@ -0,0 +1,6 @@
+coverage
+mock
+nose
+psycopg2ct
+python-coveralls
+tornado
| 6 | Update the requirements files breaking out for pypy and non-pypy installs | 0 | .pypy | pypy | bsd-3-clause | gmr/queries |
1260 | <NME> requirements.pypy
<BEF> ADDFILE
<MSG> Update the requirements files breaking out for pypy and non-pypy installs
<DFF> @@ -0,0 +1,6 @@
+coverage
+mock
+nose
+psycopg2ct
+python-coveralls
+tornado
| 6 | Update the requirements files breaking out for pypy and non-pypy installs | 0 | .pypy | pypy | bsd-3-clause | gmr/queries |
1261 | <NME> .travis.yml
<BEF> sudo: false
language: python
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- secure: "inURdx4ldkJqQXL1TyvKImC3EnL5TixC1DlNMBYi5ttygwAk+mSSSw8Yc7klB6D1m6q79xUlHRk06vbz23CsXTM4AClC5Emrk6XN2GlUKl5WI+z+A2skI59buEhLWe7e2KzhB/AVx2E3TfKa0oY7raM0UUnaOkpV1Cj+mHKPIT0="... | 2 | Test in 3.7 | 0 | .yml | travis | bsd-3-clause | gmr/queries |
1262 | <NME> .travis.yml
<BEF> sudo: false
language: python
env:
global:
- PATH=$HOME/.local/bin:$PATH
- AWS_DEFAULT_REGION=us-east-1
- secure: "inURdx4ldkJqQXL1TyvKImC3EnL5TixC1DlNMBYi5ttygwAk+mSSSw8Yc7klB6D1m6q79xUlHRk06vbz23CsXTM4AClC5Emrk6XN2GlUKl5WI+z+A2skI59buEhLWe7e2KzhB/AVx2E3TfKa0oY7raM0UUnaOkpV1Cj+mHKPIT0="... | 2 | Test in 3.7 | 0 | .yml | travis | bsd-3-clause | gmr/queries |
1263 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
=======
PostgreSQL database access simplified.
Queries is an opinionated wrapper for interfacing with PostgreSQL that offers
caching of connections and support for PyPy via psycopg2ct. Queries supports
Python versions 2.6+ and 3.2+. Additionally, Queries provides a... | 63 | Update the README to include more detailed documentation and information | 24 | .rst | rst | bsd-3-clause | gmr/queries |
1264 | <NME> README.rst
<BEF> Queries: PostgreSQL Simplified
=======
PostgreSQL database access simplified.
Queries is an opinionated wrapper for interfacing with PostgreSQL that offers
caching of connections and support for PyPy via psycopg2ct. Queries supports
Python versions 2.6+ and 3.2+. Additionally, Queries provides a... | 63 | Update the README to include more detailed documentation and information | 24 | .rst | rst | bsd-3-clause | gmr/queries |
1265 | <NME> results.py
<BEF> """
query or callproc Results
"""
import logging
import psycopg2
LOGGER = logging.getLogger(__name__)
class Results(object):
"""The :py:class:`Results` class contains the results returned from
:py:meth:`Session.query <queries.Session.query>` and
:py:meth:`Session.callproc <queries... | 1 | Dont error on negative rowcount in __repr__ | 1 | .py | py | bsd-3-clause | gmr/queries |
1266 | <NME> results.py
<BEF> """
query or callproc Results
"""
import logging
import psycopg2
LOGGER = logging.getLogger(__name__)
class Results(object):
"""The :py:class:`Results` class contains the results returned from
:py:meth:`Session.query <queries.Session.query>` and
:py:meth:`Session.callproc <queries... | 1 | Dont error on negative rowcount in __repr__ | 1 | .py | py | bsd-3-clause | gmr/queries |
1267 | <NME> tornado_basic.rst
<BEF> Basic TornadoSession Usage
==========================
The following example implements a very basic RESTful API. The following DDL will
create the table used by the API:
.. code:: sql
CREATE TABLE widgets (sku varchar(10) NOT NULL PRIMARY KEY,
name text NOT ... | 7 | Update docstrings | 7 | .rst | rst | bsd-3-clause | gmr/queries |
1268 | <NME> tornado_basic.rst
<BEF> Basic TornadoSession Usage
==========================
The following example implements a very basic RESTful API. The following DDL will
create the table used by the API:
.. code:: sql
CREATE TABLE widgets (sku varchar(10) NOT NULL PRIMARY KEY,
name text NOT ... | 7 | Update docstrings | 7 | .rst | rst | bsd-3-clause | gmr/queries |
1269 | <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 | Merge pull request #8 from orenitamar/patch-1 | 1 | .py | py | bsd-3-clause | gmr/queries |
1270 | <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 | Merge pull request #8 from orenitamar/patch-1 | 1 | .py | py | bsd-3-clause | gmr/queries |
1271 | <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... | 13 | Fix the backtick quoting | 13 | .rst | rst | bsd-3-clause | gmr/queries |
1272 | <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... | 13 | Fix the backtick quoting | 13 | .rst | rst | bsd-3-clause | gmr/queries |
1273 | <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... | 6 | Update tests | 2 | .py | py | bsd-3-clause | gmr/queries |
1274 | <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... | 6 | Update tests | 2 | .py | py | bsd-3-clause | gmr/queries |
1275 | <NME> tornado_multiple.rst
<BEF> 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:
.. code:: python
from tornado import gen, ioloop, web
import q... | 9 | Updated Tornado examples | 7 | .rst | rst | bsd-3-clause | gmr/queries |
1276 | <NME> tornado_multiple.rst
<BEF> 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:
.. code:: python
from tornado import gen, ioloop, web
import q... | 9 | Updated Tornado examples | 7 | .rst | rst | bsd-3-clause | gmr/queries |
1277 | <NME> tornado_session_tests.py
<BEF> ADDFILE
<MSG> Remove the outdated tests, stub the new ones
<DFF> @@ -0,0 +1,12 @@
+"""
+Tests for functionality in the tornado_session module
+
+"""
+import mock
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+
+from queries import tornado_session... | 12 | Remove the outdated tests, stub the new ones | 0 | .py | py | bsd-3-clause | gmr/queries |
1278 | <NME> tornado_session_tests.py
<BEF> ADDFILE
<MSG> Remove the outdated tests, stub the new ones
<DFF> @@ -0,0 +1,12 @@
+"""
+Tests for functionality in the tornado_session module
+
+"""
+import mock
+try:
+ import unittest2 as unittest
+except ImportError:
+ import unittest
+
+from queries import tornado_session... | 12 | Remove the outdated tests, stub the new ones | 0 | .py | py | bsd-3-clause | gmr/queries |
1279 | <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 | Stupid error in .travis.yml | 1 | .yml | travis | bsd-3-clause | gmr/queries |
1280 | <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 | Stupid error in .travis.yml | 1 | .yml | travis | bsd-3-clause | gmr/queries |
1281 | <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... | 23 | Add in an overridable time method for Tornado IOLoop.time | 9 | .py | py | bsd-3-clause | gmr/queries |
1282 | <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... | 23 | Add in an overridable time method for Tornado IOLoop.time | 9 | .py | py | bsd-3-clause | gmr/queries |
1283 | <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... | 19 | Switch to using _id for the connection pooling | 8 | .py | py | bsd-3-clause | gmr/queries |
1284 | <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... | 19 | Switch to using _id for the connection pooling | 8 | .py | py | bsd-3-clause | gmr/queries |
1285 | <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 | Add check to ensure its not busy and closed when closing conn | 1 | .py | py | bsd-3-clause | gmr/queries |
1286 | <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 | Add check to ensure its not busy and closed when closing conn | 1 | .py | py | bsd-3-clause | gmr/queries |
1287 | <NME> results_tests.py
<BEF> """
Tests for functionality in the results module
"""
import logging
import unittest
import mock
import psycopg2
from queries import results
LOGGER = logging.getLogger(__name__)
class ResultsTestCase(unittest.TestCase):
def setUp(self):
self.cursor = mock.MagicMock()
... | 13 | Merge pull request #4 from den-t/master | 0 | .py | py | bsd-3-clause | gmr/queries |
1288 | <NME> results_tests.py
<BEF> """
Tests for functionality in the results module
"""
import logging
import unittest
import mock
import psycopg2
from queries import results
LOGGER = logging.getLogger(__name__)
class ResultsTestCase(unittest.TestCase):
def setUp(self):
self.cursor = mock.MagicMock()
... | 13 | Merge pull request #4 from den-t/master | 0 | .py | py | bsd-3-clause | gmr/queries |
1289 | <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']
install_requires = ['psycopg2']
setup(name='pgsql_wrapper',
version='1.1.1',
description="PostgreSQL / psycopg2 caching w... | 1 | Setup self._connection_hash on __init__ and cleanup docstrings | 1 | .py | py | bsd-3-clause | gmr/queries |
1290 | <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']
install_requires = ['psycopg2']
setup(name='pgsql_wrapper',
version='1.1.1',
description="PostgreSQL / psycopg2 caching w... | 1 | Setup self._connection_hash on __init__ and cleanup docstrings | 1 | .py | py | bsd-3-clause | gmr/queries |
1291 | <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 | Use pg_isready | 1 | bootstrap | bsd-3-clause | gmr/queries | |
1292 | <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 | Use pg_isready | 1 | bootstrap | bsd-3-clause | gmr/queries | |
1293 | <NME> tornado_session.py
<BEF> ADDFILE
<MSG> Initial commit with Tornado support
Required a little bit of refactoring of Session, not too much
<DFF> @@ -0,0 +1,211 @@
+"""
+Tornado Session Adapter
+
+Use Queries asynchronously within the Tornado framework.
+
+"""
+import logging
+
+from psycopg2 import extensions
+fr... | 211 | Initial commit with Tornado support | 0 | .py | py | bsd-3-clause | gmr/queries |
1294 | <NME> tornado_session.py
<BEF> ADDFILE
<MSG> Initial commit with Tornado support
Required a little bit of refactoring of Session, not too much
<DFF> @@ -0,0 +1,211 @@
+"""
+Tornado Session Adapter
+
+Use Queries asynchronously within the Tornado framework.
+
+"""
+import logging
+
+from psycopg2 import extensions
+fr... | 211 | Initial commit with Tornado support | 0 | .py | py | bsd-3-clause | gmr/queries |
1295 | <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 | Merge pull request #11 from djt5019/set-min-pin | 1 | .py | py | bsd-3-clause | gmr/queries |
1296 | <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 | Merge pull request #11 from djt5019/set-min-pin | 1 | .py | py | bsd-3-clause | gmr/queries |
1297 | <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 | Don't clean the pool on Session cleanup | 3 | .py | py | bsd-3-clause | gmr/queries |
1298 | <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 | Don't clean the pool on Session cleanup | 3 | .py | py | bsd-3-clause | gmr/queries |
1299 | <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 "$DOCKER_COMPOSE_PREFIX"
then
CWD=${PWD##*/}
DOCKER_COMPOSE_PREFIX=${CWD/_/}
fi
COMP... | 10 | Merge pull request #30 from nvllsvm/devenv | 13 | bootstrap | bsd-3-clause | gmr/queries |