Skip to content
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

python3 version #9

Open
mirabilos opened this issue Apr 28, 2020 · 13 comments
Open

python3 version #9

mirabilos opened this issue Apr 28, 2020 · 13 comments

Comments

@mirabilos
Copy link

The next Debian will release without Python, only with py3k.

Freeze should be around beginning of January 2021, so we’ll need a stable release not requiring Python any more this year.

Cc: @gcsideal

@mirabilos
Copy link
Author

Erk… cvs2svn was just removed from Debian due to this.

@gcsideal
Copy link

gcsideal commented Jun 6, 2020

Erk… cvs2svn was just removed from Debian due to this.

Yup. This request is open for over a month and no reaction at all from the developer. I think if someone still use CVS then s/he committed to do that on the long run - others could migrate to Subversion / Git long ago. Meaning I've asked for its removal from the Debian archives.

@mirabilos
Copy link
Author

mirabilos commented Jun 6, 2020 via email

@mhagger
Copy link
Owner

mhagger commented Jun 12, 2020

I wouldn't say that the project has been abandoned but rather that not many people need it anymore and basically nobody has reported any bugs lately, or needed new features. To a good approximation, it's possible for software to be "done" and just keep serving its purpose without continuing churn…

…until something like the python2 → python3 transition comes along from the outside world and makes the software unrunnable. I have no idea how much work it would be to get cvs2svn working under python3. Maybe it's trivial? Maybe it's a big pain in the neck? I do not do much Python development these days so I'm not even up to date on what has changed since Python 3.3 or so.

Off the top of my head, the main issues that would be faced by a conversion to Python 3 would be

  • Unicode strings (as usual).
  • cvs2svn makes very heavy use of cPickle, including some obscure features. It's quite possible that that package has changed enough to cause problems.
  • cvs2svn doesn't systematically use new-style classes. On the other hand, I can't think offhand of reasons that it would care about the difference.

I don't expect to have time to work on this. If somebody wants to volunteer to do the conversion, I wouldn't object. The test suite is pretty good and covers at least some Unicode issues, so it might not be that risky.

It might be that users of the future need to run this in a python2 Docker container or something. I don't think that should be a problem from a security standpoint, given that it doesn't access the internet or anything (assuming that you're not trying to convert possibly-malicious CVS repositories).

@cacsar
Copy link

cacsar commented Jun 21, 2020

Running it in a docker container was what I was going to look at. There are old unmaintained projects floating around in things like sourceforge where someone trying to pick them up would need cvs2svn to turn them into svn or git.

@mirabilos
Copy link
Author

mirabilos commented Jun 21, 2020 via email

@futatuki
Copy link

* Unicode strings (as usual).

Subversion Python 3 bindings maps all char * types in C API to Python bytes objects, and rcsparse in ViewVC in master also parse CVS as bytes stream[1], so it seems it is not so large problem on conversion to Subversion repo. Though I'm not sure about hg, bzr, and git.

[1] viewvc/viewvc@eef060e#diff-0c54e198c9e0d028e25782dbe40c95e8,
viewvc/viewvc@36d4ccd#diff-0c54e198c9e0d028e25782dbe40c95e8

@mirabilos
Copy link
Author

mirabilos commented Jul 17, 2020 via email

@futatuki
Copy link

Subversion Python 3 bindings maps all char * types in C API to Python bytes objects, and rcsparse in ViewVC in master also parse CVS as bytes stream[1], so it seems it is not so large problem on conversion to Subversion repo.

I looked over again the code of rcsparse on ViewVC, it is incomplete how to handle non-ascii metadata, and the result of the metadata are held as str objects, decoded by 'ascii' codec with 'surrogateescape' error handler.

Anyways, I'll make a PR to update rcsparse, for those who want to work for Python 3 support of cvs2svn, although I myself don't not work for it, at least now.

@makefu
Copy link

makefu commented Dec 6, 2021

Hi all, NixOS is also on the verge of going py3-only and cvs2svn will be most likely deleted ( NixOS/nixpkgs#148779 ).
Anyways thanks for all your efforts!

@clach04
Copy link
Contributor

clach04 commented Jan 22, 2023

I briefly considered tackling Python 3 support but using crap was significantly less effort for a project conversion I did today. crap works remotely and does NOT need direct, filesystem access to a copy of the CVS repository.

Doc ref for anyone who finds this and is looking for alternatives.

cvs2svn can be used to convert to hg/mercurial (cvs2hg) and git (cvs2git), possible alternatives for those:

py3 support may still be useful for direct access use cases if anyone has the time/energy.

@mirabilos
Copy link
Author

mirabilos commented Jan 23, 2023 via email

@clach04
Copy link
Contributor

clach04 commented Jan 23, 2023

I got lucky today, the repo was tiny and only spaned a few years.

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

No branches or pull requests

7 participants