psycopg[binary,pool] breaks s390x deployments #9269

Closed
opened 2025-12-29 20:47:41 +01:00 by adam · 3 comments
Owner

Originally created by @vmorris on GitHub (Feb 19, 2024).

Originally assigned to: @arthanson on GitHub.

Deployment Type

Self-hosted

NetBox Version

v3.7.2

Python Version

3.8

Steps to Reproduce

Hello, This change in the requirements to use the binary psycopg breaks my deployment on s390x.

https://github.com/netbox-community/netbox/blob/develop/requirements.txt#L28

I modified my installation to use just psycopg[pool]==3.1.18 and it is working okay.. Is there any way that you can detect the architecture and not use the binary if it's not available?

Thanks for the awesome product, I really love netbox!

Expected Behavior

Installation of netbox works on s390x without modification to requirements.txt.

Observed Behavior

psycopg binary is unavailable for s390x architecture.

Originally created by @vmorris on GitHub (Feb 19, 2024). Originally assigned to: @arthanson on GitHub. ### Deployment Type Self-hosted ### NetBox Version v3.7.2 ### Python Version 3.8 ### Steps to Reproduce Hello, This change in the requirements to use the binary psycopg breaks my deployment on s390x. https://github.com/netbox-community/netbox/blob/develop/requirements.txt#L28 I modified my installation to use just `psycopg[pool]==3.1.18` and it is working okay.. Is there any way that you can detect the architecture and not use the binary if it's not available? Thanks for the awesome product, I really love netbox! ### Expected Behavior Installation of netbox works on s390x without modification to requirements.txt. ### Observed Behavior psycopg binary is unavailable for s390x architecture.
adam added the type: bugstatus: acceptedstatus: under review labels 2025-12-29 20:47:41 +01:00
adam closed this issue 2025-12-29 20:47:41 +01:00
Author
Owner

@jeremystretch commented on GitHub (Feb 20, 2024):

This change in the requirements to use the binary psycopg breaks my deployment on s390x.

It would help to explain what s390x is. I had to Google it.

This one took some digging. We switched to the binary package of psycopg2 waaay back in NetBox v2.3. According to #1899, this was done because the wheel packages were being renamed.

From what I can glean from pip's documentation, we might be able to replace

psycopg[binary,pool]==3.1.18

with

psycopg[pool]==3.1.18 --prefer-binary=psycopg

to install the binary package where it's available and fall back to the pure Python build where it's not. However, now I'm wondering if we should be using the C package instead.

@jeremystretch commented on GitHub (Feb 20, 2024): > This change in the requirements to use the binary psycopg breaks my deployment on s390x. It would help to explain what s390x is. I had to Google it. This one took some digging. We switched to the binary package of psycopg2 waaay back in NetBox v2.3. According to #1899, this was done because the wheel packages were being renamed. From what I can glean from pip's documentation, we might be able to replace ``` psycopg[binary,pool]==3.1.18 ``` with ``` psycopg[pool]==3.1.18 --prefer-binary=psycopg ``` to install the binary package where it's available and fall back to the pure Python build where it's not. However, now I'm wondering if we should be using the [C package](https://www.psycopg.org/psycopg3/docs/basic/install.html#local-installation) instead.
Author
Owner

@vmorris commented on GitHub (Feb 20, 2024):

It would help to explain what s390x is. I had to Google it.

Sorry! I'm too close to the problem, I know :D

I also wonder if the [c] option would be better.. I think this is similar to to what we had before, where we were building the psycopg2 binary every time.

@vmorris commented on GitHub (Feb 20, 2024): > It would help to explain what s390x is. I had to Google it. Sorry! I'm too close to the problem, I know :D I also wonder if the [c] option would be better.. I think this is similar to to what we had before, where we were building the psycopg2 binary every time.
Author
Owner

@jeremystretch commented on GitHub (Mar 19, 2024):

We've switched to the compiled (C) package beginning with NetBox v4.0.

@jeremystretch commented on GitHub (Mar 19, 2024): We've switched to the compiled (C) package beginning with NetBox v4.0.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#9269