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

Move project metadata to pyproject.toml #715

Merged
merged 4 commits into from
Nov 28, 2024
Merged

Conversation

cdce8p
Copy link
Contributor

@cdce8p cdce8p commented Nov 17, 2024

The metadata changes:

 Metadata-Version: 2.1
 Name: asyncssh
 Version: 2.18.0
 Summary: AsyncSSH: Asynchronous SSHv2 client and server library
-Author: Ron Frederick
-Author-email: [email protected]
+Author-email: Ron Frederick <[email protected]>
-License: Eclipse Public License v2.0
+License: EPL-2.0 OR GPL-2.0-or-later
-Home-page: http://asyncssh.timeheart.net
+Project-URL: Homepage, http://asyncssh.timeheart.net
 Project-URL: Documentation, https://asyncssh.readthedocs.io
 Project-URL: Source, https://github.com/ronf/asyncssh
 Project-URL: Tracker, https://github.com/ronf/asyncssh/issues
-Platform: Any
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Console
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved
 Classifier: Operating System :: MacOS :: MacOS X
 Classifier: Operating System :: POSIX
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Topic :: Internet
 Classifier: Topic :: Security :: Cryptography
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: System :: Networking
-Requires-Python: >= 3.6
+Requires-Python: >=3.6
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: cryptography >=39.0
 Requires-Dist: typing-extensions >=4.0.0
 Provides-Extra: bcrypt
 Requires-Dist: bcrypt >=3.1.3 ; extra == 'bcrypt'
 Provides-Extra: fido2
 Requires-Dist: fido2 >=0.9.2 ; extra == 'fido2'
 Provides-Extra: gssapi
 Requires-Dist: gssapi >=1.2.0 ; extra == 'gssapi'
 Provides-Extra: libnacl
 Requires-Dist: libnacl >=1.4.2 ; extra == 'libnacl'
 Provides-Extra: pkcs11
 Requires-Dist: python-pkcs11 >=0.7.0 ; extra == 'pkcs11'
 Provides-Extra: pyopenssl
 Requires-Dist: pyOpenSSL >=23.0.0 ; extra == 'pyopenssl'
 Provides-Extra: pywin32
 Requires-Dist: pywin32 >=227 ; extra == 'pywin32'

 ...
  • License: Use the SPDX license identifier
  • Platform: Removed as it isn't really used for anything
  • Removed the static __author__, __author_email__ and __url__ from asyncssh/version.py. These attributes can be accessed with importlib.metadata.

@ronf
Copy link
Owner

ronf commented Nov 17, 2024

Thanks for this. I see a couple of issues, though:

  • I don't think relying on importlib metadata is a good idea here, as it looks like that didn't appear in the Python standard library until Python 3.8.

  • The __author__ variable is used by SFTP to fill in the vendor name for the vendor_id extension. So, that needs to be available programmatically similar to __version__. While there's no such requirement for __author_email__ right now, I'm thinking it would probably be best to leave version.py unchanged and continue to pull everything from there as well just to keep these values together.

@cdce8p
Copy link
Contributor Author

cdce8p commented Nov 17, 2024

I reverted the changes related to asyncssh/version.py. The new metadata diff:

 Metadata-Version: 2.1
 Name: asyncssh
 Version: 2.18.0
 Summary: AsyncSSH: Asynchronous SSHv2 client and server library
 Home-page: http://asyncssh.timeheart.net
 Author: Ron Frederick
 Author-email: [email protected]
-License: Eclipse Public License v2.0
+License: EPL-2.0 OR GPL-2.0-or-later
 Project-URL: Homepage, http://asyncssh.timeheart.net
 Project-URL: Documentation, https://asyncssh.readthedocs.io
 Project-URL: Source, https://github.com/ronf/asyncssh
 Project-URL: Tracker, https://github.com/ronf/asyncssh/issues
-Platform: Any
 Classifier: Development Status :: 5 - Production/Stable
 Classifier: Environment :: Console
 Classifier: Intended Audience :: Developers
 Classifier: License :: OSI Approved
 Classifier: Operating System :: MacOS :: MacOS X
 Classifier: Operating System :: POSIX
 Classifier: Programming Language :: Python :: 3.7
 Classifier: Programming Language :: Python :: 3.8
 Classifier: Programming Language :: Python :: 3.9
 Classifier: Programming Language :: Python :: 3.10
 Classifier: Programming Language :: Python :: 3.11
 Classifier: Programming Language :: Python :: 3.12
 Classifier: Topic :: Internet
 Classifier: Topic :: Security :: Cryptography
 Classifier: Topic :: Software Development :: Libraries :: Python Modules
 Classifier: Topic :: System :: Networking
-Requires-Python: >= 3.6
+Requires-Python: >=3.6
+Description-Content-Type: text/x-rst
 License-File: LICENSE
 Requires-Dist: cryptography >=39.0
 Requires-Dist: typing-extensions >=4.0.0
 Provides-Extra: bcrypt
 Requires-Dist: bcrypt >=3.1.3 ; extra == 'bcrypt'
 Provides-Extra: fido2
 Requires-Dist: fido2 >=0.9.2 ; extra == 'fido2'
 Provides-Extra: gssapi
 Requires-Dist: gssapi >=1.2.0 ; extra == 'gssapi'
 Provides-Extra: libnacl
 Requires-Dist: libnacl >=1.4.2 ; extra == 'libnacl'
 Provides-Extra: pkcs11
 Requires-Dist: python-pkcs11 >=0.7.0 ; extra == 'pkcs11'
 Provides-Extra: pyopenssl
 Requires-Dist: pyOpenSSL >=23.0.0 ; extra == 'pyopenssl'
 Provides-Extra: pywin32
 Requires-Dist: pywin32 >=227 ; extra == 'pywin32'

 ...

setup.py Show resolved Hide resolved
Copy link

codecov bot commented Nov 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.82%. Comparing base (fab96ac) to head (764eea1).
Report is 92 commits behind head on develop.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #715      +/-   ##
===========================================
- Coverage    99.85%   99.82%   -0.03%     
===========================================
  Files           95      101       +6     
  Lines        27784    29687    +1903     
  Branches      2908     3129     +221     
===========================================
+ Hits         27743    29636    +1893     
- Misses          38       45       +7     
- Partials         3        6       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ronf ronf merged commit 7235631 into ronf:develop Nov 28, 2024
15 of 16 checks passed
@ronf
Copy link
Owner

ronf commented Nov 28, 2024

This change is now in the "develop" branch, and will be included in the next release. Thanks very much for your work on this, Marc!

@cdce8p cdce8p deleted the project-metadata branch November 28, 2024 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants