Skip to content

Commit 95be734

Browse files
authored
featmigrate to socketdev 3.0.0 and switch to uv dependency management (#42)
BREAKING CHANGES: - Package version bumped from 2.x to 3.0.0 - Removed deprecation warnings as this is now the main socketdev package - Migrated from Rye to uv for dependency management Changes: - Update package version to 3.0.0 in pyproject.toml and version.py - Remove deprecation notice from package description - Change development status from Inactive to Production/Stable - Remove deprecation warning from socketdev/__init__.py - Update all PyPI references from socket-sdk-python to socketdev in workflows and scripts - Clean up README.rst: remove deprecation warning, update title - Replace Rye lock files with uv.lock - Update all package installation commands to use socketdev Migration notes: - Use uv sync instead of rye sync - Use uv lock instead of rye lock - All dependencies now correctly reference [email protected]
1 parent 09ca42d commit 95be734

File tree

11 files changed

+1220
-183
lines changed

11 files changed

+1220
-183
lines changed

.github/workflows/pr-preview.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ jobs:
3333
run: |
3434
VERSION=$(hatch version | cut -d+ -f1)
3535
echo "VERSION=$VERSION" >> $GITHUB_ENV
36-
if curl -s -f https://test.pypi.org/pypi/socket-sdk-python/$VERSION/json > /dev/null; then
36+
if curl -s -f https://test.pypi.org/pypi/socketdev/$VERSION/json > /dev/null; then
3737
echo "Version ${VERSION} already exists on Test PyPI"
3838
echo "exists=true" >> $GITHUB_OUTPUT
3939
else
@@ -90,7 +90,7 @@ jobs:
9090
9191
Install with:
9292
\`\`\`bash
93-
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socket-sdk-python==${version}
93+
pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketdev==${version}
9494
\`\`\``;
9595
9696
if (botComment) {
@@ -118,9 +118,9 @@ jobs:
118118
VERSION: ${{ env.VERSION }}
119119
run: |
120120
for i in {1..30}; do
121-
if pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socket-sdk-python==${VERSION}; then
121+
if pip install --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple socketdev==${VERSION}; then
122122
echo "Package ${VERSION} is now available and installable on Test PyPI"
123-
pip uninstall -y socket-sdk-python
123+
pip uninstall -y socketdev
124124
echo "success=true" >> $GITHUB_OUTPUT
125125
exit 0
126126
fi

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
env:
4040
VERSION: ${{ env.VERSION }}
4141
run: |
42-
if curl -s -f https://pypi.org/pypi/socket-sdk-python/$VERSION/json > /dev/null; then
42+
if curl -s -f https://pypi.org/pypi/socketdev/$VERSION/json > /dev/null; then
4343
echo "Version ${VERSION} already exists on PyPI"
4444
echo "pypi_exists=true" >> $GITHUB_OUTPUT
4545
else
@@ -62,9 +62,9 @@ jobs:
6262
VERSION: ${{ env.VERSION }}
6363
run: |
6464
for i in {1..30}; do
65-
if pip install socket-sdk-python==${VERSION}; then
65+
if pip install socketdev==${VERSION}; then
6666
echo "Package ${VERSION} is now available and installable on PyPI"
67-
pip uninstall -y socket-sdk-python
67+
pip uninstall -y socketdev
6868
echo "success=true" >> $GITHUB_OUTPUT
6969
exit 0
7070
fi

.hooks/sync_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
VERSION_PATTERN = re.compile(r"__version__\s*=\s*['\"]([^'\"]+)['\"]")
1313
PYPROJECT_PATTERN = re.compile(r'^version\s*=\s*".*"$', re.MULTILINE)
14-
PYPI_API = "https://test.pypi.org/pypi/socket-sdk-python/json"
14+
PYPI_API = "https://test.pypi.org/pypi/socketdev/json"
1515

1616
def read_version_from_version_file(path: pathlib.Path) -> str:
1717
content = path.read_text()

README.rst

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11

2-
socket-python-sdk
3-
#################
4-
5-
.. warning::
6-
**DEPRECATED**: This package is deprecated. Please migrate to the new ``socketdev`` package:
7-
8-
.. code-block:: bash
9-
10-
pip uninstall socket-sdk-python
11-
pip install socketdev
12-
13-
The API remains exactly the same, only the package name has changed. This package will no longer receive updates.
2+
socketdev
3+
#########
144

155
Purpose
166
-------

pyproject.toml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@ requires = ["hatchling"]
33
build-backend = "hatchling.build"
44

55
[project]
6-
name = "socket-sdk-python"
7-
version = "2.2.3"
6+
name = "socketdev"
7+
version = "3.0.0"
88
requires-python = ">= 3.9"
99
dependencies = [
1010
'requests',
1111
'typing-extensions>=4.12.2'
1212
]
1313
readme = "README.rst"
1414
license = {file = "LICENSE"}
15-
description = "Socket Security Python SDK [DEPRECATED: Please use 'socketdev' package instead]"
15+
description = "Socket Security Python SDK"
1616
keywords = ["socketsecurity", "socket.dev", "sca", "oss", "security", "sdk"]
1717
authors = [
1818
{name = "Douglas Coburn", email = "[email protected]"}
@@ -21,7 +21,7 @@ maintainers = [
2121
{name = "Douglas Coburn", email = "[email protected]"}
2222
]
2323
classifiers = [
24-
"Development Status :: 7 - Inactive",
24+
"Development Status :: 5 - Production/Stable",
2525
"Intended Audience :: Developers",
2626
"Programming Language :: Python :: 3.9",
2727
"Programming Language :: Python :: 3.10",
@@ -51,7 +51,7 @@ test = [
5151
]
5252

5353
[project.urls]
54-
Homepage = "https://github.com/socketdev/socket-sdk-python"
54+
Homepage = "https://github.com/socketdev/socketdev"
5555

5656
[tool.ruff]
5757
# Exclude a variety of commonly ignored directories.

requirements-dev.lock

Lines changed: 0 additions & 72 deletions
This file was deleted.

requirements.lock

Lines changed: 0 additions & 72 deletions
This file was deleted.

scripts/deploy-test-pypi.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ BACKUP_FILE="${VERSION_FILE}.bak"
77

88
# Get existing versions from TestPyPI
99
echo "Checking existing versions on TestPyPI..."
10-
EXISTING_VERSIONS=$(curl -s https://test.pypi.org/pypi/socket-sdk-python/json | python -c "
10+
EXISTING_VERSIONS=$(curl -s https://test.pypi.org/pypi/socketdev/json | python -c "
1111
import sys, json
1212
data = json.load(sys.stdin)
1313
versions = [v for v in data.get('releases', {}).keys() if v.startswith('$ORIGINAL_VERSION.dev')]

socketdev/__init__.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,6 @@
2020
from socketdev.labels import Labels
2121
from socketdev.licensemetadata import LicenseMetadata
2222
from socketdev.log import log
23-
import warnings
24-
25-
26-
# Deprecation warning for socket-sdk-python package
27-
warnings.warn(
28-
"The 'socket-sdk-python' package is deprecated and will no longer receive updates. "
29-
"Please migrate to the new 'socketdev' package: pip install socketdev. "
30-
"The API remains the same, only the package name has changed. "
31-
"For more information, see: https://github.com/SocketDev/socket-sdk-python",
32-
DeprecationWarning,
33-
stacklevel=2
34-
)
3523

3624
__author__ = "socket.dev"
3725
__version__ = __version__

socketdev/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "2.2.3"
1+
__version__ = "3.0.0"

0 commit comments

Comments
 (0)