Path: csiph.com!news.mixmin.net!news2.arglkargh.de!news.in-chemnitz.de!3.eu.feeder.erje.net!feeder.erje.net!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Ermakov Alexander Newsgroups: linux.debian.maint.python Subject: pypi2deb [PATCH] Fix proxy issues Date: Mon, 15 Sep 2025 12:40:02 +0200 Message-ID: X-Original-To: =?UTF-8?Q?Piotr_O=C5=BCarowski?= X-Mailbox-Line: From debian-python-request@lists.debian.org Mon Sep 15 10:30:22 2025 Old-Return-Path: X-Amavis-Spam-Status: No, score=-6.955 tagged_above=-10000 required=5.3 tests=[BAYES_00=-2, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, LDO_WHITELIST=-5, MD5_SHA1_SUM=-1, NUMERIC_HTTP_ADDR=1.242, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, WEIRD_PORT=0.001] autolearn=ham autolearn_force=no X-Policyd-Weight: using cached result; rate: -4.6 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Content-Language: en-US, ru Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Sa-Exim-Connect-IP: 10.1.0.41 X-Sa-Exim-Mail-From: ermakovav@altgtu.ru X-Sa-Exim-Version: 4.2.1 X-Sa-Exim-Scanned: Yes (on mailgate.altstu.ru) X-Mailing-List: archive/latest/23246 List-ID: List-URL: List-Archive: https://lists.debian.org/msgid-search/f5835428-df81-47d5-ae25-f58e9533e670@altgtu.ru Approved: robomod@news.nic.it Lines: 47 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Cc: debian-python@lists.debian.org X-Original-Date: Mon, 15 Sep 2025 17:29:59 +0700 X-Original-Message-ID: Xref: csiph.com linux.debian.maint.python:17064 Hi, below is a patch for https://salsa.debian.org/python-team/tools/pypi2deb pypi2deb did not work with proxy: # export | grep proxy declare -x http_proxy="http://127.0.0.1:3128" declare -x https_proxy="http://127.0.0.1:3128" # py2dsp doh-cli -v D: py2dsp py2dsp:163: version: 4.20240727 D: py2dsp py2dsp:164: ['/usr/bin/py2dsp', 'doh-cli', '-v'] D: py2dsp py2dsp:44: args: Namespace(verbose=True, quiet=False, root='/root/result', clean=False, build=False, application=False, profile=None, github=None, pypi_search=None, distribution='UNRELEASED', revision='0~py2deb', message='converte0~py2deb', name='doh-cli') D: py2dsp pypi:153: fetching upstream tarball from https://files.pythonhosted.org/packages/f2/a3/f7d86662c06bc6f90b0cf12cc5a5a21fae0bd384e025a73db895bbf7ff3f/doh_cli-0.8.tar.gz E: py2dsp py2dsp:173: Cannot connect to host files.pythonhosted.org:443 PATCH: From bfbb103b59a87947cf17399647b223ec6c961847 Mon Sep 17 00:00:00 2001 From: Ermakov Alexander Date: Mon, 15 Sep 2025 17:22:14 +0700 Subject: [PATCH] Fix proxy issues --- pypi2deb/pypi.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pypi2deb/pypi.py b/pypi2deb/pypi.py index b2b7aca..742ccf5 100644 --- a/pypi2deb/pypi.py +++ b/pypi2deb/pypi.py @@ -149,7 +149,7 @@ async def download(name, version=None, destdir='.'): if exists(fpath): return fname - async with aiohttp.ClientSession() as session: + async with aiohttp.ClientSession(trust_env=True) as session: log.debug(f"fetching upstream tarball from {release['url']}") response = await session.get(release['url']) with open(fpath if ext == orig_ext else join(destdir, release['filename']), 'wb') as fp: -- 2.48.1