Skip to content

Commit c7e5220

Browse files
author
Ramiro Morales
committed
Merge branch 'master' into msghandler_support
2 parents 45cfd24 + 881a14f commit c7e5220

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+4390
-1006
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,4 @@ tests/tests.cfg
1010
dist
1111
*.egg
1212
*.egg-info
13+
docs/_build

.travis.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -5,14 +5,20 @@ python:
55
- 3.3
66
before_install:
77
- sudo apt-get install freetds-dev
8-
- pip install --use-mirrors Cython nose SQLAlchemy
8+
- pip install --use-mirrors pytest SQLAlchemy
9+
- pip install --upgrade pip setuptools # Upgrade pip and setuptools to get ones with `wheel` support
10+
- pip --version
11+
- time pip install --use-wheel --no-index --find-links=http://wheels.astropy.org/ --find-links=http://wheels2.astropy.org/ Cython
912
- "if [[ $TRAVIS_PYTHON_VERSION == '2.6' ]]; then pip install unittest2; fi"
1013
install:
11-
- python setup.py develop
14+
- python setup.py install
1215
script:
1316
- . bin/travis_env.sh
1417
- echo "\$PYMSSQL_TEST_DATABASE = \"$PYMSSQL_TEST_DATABASE\""
15-
- nosetests -w tests -v --nocapture
18+
- py.test -v
19+
branches:
20+
except:
21+
- 1.0
1622
env:
1723
global:
1824
- secure: KQ7dawxyyp+skShD+iIT+D6qVaeKZVeZXDM+kpA5hvZNdDMI9iVSAUbVlg7Al26l18cSPCxkYNAsi1N4vsD7x0wGjsEAhC6mpytkc1Igwv0OppmjZI5BhxJWsGPEogzk78HM8JALG4SNhW3xGB0IQtqcV1GogbYmRqw+IDriGm0=

ChangeLog

+216-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,221 @@
11
Change Log
22
==========
33

