-
-
Notifications
You must be signed in to change notification settings - Fork 459
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
Django Google Summer of Code #1337
Comments
Just wanted to point out some examples I've seen in the wild where there's been work in (quite large) codebases to contribute type hints "afterwards":
(Edit: By just browsing the above links, one can find links to other projects attempting the same approach) It just so happens that it's the same person taking charge (Kludex). Thinking if one wants some reference of how it can be done, or just take inspiration from 1 approach of how to do it. And also where it's been successful, at least for one project. There's also an example of tooling that has been used here trying to auto populate missing annotations: #909. Think I've seen scripts like that in other projects too, but can't recall where. |
I am not able to participate in GSoC anymore, I have the wrong nationality for them :( |
Are you suggesting that the type hints from django-stubs should be pushed upstream to Django proper? Last time this was discussed on Django mailing lists, their stance was that the typing ecosystem in Python is still too immature and they don't want upstream hints. Without a change in that policy, this project would be dead in the water. However, there are a few "pie in the sky" projects that would be very helpful for django-stubs
EDIT: I decided not to apply for these, I don't have enough understanding of either to be a competent mentor. |
There's talk of an exploratory proof of concept for doing this in core Django as part of GSoC 2023... |
I'm looking for input on what would be feasible there. What is the state of play in 2023 (recalling that anything we add now will need to be ≈stable for 5 versions of Python before it EOLs with the then-old-LTS). There's still lots of churn, but what's stable? What can we do with Protocols and such? Would adding (even a beginning) of a Typing in Python is evolving, and becoming more popular… can we begin? (Maybe the answer is still No — but perhaps we can get closer to what a Yes would need to look like…) As the idea says "exploratory" — but I don't think we need to just say No forever because that was the answer three versions of Python ago.
Both those folks are current Steering Council members — so it's not in any way the case that nothing would be considered here. But what? I hope that makes sense. All input welcomed! |
💯 great idea.
Probably a bit of a brain twister but would be nice to see. I think it would also make it a bit easier to separate out what needs discovering and open the door for other type checkers.
My feeling now is that we could start by typing Django internally, running a fairly lax Mypy setup. We could target certain areas at a time, like some ORM internals as suggested by Simon. But Django wouldn't contain a For users, django-stubs could remain the solution. For contributors, we'd gradually add types to one area at a time. Eventually they meet in the middle? |
Not sure if helps on something, but I've created this small script to create that table on the issues: https://github.com/Kludex/annotation-plan 😅 |
Hey everyone! So I was looking for a new issue to work upon when I stumbled across this discussion. I don't know if this is the right place for me to talk, but being a GSOC2023 aspirant I couldn't resist myself. I was a django enthusiast during my early development days, but it was during my scavageing period for GSOC that I discovered django-stubs and python type checking. I found the whole idea of type-checking interesting. I am now trying to learn more about it and contribute to this project. I did some research on the idea of integrating mypy primer into the CI and really liked it. I wanted to work on that but as @intgr said in #1362, there are no current plans for this, I started looking for something else. But seeing the idea recognised as a potential GSOC idea in this discussion I couldn't resist myself from speaking out here.I would like to work on this and wanted to ask if I could include this in my proposal alongside the current mentioned idea ( Strict-mode support for django-stubs ). I apologise if this thread wasn't made for participant discussions. |
@RyanWalker277 awesome that you are interested in helping us! 🎉 I think we can have the informal chat here, but the final application needs to go through Google's official channel. I think that So, I think that strict mode is a better project :) |
Sorry, I forgot to post an update here. Yeah, I considered submitting django-stubs mypy_primer integration for GSoC, but I decided not to. I myself have no experience with it and I would have to learn it from scratch to be a good mentor. Same with the hygienic plugin redesign. Unless @hauntsaninja is interested to apply as a mentor for that project. |
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
For clarity, I have separated this hygienic plugin discussion to another issue: |
Thanks for your response! I appreciate the insights on the technical challenges of integrating I'll focus on the strict-mode support for django-stubs project for my GSOC2023 proposal. However, I'm still very interested in learning more about the technical details of If you have any resources or suggestions on where I can start, I'd love to hear them! Thanks again for your help and guidance. |
@RyanWalker277 you are welcome! Feel free to ask me any questions about both projects. I have some experience with using and integrating |
Hey @sobolevn @intgr ! I've completed my proposal and it's ready for review. I have taken up the strict mode idea as a base goal and added the https://docs.google.com/document/d/14wvLqdHXz117H3_mUvZ_rI4efoaWulLO1X79QxZD6ek/edit?usp=sharing |
@RyanWalker277 nice! Since you don't have comments enabled, I will share my suggestions here if you don't mind:
This is not quite true, because
In your solution you are just adding Other than that - it is a great proposal! Looking forward to working together :) Thanks to @carltongibson and @adamchainz for making this project possible. 🤝 |
Really sorry for the inconvinience, I wasn't aware that comments aren't enabled by default 🥲
Thanks for pointing it out. I have changed it accordingly, I think it would be fine now.
Thanks for your feedback! Just wanted to clarify that the example I used was only for illustration purposes but it might have given a wrong idea about the approach. I truly appreciate your advice, and I've added a subgoal to "Introduce the correct type arguments in different parts of the code" to make the approach more clear. Also, I have enabled commenting so that you can give me feedback more easily, and I would be happy to work on it. Thanks again for your guidance!😊 |
Hey! So, now that the proposal submission window for GSOC'23 is closed, I just wanted to say thanks to @sobolevn and @intgr for being awesome supporters throughout my time contributing to Django-Stubs. Seriously, you guys rock! Whether or not I get selected for the program, I'm just grateful for everything I've learned from you both. Your guidance and encouragement have been invaluable to me. I'm definitely going to keep contributing to this project and try to make it even better. So, thanks again for being amazing mentors and helping me grow in so many ways! |
I really hope to work together on the next things :) |
So, I didn't make the cut for GSOC this year. It stings a little, but I'm still grateful for all the support and help that @sobolevn and @intgr gave me throughout the whole application process. Those guys are rockstars! I'm not gonna let this setback stop me from contributing to this project. I'm gonna push myself even harder and will try to get involved in contributing to core Django. Thanks again for having my back, guys. Let's keep crushing it together! Cheers! 🍻 |
slightly off topic: I am considering celery stub instead of annotating the existing codes |
Thanks for submitting @RyanWalker277 . Ultimately we had too many submissions and too few mentors, so we had to pick. Any ongoing contributions are welcome. |
Just a heads-up to other maintainers like @sobolevn and @intgr : django-stubs, and type hints in general, are again on the list of possible GSoC projects for Django this year.
Carlton summarized the current status on this post, with a link to the wiki page with draft project descriptions: https://groups.google.com/g/django-developers/c/0lelyphIw8k/m/Hz2b6OD_BwAJ
Doesn't mean any students will apply or be accepted to work on this, but if they do, it would be good to have some mentors!
The text was updated successfully, but these errors were encountered: