Azure / msrest-for-python

The runtime library "msrest" for AutoRest generated Python clients.
MIT License
41 stars 64 forks source link

Types #98

Closed lmazuel closed 6 years ago

codecov-io commented 6 years ago

Codecov Report

Merging #98 into master will increase coverage by 0.06%. The diff coverage is 73.23%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #98      +/-   ##
==========================================
+ Coverage    29.1%   29.17%   +0.06%     
==========================================
  Files         380      380              
  Lines       16178    16202      +24     
==========================================
+ Hits         4709     4727      +18     
- Misses      11469    11475       +6
Impacted Files Coverage Δ
msrest/configuration.py 45.45% <100%> (+0.71%) :arrow_up:
msrest/serialization.py 82.38% <100%> (+0.02%) :arrow_up:
msrest/http_logger.py 17.02% <26.66%> (+3.68%) :arrow_up:
msrest/authentication.py 91.66% <60%> (-2.46%) :arrow_down:
msrest/service_client.py 81.49% <75%> (-0.2%) :arrow_down:
msrest/exceptions.py 87.5% <80%> (+0.73%) :arrow_up:
msrest/polling/poller.py 98.92% <85.71%> (-1.08%) :arrow_down:
msrest/pipeline.py 92.72% <87.5%> (-0.74%) :arrow_down:
msrest/paging.py 88.23% <87.5%> (-1.35%) :arrow_down:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 2b7d778...40f393a. Read the comment docs.

dhawal1304 commented 6 years ago

[root@server101 ~]# python3.5 Python 3.5.1 (default, Jul 14 2017, 09:39:18) [GCC 4.8.5 20150623 (Red Hat 4.8.5-11)] on linux Type "help", "copyright", "credits" or "license" for more information.

import msrest Traceback (most recent call last): File "", line 1, in File "/opt/VRTSpython/lib/python3.5/site-packages/msrest/init.py", line 27, in from .configuration import Configuration File "/opt/VRTSpython/lib/python3.5/site-packages/msrest/configuration.py", line 40, in from .exceptions import raise_with_traceback File "/opt/VRTSpython/lib/python3.5/site-packages/msrest/exceptions.py", line 30, in from typing import Callable, Any, Optional, TYPE_CHECKING ImportError: cannot import name 'TYPE_CHECKING'

[root@server101 ~]# /opt/VRTSpython/bin/pip3.5 freeze |grep msrest msrest==0.5.5 msrestazure==0.5.0

Why i am getting this. I was trying to install azure modules and after this was trying some azure API.Getting this.

dhawal1304 commented 6 years ago

Hi, You are right about the version problem. But we ship python 3.5.1 with our product as a bundle. So we cannot change the version, we may have to ship a patch of there is no other way.

On Thu, Sep 6, 2018, 21:53 Laurent Mazuel notifications@github.com wrote:

@lmazuel commented on this pull request.

In msrest/exceptions.py https://github.com/Azure/msrest-for-python/pull/98#discussion_r215690915 :

@@ -27,19 +27,28 @@ import logging import sys

+from typing import Callable, Any, Optional, TYPE_CHECKING

Indeed, but why you would use a version of Python which is not the latest bugfix?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Azure/msrest-for-python/pull/98#discussion_r215690915, or mute the thread https://github.com/notifications/unsubscribe-auth/AGVGQFjzv3ZpdmFOw6DmP5Xb1exH4wyCks5uYUvngaJpZM4UAGH1 .

lmazuel commented 6 years ago

Hi @dhawal1304 I don't know exactly your product, but without talking about Azure SDK, why don't you update the bugfix version of your bundled 3.5? There is important security fixes, and security is usually more important than any other considerations. See here for 3.5 changelog: https://docs.python.org/3.5/whatsnew/changelog.html And you will see how many security issues have been fixed (and then are now publicly known) since 3.5.1

dhawal1304 commented 6 years ago

Yeah you are right. We are using an ancient python version. Thanks for your insight. What about 3.6.6. Will that work.

lmazuel commented 6 years ago

It's definitely better and you should have no trouble :)