Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
setup(
name = 'browserstack-local',
packages = ['browserstack'],
version = '1.2.15',
version = '1.2.16',
description = 'Python bindings for Browserstack Local',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
Expand All @@ -16,7 +16,7 @@
keywords = ['BrowserStack', 'Local', 'selenium', 'testing'],
classifiers = [],
install_requires=[
'psutil>=5.6.6,<7',
'psutil>=5.6.6',

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "Known edge case" section covers 32-bit Windows, but psutil dropped 32-bit Linux (i686) wheels on the same boundary — and 32-bit Linux is a platform this package explicitly serves.

Evidence — wheel platform tags on PyPI:

psutil linux i686 wheel win32 wheel
6.1.1 yes yes
7.0.0 yes yes
7.2.2 no no

browserstack/local_binary.py:17,31-34 computes is_64bits = sys.maxsize > 2**32 and downloads BrowserStackLocal-linux-ia32 for 32-bit interpreters, so 32-bit Linux is a first-class target here. Windows, by contrast, has no bitness branch at all (local_binary.py:36 → a single BrowserStackLocal.exe). With the cap removed, a fresh install on a 32-bit Linux interpreter resolves psutil 7.2.2 and must compile it from sdist (gcc + Python headers) where 6.1.1/7.0.0 supplied a wheel — a minimal CI image without a toolchain fails the install outright.

Worth adding the flip side to the description as well: 7.2.2 gains musllinux wheels (x86_64 + aarch64) that 6.1.1 lacked entirely, so Alpine users (local_binary.py:26BrowserStackLocal-alpine) go from an sdist build to a wheel. Net wheel coverage improves for a supported platform.

Fix — either extend the documented edge case to win32 + linux i686 and accept it knowingly, or scope the cap to 32-bit so wheel coverage is preserved everywhere:

install_requires=[
    'psutil>=5.6.6',
    'psutil<7; platform_machine in "i686 i386 x86"',
]

On "environment markers cannot reliably detect interpreter bitness" — markers do expose platform_machine, which pip evaluates as i686 on 32-bit Linux and x86 for 32-bit CPython on Windows (a WOW64 process reports PROCESSOR_ARCHITECTURE=x86). I haven't tested that resolution myself, and platform_machine reflects the OS/WOW64 view rather than sys.maxsize, so worth a pip install --dry-run --platform manylinux2014_i686 check before relying on it.

Question for author: was 32-bit Linux considered alongside win32, or did the wheel audit look only at the Windows set (the LOC-7228 customer is on Windows)?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch — answering your direct question first: the wheel audit only diffed the win32 set against 6.1.1/7.0.0 (the LOC-7228 customer was on Windows); i686 was not checked. You're right that it lost wheels on the same boundary, and unlike Windows, 32-bit Linux is a platform local_binary.py explicitly branches for (is_64bitsBrowserStackLocal-linux-ia32).

Re-verified your table against PyPI JSON:

psutil linux i686 wheels win32 wheels musllinux wheels
6.1.1 3 3 0
7.0.0 1 2 0
7.2.2 0 0 2

Going with extending the documented edge case rather than the scoped marker, for the reason you already half-flagged: platform_machine reflects the OS/WOW64 view, so a 32-bit CPython on a 64-bit kernel reports x86_64 and the marker wouldn't fire — while pip's wheel selection still follows interpreter bitness. That's arguably the more common 32-bit scenario today (i386 Docker images without linux32 personality), so the marker gives partial coverage in exchange for permanent resolver complexity on a shrinking platform. The failure mode it would guard is loud (compiler error at install time), not a silent runtime break.

Also folded your flip side into the description: 7.2.2 adds musllinux wheels that 6.1.1 lacked, so Alpine (BrowserStackLocal-alpine, also explicitly served) goes from sdist-build to wheel — net coverage improves for a supported platform.

PR description updated to cover win32 + linux i686 + the Alpine improvement.

],
)

Loading