Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python3x vs Python3xFull # package name change in 2016 vs standardized semantic - adopt to standard python semantic #108842

Closed
InLaw opened this issue Jan 9, 2021 · 2 comments

Comments

@InLaw
Copy link
Contributor

InLaw commented Jan 9, 2021

Describe the bug
The python package in nixpkgs which is most equivalent to the original Python[38] https://www.python.org/ should be called via pkgs.python[38]

Adapt the standardized way of naming/semantic with Python in nixpkgs.
The current Naming/Semantic of Python in nixpkgs is against the usual/standardized way of calling Python

Like in the discussion in 2016 the minimal python should NOT be called python because that leads to confusion and mishandling

Additional context
see as well an issue example where pkgs.python38 does not know about the pkgs cuts that have been placed on it in nixpkgs.

-> that seems easy to workaround (like installing nixpkgs tkinter) if the environment is very small and without further tooling from nixos/nixpkgs ecosystem but can high complexity in an advanced environment within other tools of the nix ecosystem like mach-nix - as to say it makes debugging way more complex if the interpreter does not know about "packages installed" with are not installed

To Reproduce
In NixOs/nixpkgs

pkgs = import (fetchTarball https://github.com/nixos/nixpkgs/archive/nixos-20.09.tar.gz) {}  # "rev": "502845c3e31ef3de0e424f3fcb09217df2ce6df6" 
pkgs.python38.buildInputs
# [ "bzip2-1.0.6.0.1" "expat-2.2.8" "gdbm-1.18.1" "libffi-3.3" "ncurses-6.2" "openssl-1.1.1i" "readline-6.3p08" "sqlite-3.33.0" "xz-5.2.5" "zlib-1.2.11" ]

pkgs = import (fetchTarball https://github.com/nixos/nixpkgs/archive/nixos-20.09.tar.gz) {} 
pkgs.python38Full.buildInputs
# [ "bluez-5.55" "bzip2-1.0.6.0.1" "expat-2.2.8" "gdbm-1.18.1" "libX11-1.6.12" "libffi-3.3" "ncurses-6.2" "openssl-1.1.1i" "readline-6.3p08" "sqlite-3.33.0" "tcl-8.6.9" "tk-8.6.9" "xorgproto-2019.1" "xz-5.2.5" "zlib-1.2.11" ]

e.g. tkinter is not contained in pkgs.python38 (but it is an essential part the original Python[38] https://www.python.org/)
-> the naming as pkgs.python[38] is misleading because it is build to NOT represent the original Python[38]

  • but pkgs.python[38]Full tries to represent the original Python[38] -> that's why this package should be called pkgs.python[38] in nixpkgs
  • the shortened packages version of python should be called minimal because that was one of the main reasons for the change in 2016

the technology standard could be seen as well at docker

  • there you have the original Python[38] called python:3.8
  • and besides that there are manipulated/shortened Python variants (e.g. due to reasons of size) - those get a suffix like -slim e.g. python:3.8-slim

docker run --rm -it python:3.8 python -c "import tkinter; print(tkinter.__name__) "
vs:
docker run --rm -it python:3.8-slim python -c "import tkinter; print(tkinter.__name__) "

Expected behavior
If a developer uses NixOS/nix/nixpkgs he/she expects to get a derivative (most adequate to) the original Python[38] when calling pkgs.python[38] (not the minimal version of python)

I know that the size then will be a big bigger, but thats shouldn't be any issue for keeping the general naming convention - e.g. the pkgs.python[38] can be renamed to pkgs.python[38]-slim

Notify maintainers
@FRidh

Maintainer information:

# a list of nixos modules affected by the problem
module:
- python38
- python38Full
@nixos-discourse
Copy link

This issue has been mentioned on NixOS Discourse. There might be relevant details there:

https://discourse.nixos.org/t/python3x-vs-python3xfull-package-name-change-in-2016-vs-standardized-semantic-adopt-to-standard-python-semantic/10896/1

@flokli
Copy link
Contributor

flokli commented Jan 12, 2021

closing for the same reasons as mentioned in #108840 (comment) - there's no consensus, and we should keep these discussions in the Discourse Thread.

@flokli flokli closed this as completed Jan 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants