Google App Engine 1 (Python 2) Issue for making requests to algolia
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- ドキュメント
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
調査の方向性
まず、Google App Engine 1 (Python 2) との互換性に関する issue の詳細と、リンクされている Requests のガイダンスを確認してください。GAE1 ユーザーにはデフォルトのアダプターではなく requests_toolbelt の AppEngineAdapter が必要であることを文書化し、ドキュメントで対象となる構成が明確に示されていることを確認してください。
索引モデルが issue の本文から書いたものです。
説明
- Version: 2.4.0
Underlying cause
I am using Algolia in Google App Engine (GAE1) and we are using requests library to issue requests as well. However, due to GAE1 limitations, we need to use an additional library called requests_toolbelt. This library changes underlying requests library to use urlfetch. Details of that can be found here.
In Requester, Algolia library is importing HttpAdapter which is the wrong adapter for the GAE1 that using requests library. It needs to import AppEngineAdapter from requests_toolbelt to correctly read the response otherwise request will fail.
I have fixed the problem by introducing a custom code.
import sys
if sys.version_info >= (3, 0):
self._session.mount("https://", HTTPAdapter(max_retries=Retry(connect=0)))
else:
from requests_toolbelt.adapters.appengine import AppEngineAdapter
self._session.mount('https://', AppEngineAdapter(max_retries=Retry(connect=0)))
This solution only works for the GAE1 which is fine for me. This issue is also can be closed. However, it would be helpful to have a section in Algolia Docs to mention this problem since it will affect other App Engine users.
- 主要言語
- Python
- スター
- 207
- フォーク
- 63
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
algolia/algoliasearch-client-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
Version 4.31.0 introduced breaking urllib3 dependency constraint incompatible with other packagesオープン
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
KeyError: 'facets'オープン
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
-
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
難易度 4/5 3〜5日 初心者へのやさしさ 25/100
algolia/algoliasearch-client-python#565 · コメント 1 件 · リアクション 2 件 ·
algolia/algoliasearch-client-python の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
volcengine/OpenViking#8432 ·
メンテナーはふだん 1 日以内に返信
-
Failed chat turns are passed to the follow-up rewrite as completed history対応中かも @hskhyl が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
NVIDIA/auto-ontology#683 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
documentation task
難易度 2/5 1〜3時間 初心者へのやさしさ 62/100
-
Implement parse_url and accept http URLs for Pear backend対応中かも @muskan-creates352 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
fedora-infra/anitya#2231 ·
メンテナーはふだん 2 日以内に返信
-
MarkdownDocSerializer.post_process escapes '\<' to '\<', rendering literal '<' in CommonMarkオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
docling-project/docling-core#1067 ·
メンテナーはふだん 3 日以内に返信