Django 4.0 来了

原文: PyCoder's Weekly - Issue #492

pycoder

  • 210929 Zoom.Quiet(大妈) 用时 42 分钟 完成快译
  • 210929 Zoom.Quiet(大妈) 用时 37 分钟 完成格式转抄.

GIL stands for the Global Interpreter Lock, and its job is to make the CPython interpreter thread-safe. This post tells you more about non-obvious effects of the GIL. Along the way, you’ll see what the GIL really is, why it exists, how it works, and how it’s going to affect Python concurrency in the future.

(是也乎:

沈游侠也曰过类似的断言, 毕竟 Guido 老爹不傻...

)

Django templates use their own mini-language that’s inspired by Python. This tutorial covers Django template tags and filters, explaining how to compile and use templates. It covers conditional blocks, looping, and inheritance in tags as well as filters for strings and filters for lists.

(是也乎:

DTL

)

Django 4.0 had its first alpha release last week and the final release should be out in December. It contains an abundance of new features, which you can check out in the release notes. This post looks at the changes to testing in a bit more depth.

(是也乎:

就象 Py3 ?

)

“Although it’s well known PyPI is unforgiving for good reasons, the package publishing process is not as straightforward as the tutorials make it seem. I run into a few unexpected minor bumps none of the guides mention.”

(是也乎:

PyPI 公开的机密

)

See the full changelog here.

(是也乎:

竟然出 1.0 了... 好象永远不发布1.0 的才是最Nb 的?

)


探讨/吐糟

Discussions

(是也乎:

所以, 第一是谁?

)

(是也乎:

淦...

)


文章/教程/嗯哼

Articles, Tutorials and Talks

“Normally, when starting a Java project (or any other programming project, really), you don’t want to reinvent the wheel. You go with the de-facto build system, folder structure, environment, etc. The ones that the rest of the world is using. Yet, both Skija and JWM are built using Python scripts instead of more traditional Ant/Maven/Gradle/SBT. Why? Let’s find out!”

(是也乎:

大型 JAVA 项目为毛用 Python 来管理构建?

)

Where are you along the path of learning Python? Do you feel like you’re making progress? What are ways you can put the learning path into a more precise focus? This week on the show, a discussion with Martin Breuss about his recent article “How Long Does It Take to Learn Python?”

(是也乎: Measuring

衡量是最困难也最值得的学习行为

)

In this course, you’ll learn to program rock paper scissors in Python from scratch. You’ll learn how to take in user input, make the computer choose a random action, determine a winner, and split your code into functions.

(是也乎:

Rock

)

In this step-by-step tutorial, you’ll learn how to reverse strings in Python by using available tools such as reversed() and slicing operations. You’ll also learn about a few useful ways to build reversed strings by hand.

(是也乎:

Reverse

其实, 这种翻转

)

Maybe your Django app needs to handle files from users like profile pictures. Accepting files from others is tricky to do safely. In this article, you’ll see the tools that the framework provides to manage files safely.

Django REST Framework (DRF) has its own flavor of views that inherit from Django’s View class. This article explores the most basic of the views: APIView. APIView is the base for every other DRF view.

(是也乎:

随着业务拓展, 各种元需求才能正确识别并实现.

)

Why Black recommends adopting it by reformatting your entire codebase in one go and refuses to do “region reformatting.” Thoughts from the creator for the popular Python auto-formatter.

(是也乎:

因为 => 从不妥协

)

Split, merge and rotate PDF documents using borb, the open-source pure Python PDF library.

(是也乎:

嗯哼? 发票构建库, 当然也可以干其它的事儿../.

)

How to add gradual typing to your Django app, focusing on Django views and Django models.


好物/妙品/...

Interesting Projects, Tools and Libraries, Projects & Code

(是也乎:

MPLG 无代码 思想产物... 不过, 资深用户一定还是不得不回到代码中来吧...

)

(是也乎:

对 NPM 的致敬?

)

(是也乎:

不是, 为什么突然怼上 Histogram 了呢?

)


📆🐍 活动/大会

Events, MeetUp 真的是全球线下活动组织中心

(是也乎:

PyConTW

)


DAMA

❤️ Happy Pythonic ;-(大妈私人无责任播报)

(是也乎:

独创 logging + debug 模块

)

(是也乎:

老司机开新坑, 时隔10年, 沈游侠再次开声, 值得关注:

Bilibili

)


PS:

PPS:

不觉中蟒周刊快译已经到了第9个年头

去年开始有小伙伴加入承担 pythonisa 周刊的翻译, 从来没提醒过, 可就这么默默坚持下来了...

问为什么:

[皱眉]每周新闻资讯 怎么能错过 
看看有什么新东西 
当有新的发现时:
    what f**k 还能这样玩? 还有这东西?
    每周开彩蛋[吃瓜]

无法同意更多... 很多社区贡献看起来辛苦, 其实受益最多的, 就是主动承担者也.


好文笔,感叹号年度配额: 2/3

投稿/反馈邮箱:

askdama@googlegroups.com

(邮件列表地址, 当成正常邮件发送邮件就好, 不用注册, 不用翻越...)


ZoomQuiet/大妈

就是四处 是也乎,( ̄▽ ̄) 的那个大妈:

私自嗯哼: ZoomQuiet (订阅号: ZoomQuiet42)
公开课程: 蟒营 (订阅号: Mainium)
历史吐糟: Chaos42 (订阅号 PythoniCamp)

as 创始组织者:
    PyChina (订阅号: PyChinaOrg)
    本地社区: 
        GDG珠海 (订阅号: GDG-ZhuHai)
        TFUG珠海 (订阅号: ZH_TFUG)


Comments



自怼圈/年度番新

DU21.7
关于 ~ DebugUself with DAMA ;-)

关注公众号, 持续获得相关各种嗯哼:
zoomquiet

追问

任何问题, 随时邮件提问可也:
askdama@googlegroups.com


蟒营®编程思维提高班Python版

**2021.01.11** 因大妈再次创业暂停定期开设, 转换为预约触发:
  • + 扫描预约入群, 学员每满 42 人即启动新一期训练营 ;-)
  • 101camp21.7
  • + 任何问题, 随时邮件提问可也:
    askdama@googlegroups.com