西打酒是什么意思| nicu是什么意思| 女性下面长什么样| 失眠是什么原因引起的| 普拉提是什么意思| 动脉硬化吃什么药| 阴虚湿热吃什么中成药| 剥皮实草是什么意思| 拔完智齿能吃什么| 状元红又叫什么荔枝| 东盟为什么没有中国| 心率低有什么危害| 什么东西能美白| 谷丙转氨酶高是什么原因| 佛手瓜什么时候结果| 胃粘膜糜烂吃什么药| 人乳头瘤病毒是什么意思| 检查hpv挂什么科| 六味地黄丸有什么副作用吗| 肾衰竭是什么症状| 夫妻都是b型血孩子是什么血型| 水可以变成什么| 鸡蛋和面粉可以做什么好吃的| 知府相当于现在什么官| 六月不搬家是什么意思| 七月二十五是什么星座| 胃息肉有什么危害| 什么动物没有眼睛| 威化是什么意思| 长期是什么意思| 霜降是什么时候| 雌激素是什么东西| 贾宝玉大名叫什么| 为什么有些人怎么吃都不胖| 寝不言食不语什么意思| 身体年龄是什么意思| 大摇大摆是什么生肖| 收阴是什么意思| 猫有什么品种| 宫腔镜检查后需要注意什么| 叹服是什么意思| 四月23日是什么星座| 十二月六号是什么星座| 紫苏是什么| 藏红花是什么| 知柏地黄丸治疗什么病| 雨中即景什么意思| 肚子里有虫子会有什么症状| 摆子是什么意思| 春砂仁与什么煲汤最佳| 半什么半什么| adp是什么意思| 非营利性医院是什么意思| 同居是什么意思| 河北有什么特产| 9月6日什么星座| 男生属鸡和什么属相配| 肾虚吃什么好| 通草和什么炖最催奶了| 猪利是什么| 诺五行属什么| 裙子搭配什么鞋子| 法王是什么意思| 检查免疫力都需要化验什么项目| 三星堆是什么意思| crp医学上是什么意思| 720是什么意思| 复制是什么意思| 2024年属龙的是什么命| 借力是什么意思| 五月天主唱叫什么名字| 2023年是属什么生肖| 为什么不建议做冠脉cta检查| 四肢百骸是什么意思| 一直发低烧是什么原因| 人得了猫藓用什么药膏| 老妹是什么意思| 爱生闷气的人容易得什么病| 物以类聚什么意思| 莓茶是什么茶| d二聚体偏高说明什么| 生蚝和什么不能一起吃| 大便不规律是什么原因| 旦是什么意思| 农历十月初八是什么星座| 什么是取保候审| 鼻烟是什么东西| 什么是干细胞| 什么水果降火效果最好| 梦见大蛇是什么意思| 脾肺两虚吃什么中成药| 面色无华什么意思| 血卡是什么| 男性检查hpv挂什么科| 标间是什么意思| 胰头占位是什么病| 海参几头是什么意思| 魂穿是什么意思| 鼻尖发红是什么原因| 频繁做噩梦是什么原因| 什么意思啊| 氨纶丝是什么面料| 梦见狗追我是什么意思| 刘邦和刘秀是什么关系| 鲜黄花菜含有什么毒素| 麻头是什么| 三月二十二是什么星座| rh阴性血是什么血型| 虫合读什么| 胳膊肘发黑是什么原因| 间歇性是什么意思| 有过之而不及是什么意思| 3楼五行属什么| 杨梅用什么酒泡最好| 什么像| 开塞露擦脸有什么效果| 西字里面加一横是什么字| 肝介入治疗是什么意思| 保家仙都有什么仙| 肺结核是什么原因引起的| 什么品牌的| 妨父母痣是什么意思| nec投影仪是什么牌子| 7月5号是什么星座| 直白是什么意思| 天天喝奶茶有什么危害| 舒肝健胃丸治什么病| 股骨头坏死吃什么药| 中国地图像什么| 原生家庭是什么| 氪金是什么意思| 查血脂挂什么科| 今年气温为什么这么高| 南极和北极有什么区别| 脑瘫是什么症状| 小脚趾麻木是什么原因| 白龙马是什么生肖| 微创是什么| 什么是脱脂牛奶| 体重什么时候称最准确| 月经周期是什么意思| 左侧脖子疼是什么原因| 胆气虚吃什么中成药| 一岁宝宝口臭是什么原因引起的| 乌龟为什么喜欢叠罗汉| 99年属什么| 复仇者用什么武器| 狗狗胰腺炎吃什么药| 排卵期后面是什么期| 动物蛋白是什么| 什么人不适合吃胃复春| 宫缩什么感觉| 六味地黄丸起什么作用| 12月14日是什么星座| 江西庐山产什么茶| 生气对身体有什么危害| 情愫什么意思| 高明是什么意思| 牛肉馅配什么菜包饺子好吃| 调理是什么意思| 喝冰水牙疼是什么原因| 12月份是什么星座| 膳食纤维是什么| 湿毒是什么原因引起的| crispi是什么牌子| 内内是什么意思| 头晕视力模糊是什么原因| 谷丙转氨酶偏低是什么意思| 子宁不嗣音什么意思| 白鳍豚用什么呼吸| sunglasses是什么意思| 博士生导师是什么级别| 扇子骨是什么肉| 六六无穷是什么意思| 强磁对人体有什么危害| 动脉抽血为什么这么疼| 好巴适是什么意思| 受凉咳嗽吃什么药| 什么是学前教育| 头皮发痒是什么原因引起的| 1987属什么生肖| 广西属于什么气候| 血小板有什么作用| 香皂和肥皂有什么区别| 恐龙是什么时候灭绝| 牙周康又叫什么名字| 胃烧灼感是什么原因| 肩膀疼痛挂什么科| ad和d3有什么区别| 查电解质是查什么| 吴亦凡什么学历| 经常拉肚子什么原因| 飞机杯什么意思| 5月26号是什么日子| 淼是什么意思| 九月九日是什么日子| 参商是什么意思| 什么手表品牌最好| 拔罐对身体有什么好处| reads是什么意思| 耳垂后面疼是什么原因| 胆汁反流有什么症状| 胃肠功能紊乱是什么意思| 手肿是什么原因| 三观不正是什么意思| 尿液发绿是什么原因| 控制血糖吃什么食物| 64岁属什么生肖| 炎症有什么症状| 端的是什么意思| 人活着到底有什么意义| bp是什么意思| 镶是什么意思| 男性查hpv挂什么科| 为什么崴脚了休息一晚脚更疼| 配偶什么意思| db是什么| 觉是什么结构| 喉咙发炎用什么药| 海马萎缩是什么情况| 抗甲状腺球蛋白抗体高是什么意思| la是什么牌子| 1901年属什么生肖| 人怕出名猪怕壮是什么生肖| 在家里可以做什么赚钱| 宝宝拉肚子能吃什么| 卡蒂罗属于什么档次| 5羟色胺是什么| 两三分钟就射什么原因| 大满贯什么意思| 嫉妒是什么意思| 胎毛什么时候剃最好| 刷存在感是什么意思| 小腿酸软无力是什么原因| 榴莲壳有什么用处| 夜晚睡不着觉什么原因| 伏天从什么时候开始| 硝苯地平是什么药| ig是什么| 冰冻三尺非一日之寒是什么意思| 月经过后有褐色分泌物是什么原因| 牙龈上火吃什么药| 调理内分泌失调吃什么药效果好| 磨平了棱角是什么意思| 尿路感染吃什么药效果最好| o型rhd阳性是什么意思| 风寒吃什么药| 九月三号是什么日子| 小孩睡觉流口水是什么原因| 右半边头痛是什么原因| 天涯海角是什么生肖| 蟑螂为什么会飞| 女人蜕变是什么意思| 去年的树告诉我们什么| 吗丁啉是什么药| 血常规什么颜色的管子| cpc是什么意思| happy halloween是什么意思| 静脉曲张用什么药| esd手术是什么意思| 脚趾甲发白是什么原因| 嗓子咽口水疼吃什么药| 甲沟炎属于什么科| 西游记有什么故事| 百度
Skip to content

Redo vendoring based on pypi.org/project/vendoring/ #49752

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

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

gsnedders
Copy link
Member

@gsnedders gsnedders commented Dec 18, 2024

See individual commits here.

In short, this uses vendoring to re-do all of our Python vendoring, directly into third_party (crudely: pip install -t tools/third_party ...), and then moves to a generated requirements_vendor.txt which finds several recursive dependencies we'd missed and makes it obvious we can drop others.

The only version change here is we go from vendoring html5lib as of html5lib/html5lib-python@f4646e6 to the html5lib==1.1 release; the only change between that commit and the 1.1 release is going from __version__ = "1.2-dev" to __version__ = "1.1".

This is a huge negative line diff primarily because we're no longer vendoring all the documentations and unit tests and CI workflows and all from everything we vendor; instead we're just vendoring the actual distribution packages, with their licenses.

I'll argue this doesn't require an RFC because we're not actually vendoring anything new here — we're merely changing how we do our pre-existing vendoring, and this should have no impact on any downstream consumers. (This is pedantically untrue: we've changed how we define sys.path which might break if others aren't relying on tools.localpaths for this, and we've removed vendored packages we no longer use which others could rely on elsewhere.)

Why? Because having all the documentation and everything is just a nuisance, and having a huge number of items added to sys.path is painful (as it makes it long and hard to understand what's going on, and makes us more dissimilar to how these packages expect to be installed). Having this automated also makes it much easier to update our vendored packages, or add further new vendored packages in future (as #49598 does).

@Ms2ger
Copy link
Contributor

Ms2ger commented Dec 18, 2024

I might err towards an RFC for visibility. The change seems reasonable on the face of it; not going to review in detail obviously.

@gsnedders gsnedders force-pushed the vendored_third_party-no-update branch 2 times, most recently from b240115 to 6471996 Compare December 28, 2024 23:57
@wpt-pr-bot wpt-pr-bot added the wptrunner The automated test runner, commonly called through ./wpt run label Dec 29, 2024
@gsnedders gsnedders closed this Jan 7, 2025
@gsnedders gsnedders reopened this Jan 7, 2025
@gsnedders
Copy link
Member Author

It seems like Taskcluster is fundamentally unable to run this PR; it leaves comments such as 6471996#commitcomment-150981848:

Uh oh! Looks like an error!
HttpError: Invalid request.

Only 65535 characters are allowed; 6195666 were supplied.

@gsnedders
Copy link
Member Author

gsnedders commented Feb 5, 2025

Full runs as of 3791a6c:

@gsnedders
Copy link
Member Author

Full runs as of 3791a6c:

@jgraham These all look like pre-existing flakiness to me.

@gsnedders
Copy link
Member Author

With the RFC now merged, can we get this reviewed?

Copy link
Contributor

@jgraham jgraham left a comment

Choose a reason for hiding this comment

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

I think this is probably OK, but it's a bit harder to tell because there are multiple changes that all contain generated output. I understand the reason might be to associate each change in output with a specific change in the code, but when we add something in one commit and remove it in the next it gets a bit confusing. I think I'd prefer to see just the commits that make human-authored changes first, and then a single commit with all the tool-generated changes at the end.

# This file was autogenerated by uv via the following command:
# uv pip compile --universal --python-version 3.8 requirements_vendor.in -o requirements_vendor.txt

# This file was then modified to remove all markers, as we want to make
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not a big fan of this having undefined post-processing steps. Is it something you could write a short script for?

Copy link
Member Author

@gsnedders gsnedders Apr 7, 2025

Choose a reason for hiding this comment

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

Done! (And it's not undefined, it's defined in the comment there!)


[tool.vendoring.transformations]
drop = [
"*.dist-info",
Copy link
Contributor

Choose a reason for hiding this comment

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

Would not dropping these help with the pytest-asyncio situation?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll need to check, but I think this was mostly motivated by changes between pre-release and stable vendoring, and getting consistent output between the two.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, getting consistent output with/without pradyunsg/vendoring@861e561.

We could definitely keep all the metadata, if we want to, which does avoid the pytest-asyncio reference — though honestly explicitly including it probably isn't a bad idea, because it means we loudly and clearly fail if for some reason the plugin isn't present.

@gsnedders gsnedders force-pushed the vendored_third_party-no-update branch from 3791a6c to cf8ef15 Compare April 7, 2025 19:51
@gsnedders
Copy link
Member Author

gsnedders commented Apr 7, 2025

I think this is probably OK, but it's a bit harder to tell because there are multiple changes that all contain generated output. I understand the reason might be to associate each change in output with a specific change in the code, but when we add something in one commit and remove it in the next it gets a bit confusing. I think I'd prefer to see just the commits that make human-authored changes first, and then a single commit with all the tool-generated changes at the end.

I've split up the commits now; this does mean a6b4743 is a bogus commit that cannot pass CI, because it has updated all the paths for the vendored code being re-vendored, but doesn't actually have the re-vendoring. If we actually want to land it like this, I guess we need to make that commit be able to cope with either the old-style or new-style vendoring.

And despite the branch name, I've actually added a commit to update everything, which I think we may well want to land separately still.

@wpt-pr-bot wpt-pr-bot added the ci label Apr 7, 2025
@gsnedders
Copy link
Member Author

A bunch of the Azure Pipelines failures are #51884.

@gsnedders gsnedders force-pushed the vendored_third_party-no-update branch from cf8ef15 to 21c9a9e Compare April 10, 2025 00:24
gsnedders added 7 commits May 6, 2025 15:35
This allows us to move the third_party directory to being managed by
Python tooling.
This moves us to relying on the vendoring tool to do our vendoring,
rather than doing this on an ad-hoc basis. See: tools/pyproject.toml,
tools/requirements_vendor.txt, tools/third_party_patches.

This doesn't change what we have vendored, it merely moves it over to
the new vendoring mechanism.

Notably, this leaves us _without_ all the non-installed bits of these
various third-party libraries: we no longer have docs or tests or
GitHub Actions Workflows or anything else. This also means we only
need to have third_party on the sys.path, and nothing else.

This requires two changes to our actual code:

 * tools/wpt/android.py, because we've changed the path of tooltool
   (because that's how it is packaged), and

 * webdriver/tests/conftest.py, because we no longer have the
   *.egg-info (or *.dist-info) from pytest-asyncio, and thus must
   manually register the plugin entrypoint.

For anyone wishing to audit this commit, the following may be helpful:

    git diff --raw HEAD^- | cut -d' ' -f5- | sort
Per e08f471 it appears it was intended to vendor html5lib==1.1, but
instead the commit after 1.1 seems to have been vendored.

Rather than vendoring a random revision from git, downgrade to the
actual release, which is merely changes the version number.

The removal of html5lib/LICENSE.md here is purely because vendoring is
now looking purely at the wheel for the license, rather than the
entire repository, thus it no longer picks up the license in
benchmarks/data/wpt/LICENSE.md, as no part of that directory is in the
distribution package.
Then, using uv, we can build requirements_vendor.txt and remove
various unused dependencies. This isn't perfect, because we want to
vendor everything regardless of markers, and thus this still requires
manual fixup to remove all markers from the output.

This allows us to remove a number of packages (attrs, certifi,
importlib-metadata, more-itertools, pathlib2, and zipp), but does add
a few extra (colorama, which gives pytest better colourized output on
Windows; pyparsing, which packaging relies on to parse markers and
requirements; and tomli, which pytest relies on to parse *.toml files
on Python < 3.11).
@gsnedders gsnedders force-pushed the vendored_third_party-no-update branch from 21c9a9e to 1a13808 Compare May 6, 2025 23:14
@gsnedders
Copy link
Member Author

And despite the branch name, I've actually added a commit to update everything, which I think we may well want to land separately still.

And removed again, to be landed separately after this.

@gsnedders
Copy link
Member Author

From @jgraham, from Matrix:

I'm trying to run this through gecko CI, but it's broken the patch submission tooling, so…

So apparently this has changed the module search path in a way that breaks our build(!). So, I guess I have some work to do before we can consider landing this

I'm still working through this slowly; after fixing the above problem it turns out we were depending on being able to pip install stuff in third_party, which doesn't work now.

@gsnedders
Copy link
Member Author

If some of the breakage is things trying to use wptserve as a package, maybe it's worthwhile doing what my longer term plan has been for ages and do things like move h2 to wptserve._vendored.h2, and thus just make it part of the wptserve package, and not something that needs paths somehow magically set up.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants
欺世盗名是什么意思 扁桃体作用是什么 花是什么意思 六月初六是什么日子 玉皇大帝的老婆叫什么
秋葵与什么食物相克 巧妙是什么意思 早上起床胃疼是什么原因 夏枯草治什么病 男人左眼下有痣代表什么
纪委是干什么的 吃得苦中苦方为人上人是什么意思 28属什么的生肖 地格是什么意思 苹果什么时候出新手机
bcr是什么意思 王维是诗什么 保重适合对什么人说 熟练的反义词是什么 副县长是什么级别干部
白龙马叫什么名字hcv7jop7ns0r.cn 萘普生是什么药hcv8jop1ns4r.cn 总是放屁是什么原因引起的hcv9jop3ns8r.cn 脾肺两虚吃什么中成药hcv7jop4ns6r.cn 面首什么意思xianpinbao.com
回是什么生肖hcv9jop0ns1r.cn 一库一库雅蠛蝶是什么意思hcv7jop9ns8r.cn 原始心管搏动是什么意思hcv8jop5ns1r.cn vape是什么意思liaochangning.com 吃海参有什么功效hcv9jop4ns3r.cn
什么叫积阴德helloaicloud.com 调制乳粉是什么意思hcv8jop9ns4r.cn 狗鼻子为什么是湿的ff14chat.com 贫血吃什么药效果好xinjiangjialails.com 大男子主义是什么意思hcv8jop8ns6r.cn
层林尽染是什么季节hcv9jop0ns0r.cn 桔子什么时候成熟hcv8jop7ns8r.cn 什么是适度水解奶粉hcv9jop2ns5r.cn 排卵期过后是什么期hcv8jop8ns2r.cn 熬笔是什么意思hcv8jop8ns2r.cn
百度