Skip to content

Commit

Permalink
Working on Python 3.13: greenlet murmurhash netifaces preshed pycurl …
Browse files Browse the repository at this point in the history
…regex ruamel-yaml-clib zope-interface zstandard
  • Loading branch information
mhsmith committed Oct 22, 2024
1 parent a80c5be commit fdbdc1d
Show file tree
Hide file tree
Showing 10 changed files with 35 additions and 15 deletions.
23 changes: 20 additions & 3 deletions server/pypi/build-wheel.py
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,8 @@ def download_pypi(self):

# Even with --no-deps, `pip download` still pointlessly runs egg_info on the
# downloaded sdist, which may fail or take a long time
# (https://github.com/pypa/pip/issues/1884). So we download the sdist manually.
# (https://github.com/pypa/pip/issues/1884). So we download the sdist with a
# different library.
log("Searching PyPI")
pypi = pypi_simple.PyPISimple()
try:
Expand All @@ -376,16 +377,32 @@ def download_pypi(self):
raise CommandError(e)

for package in project.packages:
# sdist filenames used to use the original package name, but current
# standards encourage normalization
# (https://packaging.python.org/en/latest/specifications/source-distribution-format/).
if (
(package.project, package.version) == (self.package, self.version)
normalize_name_pypi(package.project) == normalize_name_pypi(self.package)
and package.version == self.version
and any(package.filename.endswith("." + ext) for ext in EXTENSIONS)
):
log(f"Downloading {package.url}")
pypi.download_package(
package, package.filename,
progress=pypi_simple.tqdm_progress_factory(
unit="B", unit_scale=True, unit_divisor=1024))
return package.filename

# Cache it under the unnormalized name so the code above can find it.
for ext in EXTENSIONS:
if package.filename.endswith("." + ext):
cache_filename = f"{self.package}-{self.version}.{ext}"
if cache_filename != package.filename:
os.rename(package.filename, cache_filename)
break
else:
raise CommandError(
f"Can't determine cache filename for {package.filename!r}")

return cache_filename
else:
raise CommandError(
f"Can't find sdist for {self.package!r} version {self.version!r} at "
Expand Down
6 changes: 3 additions & 3 deletions server/pypi/meta-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ properties:
type: object
required: [name, version]
properties:
name: # Must be in its original form, as used in sdist filenames.
type: string
name: # Must be in its original form, as shown in the page heading
type: string # on PyPI.
version: # We no longer accept numbers, because that would make it
type: string # impossible to distinguish 0.1 from 0.10.
type: string # impossible to distinguish 0.1 from 0.10.
additionalProperties: false

source:
Expand Down
4 changes: 2 additions & 2 deletions server/pypi/packages/greenlet/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: greenlet
version: "3.0.1"
version: "3.1.1"

build:
number: 1
number: 0
3 changes: 3 additions & 0 deletions server/pypi/packages/murmurhash/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# We also maintain an older version of this package to support the Chaquopy unit tests -
# see the branch `murmurhash-0`.

package:
name: murmurhash
version: "1.0.10"
Expand Down
2 changes: 1 addition & 1 deletion server/pypi/packages/pycurl/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

package:
name: pycurl
version: "7.45.2"
version: "7.45.3"

build:
number: 0
Expand Down
2 changes: 1 addition & 1 deletion server/pypi/packages/regex/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package:
name: regex
version: "2023.10.3"
version: "2024.9.11"
2 changes: 1 addition & 1 deletion server/pypi/packages/ruamel-yaml-clib/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package:
name: ruamel.yaml.clib
version: "0.2.8"
version: "0.2.12"
2 changes: 1 addition & 1 deletion server/pypi/packages/zope-interface/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
package:
name: zope.interface
version: "6.1"
version: "7.1.0"
4 changes: 2 additions & 2 deletions server/pypi/packages/zope-interface/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
class TestZopeInterface(unittest.TestCase):

def test_coptimizations(self):
import zope.interface
import zope.interface # noqa: F401
self.assertIn("zope.interface._zope_interface_coptimizations", sys.modules)

def test_inside_function_call(self):
from zope.interface.advice import getFrameInfo

kind, module, f_locals, f_globals = getFrameInfo(sys._getframe())
self.assertEqual(kind, "function call")
self.assertTrue(f_locals is locals())
# `f_locals is locals()` is no longer true in Python 3.13.
for d in module.__dict__, f_globals:
self.assertTrue(d is globals())

Expand Down
2 changes: 1 addition & 1 deletion server/pypi/packages/zstandard/meta.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package:
name: zstandard
version: "0.22.0"
version: "0.23.0"

build:
number: 0

0 comments on commit fdbdc1d

Please sign in to comment.