-
Notifications
You must be signed in to change notification settings - Fork 52
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
Preparation for 1.16.0 release #175
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #175 +/- ##
==========================================
- Coverage 89.35% 89.32% -0.04%
==========================================
Files 44 44
Lines 8129 8130 +1
==========================================
- Hits 7264 7262 -2
- Misses 865 868 +3 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some py 3.9 compatibility concerns.
@@ -955,7 +956,7 @@ def __init__(self) -> None: | |||
self.validate_host = True | |||
self.enc_login_only = False | |||
self.enc_flag = 0 | |||
self.tls_ctx = None | |||
self.tls_ctx: None | OpenSSL.SSL.Context = None |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
allowing pipes for Union types doesn't work in python 3.9: https://peps.python.org/pep-0604/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean 1.16.0 will not work in python 3.9, or this just affects the package building?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't work on python 3.9 at all. For example, this code works on 3.11 but is a syntax error on 3.9:
class Foo:
asdf: None | int
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see. Thanks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This module has
from __future__ import annotations
Which apparently enables Union type support for Python starting at least from 3.8
For example this code works on Python 3.8:
from __future__ import annotations
class Foo:
asdf: None | int
host, _, _ = socket.gethostbyname_ex(server) | ||
target_name = "MSSQLSvc/{0}:1433".format(host) | ||
# getting current host's name | ||
host, _, _ = socket.gethostbyname_ex("") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IDK about other versions of python, but at least on 3.9 I get a Resolver Error
when a blank str is given to socket.gethostbyname_ex
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, it doesn't seem to work with 3.11, either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for reviewing, will take a look.
Weirdly tests passed on Python 3.8 https://ci.appveyor.com/project/denisenkom/pytds/builds/50784050
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This works on Windows on Python 3.8 and 3.12 and this test is only executed on Windows.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please fix noted issues.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. We will keep an eye on the "|".
Fixes mypy failures
Fix for test_sec_context test