Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 716998 - dev-python/pypy3: AttributeError: module 'socket' has no attribute 'sethostname'
Summary: dev-python/pypy3: AttributeError: module 'socket' has no attribute 'sethostname'
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Python Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-10 22:15 UTC by Jeffrey Lin
Modified: 2020-10-04 21:16 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffrey Lin 2020-04-10 22:15:24 UTC
This causes a minor issue with newer versions of sys-apps/portage that want to use socket.sethostname(), notibly [1].  When using ebuild or the emerge frontend, the following message will show up in build logs:

Unable to set hostname: module 'socket' has no attribute 'sethostname' (for FEATURES="network-sandbox")

Reproduce with:

pypy3 -c 'import socket; print(socket.sethostname)'

[1]: https://github.com/gentoo/portage/commit/28ce410d2aa2eb33d0e61fbf272e1929b734622d
Comment 1 Reva Denis 2020-05-11 11:24:05 UTC
Confirmed. Except that issue using pypy3 with portage is seamless
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-05-17 08:42:39 UTC
We could add a workaround to Portage, I guess, as we load libc anyway.
Comment 3 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2020-05-20 01:32:52 UTC
(In reply to Michał Górny from comment #2)
> We could add a workaround to Portage, I guess, as we load libc anyway.

https://gitweb.gentoo.org/proj/portage.git/commit/?id=c35f39af1ae591c9df50da52e83067428a10f80a
Comment 4 Georgy Yakovlev archtester gentoo-dev 2020-09-29 02:59:06 UTC
it has returned as different error in pypy-7.3.2.

Unable to set hostname: expected unicode, got bytes object (for FEATURES="network-sandbox")
Comment 5 Georgy Yakovlev archtester gentoo-dev 2020-09-29 02:59:25 UTC
I meant pypy3-7.3.2 ofc.
Comment 6 Reva Denis 2020-10-04 04:00:38 UTC
Confirmed
Comment 7 Reva Denis 2020-10-04 04:01:06 UTC
(In reply to Reva Denis from comment #6)
> Confirmed

I mean I can reproduce it in pypy3-7.3.2
Comment 8 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-10-04 21:15:55 UTC
This should be fixed in -r1 now.
Comment 9 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2020-10-04 21:16:05 UTC
(of pypy3-exe/-bin)