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

merge with master #21

Merged
merged 37 commits into from
Sep 9, 2022
Merged
Changes from 1 commit
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
c60358b
Add support for Python 3.10, drop EOL 3.5 (#952)
hugovk Dec 7, 2021
4c234f6
Remove duplicate entry in pyi stub (#979)
ajnelson-nist Dec 7, 2021
4df5c88
Replace deprecated SafeConfigParser with ConfigParser (#953)
hugovk Dec 15, 2021
c5da357
Designate connection string as optional (#987)
ajnelson-nist Dec 15, 2021
7aaca60
Fix spelling typos (#985)
kianmeng Dec 15, 2021
b1cfb75
Fix for DSN Names with non-ASCII chars (#951)
Dec 16, 2021
7f00778
Added InterfaceError to pyodbc.pyi. (#1013)
bdholder Jan 28, 2022
ba81703
Upgrade deprecated unicode encoding calls (#792)
methane Feb 6, 2022
4a7c583
Do not include .pyc artifacts in source tarball #742
fladi Mar 27, 2022
6c79d7a
Build wheels with cibuildwheels on GitHub Actions
abitrolly Oct 13, 2021
e2409c1
Install unixodbc-dev for Linux wheels
abitrolly Oct 13, 2021
20fdf5f
Enable GitHub Actions for pull requests
abitrolly Oct 13, 2021
597700e
Use Debian based `manylinux_2_24` image
abitrolly Oct 14, 2021
155ef17
`apt-get` update before installing in wheel build
abitrolly Oct 14, 2021
996fce1
Use PEP 440 version name required for wheels
abitrolly Oct 14, 2021
32ee84a
Skip building 32-bit wheels
abitrolly Oct 14, 2021
c88d661
4.0.dev0 for default version, because test_version() wants 3 parts here
abitrolly Oct 14, 2021
1295fa6
Had to use Debian image for PyPy too
abitrolly Oct 14, 2021
feb03dd
Disable PyPy wheels
abitrolly Oct 15, 2021
6aa72e6
Update README.md
jose598 Oct 29, 2021
9b580af
Avoid error when testing with DSN= connection
gordthompson Jan 2, 2022
b7cbf90
Disable setencoding/setdecoding in tests3/pgtests.py
gordthompson Jan 6, 2022
8228dbc
Adjust test_columns() in tests3/pgtests.py for newer driver versions
gordthompson Jan 6, 2022
9d84ef1
Move driver version check out of function
gordthompson Jan 6, 2022
6bae8f0
Add comment to _get_column_size()
gordthompson Jan 12, 2022
e67ad89
Fix memory leak with decimal parameters
gordthompson Feb 14, 2022
04ad11d
Create codeql-analysis.yml
mkleehammer Apr 16, 2022
a4b0b75
Bugfix/sql param data memory leak (#703)
Mizaro May 13, 2022
1f05bb6
Replace deprecated PyUnicode_FromUnicode(NULL, size) calls (#998)
bkline Jan 2, 2022
1b4e214
Making pyodbc compatible with PostgreSQL infinity dates, returning MI…
lsrzj Dec 18, 2021
234efd7
Removing autoformat from code
lsrzj Apr 26, 2022
b069e00
Removing autoformat from code
lsrzj Apr 26, 2022
8519c69
Add odbc_config support on mac and m1 homebrew dir
Aloisius Feb 11, 2021
f28d235
Note EOL of 2.7 support in README (#945)
mkleehammer Jul 14, 2022
b7e944a
Fix version of CI generated wheels
mkleehammer Jul 14, 2022
c717c78
Fix for #1082 libraries in Linux wheels (#1084)
keitherskine Aug 7, 2022
2071e94
use argparse instead of optparse (#1089)
keitherskine Aug 7, 2022
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
Prev Previous commit
Next Next commit
Removing autoformat from code
lsrzj authored and mkleehammer committed Jul 14, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit b069e00c3db8a98a77a8e06bb993924614311ba8
39 changes: 20 additions & 19 deletions src/getdata.cpp
Original file line number Diff line number Diff line change
@@ -631,27 +631,28 @@ static PyObject* GetDataTimestamp(Cursor* cur, Py_ssize_t iCol)

switch (cur->colinfos[iCol].sql_type)
{
case SQL_TYPE_TIME:
{
int micros = (int)(value.fraction / 1000); // nanos --> micros
return PyTime_FromTime(value.hour, value.minute, value.second, micros);
}

case SQL_TYPE_DATE:
return PyDate_FromDate(value.year, value.month, value.day);
case SQL_TYPE_TIME:
{
int micros = (int)(value.fraction / 1000); // nanos --> micros
return PyTime_FromTime(value.hour, value.minute, value.second, micros);
}

case SQL_TYPE_DATE:
return PyDate_FromDate(value.year, value.month, value.day);

case SQL_TYPE_TIMESTAMP:
{
if (value.year < 1)
{
value.year = 1;
}
else if (value.year > 9999)
{
value.year = 9999;
}
}
}

case SQL_TYPE_TIMESTAMP:
{
if (value.year < 1)
{
value.year = 1;
}
else if (value.year > 9999)
{
value.year = 9999;
}
}

int micros = (int)(value.fraction / 1000); // nanos --> micros