public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: Marco Atzeri <marco.atzeri@gmail.com>
To: cygwin@cygwin.com
Subject: Re: [BUG] Latest python38 package (3.8.7-1) fails to execute 'ensurepip', 3.8.3.-1 works
Date: Sat, 23 Jan 2021 20:13:40 +0100	[thread overview]
Message-ID: <a78d6b1b-3389-8198-75b1-eb802d566f31@gmail.com> (raw)
In-Reply-To: <d2adf631-a251-bb88-a015-0ab03d120835@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1050 bytes --]

On 23.01.2021 19:47, Marco Atzeri wrote:
> On 23.01.2021 19:23, Oleh Svirshchevsky via Cygwin wrote:
>> Latest python38 package (3.8.7-1) fails to execute 'ensurepip', 
>> 3.8.3.-1 works
>>
>> Latest version:
>> $ python3.8.exe --version
>> Python 3.8.7
>> $ python3.8.exe -Im ensurepip --upgrade --default-pip
>> Traceback (most recent call last):
>>    File "/usr/lib/python3.8/runpy.py", line 185, in _run_module_as_main
>>      mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
>>    File "/usr/lib/python3.8/runpy.py", line 144, in _get_module_details
>>      return _get_module_details(pkg_main_name, error)
>>    File "/usr/lib/python3.8/runpy.py", line 111, in _get_module_details
>>      __import__(pkg_name)
>>    File "/usr/lib/python3.8/ensurepip/__init__.py", line 121
>>      with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp:
>>      ^
>> IndentationError: unexpected indent

Hi Oleh,

the attached patch should solve the indentation mistakes.

Can you confirm it ?

Regards
Marco

[-- Attachment #2: 3.8.7-2-ensurepip.patch --]
[-- Type: text/plain, Size: 706 bytes --]

--- Lib/ensurepip/__init__.py	2021-01-12 14:56:53.283024300 +0100
+++ /usr/lib/python3.8/ensurepip/__init__.py	2021-01-23 20:07:15.593584200 +0100
@@ -118,9 +118,9 @@
         additional_paths = []
         for project, version, py_tag in _PROJECTS:
             wheel_name = _wheels[project][version]
-             with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp:
+            with open(os.path.join(_WHEEL_DIR, wheel_name), "rb") as sfp:
                 with open(os.path.join(tmpdir, wheel_name), "wb") as fp:
-                fp.write(sfp.read())            
+                    fp.write(sfp.read())            
 
             additional_paths.append(os.path.join(tmpdir, wheel_name))
 

  reply	other threads:[~2021-01-23 19:13 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-23 18:23 Oleh Svirshchevsky
2021-01-23 18:47 ` Marco Atzeri
2021-01-23 19:13   ` Marco Atzeri [this message]
2021-01-24  6:58     ` Oleh Svirshchevsky
2021-01-24  8:27       ` Marco Atzeri
2021-01-30 15:00         ` Marco Atzeri

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a78d6b1b-3389-8198-75b1-eb802d566f31@gmail.com \
    --to=marco.atzeri@gmail.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).