4+
Version 2.x.y - To be released
5+
==============================
6+
7+
Features
8+
--------
9+
10+
- Compatibility with Azure
11+
12+
It is now possible to transparently connect to `SQL Server instances`_
13+
accessible as part of the Azure_ cloud services.
14+
15+
.. note:: If you need to connect to Azure make sure you use FreeTDS 0.91 or newer.
16+
17+
.. _SQL Server instances: http://www.windowsazure.com/en-us/services/sql-database/
18+
.. _Azure: https://www.windowsazure.com/
19+
20+
Version 2.1.0 - 2014-02-25 - `Marc Abramowitz <http://marc-abramowitz.com/>`_
21+
=============================================================================
22+
23+
Features
24+
--------
25+
26+
- Sphinx-based documentation (GH-149)
27+
28+
Read it online at http://pymssql.org/
29+
30+
Thanks, Ramiro Morales!
31+
32+
See:
33+
* https://github.com/pymssql/pymssql/pull/149
34+
* https://github.com/pymssql/pymssql/pull/162
35+
* https://github.com/pymssql/pymssql/pull/164
36+
* https://github.com/pymssql/pymssql/pull/165
37+
* https://github.com/pymssql/pymssql/pull/166
38+
* https://github.com/pymssql/pymssql/pull/167
39+
* https://github.com/pymssql/pymssql/pull/169
40+
* https://github.com/pymssql/pymssql/pull/174
41+
* https://github.com/pymssql/pymssql/pull/175
42+
43+
- "Green" support (GH-135)
44+
45+
Lets you use pymssql with cooperative multi-tasking systems like
46+
gevent and have pymssql call a callback when it is waiting for a
47+
response from the server. You can set this callback to yield to
48+
another greenlet, coroutine, etc. For example, for gevent, you could
49+
do::
50+
51+
def wait_callback(read_fileno):
52+
gevent.socket.wait_read(read_fileno)
53+
54+
pymssql.set_wait_callback(wait_callback)
55+
56+
The above is useful if you're say, running a gunicorn server with the
57+
gevent worker. With this callback in place, when you send a query to
58+
SQL server and are waiting for a response, you can yield to other
59+
greenlets and process other requests. This is super useful when you
60+
have high concurrency and/or slow database queries and lets you use
61+
less gunicorn worker processes and still handle high concurrency.
62+
63+
See https://github.com/pymssql/pymssql/pull/135
64+
65+
- Better error messages.
66+
67+
E.g.: For a connection failure, instead of:
68+
69+
pymssql.OperationalError: (20009, 'Net-Lib error during Connection
70+
refused')
71+
72+
the dberrstr is also included, resulting in:
73+
74+
pymssql.OperationalError: (20009, 'DB-Lib error message 20009,
75+
severity 9:\nUnable to connect: Adaptive Server is unavailable or
76+
does not exist\nNet-Lib error during Connection refused\n')
77+
78+
See:
79+
* https://github.com/pymssql/pymssql/pull/151
80+
81+
In the area of error messages, we also made this change:
82+
83+
execute: Raise ColumnsWithoutNamesError when as_dict=True and missing
84+
column names (GH-160)
85+
86+
because the previous behavior was very confusing; instead of raising
87+
an exception, we would just return row dicts with those columns
88+
missing. This prompted at least one question on the mailing list
89+
(https://groups.google.com/forum/?fromgroups#!topic/pymssql/JoZpmNZFtxM),
90+
so we thought it was better to handle this explicitly by raising an
91+
exception, so the user would understand what went wrong.
92+
93+
See:
94+
* https://github.com/pymssql/pymssql/pull/160
95+
* https://github.com/pymssql/pymssql/pull/168
96+
97+
- Performance improvements
98+
99+
You are most likely to notice a difference from these when you are
100+
fetching a large number of rows.
101+
102+
* Reworked row fetching (GH-159)
103+
104+
There was a rather large amount of type conversion occuring when
105+
fetching a row from pymssql. The number of conversions required have
106+
been cut down significantly with these changes.
107+
Thanks Damien, Churchill!
108+
109+
See:
110+
* https://github.com/pymssql/pymssql/pull/158
111+
* https://github.com/pymssql/pymssql/pull/159
112+
113+
* Modify get_row() to use the CPython tuple API (GH-178)
114+
115+
This drops the previous method of building up a row tuple and switches
116+
to using the CPython API, which allows you to create a correctly sized
117+
tuple at the beginning and simply fill it in. This appears to offer
118+
around a 10% boost when fetching rows from a table where the data is
119+
already in memory.
120+
Thanks Damien, Churchill!
121+
122+
See:
123+
* https://github.com/pymssql/pymssql/pull/178
124+
125+
- MSSQLConnection: Add `with` (context manager) support (GH-171)
126+
127+
This adds `with` statement support for MSSQLConnection in the `_mssql`
128+
module -- e.g.:
129+
130+
with mssqlconn() as conn:
131+
conn.execute_query("SELECT @@version AS version")
132+
133+
We already have `with` statement support for the `pymssql` module.
134+
135+
See:
136+
* https://github.com/pymssql/pymssql/pull/171
137+
138+
- Allow passing in binary data (GH-179)
139+
140+
Use the bytesarray type added in Python 2.6 to signify that this is
141+
binary data and to quote it accordingly. Also modify the handling of
142+
str/bytes types checking the first 2 characters for b'0x' and insert
143+
that as binary data.
144+
145+
See:
146+
* https://github.com/pymssql/pymssql/pull/179
147+
148+
- Add support for binding uuid.UUID instances to stored procedures input
149+
params (GH-143)
150+
Thanks, Ramiro Morales!
151+
See:
152+
* https://github.com/pymssql/pymssql/pull/143
153+
* https://github.com/pymssql/pymssql/commit/1689c83878304f735eb38b1c63c31e210b028ea7
154+
155+
- The version number is now stored in one place, in pymssql_version.h
156+
This makes it easier to update the version number and not forget any
157+
places, like I did with pymssql 2.0.1
158+
* See https://github.com/pymssql/pymssql/commit/fd317df65fa62691c2af377e4661defb721b2699
159+
160+
- Improved support for using py.test as test runner (GH-183)
161+
* See: https://github.com/pymssql/pymssql/pull/183
162+
163+
- Improved PEP-8 and pylint compliance
164+
165+
Bug Fixes
166+
---------
167+
168+
- GH-142 ("Change how *.pyx files are included in package") - this
169+
should prevent pymssql.pyx and _mssql.pyx from getting copied into the
170+
root of your virtualenv. Thanks, @Arfrever!
171+
* See: https://github.com/pymssql/pymssql/issues/142
172+
173+
- GH-145 ("Prevent error string growing with repeated failed connection
174+
attempts.")
175+
See:
176+
* https://github.com/pymssql/pymssql/issues/145
177+
* https://github.com/pymssql/pymssql/pull/146
178+
179+
- GH-151 ("err_handler: Don't clobber dberrstr with oserrstr")
180+
* https://github.com/pymssql/pymssql/pull/151
181+
182+
- GH-152 ("_mssql.pyx: Zero init global last_msg_* vars")
183+
See: https://github.com/pymssql/pymssql/pull/152
184+
185+
- GH-177 ("binary columns sometimes are processed as varchar")
186+
Better mechanism for pymssql to detect that user is passing binary
187+
data.
188+
See: https://github.com/pymssql/pymssql/issues/177
189+
190+
- buffer overflow fix (GH-182)
191+
* See: https://github.com/pymssql/pymssql/pull/181
192+
* See: https://github.com/pymssql/pymssql/pull/182
193+
194+
- Return uniqueidentifer columns as uuid.UUID objects on Python 3
195+
196+
197+
Version 2.0.1 - 2013-10-27 - `Marc Abramowitz <http://marc-abramowitz.com/>`_
198+
-----------------------------------------------------------------------------
199+
* MANIFEST.in: Add "\*.rst" to prevent install error: "IOError: [Errno 2] No
200+
such file or directory: 'ChangeLog_highlights.rst'"
201+
202+
Version 2.0.0 - 2013-10-25 - `Marc Abramowitz <http://marc-abramowitz.com/>`_
203+
-----------------------------------------------------------------------------
204+
* First official release of pymssql 2.X (`Cython`_-based code) to `PyPI`_!
205+
* Compared to pymssql 1.X, this version offers:
206+
207+
* Better performance
208+
* Thread safety
209+
* Fuller test suite
210+
* Support for Python 3
211+
* Continuous integration via `Travis CI`_
212+
* Easier to understand code, due to `Cython`_
213+
214+
.. _PyPI: https://pypi.python.org/pypi/pymssql/2.0.0
215+
.. _Travis CI: https://travis-ci.org/pymssql/pymssql
216+
.. _Cython: http://cython.org/
217+
.. _ChangeLog: https://github.com/pymssql/pymssql/blob/master/ChangeLog
218+
4219
Version 2.0.0b1-dev-20130403 - 2013-04-03 - Marc Abramowitz <[email protected]>
5220
--------------------------------------------------------------------------------
6221
* Added tag 2.0.0b1-dev-20130403 for changeset 5d0c980ef8b8
@@ -182,7 +397,7 @@ Mon Nov 23 13:37:00 2009 Damien Churchill <[email protected]>
182397
Fri Nov 20 13:03:00 2009 Damien Churchill <[email protected]>
183398
* mssqldbmodule.c: deprecated in favour of _mssql.pyx
184399
* pymssql.py: deprecated in favour of pymssql.py
185-
+ feature: added support for uniqueidentifer types
400+
+ feature: added support for uniqueidentifier types
186401
+ feature: added support for calling remote procedures programmatically
187402
* version 1.9.901
188403

0 commit comments

Comments
 (0)