-
Notifications
You must be signed in to change notification settings - Fork 556
Description
Synopsis
See the project planning page: https://github.com/yaml/pyyaml/projects/1
- Make release/4.2 with current master
- Make PR to revert Make pyyaml safe by default. #74 ( Reverting https://github.com/yaml/pyyaml/pull/74 #194 )
- PyYAML team fixes broken pyyaml-build system
- Builds wheels with libyaml-2.1 linked in
- Fix any other 4.2 blocker issues
- Merge in successor to (Make pyyaml safe by default. #74, Rework the safety related API code #189) IF it reaches approval consensus
- Release 4.2 to PyPI
- Continue to work on successor if not part of 4.2
- Bump version to 5.1 when merged
The PyYAML Release Situation
The most recent PyYAML, 3.12, was released Aug 2016. At that time, Kirill
turned over maintenance of PyYAML and LibYAML to @sigmavirus24 and @ingy .
Since then about 20 PRs have been applied to PyYAML and about 40 to LibYAML.
PyYAML has a release builder: https://github.com/yaml/pyyaml-build
It builds PyYAML wheels against specific versions combinations of
(Python, PyYAML, LibYAML).
This builder no longer works and it's complicated by the fact that the build
process for libyaml has been changed. The PyYAML team is working hard to fix it.
The 4.1 release attempt was rushed out because we knew that PyYAML 3.12 doesn't
work with Python 3.7 which went out this week. We had a fix for that in master,
and so we tried to get it out in time for 3.7.
We thought we had a Jenkins build system that would build the wheels as soon as
the sdist was uploaded. So we pushed the release only to find out minutes later
that this build system wasn't set up to build with libyaml. We were going to
have to use the pyyaml-build system.
After 48 hours of work on the windows/wheels system we decided to pull the plug
on 4.1. We didn't have wheels and we were getting reports of other things that
were wrong. We didn't have a sense that the build system was going to get fixed
soon, and we are all volunteers with limited time.
Soon after the release I learned about PR #74 and was completely surprised to
find that something this big went in without my seeing it. Looking back now I
remember that I had a lot going on in my life at that specific time.
#74 is a non backwards compatible change at the most basic level. It changes
how the dump and load functions behave.
The intent of the change is a good one:
- Currently PyYAML has the sugar-API: dump, load, safe_dump, safe_load
- PyYAML has had that API since version 3.1 (April 2006)
- load() is trivial to exploit on untrusted data
- Change load and dump to be aliases to safe_load and safe_dump
- Add alarming (danger_*) new functions for the old load and dump
But this change has contentions:
- It's non-back-compat and is going to affect a ton of existing code
- The name danger is misleading when used in completely safe ways
- In addition, danger_dump is not known to be exploitable in any way
- PyYAML has known about this and had a safe_ solution in place from the start
- People are just not feeling comfortable with the defaults
The change is important, worthy of a major release, but is not ready to
be part of PyYAML in its current form. A new PR, building from #74 and #189
should be worked on.
The Current Plan Forward
We need to get PyYAML released soon, if only for the Python 3.7 release. We
can't make any release at all until the build system works again. IOW, we
couldn't even re-release 3.12 right now.
The #74 API change is big and it is more important to get it right than to rush
it out. ie It load() may be a big can of gasoline, but nothing's on fire. ie
#74 doesn't "fix" anything. It just changes a default to something that's
always been safe and available.
There are 60 other changes that I'd like to tackle in the next release, while
at the same time taming a broken release process. My hope is that when we
figure this out, it will be easy to put out PyYAML releases on a regular basis.
We went from 3.12 to 4.x because this was a big release. It's big with or
without #74. I would like to see PyYAML 4.2 get out in the next few days.
If the successor to #74 / #189 is ready and approved by the time we are ready
to upload 4.2, it can go in.
If not, then I think it should be the focus of a 5.1 release. It's a big enough
change to trigger a major release. It should be in the first release of either
4.x or 5.x.