Skip to content

Commit af01d2c

Browse files
cxzhongCopilot
andauthored
Apply suggestions from code review
Co-authored-by: Copilot <[email protected]>
1 parent 0378ce7 commit af01d2c

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.github/workflows/release.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ jobs:
4343
make configure
4444
./configure
4545
- name: make dist (--enable-download-from-upstream-url)
46-
if: (success() || failure()) && steps.make_dist.outcome != 'success'
46+
id: make_dist
47+
if: success() || failure()
4748
run: |
4849
make dist
4950
env:

build/pkgs/rpds_py/SPKG.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Python bindings to the Rust rpds crate for persistent data structures.
99
rpds-py provides efficient, immutable data structures including:
1010

1111
* ``HashTrieMap`` - Persistent hash map
12-
* ``HashTrieSet`` - Persistent hash set
12+
* ``HashTrieSet`` - Persistent hash set
1313
* ``List`` - Persistent list with efficient operations
1414

1515
These data structures are backed by Rust implementations for high performance
@@ -53,7 +53,7 @@ versions and platforms:
5353
* Windows (win32, win_amd64, win_arm64)
5454

5555
The Sage build system automatically selects and downloads the appropriate
56-
wheel for your platform and Python version using pip's auto-detection.
56+
wheel for your platform and Python version using the packaging library's compatibility tags.
5757

5858
When building from source, a Rust toolchain is required as rpds-py contains
5959
Rust extensions for performance.

build/sage_bootstrap/package.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ def tarballs_info(self):
258258
"""
259259
return self.__tarballs_info
260260

261-
def find_tarball_for_platform(self, python_version=None):
261+
def find_tarball_for_platform(self):
262262
"""
263263
Find the appropriate tarball for the current platform.
264264

build/sage_bootstrap/tarball.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,7 @@
1616
# ****************************************************************************
1717

1818
import os
19-
import sys
20-
import subprocess
19+
2120
import logging
2221
log = logging.getLogger()
2322

@@ -60,7 +59,7 @@ def __init__(self, tarball_name, package=None, tarball_info=None):
6059
"""
6160
self.__filename = tarball_name
6261
self.__tarball_info = tarball_info
63-
62+
6463
if package is None:
6564
self.__package = None
6665
for pkg in Package.all():
@@ -343,7 +342,7 @@ def _download_single_wheel(self, tarball_info, allow_upstream=False):
343342
log.debug('File not at upstream URL')
344343

345344
if not successful_download:
346-
raise FileNotMirroredError(f'Could not download {tarball_filename} from pip, mirrors, or upstream')
345+
raise FileNotMirroredError(f'Could not download {tarball_filename} from mirrors or upstream')
347346

348347
# Verify checksum of traditionally-downloaded file
349348
try:
@@ -355,7 +354,7 @@ def _download_single_wheel(self, tarball_info, allow_upstream=False):
355354
log.info(f'Successfully downloaded and verified: {tarball_filename}')
356355
# Update self to point to the actually downloaded file
357356
self.__filename = tarball_filename
358-
except Exception as e:
357+
except (ChecksumError, IOError, ValueError) as e:
359358
log.error(f'Error verifying downloaded tarball: {e}')
360359
raise
361360

0 commit comments

Comments
 (0)