You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

crossenv

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

crossenv - pypi Package Compare versions

Comparing version
1.6.0
to
1.6.1
+6
-0
CHANGELOG.md
# Changelog
## [1.6.1] - 2025-10-24
### Fixed
- Using subinterpreters no longer results in "crossenv leaked into interpreter"
warnings (#160)
## [1.6.0] - 2025-09-26

@@ -4,0 +10,0 @@

+1
-1

@@ -19,3 +19,3 @@ import venv

__version__ = "1.6.0"
__version__ = "1.6.1"

@@ -22,0 +22,0 @@ logger = logging.getLogger(__name__)

@@ -12,10 +12,24 @@ # Import only what we absolutely need before the path fixup

_sentinel = posix.environ.get(b"PYTHON_CROSSENV")
# Handle subinterpreters -- everything should already be ready to go, but
# the PYTHON_CROSSENV environment variable won't be set because we're running
# in the same process
_sentinel = None
try:
import concurrent.interpreters
except ImportError:
pass
else:
if concurrent.interpreters.get_current() != concurrent.interpreters.get_main():
_sentinel = b"{{context.sentinel}}"
if _sentinel is None:
_sentinel = posix.environ.get(b"PYTHON_CROSSENV")
if _sentinel != b"{{context.sentinel}}":
print("*******************************************************")
print("* Crossenv has leaked into another Python interpreter!")
print("* You should probably file a bug report.")
print("* Version %s" % sys.version)
print("* Executable %s" % sys.executable)
print("*******************************************************")
print("*******************************************************", file=sys.stderr)
print("* Crossenv has leaked into another Python interpreter!", file=sys.stderr)
print("* You should probably file a bug report.", file=sys.stderr)
print("* Version %s" % sys.version, file=sys.stderr)
print("* Executable %s" % sys.executable, file=sys.stderr)
print("*******************************************************", file=sys.stderr)

@@ -22,0 +36,0 @@ import os

Metadata-Version: 2.4
Name: crossenv
Version: 1.6.0
Version: 1.6.1
Summary: A cross-compiling tool for Python extension modules

@@ -5,0 +5,0 @@ Project-URL: Homepage, https://github.com/robotpy/crossenv

import os
import re
import subprocess
from textwrap import dedent

@@ -221,2 +222,3 @@

universal_newlines=True,
stderr=subprocess.STDOUT,
)

@@ -226,2 +228,25 @@ assert "Crossenv has leaked" not in out

def test_environment_subinterpreter_leak(crossenv):
pytest.importorskip("concurrent.interpreters")
out = crossenv.check_output(
[
"python",
"-c",
dedent(
"""\
import concurrent.interpreters
def fn():
print("ok")
concurrent.interpreters.create().call(fn)
"""
),
],
universal_newlines=True,
stderr=subprocess.STDOUT,
)
assert "Crossenv has leaked" not in out
def test_run_sysconfig_module(crossenv):

@@ -228,0 +253,0 @@ # a regression test that 'python -m sysconfig' works as well as 'import