•  


google-api-python-client/UPGRADING.md at main · googleapis/google-api-python-client · GitHub
Skip to content

Latest commit

 

History

History
82 lines (61 loc) · 3.22 KB

UPGRADING.md

File metadata and controls

82 lines (61 loc) · 3.22 KB

2.0.0 Migration Guide

The 2.0 release of google-api-python-client includes a substantial reliability improvement, compared with 1.x, as discovery documents are now cached in the library rather than fetched dynamically. It is highly recommended to upgrade from v1.x to v2.x.

Only python 3.7 and newer is supported. If you are not able to upgrade python, then please continue to use version 1.x as we will continue supporting python 2.7+ in v1 .

Discovery documents will no longer be retrieved dynamically when you call discovery.build() . The discovery documents will instead be retrieved from the client library directly. New versions of this library are released weekly. As a result of caching the discovery documents, the size of this package is at least 50 MB larger compared to the previous version.

For users of public APIs

Existing code written for earlier versions of this library will not require updating.

For users of private APIs

If the discovery document requires an authentication key to access it then the discovery document is private and it will not be shipped with the library. Only discovery documents listed in this public directory are included in the library. Users of private APIs should set the static_discovery argument of discovery.build() to False to continue to retrieve the service definition from the internet. As of version 2.1.0, for backwards compatibility with version 1.x, if static_discovery is not specified, the default value for static_discovery will be False when the discoveryServiceUrl argument of discovery.build() is provided.

If you experience issues or have questions, please file an issue .

Supported Python Versions

WARNING : Breaking change

The 2.0.0 release requires Python 3.7+, as such you must upgrade to Python 3.7+ to use version 2.0.0.

Method Calls

Note : Existing code written for earlier versions of this library will not require updating. You should only update your code if you are using an API which does not have a public discovery document.

WARNING : Breaking change

The 2.0 release no longer retrieves discovery documents dynamically on each call to discovery.build() . Instead, discovery documents are retrieved from the client library itself.

Under the hood, the discovery.build() function retrieves a discovery artifact in order to construct the service object. The breaking change is that the discovery.build() function will no longer retrieve discovery artifacts dynamically. Instead it will use service definitions shipped in the library.

Before:

from
 googleapiclient
.
discovery
 import
 build


# Retrieve discovery artifacts from the internet

with
 build
(
'drive'
, 
'v3'
) 
as
 service
:
    
# ...

After:

from
 googleapiclient
.
discovery
 import
 build


# Retrieve discovery artifacts from the client library

with
 build
(
'drive'
, 
'v3'
) 
as
 service
:
    
# ...


# Retrieve discovery artifacts from the internet for a private API

with
 build
(
'drive'
, 
'v3'
, 
static_discovery
=
False
, 
developerKey
=
XXXXX
) 
as
 service
:
    
# ...
- "漢字路" 한글한자자동변환 서비스는 교육부 고전문헌국역지원사업의 지원으로 구축되었습니다.
- "漢字路" 한글한자자동변환 서비스는 전통문화연구회 "울산대학교한국어처리연구실 옥철영(IT융합전공)교수팀"에서 개발한 한글한자자동변환기를 바탕하여 지속적으로 공동 연구 개발하고 있는 서비스입니다.
- 현재 고유명사(인명, 지명등)을 비롯한 여러 변환오류가 있으며 이를 해결하고자 많은 연구 개발을 진행하고자 하고 있습니다. 이를 인지하시고 다른 곳에서 인용시 한자 변환 결과를 한번 더 검토하시고 사용해 주시기 바랍니다.
- 변환오류 및 건의,문의사항은 juntong@juntong.or.kr로 메일로 보내주시면 감사하겠습니다. .
Copyright ⓒ 2020 By '전통문화연구회(傳統文化硏究會)' All Rights reserved.
 한국   대만   중국   일본