repo groups API methods not documented
Mads Kiilerich
mads at kiilerich.com
Sun Sep 18 00:02:13 UTC 2022
The failure comes from
https://github.com/formencode/formencode/blob/1.3.1/setup.py#L14 . That
version check doesn't handle Python 3.10 correctly. One workaround is
thus to use Python 3.9 .
Kallithea support for 3.10 (such as using formencode 2.0) has landed in
the stable branch, but it hasn't been released, and it had not been
merged back to the default branch. I just fixed that.
I guess you were running at the head of the default branch. It should
thus work for you now with Python 3.10 after "hg pull" and "hg update".
(Also, I wonder why you use "python -m pip". The virtualenv should
contain a pip command when it is created.)
/Mads
On 9/18/22 00:12, Louis Bertrand wrote:
> Hi,
> The error shows up if I follow the getting_started instructions
> https://kallithea.readthedocs.io/en/default/contributing.html#getting-started
>
> The error occurs when trying to use pip to install FormEncode. See below.
>
> I'm running Python 3.10:
> >python --version
> Python 3.10.6
>
> I separately upgraded sphinx and that doesn't seem to be the problem.
> > sphinx-build --version
> sphinx-build 5.1.1
>
> Here are the steps, using Windows CMD.exe (_not_ running as Administrator):
> Create a venv in the kallithea folder
> > python -m venv venv
> Activate the venv
> > venv\Scripts\activate.bat
> Upgrade pip
> > python -m pip install -U pip
> Install (possibly upgrading) setuptools
> > pip install -U setuptools
>
> So far so good, then patch dev-requirements.txt
> - Sphinx >= 1.8.0, < 3.1
> + Sphinx >= 1.8.0, < 5.2
>
> Run the next installation:
> pip install --upgrade -e . -r dev_requirements.txt python-ldap python-pam
> That's when the error shows up, on FormEncode:
> ====
> Collecting FormEncode<1.4,>=1.3.1
> Using cached FormEncode-1.3.1.tar.gz (197 kB)
> Preparing metadata (setup.py) ... error
> error: subprocess-exited-with-error
>
> × python setup.py egg_info did not run successfully.
> │ exit code: 1
> ╰─> [6 lines of output]
> Traceback (most recent call last):
> File "<string>", line 2, in <module>
> File "<pip-setuptools-caller>", line 34, in <module>
> File "C:\Users\100159386\AppData\Local\Temp\pip-install-uxr2b6u8\formencode_bf6486894d3141398e0b66067c9a9a9a\setup.py", line 15, in <module>
> raise ImportError('Python version not supported')
> ImportError: Python version not supported
> [end of output]
>
> note: This error originates from a subprocess, and is likely not a problem with pip.
> error: metadata-generation-failed
>
> × Encountered error while generating package metadata.
> ╰─> See above for output.
>
> note: This is an issue with the package mentioned above, not pip.
> hint: See above for details.
> ====
>
> Hope this helps
> --Louis
>
>
> -----Original Message-----
> From: Mads Kiilerich <mads at kiilerich.com>
> Sent: September 17, 2022 2:52 PM
> To: Louis Bertrand <Louis.Bertrand at durhamcollege.ca>; Kallithea <kallithea-general at sfconservancy.org>
> Subject: Re: repo groups API methods not documented
>
> [EXTERNAL EMAIL - USE CAUTION]
>
> I found that the supported Sphinx version had broken jinja2 dependencies on pypi - fixed by
> https://kallithea-scm.org/repos/kallithea/changeset/33f1faa7fe044e6cea68bf4bf65f63e2a2dc15e9
> .
>
> With that, it works for me on linux in a venv per https://kallithea.readthedocs.io/en/default/contributing.html#getting-started
> . I change to docs/ and run "make html". On Windows it might be easier to run "sphinx-build -b html -d _build/doctrees . _build/html" directly.
>
> Exactly what error do you get, when doing what?
>
> /Mads
>
>
> On 9/17/22 18:52, Louis Bertrand wrote:
>> Hi,
>> I found the api.py and started tinkering with the doc file api.rst, but I can't build the HTML with Sphinx. When it imports kallithea as a module, I get an error "unsupported version". I'm using Python 3.10 on Windows. Should I create a venv with an earlier version of Python?
>> Thanks
>> --Louis
>>
>>
>> -----Original Message-----
>> From: Mads Kiilerich <mads at kiilerich.com>
>> Sent: September 17, 2022 8:55 AM
>> To: Louis Bertrand <Louis.Bertrand at durhamcollege.ca>; Kallithea
>> <kallithea-general at sfconservancy.org>
>> Subject: Re: repo groups API methods not documented
>>
>> [EXTERNAL EMAIL - USE CAUTION]
>>
>> Hi
>>
>> That is just the documentation that is incomplete (and perhaps slightly wrong).
>>
>> You can get an idea of the functionality by looking at the
>> implementation in
>> https://kallithea-scm.org/repos/kallithea/files/stable/kallithea/contr
>> ollers/api/api.py
>> .
>>
>> /Mads
>>
>>
>> On 9/17/22 10:11, Louis Bertrand wrote:
>>> Hello,
>>> I am trying to use the API to manage a number of repo groups but I don't see documentation on kallithea.readthedocs.io for methods like get_repo_groups, create_repo_group, and so on. They seem to work. Are they undocumented because not stable? Or is it just a to-do?
>>> My use case is managing a repo group for each student in a class such that they can all use a repo name like 'assignment1' without conflicts, and I can use the API to bulk clone repos to local for assessment. I need to bulk create those repo groups, and eventually delete them when the students graduate.
>>> Thanks
>>> --Louis
>>>
>>> --
>>> Louis Bertrand, P.Eng.
>>> Professor, Faculty of Science, Engineering and Information Technology
>>> Durham College
>>>
>>> ________________________________
>>>
>>> ________________________________
>>> This message is intended only for the named recipients. This message may contain information that is confidential or exempt from disclosure under applicable law. Any dissemination or copying of this message by anyone other than a named recipient is strictly prohibited. If you are not a named recipient or an employee or agent responsible for delivering this message to a named recipient, please notify us immediately, and permanently destroy this message and any copies you may have. Warning: Email may not be secure unless properly encrypted.
>>> _______________________________________________
>>> kallithea-general mailing list
>>> kallithea-general at sfconservancy.org
>>> https://lists.sfconservancy.org/mailman/listinfo/kallithea-general
More information about the kallithea-general
mailing list