GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-90656: Add platform triplets for 64-bit LoongArch (LA64) by loongson-zn · Pull Request #30939 · python/cpython

Conversation

@loongson-zn

@loongson-zn loongson-zn commented Jan 27, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Add new triplets for loongarch64, please review, thanks!
https://bugs.python.org/issue46498

https://bugs.python.org/issue46498

Signed-off-by: Zhang Na [email protected]
Reviewed-by: Wang Xuerui [email protected]
Reviewed-by: Wu Xiaotian [email protected]
Reviewed-by: Zhu Yaliang [email protected]

  • Issue: Add new triplets for 64-bit LoongArch #90656

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

arhadthedev and mara004 reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@the-knights-who-say-ni the-knights-who-say-ni added the CLA not signed label Jan 27, 2022
@the-knights-who-say-ni

the-knights-who-say-ni commented Jan 27, 2022

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept this contribution by verifying everyone involved has signed the PSF contributor agreement (CLA).

CLA Missing

Our records indicate the following people have not signed the CLA:

@loongson-zn

For legal reasons we need all the people listed to sign the CLA before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

If you have recently signed the CLA, please wait at least one business day
before our records are updated.

You can check yourself to see if the CLA has been received.

Thanks again for the contribution, we look forward to reviewing it!

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot bedevere-bot added the awaiting review label Jan 27, 2022
@the-knights-who-say-ni the-knights-who-say-ni added CLA signed and removed CLA not signed labels Feb 1, 2022
@loongson-zn loongson-zn mentioned this pull request Feb 9, 2022
bpo-46498: Add new triplets for loongarch64 loongarch64/cpython#2
Open
@bedevere-bot

bedevere-bot commented Apr 18, 2022

Copy link
Copy Markdown

Every change to Python requires a NEWS entry.

Please, add it using the blurb_it Web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-bot

bedevere-bot commented Jun 20, 2022

Copy link
Copy Markdown

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@loongson-zn

loongson-zn commented Jun 20, 2022

Copy link
Copy Markdown
Contributor Author

Okay, I'm working on it now.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@ezio-melotti ezio-melotti removed the CLA signed label Jul 13, 2022
xen0n
xen0n reviewed Nov 25, 2022
View reviewed changes

@xen0n xen0n left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rebase on top of main branch so that no merge commits remain in this PR.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread configure.ac Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread Misc/NEWS.d/next/Build/2022-06-20-15-15-11.gh-issue-90656.kFBbKe.rst Resolved

Uh oh!

There was an error while loading. Please reload this page.

@loongson-zn loongson-zn changed the title bpo-46498: Add new triplets for loongarch64 bpo-46498: Add platform triplets for LoongArch64 Mar 23, 2023
@loongson-zn
loongson-zn force-pushed the main branch from a61144d to f4edfe1 Compare March 23, 2023 12:25
@loongson-zn
loongson-zn requested review from corona10 and erlend-aasland as code owners March 23, 2023 12:25
@erlend-aasland erlend-aasland changed the title bpo-46498: Add platform triplets for LoongArch64 gh-90656: Add platform triplets for LoongArch64 Mar 23, 2023
@loongson-zn

loongson-zn commented Mar 28, 2023

Copy link
Copy Markdown
Contributor Author

LoongArch toolchain conventions -- official documentation instructions, please review, thanks! @corona10 @erlend-aasland

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@corona10 corona10 self-assigned this Mar 28, 2023
@corona10

corona10 commented Mar 28, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@loongson-zn I will take a look, but it may takes some times to review from the view of supporting this platform is proper.
Please keep patient

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@loongson-zn

loongson-zn commented Mar 28, 2023

Copy link
Copy Markdown
Contributor Author

@loongson-zn I will take a look, but it may takes some times to review from the view of supporting this platform is proper. Please keep patient

Thanks,this is debian documentation about LoongArch, we need cpython support LoongArch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland
erlend-aasland removed their request for review March 28, 2023 07:39
@youknowone youknowone mentioned this pull request Apr 23, 2023
Add loongarch64 support RustPython/RustPython#4914
Merged
@wegank wegank mentioned this pull request Apr 30, 2023
openblas: Enable loongarch64-linux NixOS/nixpkgs#229073
Merged
2 of 12 tasks
@loongson-zn

loongson-zn commented May 6, 2023

Copy link
Copy Markdown
Contributor Author

llvm 16.0.0 、kernel 5.19、gcc 13.1、binutils 2.40 、glibc 2.36 and many other projects already support LoongArch.
On the other hand, I find python in the Gentoo , . /python3.11-config --extension-suffix output is .cpython-311.so, but to maintain consistency with other architectures, the output should be .cpython-311-loongarch64-linux-gnu.so. So, I think this commit should be merged as soon as possible to avoid more new questions continue to arise.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@arhadthedev arhadthedev added the build The build process and cross-build label May 6, 2023
@loongson-zn
loongson-zn force-pushed the main branch from f4edfe1 to 4f8fe6d Compare May 6, 2023 08:05
@loongson-zn

loongson-zn commented May 6, 2023

Copy link
Copy Markdown
Contributor Author

rebase update

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

xen0n
xen0n reviewed May 6, 2023
View reviewed changes

@xen0n xen0n left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The commit message tags are malformed. Email addresses must be attached:

Co-authored-by: WANG Xuerui <[email protected]>
Signed-off-by: Zhang Na <[email protected]>

Also I don't know if CPython uses DCO tags (i.e. Signed-off-by) by convention. If it's not the case you may safely drop that line. I can confirm the other part (the bulk of #ifdef-ery) was suggested and written by me though.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

erlend-aasland reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@loongson-zn @xen0n
bpo-46498: Add Platform triplets for LoongArch64
1d2de47
Signed-off-by: Zhang Na <[email protected]>
Co-authored-by: WANG Xuerui <[email protected]>
@loongson-zn

loongson-zn commented May 6, 2023

Copy link
Copy Markdown
Contributor Author

Yeah, you are right. I will make corrections.

arhadthedev reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@xen0n

xen0n commented May 8, 2023

Copy link
Copy Markdown
Contributor

Aside from the Loongson teams, there is an active community around LoongArch (also Telegram user group) with multiple porters and power users willing to help. I'm heavily involved in and contributed to many upstream projects' LoongArch support, if it helps.

Yeah, I understand how you try to support the LoongArch for various projects. But maintaining from the CPython is a different story, so what I want to confirm about accepting the patch is that all you have to do is adding a triplet, or do you need more patches in the future that include modifying CPython code with preprocessor?

Thanks for clarifying. AFAICT, so far this is the only patch necessary for future binary compatibility between multiarch-aware and -unaware distributions (i.e. Debian & derivatives vs. the others). CPython itself builds and tests fine without this change; only the native extensions have different filename suffixes which is what this patch is trying to reconcile. Hence I don't think more #ifdef-ery should be necessary in the future.

Some more backgrounds though: LoongArch might need more treatment in the future if we'd want to provide perfect UX. There's two incompatible ABIs of LoongArch userland, so native libraries of different ABIs can't be interlinked without invoking UB, but Loongson wants the two ABIs (really two worlds) to share the same multiarch tuple. I expect some friction in the future if some user on one world uploads wheels to PyPI, only to be downloaded by someone on the other world, then failing at import time. It can be said to be a purely downstream problem though; most other upstream projects simply don't consider the "old world" / "ABI v1.0" to exist at all. And even if we do want to care, the changes here still apply: we've already undergone debates and this patch can be seen as the result. (This is kinda orthogonal to the issue at hand; I should probably post this elsewhere for further discussion.)

erlend-aasland and corona10 reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

loongson-zn added 2 commits May 8, 2023 20:53
@loongson-zn
Modify *.rst according to Erlend Aasland's suggestion
c29c949
@loongson-zn
Delete blank lines
5f8d6ca
@loongson-zn

loongson-zn commented May 9, 2023

Copy link
Copy Markdown
Contributor Author

@erlend-aasland cc @loongson-zn

But on the other hand, if this is the only patch that they will need, I am okay to accept the patch anyway.

@corona10 Currently, this is the only one patch. Because it affects binary compatibility, I believe it is necessary to merge as soon as possible.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@corona10

corona10 commented May 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@corona10 Currently, this is the only one patch. Because it affects binary compatibility, I believe it is necessary to merge as soon as possible.

Okay, let's pass the CI first, I am +1 with accepting this patch.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@loongson-zn

loongson-zn commented May 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

Okay, let's pass the CI first, I am +1 with accepting this patch.

@corona10 Thank you for your support. I am debugging errors in CI Docs. I have asked Erlend Aasland about the reason and wating for his reply. If you could tell me the reason, I would be very grateful

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@loongson-zn

loongson-zn commented May 9, 2023

Copy link
Copy Markdown
Contributor Author

This error disappeared after I executed it twice on my PC.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland
Copy NEWS entry to What's New; fix formatting
93d3d37
@erlend-aasland erlend-aasland linked an issue May 9, 2023 that may be closed by this pull request
Add new triplets for 64-bit LoongArch #90656
Closed
@erlend-aasland
Newline at end of NEWS item
ebc1669
erlend-aasland
erlend-aasland approved these changes May 9, 2023
View reviewed changes

@erlend-aasland erlend-aasland left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, Zhang & WÁNG! I'll wait for Dong-hee's approval before landing this.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting changes labels May 9, 2023
@erlend-aasland erlend-aasland changed the title gh-90656: Add platform triplets for LoongArch64 gh-90656: Add platform triplets for 64-bit LoongArch (LA64) May 9, 2023
@bedevere-bot bedevere-bot added awaiting review and removed awaiting merge labels May 9, 2023
corona10
corona10 approved these changes May 9, 2023
View reviewed changes

@corona10 corona10 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@bedevere-bot bedevere-bot added awaiting merge and removed awaiting review labels May 9, 2023
@erlend-aasland
erlend-aasland enabled auto-merge (squash) May 9, 2023 09:02
@erlend-aasland

erlend-aasland commented May 9, 2023

Copy link
Copy Markdown
Contributor

@xen0n, should we add your attributions to the NEWS and What's New entry also?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@erlend-aasland
erlend-aasland merged commit 03029ac into python:main May 9, 2023
@bedevere-bot bedevere-bot removed the awaiting merge label May 9, 2023
@xen0n

xen0n commented May 9, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

@xen0n, should we add your attributions to the NEWS and What's New entry also?

Either is OK, I'm unaffiliated with Loongson and in general just provides drive-by code reviews for everything LoongArch ;-)

In this case IMO let's see what @loongson-zn thinks though.

EDIT: Actually my involvement can be seen here -- while the change was substantive compared to the original (that was just a single __loongarch64 -> loongarch64-linux-gnu check), it's still kinda trivial given the patch's absolute size, so I'm not sure if I deserve the attribution ;-)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

carljm added a commit to carljm/cpython that referenced this pull request May 9, 2023
@carljm
Merge branch 'main' into inlinecomp2
95401fe
* main:
  pythongh-104276: Make `_struct.unpack_iterator` type use type flag instead of custom constructor (python#104277)
  pythongh-97696: Move around and update the whatsnew entry for asyncio eager task factory (python#104298)
  pythongh-103193: Fix refleaks in `test_inspect` and `test_typing` (python#104320)
  require-pr-label.yml: Add missing "permissions:" (python#104309)
  pythongh-90656: Add platform triplets for 64-bit LoongArch (LA64) (python#30939)
  pythongh-104180: Read SOCKS proxies from macOS System Configuration (python#104181)
carljm added a commit to carljm/cpython that referenced this pull request May 9, 2023
@carljm
Merge branch 'main' into fixsendfamily
a614216
* main: (29 commits)
  pythongh-104276: Make `_struct.unpack_iterator` type use type flag instead of custom constructor (python#104277)
  pythongh-97696: Move around and update the whatsnew entry for asyncio eager task factory (python#104298)
  pythongh-103193: Fix refleaks in `test_inspect` and `test_typing` (python#104320)
  require-pr-label.yml: Add missing "permissions:" (python#104309)
  pythongh-90656: Add platform triplets for 64-bit LoongArch (LA64) (python#30939)
  pythongh-104180: Read SOCKS proxies from macOS System Configuration (python#104181)
  pythongh-97696 Remove unnecessary check for eager_start kwarg (python#104188)
  pythonGH-104308: socket.getnameinfo should release the GIL (python#104307)
  pythongh-104310: Add importlib.util.allowing_all_extensions() (pythongh-104311)
  pythongh-99113: A Per-Interpreter GIL! (pythongh-104210)
  pythonGH-104284: Fix documentation gettext build (python#104296)
  pythongh-89550: Buffer GzipFile.write to reduce execution time by ~15% (python#101251)
  pythongh-104223: Fix issues with inheriting from buffer classes (python#104227)
  pythongh-99108: fix typo in Modules/Setup (python#104293)
  pythonGH-104145: Use fully-qualified cross reference types for the bisect module (python#104172)
  pythongh-103193: Improve `getattr_static` test coverage (python#104286)
  Trim trailing whitespace and test on CI (python#104275)
  pythongh-102500: Remove mention of bytes shorthand (python#104281)
  pythongh-97696: Improve and fix documentation for asyncio eager tasks (python#104256)
  pythongh-99108: Replace SHA3 implementation HACL* version (python#103597)
  ...
carljm added a commit to carljm/cpython that referenced this pull request May 9, 2023
@carljm
Merge branch 'main' into supermon
c48eee3
* main: (156 commits)
  pythongh-97696 Add documentation for get_coro() behavior with eager tasks (python#104304)
  pythongh-97933: (PEP 709) inline list/dict/set comprehensions (python#101441)
  pythongh-99889: Fix directory traversal security flaw in uu.decode() (python#104096)
  pythongh-104184: fix building --with-pydebug --enable-pystats (python#104217)
  pythongh-104139: Add itms-services to uses_netloc urllib.parse. (python#104312)
  pythongh-104240: return code unit metadata from codegen (python#104300)
  pythongh-104276: Make `_struct.unpack_iterator` type use type flag instead of custom constructor (python#104277)
  pythongh-97696: Move around and update the whatsnew entry for asyncio eager task factory (python#104298)
  pythongh-103193: Fix refleaks in `test_inspect` and `test_typing` (python#104320)
  require-pr-label.yml: Add missing "permissions:" (python#104309)
  pythongh-90656: Add platform triplets for 64-bit LoongArch (LA64) (python#30939)
  pythongh-104180: Read SOCKS proxies from macOS System Configuration (python#104181)
  pythongh-97696 Remove unnecessary check for eager_start kwarg (python#104188)
  pythonGH-104308: socket.getnameinfo should release the GIL (python#104307)
  pythongh-104310: Add importlib.util.allowing_all_extensions() (pythongh-104311)
  pythongh-99113: A Per-Interpreter GIL! (pythongh-104210)
  pythonGH-104284: Fix documentation gettext build (python#104296)
  pythongh-89550: Buffer GzipFile.write to reduce execution time by ~15% (python#101251)
  pythongh-104223: Fix issues with inheriting from buffer classes (python#104227)
  pythongh-99108: fix typo in Modules/Setup (python#104293)
  ...
carljm added a commit to carljm/cpython that referenced this pull request May 9, 2023
@carljm
Merge branch 'main' into fixloadsuperspec
cf11908
* main: (35 commits)
  pythongh-97696 Add documentation for get_coro() behavior with eager tasks (python#104304)
  pythongh-97933: (PEP 709) inline list/dict/set comprehensions (python#101441)
  pythongh-99889: Fix directory traversal security flaw in uu.decode() (python#104096)
  pythongh-104184: fix building --with-pydebug --enable-pystats (python#104217)
  pythongh-104139: Add itms-services to uses_netloc urllib.parse. (python#104312)
  pythongh-104240: return code unit metadata from codegen (python#104300)
  pythongh-104276: Make `_struct.unpack_iterator` type use type flag instead of custom constructor (python#104277)
  pythongh-97696: Move around and update the whatsnew entry for asyncio eager task factory (python#104298)
  pythongh-103193: Fix refleaks in `test_inspect` and `test_typing` (python#104320)
  require-pr-label.yml: Add missing "permissions:" (python#104309)
  pythongh-90656: Add platform triplets for 64-bit LoongArch (LA64) (python#30939)
  pythongh-104180: Read SOCKS proxies from macOS System Configuration (python#104181)
  pythongh-97696 Remove unnecessary check for eager_start kwarg (python#104188)
  pythonGH-104308: socket.getnameinfo should release the GIL (python#104307)
  pythongh-104310: Add importlib.util.allowing_all_extensions() (pythongh-104311)
  pythongh-99113: A Per-Interpreter GIL! (pythongh-104210)
  pythonGH-104284: Fix documentation gettext build (python#104296)
  pythongh-89550: Buffer GzipFile.write to reduce execution time by ~15% (python#101251)
  pythongh-104223: Fix issues with inheriting from buffer classes (python#104227)
  pythongh-99108: fix typo in Modules/Setup (python#104293)
  ...
@loongson-zn loongson-zn mentioned this pull request Jun 19, 2023
Add platform tag support for LoongArch pypa/packaging#693
Merged
@xen0n xen0n mentioned this pull request Aug 6, 2024
Potential issue regarding ABI identification for PyPI manylinux purposes loongson-community/discussions#63
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@corona10 corona10 corona10 approved these changes
@erlend-aasland erlend-aasland erlend-aasland approved these changes
+1 more reviewer
@xen0n xen0n xen0n left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@corona10 corona10

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Add new triplets for 64-bit LoongArch

Uh oh!

There was an error while loading. Please reload this page.

8 participants

@loongson-zn @the-knights-who-say-ni @bedevere-bot @corona10 @arhadthedev @erlend-aasland @xen0n @ezio-melotti
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.