Skip to content

windows: fix fcntl import#2329

Merged
adeebshihadeh merged 5 commits intocommaai:masterfrom
pd0wm:windows-fcntl
Feb 15, 2026
Merged

windows: fix fcntl import#2329
adeebshihadeh merged 5 commits intocommaai:masterfrom
pd0wm:windows-fcntl

Conversation

@pd0wm
Copy link
Copy Markdown
Contributor

@pd0wm pd0wm commented Feb 12, 2026

Like spidev, we need to gate the fcntl import as it's only available on *nix.

This can also be combined into a single try/except if needed. If one of them is not available, it's probably fine to mock out the other one too. E.g.

try:
    import fcntl # No fcntl on Windows
    import spidev # No spidev on Windows/MacOS
except ImportError:
    fcntl = None # type: ignore
    spidev = None

Copy link
Copy Markdown
Contributor

@adeebshihadeh adeebshihadeh left a comment

Choose a reason for hiding this comment

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

can you also add some simple windows CI that maybe just installs the package? it shouldn't be too aggressive, just enough that it's clearly a problem if it fails

@adeebshihadeh adeebshihadeh merged commit 46e02cc into commaai:master Feb 15, 2026
6 checks passed
heysenbug pushed a commit to Ever-Cars/panda that referenced this pull request Feb 15, 2026
* windows: fix fcntl import

* fix indentation

* add windows ci

* make sure CI catches import error

* Revert "make sure CI catches import error"

This reverts commit b18043a.
heysenbug added a commit to Ever-Cars/panda that referenced this pull request Feb 15, 2026
* spi debug (commaai#2292)

Co-authored-by: Comma Device <device@comma.ai>

* Add comma body firmware (commaai#2291)

* motors

* can

* cleanup unused stuff

* initial clean

* more clean

* remove integral and derivative clamps, revert pwm driver to original

* remove integral and derivative clamps, revert pwm driver to original

* remove integral and derivative clamps, revert pwm driver to original

* dont need this for now

* clean

* fix can rx and can version error

* ignore body for misra mutation test

* fix bus recovery, remove body rx hook

* SocketPanda improvements (commaai#2297)

* SocketPanda improvements

* implement timeouts

* Fix mcu_type for deprecated pandas (commaai#2296)

* skip 1024 samples to settle, around 22ms (commaai#2295)

* skip 1024 samples to settle, around 22ms

* smaller diff

* Fix mcu_type in jungle (commaai#2300)

should fix jungle

* Cuatro siren (commaai#2294)

* Fix siren

* fix MISRA

* remove MISRA suppression

* disable amp

* fix rebase mistake

* fix fault

* diff audio

* misra

---------

Co-authored-by: Comma Device <device@comma.ai>

* add double buffer for microphone (commaai#2299)

* add double buffer for microphone

* comment

* fix size check

* Revert `mcu_type` changes (commaai#2303)

* Revert "Fix mcu_type for deprecated pandas (commaai#2296)"

This reverts commit 6c9064c.

* Revert "Fix mcu_type in jungle (commaai#2300)"

This reverts commit 1e8fa51.

* it's just unsupported

* cleanup fan scripts

* garbage collect always-true condition check (commaai#2305)

garbage collect dead code

* CI: use tags for cppcheck update

cppcheck doesn't always create a release for each tag

* lil more

* Adjust `gitversion` handling to include null terminator in length calculations. (commaai#2309)

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* fix up fan HITL test (commaai#2317)

* fix up fan HITL test

* cleanup

* times two

* even simpler

* append

* one more...

* speed it up now

* oops

* Build everything before jungle recover (commaai#2316)

* make sure everything is built, including the bootloader

* also for flash

* Align delay and compensate (commaai#2318)

* align delay and compensate

* empty

* rm -rf drivers/spi/; kernel driver isn't needed

* [bot] Update cppcheck to 2.19.1 (commaai#2254)

* [bot] Update cppcheck to 2.19.1

* update coverage table

---------

Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>

* Revert "[bot] Update cppcheck to 2.19.1 (commaai#2254)"

This reverts commit ae769db.

* remove mcu_type (commaai#2324)

* remove mcu_type from Panda, it's redundant since all supported devices are H7

* revert disable automatic CAN-FD switching H7 check

* revert original can no longer be flashed error

* assert, assert, assert

* normal reset is fine

* fix usb connect on macos (commaai#2326)

fix claim on macos

* Revert "remove mcu_type (commaai#2324)"

This reverts commit 8922b48.

* remove mcu_type (commaai#2327)

* remove mcu_type from Panda, it's redundant since all supported devices are H7

* revert disable automatic CAN-FD switching H7 check

* revert original can no longer be flashed error

* assert, assert, assert

* normal reset is fine

* remove assert from recover

* update pyproject.toml: include panda.python and panda.board (commaai#2328)

* improve HITL robustness (commaai#2333)

* windows: fix fcntl import (commaai#2329)

* windows: fix fcntl import

* fix indentation

* add windows ci

* make sure CI catches import error

* Revert "make sure CI catches import error"

This reverts commit b18043a.

---------

Co-authored-by: Adeeb Shihadeh <adeebshihadeh@gmail.com>
Co-authored-by: Comma Device <device@comma.ai>
Co-authored-by: Jason Huang <91160588+rexblade21@users.noreply.github.com>
Co-authored-by: Willem Melching <willem.melching@gmail.com>
Co-authored-by: Igor Biletski <briskspirit@users.noreply.github.com>
Co-authored-by: Robbe Derks <robbe.derks@gmail.com>
Co-authored-by: Jason Young <46612682+jyoung8607@users.noreply.github.com>
Co-authored-by: downquark7 <mail2emn@gmail.com>
Co-authored-by: commaci-public <60409688+commaci-public@users.noreply.github.com>
Co-authored-by: Vehicle Researcher <user@comma.ai>
Co-authored-by: Andi Radulescu <andi.radulescu@gmail.com>
mmoo758 added a commit to mmoo758/panda that referenced this pull request Mar 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants