laforge has submitted this change. ( 
https://gerrit.osmocom.org/c/pysim/+/43981?usp=email )

 (

2 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted 
one.
 )Change subject: setup: make smpp.twisted3 an extra, only pySim-smpp2sim.py 
needs it
......................................................................

setup: make smpp.twisted3 an extra, only pySim-smpp2sim.py needs it

smpp.twisted3 is imported by pySim-smpp2sim.py alone; no module under
pySim/ uses it. Every release of smpp.twisted3 pins Twisted~=23.10.0,
a Twisted with three open advisories (CVE-2026-42304, CVE-2024-41810,
CVE-2024-41671), so every installation of the library carries a Twisted
it never loads and cannot upgrade. Move the requirement to a
`smpp2sim` extra; the script keeps working with `pip install
"pysim[smpp2sim]"` and fails with a plain ImportError without it, the
same way the `smdpp` extra behaves for klein.

The folder osmocom-pysim-smpp-twisted-optional of
hampushellsberg-dev/PySIM-upstream-patches on GitHub has the analysis
and the validation output.

Co-Authored-By: Oliver Smith <[email protected]>
Change-Id: I7001effd073fa341c08a6e4508e22b568aa7cd70
---
M contrib/jenkins.sh
M requirements.txt
M setup.py
3 files changed, 6 insertions(+), 3 deletions(-)

Approvals:
  osmith: Looks good to me, but someone else must approve
  Jenkins Builder: Verified
  laforge: Looks good to me, approved




diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh
index fa2575b..2763f57 100755
--- a/contrib/jenkins.sh
+++ b/contrib/jenkins.sh
@@ -42,7 +42,7 @@
 "card-test") # tests requiring physical cards
        setup_venv

-       pip install -r requirements.txt
+       pip install .

        # Run pySim-prog integration tests
        cd tests/pySim-prog_test/
@@ -53,6 +53,8 @@
        python3 -m unittest discover -v -s ./tests/pySim-shell_test/

        # Run pySim-smpp2sim test
+       pip install .[smpp2sim]
+       pip install smpplib
        tests/pySim-smpp2sim_test/pySim-smpp2sim_test.sh
        ;;
 "distcheck")
diff --git a/requirements.txt b/requirements.txt
index aafccc2..947ccff 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -14,5 +14,4 @@
 git+https://github.com/osmocom/asn1tools
 packaging
 git+https://github.com/hologram-io/smpp.pdu
-smpp.twisted3 @ git+https://github.com/jookies/smpp.twisted
 smpplib
diff --git a/setup.py b/setup.py
index ff093fb..20feba4 100644
--- a/setup.py
+++ b/setup.py
@@ -33,7 +33,6 @@
         "packaging",
         "smpp.pdu @ git+https://github.com/hologram-io/smpp.pdu";,
         "asn1tools",
-        "smpp.twisted3 @ git+https://github.com/jookies/smpp.twisted";,
     ],
     scripts=[
         'pySim-prog.py',
@@ -57,6 +56,9 @@
             "requests",
             "smpplib",
         ],
+        "smpp2sim": [
+            "smpp.twisted3 @ git+https://github.com/jookies/smpp.twisted";,
+        ],
         "CardKeyProviderPgsql": [
             "psycopg2-binary",
         ]

--
To view, visit https://gerrit.osmocom.org/c/pysim/+/43981?usp=email
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings?usp=email

Gerrit-MessageType: merged
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I7001effd073fa341c08a6e4508e22b568aa7cd70
Gerrit-Change-Number: 43981
Gerrit-PatchSet: 3
Gerrit-Owner: laforge <[email protected]>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: laforge <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-CC: hampushellsberg <[email protected]>

Reply via email to