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

Upgrade dunamai to Python 3.6 #26

Closed
wwuck opened this issue Oct 5, 2021 · 5 comments
Closed

Upgrade dunamai to Python 3.6 #26

wwuck opened this issue Oct 5, 2021 · 5 comments
Labels
enhancement New feature or request

Comments

@wwuck
Copy link
Contributor

wwuck commented Oct 5, 2021

Python 3.5 is end-of-life, and upgrading to 3.6 will allow dunamai to drop the dependency on setuptools.

Is there any need to keep 3.5 compatibility?

I will submit a PR for updating to 3.6 and removing setuptools.

wwuck added a commit to wwuck/dunamai that referenced this issue Oct 6, 2021
replace setuptools with packaging and importlib.metadata

Fixes mtkennerly#26
@mtkennerly mtkennerly added the enhancement New feature or request label Oct 8, 2021
@mtkennerly
Copy link
Owner

For now, I would prefer to maintain Python 3.5 compatibility. I do understand that it's officially end of life, but there will still be groups using it because of inertia. I'd like to maintain the compatibility until there's a true need to drop it (e.g., if it were a prerequisite for supporting a newer Python version).

@wwuck
Copy link
Contributor Author

wwuck commented Oct 9, 2021

No worries. I guess I’ll live with the setuptools dependency for now.

@mtkennerly
Copy link
Owner

Actually, #29 just got rid of the dependency in a different way, although there's still a minor issue with it that needs to be investigated before I can make a new release with it.

@wwuck
Copy link
Contributor Author

wwuck commented Oct 9, 2021

Ahhh I see. I didn’t think to check older package versions for 3.5 compatibility.

@wwuck
Copy link
Contributor Author

wwuck commented Oct 12, 2021

Just a quick note that the latest versions of pytest and mypy only support py36+. flake8 v4 released this week has also dropped support for python < 3.6.

I ran a quick query on the pypi public dataset https://packaging.python.org/guides/analyzing-pypi-package-downloads/ for dunamai showing downloads over the last 3 months, keeping in mind that the data is not 100% accurate as stated on that packaging webpage.

#standardSQL
SELECT
  REGEXP_EXTRACT(details.python, r"[0-9]+\.[0-9]+") AS python_version,
  COUNT(*) AS num_downloads,
FROM `bigquery-public-data.pypi.file_downloads`
WHERE
  file.project = 'dunamai'
  -- Only query the last 3 months of history
  AND DATE(timestamp)
    BETWEEN DATE_TRUNC(DATE_SUB(CURRENT_DATE(), INTERVAL 3 MONTH), MONTH)
    AND CURRENT_DATE()
GROUP BY `python_version`
ORDER BY `num_downloads` DESC
[
  {
    "python_version": "3.7",
    "num_downloads": "160579"
  },
  {
    "python_version": "3.8",
    "num_downloads": "105883"
  },
  {
    "python_version": null,
    "num_downloads": "49834"
  },
  {
    "python_version": "3.9",
    "num_downloads": "30326"
  },
  {
    "python_version": "3.6",
    "num_downloads": "4329"
  },
  {
    "python_version": "3.10",
    "num_downloads": "1099"
  },
  {
    "python_version": "3.5",
    "num_downloads": "214"
  },
  {
    "python_version": "2.7",
    "num_downloads": "4"
  }
]

and also for the last 30 days

#standardSQL
SELECT
  REGEXP_EXTRACT(details.python, r"[0-9]+\.[0-9]+") AS python_version,
  COUNT(*) AS num_downloads,
FROM `bigquery-public-data.pypi.file_downloads`
WHERE
  file.project = 'dunamai'
  -- Only query the last 3 months of history
  AND DATE(timestamp)
    BETWEEN DATE_SUB(CURRENT_DATE(), INTERVAL 30 DAY)
    AND CURRENT_DATE()
GROUP BY `python_version`
ORDER BY `num_downloads` DESC
[
  {
    "python_version": "3.7",
    "num_downloads": "37582"
  },
  {
    "python_version": "3.8",
    "num_downloads": "33851"
  },
  {
    "python_version": null,
    "num_downloads": "16848"
  },
  {
    "python_version": "3.9",
    "num_downloads": "10832"
  },
  {
    "python_version": "3.10",
    "num_downloads": "1081"
  },
  {
    "python_version": "3.6",
    "num_downloads": "1063"
  },
  {
    "python_version": "3.5",
    "num_downloads": "101"
  }
]

I'm not surprised to see the py36 usage declining too as it will reach EOL in December 2021. It would appear that dunamai is still used on py35, even if only a very small amount.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants