Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ensurepip fails ungracefully when mimetype is missing from Windows registry #100256

Closed
Labels
3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesOS-windowseasyextension-modulesC modules in the Modules dirtopic-ensurepiptriagedThe issue has been accepted as valid by a triager.type-bugAn unexpected behavior, bug, or error
@BlipRanger

Description

@BlipRanger

Bug report

A "WinError 5 Access is denied" error occurs when ensurepip (for python 3.10 and above) is run and there are missing/inaccessible mimetypes in the Windows registry. Because ensurepip is used in the Python installer, it also fails silently there, causing pip to never be installed without alerting the user to the issue. The line in which the error occurs is here:

_mimetypes_read_windows_registry(add_type)

Bypassing that line and instead usingself._read_windows_registry(add_type) (which is the fallback function I believe) fixes the problem. I believe that_mimetypes_read_windows_registry(add_type) needs to be able to fail more gracefully when it can't find a particular mimetype in the registry.
I found someone else describing exactly the issuehere.

Your environment

  • CPython versions tested on: 3.10, 3.11
  • Operating system and architecture: Windows 10 LTSC, x64

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixes3.13bugs and security fixes3.14bugs and security fixesOS-windowseasyextension-modulesC modules in the Modules dirtopic-ensurepiptriagedThe issue has been accepted as valid by a triager.type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp