Skip to content

Commit cc60e20

Browse files
authored
Merge pull request #600 from aboutcode-org/599-index-pypi-packages
Add PyPI to supported_ecosystems #599
2 parents 7891773 + a2d387e commit cc60e20

File tree

4 files changed

+35
-5
lines changed

4 files changed

+35
-5
lines changed

packagedb/api.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -996,6 +996,7 @@ def _reindex_package(package, reindexed_packages, **kwargs):
996996
"openssl",
997997
"github",
998998
"conan",
999+
"pypi",
9991000
]
10001001

10011002
unique_packages, unsupported_packages, unsupported_vers = get_resolved_packages(
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Generated by Django 5.1.5 on 2025-04-03 20:10
2+
3+
from django.db import migrations, models
4+
5+
6+
class Migration(migrations.Migration):
7+
8+
dependencies = [
9+
("packagedb", "0091_package_is_duplicate"),
10+
]
11+
12+
operations = [
13+
migrations.AlterField(
14+
model_name="party",
15+
name="email",
16+
field=models.CharField(
17+
blank=True,
18+
help_text="Email for this party.",
19+
max_length=1024,
20+
null=True,
21+
),
22+
),
23+
migrations.AlterField(
24+
model_name="party",
25+
name="name",
26+
field=models.CharField(
27+
blank=True, help_text="Name of this party.", max_length=1024, null=True
28+
),
29+
),
30+
]

packagedb/models.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
from django.contrib.auth.models import UserManager
1818
from django.contrib.postgres.fields import ArrayField
1919
from django.core import exceptions
20-
from django.core.paginator import Paginator
2120
from django.core.validators import MaxValueValidator
2221
from django.core.validators import MinValueValidator
2322
from django.db import models
@@ -858,11 +857,11 @@ class Party(models.Model):
858857
)
859858

860859
name = models.CharField(
861-
max_length=255, blank=True, null=True, help_text=_("Name of this party.")
860+
max_length=1024, blank=True, null=True, help_text=_("Name of this party.")
862861
)
863862

864863
email = models.CharField(
865-
max_length=255, blank=True, null=True, help_text=_("Email for this party.")
864+
max_length=1024, blank=True, null=True, help_text=_("Email for this party.")
866865
)
867866

868867
url = models.CharField(

packagedb/tests/test_api.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ def test_reindex_packages_bulk(self):
12571257
},
12581258
# NOt in DB and unsupported
12591259
{
1260-
"purl": "pkg:pypi/does/not-exist@1",
1260+
"purl": "pkg:bower/does/not-exist@1",
12611261
},
12621262
]
12631263
data = {"packages": packages, "reindex": True}
@@ -1268,7 +1268,7 @@ def test_reindex_packages_bulk(self):
12681268
]
12691269

12701270
unsupported_purls = [
1271-
"pkg:pypi/does/not-exist@1",
1271+
"pkg:bower/does/not-exist@1",
12721272
]
12731273

12741274
response = self.client.post(

0 commit comments

Comments
 (0)