Re: dash/underscore on name of package uploaded on pypi
On Friday, March 1, 2019 at 12:08:00 AM UTC+3, Terry Reedy wrote: > On 2/28/2019 11:09 AM, ast wrote: > > Hello > > > > I just uploaded a package on pypi, whose name is "arith_lib" > > > > The strange thing is that on pypi the package is renamed "arith-lib" > > The underscore is substitued with a dash > > > > If we search for this package: > > > > pip search arith > > > > arith-lib (2.0.0) - A set of functions for miscellaneous arithmetic > > (so a dash) > > > > For installation both: > > > > pip install -U arith_lib > > pip install -U arith-lib > > > > are working well > > > > and in both case I got a directory with an underscore > > > > C:\Program Files\Python36-32\Lib\site-packages > > > > 28/02/2019 16:57 arith_lib > > 28/02/2019 16:57 arith_lib-2.0.0.dist-info > > > > What happens ? > To expand on Paul's answer. > > English uses '-' both as a connector for compound names and as a > subtraction operator. Context usually makes the choice obvious. But > context-free parsers must choose just one, and for computation, > subtraction wins. 'arith-lib' is parsed as (arith) - (lib). Many > algorithm languages use '_' instead of '-' as the compounder for > identifiers (object names). > > In addition, Python uses filenames -(minus) '.py' as identifiers for > imported modules. So if the repository allows '-' in package names, > installers must convert '-' to '_'. But if the repository allows > 'arith_lib' and 'arith-lib' to be distinct names for different packages, > both would be installed with the same file name. So the repository > standardizes on one form, and it went with English instead of Pythonese. > > -- > Terry Jan Reedy Hi, Recently I wrote the article about packages vs distributions and also explored naming and normalization: https://labdmitriy.github.io/blog/distributions-vs-packages/#additional-experiments In the section “Additional experiments” I got the expected normalization results, but in “Open questions” I found that for another package URL is not normalized and original URL is used, and name is partially normalized (underscore is replaced by hyphen but dot remains unchanged). Could you please explain this behavior? Thank you. -- https://mail.python.org/mailman/listinfo/python-list
[Python-announce] [RELEASE] Expedited release of Python3.11.0b3!!
Hi everyone, Due to a known incompatibility with pytest and the previous beta release (Python 3.11.0b2) and after some deliberation, me and the rest of the release team have decided to do an expedited release of Python 3.11.0b3 so the community can continue testing their packages with pytest and therefore testing the betas as expected. # Where can I get the new release? https://www.python.org/downloads/release/python-3110b3/ # What happened? Pytest by default rewrites the AST nodes in the testing code to provide better diagnostics when something fails in the test. For doing this, it creates new AST nodes that are then compiled. In Python 3.11, after some changes in the compiler and AST nodes, these new AST nodes that pytest was creating were invalid. This causes CPython to crash in debug mode because we have several assert statements in the compiler, but in release mode this doesn't cause always a crash, but it creates potential corrupted structures in the compiler silently. In 3.11.0b3 we changed the compiler to reject invalid AST nodes, so what was a silent problem and a crash in debug mode turned into an exception being raised. We had a fix to allow the nodes that pytest is creating to work to preserve backwards compatibility but unfortunately, it didn't make it into 3.11.0b2. Is still possible to use pytest with 3.11.0b2 if you add "--assert=plain" to the pytest invocation but given how many users would have to modify their test suite invocation we decided to proceed with a new release that has the fix. # What happens with future beta releases Python 3.11.0b3 should be considered as an extra beta release. Instead of four beta releases, we will have five and the next beta release (3.11.0b4) will happen as scheduled on Thursday, 2022-06-16. # We hope you enjoy the new releases! Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation. https://www.python.org/psf/ If you have any questions, please reach out to me or another member of the release team :) Your friendly release team, Ned Deily @nad https://discuss.python.org/u/nad Steve Dower @steve.dower https://discuss.python.org/u/steve.dower Pablo Galindo Salgado @pablogsal https://discuss.python.org/u/pablogsal ___ Python-announce-list mailing list -- python-announce-list@python.org To unsubscribe send an email to python-announce-list-le...@python.org https://mail.python.org/mailman3/lists/python-announce-list.python.org/ Member address: arch...@mail-archive.com
[RELEASE] Expedited release of Python3.11.0b3!!
Hi everyone, Due to a known incompatibility with pytest and the previous beta release (Python 3.11.0b2) and after some deliberation, me and the rest of the release team have decided to do an expedited release of Python 3.11.0b3 so the community can continue testing their packages with pytest and therefore testing the betas as expected. # Where can I get the new release? https://www.python.org/downloads/release/python-3110b3/ # What happened? Pytest by default rewrites the AST nodes in the testing code to provide better diagnostics when something fails in the test. For doing this, it creates new AST nodes that are then compiled. In Python 3.11, after some changes in the compiler and AST nodes, these new AST nodes that pytest was creating were invalid. This causes CPython to crash in debug mode because we have several assert statements in the compiler, but in release mode this doesn't cause always a crash, but it creates potential corrupted structures in the compiler silently. In 3.11.0b3 we changed the compiler to reject invalid AST nodes, so what was a silent problem and a crash in debug mode turned into an exception being raised. We had a fix to allow the nodes that pytest is creating to work to preserve backwards compatibility but unfortunately, it didn't make it into 3.11.0b2. Is still possible to use pytest with 3.11.0b2 if you add "--assert=plain" to the pytest invocation but given how many users would have to modify their test suite invocation we decided to proceed with a new release that has the fix. # What happens with future beta releases Python 3.11.0b3 should be considered as an extra beta release. Instead of four beta releases, we will have five and the next beta release (3.11.0b4) will happen as scheduled on Thursday, 2022-06-16. # We hope you enjoy the new releases! Thanks to all of the many volunteers who help make Python Development and these releases possible! Please consider supporting our efforts by volunteering yourself or through organization contributions to the Python Software Foundation. https://www.python.org/psf/ If you have any questions, please reach out to me or another member of the release team :) Your friendly release team, Ned Deily @nad https://discuss.python.org/u/nad Steve Dower @steve.dower https://discuss.python.org/u/steve.dower Pablo Galindo Salgado @pablogsal https://discuss.python.org/u/pablogsal -- https://mail.python.org/mailman/listinfo/python-list