cuducos / django-public-admin

🔓 A public and read-only version of the Django Admin
MIT License
37 stars 5 forks source link

Incompatible with Django 3 #16

Closed Urahara closed 3 years ago

Urahara commented 3 years ago

When i try to install poetry install with the pyproject.toml above:

[tool.poetry]
name = "poeta"
version = "0.1.0"
description = ""
authors = ["Urahara"]

[tool.poetry.dependencies]
python = "^3.6"
django = "3.0.8"
django-public-admin = "^0.0.2"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

Result:

Updating dependencies
Resolving dependencies... (0.4s)

[SolverProblemError]
Because no versions of django-public-admin match >0.0.2,<0.0.3
 and django-public-admin (0.0.2) depends on django (>=2.0.0,<3.0.0), django-public-admin (>=0.0.2,<0.0.3) requires django (>=2.0.0,<3.0.0).
So, because poeta depends on both django (3.0.8) and django-public-admin (^0.0.2), version solving failed.

Slightly modifying to use the latest 2.x release of django i able to use without problems:

[tool.poetry]
name = "poeta"
version = "0.1.0"
description = ""
authors = ["Urahara"]

[tool.poetry.dependencies]
python = "^3.6"
django = "2.2.14"
django-public-admin = "^0.0.2"

[tool.poetry.dev-dependencies]

[build-system]
requires = ["poetry>=0.12"]
build-backend = "poetry.masonry.api"

Result:

Updating dependencies
Resolving dependencies... (2.8s)

Writing lock file

Package operations: 4 installs, 0 updates, 0 removals

  - Installing pytz (2020.1)
  - Installing sqlparse (0.3.1)
  - Installing django (2.2.14)
  - Installing django-public-admin (0.0.2)
cuducos commented 3 years ago

Hum… interesting. I think we should have in django-public-admin’s pyprojecyt.toml django = "^2, ^3"… does that make sense? I can test that over the weekend, but if anyone can confirm this actually work, feel free to open a PR : )

Urahara commented 3 years ago

@cuducos Can you take a look at PR that i created?

Urahara commented 3 years ago

Hum… interesting. I think we should have in django-public-admin’s pyprojecyt.toml django = "^2, ^3"… does that make sense? I can test that over the weekend, but if anyone can confirm this actually work, feel free to open a PR : )

The problem with ^2, ^3 is:

Warning: The lock file is not up to date with the latest changes in pyproject.toml. You may be getting outdated dependencies. Run update to update them.

[SolverProblemError]
Because django-public-admin depends on both django (^2, ^3) and django (^2, ^3), version solving failed.

Because of this i use >=.