[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-07 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset 47cca0492b3c379823d4bdb600be56a633e5bb88 by Erlend Egeberg 
Aasland in branch 'main':
bpo-46933: Fix make distclean regression (GH-31737)
https://github.com/python/cpython/commit/47cca0492b3c379823d4bdb600be56a633e5bb88


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-07 Thread Erlend E. Aasland


Change by Erlend E. Aasland :


--
nosy: +erlendaasland
nosy_count: 1.0 -> 2.0
pull_requests: +29854
pull_request: https://github.com/python/cpython/pull/31737

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-07 Thread Christian Heimes


Change by Christian Heimes :


--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-07 Thread Christian Heimes


Christian Heimes  added the comment:


New changeset ca9689f8dac01d27e041e1dbbdae146746d48ab3 by Christian Heimes in 
branch 'main':
bpo-46933: Make pwd module optional (GH-31700)
https://github.com/python/cpython/commit/ca9689f8dac01d27e041e1dbbdae146746d48ab3


--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-05 Thread Christian Heimes


Change by Christian Heimes :


--
keywords: +patch
pull_requests: +29820
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/31700

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue46933] Make pwd module optional for wasm32-emscripten and wasi

2022-03-05 Thread Christian Heimes


New submission from Christian Heimes :

WebAssembly platforms like wasm32-emscripten and wasm32-wasi don't have a 
typical user and group database.

WASI platform does not provide necessary API functions at all. Emscripten 
provides dummy stubs. On Emscripten the pwd module compiles, but is 
non-functional:

Python 3.11.0a4+ (heads/main-dirty:b1a3446, Jan 25 2022, 10:19:07) [Clang 
14.0.0 (https://github.com/llvm/llvm-project f142c45f1e494f8dbdcc1bcf1412 on 
emscripten
Type "help", "copyright", "credits" or "license" for more information.
>>> import pwd, os
>>> os.getuid()
0
>>> pwd.getpwall()
[]
>>> pwd.getpwuid(os.getuid())
Traceback (most recent call last):
  File "", line 1, in 
KeyError: 'getpwuid(): uid not found: 0'

I propose to make the pwd optional and catch import error in few places where 
the pwd module is used to look up user home directory.

--
assignee: christian.heimes
components: Library (Lib)
messages: 414595
nosy: christian.heimes
priority: normal
severity: normal
status: open
title: Make pwd module optional for wasm32-emscripten and wasi
type: behavior
versions: Python 3.11

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com