Changeset - 3adaa1a90420
[Not reviewed]
stable
0 4 0
Mads Kiilerich (mads) - 5 months ago 2025-10-05 13:57:28
mads@kiilerich.com
setup: bump minimum Python version to 3.9

3.8 was EOL a year ago. Mercurial also only supports 3.9 and later.
4 files changed with 7 insertions and 11 deletions:
0 comments (0 inline, 0 general)
docs/contributing.rst
Show inline comments
 
@@ -273,25 +273,25 @@ ready.
 

	
 
.. _coding-guidelines:
 

	
 

	
 
Coding guidelines
 
-----------------
 

	
 
We don't have a formal coding/formatting standard. We are currently using a mix
 
of Mercurial's (https://www.mercurial-scm.org/wiki/CodingStyle), pep8, and
 
consistency with existing code. Run ``scripts/run-all-cleanup`` before
 
committing to ensure some basic code formatting consistency.
 

	
 
We support Python 3.6 and later.
 
We support Python 3.9 and later.
 

	
 
We try to support the most common modern web browsers. IE9 is still supported
 
to the extent it is feasible, IE8 is not.
 

	
 
We primarily support Linux and OS X on the server side but Windows should also work.
 

	
 
HTML templates should use 2 spaces for indentation ... but be pragmatic. We
 
should use templates cleverly and avoid duplication. We should use reasonable
 
semantic markup with element classes and IDs that can be used for styling and testing.
 
We should only use inline styles in places where it really is semantic (such as
 
``display: none``).
 

	
docs/overview.rst
Show inline comments
 
@@ -82,25 +82,25 @@ clone in ``kallithea``. Create a ``kalli
 
For simple setups, it is fine to just use something like a ``kallithea`` user
 
with home in ``/home/kallithea`` and place everything there.
 

	
 
For experiments, it might be convenient to run everything as yourself and work
 
inside a clone of Kallithea, with the ``.ini`` and SQLite database in the root
 
of the clone, and a virtualenv in ``venv``.
 

	
 

	
 
Python environment
 
------------------
 

	
 
**Kallithea** is written entirely in Python_ and requires Python version
 
3.6 or higher.
 
3.9 or higher.
 

	
 
Given a Python installation, there are different ways of providing the
 
environment for running Python applications. Each of them pretty much
 
corresponds to a ``site-packages`` directory somewhere where packages can be
 
installed.
 

	
 
Kallithea itself can be run from source or be installed, but even when running
 
from source, there are some dependencies that must be installed in the Python
 
environment used for running Kallithea.
 

	
 
- Packages *could* be installed in Python's ``site-packages`` directory ... but
 
  that would require running pip_ as root and it would be hard to uninstall or
kallithea/__init__.py
Show inline comments
 
@@ -24,26 +24,26 @@ Original author and date, and relevant c
 
:created_on: Apr 9, 2010
 
:author: marcink
 
:copyright: (c) 2013 RhodeCode GmbH, (C) 2014 Bradley M. Kuhn, and others.
 
:license: GPLv3, see LICENSE.md for more details.
 
"""
 

	
 
import platform
 
import sys
 

	
 
import celery
 

	
 

	
 
if sys.version_info < (3, 6):
 
    raise Exception('Kallithea requires python 3.6 or later')
 
if sys.version_info < (3, 9):
 
    raise Exception('Kallithea requires python 3.9 or later')
 

	
 
VERSION = (0, 7, 0)
 
BACKENDS = {
 
    'hg': 'Mercurial repository',
 
    'git': 'Git repository',
 
}
 

	
 
CELERY_APP = celery.Celery()  # needed at import time but is lazy and can be configured later
 

	
 
DEFAULT_USER_ID: int  # set by setup_configuration
 
CONFIG = {}  # set to tg.config when TG app is initialized and calls app_cfg
 

	
setup.py
Show inline comments
 
#!/usr/bin/env python3
 
# -*- coding: utf-8 -*-
 
import os
 
import platform
 
import re
 
import sys
 

	
 
import setuptools
 
# monkey patch setuptools to use distutils owner/group functionality
 
from setuptools.command import sdist
 

	
 

	
 
if sys.version_info < (3, 6):
 
    raise Exception('Kallithea requires Python 3.6 or later')
 
if sys.version_info < (3, 9):
 
    raise Exception('Kallithea requires Python 3.9 or later')
 

	
 

	
 
here = os.path.abspath(os.path.dirname(__file__))
 

	
 

	
 
def _get_meta_var(name, data, callback_handler=None):
 
    matches = re.compile(r'(?:%s)\s*=\s*(.*)' % name).search(data)
 
    if matches:
 
        s = eval(matches.groups()[0])
 
        if callable(callback_handler):
 
            return callback_handler(s)
 
        return s
 
@@ -66,40 +66,36 @@ requirements = [
 
    "mercurial >= 5.2, < 7.2",
 
    "decorator >= 4.2.1, < 5.3",
 
    "Paste >= 2.0.3, < 3.11",
 
    "bleach >= 3.2, < 5",  # TODO: Upgrade and fix TypeError: clean() got an unexpected keyword argument 'styles'
 
    "Click >= 7.0, < 8.4",
 
    "ipaddr >= 2.2.0, < 2.3",
 
    "paginate >= 0.5, < 0.6",
 
    "paginate_sqlalchemy >= 0.3.0, < 0.4",
 
    "bcrypt >= 3.1.0, < 5.1",
 
    "pip >= 20.0, < 24.1",
 
    "chardet >= 3",
 
]
 
if sys.version_info < (3, 8):
 
    requirements.append("importlib-metadata < 5")
 

	
 
dependency_links = [
 
]
 

	
 
classifiers = [
 
    'Development Status :: 4 - Beta',
 
    'Environment :: Web Environment',
 
    'Framework :: Pylons',
 
    'Intended Audience :: Developers',
 
    'License :: OSI Approved :: GNU General Public License (GPL)',
 
    'Operating System :: OS Independent',
 
    'Programming Language :: Python :: 3.6',
 
    'Programming Language :: Python :: 3.7',
 
    'Programming Language :: Python :: 3.8',
 
    'Programming Language :: Python :: 3.13',
 
    'Topic :: Software Development :: Version Control',
 
]
 

	
 

	
 
# additional files from project that goes somewhere in the filesystem
 
# relative to sys.prefix
 
data_files = []
 

	
 
description = ('Kallithea is a fast and powerful management tool '
 
               'for Mercurial and Git with a built in push/pull server, '
 
               'full text search and code-review.')
 

	
0 comments (0 inline, 0 general)