Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • pypy pypy
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 668
    • Issues 668
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 14
    • Merge requests 14
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • PyPy
  • pypypypy
  • Issues
  • #1966

Closed
Open
Created Jan 26, 2015 by Bitbucket Importer@bitbucket_importerMaintainer

When run in a chroot, pypy will sometimes fail to import builtin modules

Created originally on Bitbucket by JakobKrainz

When running in a chroot where $HOME is not set and /etc/passwd does not contain an entry for the current UID, pypy 2.4.0 will fail to import some builtin modules.

More precisely, the script

#!python

a = raw_input()
b = raw_input()

n = a.count("x")

for x in range(n + 4):
	if eval(a, dict(x=x)) != eval(b, dict(x=x)):
		print "NOT EQUIVALENT"
		exit()
print "EQUIVALENT"

will produce the following output:

'import site' failed
Traceback (most recent call last):
  File "app_main.py", line 75, in run_toplevel
  File "K.py", line 9, in <module>
    exit()
NameError: global name 'exit' is not defined

Adding the current user to /etc/passwd or setting $HOME fixes this.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking