You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Mark Phippard <ma...@gmail.com> on 2022/04/02 13:39:54 UTC

One minor release hiccup

The releases are posted for signing. The process all went well except
for one part. When I ran the script to create the tag it fails with
this error:

INFO:root:Creating tag for 1.14.2
INFO:root:Bumping version numbers on the branch
Traceback (most recent call last):
File "/opt/trunk/tools/dist/release.py", line 1916, in <module>
main()
File "/opt/trunk/tools/dist/release.py", line 1912, in main
args.func(args)
File "/opt/trunk/tools/dist/release.py", line 1134, in
create_tag_and_bump_versions
bump_versions_on_branch(args)
File "/opt/trunk/tools/dist/release.py", line 1106, in bump_versions_on_branch
svn_version_h = file_object_for('subversion/include/svn_version.h')
File "/opt/trunk/tools/dist/release.py", line 1099, in file_object_for
fd = tempfile.NamedTemporaryFile(mode='w+', encoding='UTF-8')
TypeError: NamedTemporaryFile() got an unexpected keyword argument 'encoding'

I believe what has not happened is the updating of the 1.10.x and
1.14.x branches to prepare for the next release. I will try to look
through old commits to see what was supposed to happen and will do it
manually.

If someone can fix the problem for the future that would be great.
Kind of guessing it could be that the script has to run with Python 3
now or something?

I have maintained a full diary/transcript here including all logs from
the build and tests:

https://github.com/markphip/svnrm/tree/main/history

I figure this will help me or someone else in the future do a release

Mark

Re: One minor release hiccup

Posted by Mark Phippard <ma...@gmail.com>.
Also just note ...

I updated JIRA to add new releases but I need someone else to update
IRC as I do not use it.

Also, just a reminder .. I should have said this in the other emails.
The goal is to have all signing complete by next Sunday April 10 so we
can release on the April 12

Thanks

Mark


On Sat, Apr 2, 2022 at 9:39 AM Mark Phippard <ma...@gmail.com> wrote:
>
> The releases are posted for signing. The process all went well except
> for one part. When I ran the script to create the tag it fails with
> this error:
>
> INFO:root:Creating tag for 1.14.2
> INFO:root:Bumping version numbers on the branch
> Traceback (most recent call last):
> File "/opt/trunk/tools/dist/release.py", line 1916, in <module>
> main()
> File "/opt/trunk/tools/dist/release.py", line 1912, in main
> args.func(args)
> File "/opt/trunk/tools/dist/release.py", line 1134, in
> create_tag_and_bump_versions
> bump_versions_on_branch(args)
> File "/opt/trunk/tools/dist/release.py", line 1106, in bump_versions_on_branch
> svn_version_h = file_object_for('subversion/include/svn_version.h')
> File "/opt/trunk/tools/dist/release.py", line 1099, in file_object_for
> fd = tempfile.NamedTemporaryFile(mode='w+', encoding='UTF-8')
> TypeError: NamedTemporaryFile() got an unexpected keyword argument 'encoding'
>
> I believe what has not happened is the updating of the 1.10.x and
> 1.14.x branches to prepare for the next release. I will try to look
> through old commits to see what was supposed to happen and will do it
> manually.
>
> If someone can fix the problem for the future that would be great.
> Kind of guessing it could be that the script has to run with Python 3
> now or something?
>
> I have maintained a full diary/transcript here including all logs from
> the build and tests:
>
> https://github.com/markphip/svnrm/tree/main/history
>
> I figure this will help me or someone else in the future do a release
>
> Mark

Re: One minor release hiccup

Posted by Mark Phippard <ma...@gmail.com>.
On Sat, Apr 2, 2022 at 1:52 PM Yasuhito FUTATSUKI
<fu...@yf.bsdclub.org> wrote:
>
> On 2022/04/02 22:39, Mark Phippard wrote:
> > The releases are posted for signing. The process all went well except
> > for one part. When I ran the script to create the tag it fails with
> > this error:
> >
> > INFO:root:Creating tag for 1.14.2
> > INFO:root:Bumping version numbers on the branch
> > Traceback (most recent call last):
> > File "/opt/trunk/tools/dist/release.py", line 1916, in <module>
> > main()
> > File "/opt/trunk/tools/dist/release.py", line 1912, in main
> > args.func(args)
> > File "/opt/trunk/tools/dist/release.py", line 1134, in
> > create_tag_and_bump_versions
> > bump_versions_on_branch(args)
> > File "/opt/trunk/tools/dist/release.py", line 1106, in bump_versions_on_branch
> > svn_version_h = file_object_for('subversion/include/svn_version.h')
> > File "/opt/trunk/tools/dist/release.py", line 1099, in file_object_for
> > fd = tempfile.NamedTemporaryFile(mode='w+', encoding='UTF-8')
> > TypeError: NamedTemporaryFile() got an unexpected keyword argument 'encoding'
> >
> > I believe what has not happened is the updating of the 1.10.x and
> > 1.14.x branches to prepare for the next release. I will try to look
> > through old commits to see what was supposed to happen and will do it
> > manually.
> >
> > If someone can fix the problem for the future that would be great.
> > Kind of guessing it could be that the script has to run with Python 3
> > now or something?
>
> Yes, the function tempfile.NamedTemporaryFile() does not have keyword
> argument 'encoding' in Python 2.7, and has in Python 3.
> So tools/dist/release.py in trunk no longer supports Python 2 since r1877953.
>
> Here is a patch (not tested) to support Python 2.7, but I don't think
> it has worth.

I did this release using 2.7 because I assumed that I needed it for
1.10.8. Now that I have something that works I will probably move it
to Debian Bullseye when we get to the 1.15 release process.

I am not sure if we will need to make many more 1.10.x releases but if
we do then the patch might be worth applying.

I manually completed the step that was broken so I cannot try it now.

Thanks

Mark

Re: One minor release hiccup

Posted by Yasuhito FUTATSUKI <fu...@yf.bsdclub.org>.
On 2022/04/02 22:39, Mark Phippard wrote:
> The releases are posted for signing. The process all went well except
> for one part. When I ran the script to create the tag it fails with
> this error:
> 
> INFO:root:Creating tag for 1.14.2
> INFO:root:Bumping version numbers on the branch
> Traceback (most recent call last):
> File "/opt/trunk/tools/dist/release.py", line 1916, in <module>
> main()
> File "/opt/trunk/tools/dist/release.py", line 1912, in main
> args.func(args)
> File "/opt/trunk/tools/dist/release.py", line 1134, in
> create_tag_and_bump_versions
> bump_versions_on_branch(args)
> File "/opt/trunk/tools/dist/release.py", line 1106, in bump_versions_on_branch
> svn_version_h = file_object_for('subversion/include/svn_version.h')
> File "/opt/trunk/tools/dist/release.py", line 1099, in file_object_for
> fd = tempfile.NamedTemporaryFile(mode='w+', encoding='UTF-8')
> TypeError: NamedTemporaryFile() got an unexpected keyword argument 'encoding'
> 
> I believe what has not happened is the updating of the 1.10.x and
> 1.14.x branches to prepare for the next release. I will try to look
> through old commits to see what was supposed to happen and will do it
> manually.
> 
> If someone can fix the problem for the future that would be great.
> Kind of guessing it could be that the script has to run with Python 3
> now or something?

Yes, the function tempfile.NamedTemporaryFile() does not have keyword
argument 'encoding' in Python 2.7, and has in Python 3.  
So tools/dist/release.py in trunk no longer supports Python 2 since r1877953.

Here is a patch (not tested) to support Python 2.7, but I don't think
it has worth.
[[[
Index: tools/dist/release.py
===================================================================
--- tools/dist/release.py       (revision 1899209)
+++ tools/dist/release.py       (working copy)
@@ -35,6 +35,7 @@
 # but people.apache.org doesn't currently have them installed
 
 # Stuff we need
+from __future__ import print_function # Python 2.7 need it
 import os
 import re
 import sys
@@ -1096,7 +1097,12 @@
                                    universal_newlines=True).strip()
     HEAD = int(HEAD)
     def file_object_for(relpath):
-        fd = tempfile.NamedTemporaryFile(mode='w+', encoding='UTF-8')
+        if b'' == '':
+            # Python 2
+            fd = tempfile.NamedTemporaryFile(mode='w+')
+        else:
+            # Python 3
+            fd = tempfile.NamedTemporaryFile(mode='w+', encoding='UTF-8')
         url = branch_url + '/' + relpath
         fd.url = url
         subprocess.check_call(['svn', 'cat', '%s@%d' % (url, HEAD)],
]]]

Cheers,
-- 
Yasuhito FUTATSUKI <fu...@yf.bsclub.org>