Mercurial python 3

26 views
Skip to first unread message

Шаманов Алексей

unread,
Apr 2, 2020, 1:29:05 PM4/2/20
to web2py-users
Hello, anybody tries web2py + mercurial versioning with python 3?
Mercurial 5.2+ support python 3 but in web2py i have a bunch of errors:

<class 'TypeError'> %b requires a bytes-like object, or an object that implements __bytes__, not 'str'

Версия

web2py™ Version 2.19.1-stable+timestamp.2020.03.21.21.49.28
Python Python 3.7.4: /usr/local/bin/uwsgi (prefix: /var/www/web)

Traceback

1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
Traceback (most recent call last):
File "/var/www/web/web2py/gluon/restricted.py", line 219, in restricted
exec(ccode, environment)
File "/var/www/web/web2py/applications/admin/controllers/mercurial.py", line 87, in <module>
File "/var/www/web/web2py/gluon/globals.py", line 422, in <lambda>
self._caller = lambda f: f()
File "/var/www/web/web2py/applications/admin/controllers/mercurial.py", line 45, in commit
repo = hg_repo(path)
File "/var/www/web/web2py/applications/admin/controllers/mercurial.py", line 30, in hg_repo
if not os.environ.get('HGUSER') and not uio.config("ui", "username"):
File "/var/www/web/lib/python3.7/site-packages/mercurial/ui.py", line 607, in config
section, name, default=default, untrusted=untrusted
File "/var/www/web/lib/python3.7/site-packages/mercurial/ui.py", line 626, in _config
msg %= (section, name)
TypeError: %b requires a bytes-like object, or an object that implements __bytes__, not 'str'

Dave S

unread,
Apr 2, 2020, 7:30:27 PM4/2/20
to web2py-users


On Thursday, April 2, 2020 at 10:29:05 AM UTC-7, Шаманов Алексей wrote:
Hello, anybody tries web2py + mercurial versioning with python 3?
Mercurial 5.2+ support python 3 but in web2py i have a bunch of errors:


The Web2py Mercurial interface is deprecated because it depended on un-official interfaces (the official interfaces are the command line tools and the command server).  I was interested in doing the changes to use the command server interface, but haven't done anything of value yet.  (I get along just fine using mercurial from the command line; the web2py module never handled branching anyway, and for some of my web2py experiments branching is a useful idea.)

I think the current web2py stance is "just use whatever you already use", and since the source archives moved from Google Code to Github, someone is probably giving Github a recommendation these days.  (From my experience, Github takes away some of the pain of using git.)

Dave
/dps
Reply all
Reply to author
Forward
0 new messages