Projet

Général

Profil

Development #67950

Publik - Project management #64274: montée de version django (→ 3.2 LTS)

fonctionner avec django 3.2

Ajouté par A. Berriot il y a plus d'un an. Mis à jour il y a environ un an.

Statut:
Fermé
Priorité:
Normal
Assigné à:
Version cible:
-
Début:
04 août 2022
Echéance:
% réalisé:

0%

Temps estimé:
Patch proposed:
Oui
Planning:
Non
Tags:


Fichiers


Demandes liées

Bloqué par Hobo - Development #67760: fonctionner avec django 3.2Fermé28 juillet 2022

Actions
Bloqué par BiJoe - Development #68312: Tests qui crashent en local en cherchant une base au nom de l'utilisateur linuxFermé22 août 2022

Actions

Révisions associées

Révision e3847091 (diff)
Ajouté par A. Berriot il y a environ un an

dj32: enable django 3.2 testing in tox file (#67950)

Révision a4277409 (diff)
Ajouté par Benjamin Dauvergne il y a environ un an

dj32: adapt dependencies on Django-Select2 (#67950)

Révision 17c566ed (diff)
Ajouté par Benjamin Dauvergne il y a environ un an

dj32: rename staticfiles templatetags lib to static (#67950)

Historique

#1

Mis à jour par A. Berriot il y a plus d'un an

  • Tags mis à django32
  • Assigné à A. Berriot supprimé

Impossible de lancer les tests en local (ni sur django 2, ni sur django 3):

    @pytest.fixture(scope='module')
    def schema1_db():
>       with load_schema_db('schema1') as d:

tests/conftest.py:126: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
/usr/lib/python3.10/contextlib.py:135: in __enter__
    return next(self.gen)
tests/conftest.py:117: in load_schema_db
    with closing(psycopg2.connect('')) as conn:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

dsn = '', connection_factory = None, cursor_factory = None, kwargs = {}, kwasync = {}

    def connect(dsn=None, connection_factory=None, cursor_factory=None, **kwargs):
        """ 
        Create a new database connection.

        The connection parameters can be specified as a string:

            conn = psycopg2.connect("dbname=test user=postgres password=secret")

        or using a set of keyword arguments:

            conn = psycopg2.connect(database="test", user="postgres", password="secret")

        Or as a mix of both. The basic connection parameters are:

        - *dbname*: the database name
        - *database*: the database name (only as keyword argument)
        - *user*: user name used to authenticate
        - *password*: password used to authenticate
        - *host*: database host address (defaults to UNIX socket if not provided)
        - *port*: connection port number (defaults to 5432 if not provided)

        Using the *connection_factory* parameter a different class or connections
        factory can be specified. It should be a callable object taking a dsn
        argument.

        Using the *cursor_factory* parameter, a new default cursor factory will be
        used by cursor().

        Using *async*=True an asynchronous connection will be created. *async_* is
        a valid alias (for Python versions where ``async`` is a keyword).

        Any other keyword parameter will be passed to the underlying client
        library: the list of supported parameters depends on the library version.

        """ 
        kwasync = {}
        if 'async' in kwargs:
            kwasync['async'] = kwargs.pop('async')
        if 'async_' in kwargs:
            kwasync['async_'] = kwargs.pop('async_')

        if dsn is None and not kwargs:
            raise TypeError('missing dsn and no parameters')

        dsn = _ext.make_dsn(dsn, **kwargs)
>       conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
E       psycopg2.OperationalError: connection to server on socket "/var/run/postgresql/.s.PGSQL.5432" failed: FATAL:  database "agate" does not exist

Visiblement il cherche une base à mon username linux (agate).

#2

Mis à jour par A. Berriot il y a plus d'un an

#3

Mis à jour par A. Berriot il y a plus d'un an

J'ai quand même poussée ma branche avec le strict minimum pour lancer les tests sous django 3, si quelqu'un veut tester: wip/67950-fonctionner-avec-django-

#4

Mis à jour par A. Berriot il y a plus d'un an

#5

Mis à jour par A. Berriot il y a plus d'un an

  • Bloqué par Development #68312: Tests qui crashent en local en cherchant une base au nom de l'utilisateur linux ajouté
#6

Mis à jour par Benjamin Dauvergne il y a plus d'un an

  • Assigné à mis à Benjamin Dauvergne
#8

Mis à jour par Thomas Noël il y a plus d'un an

Peut-être utiliser https://git.entrouvert.org/hobo.git/snapshot/hobo-wip/67760-fonctionner-avec-django-.tar.gz au lieu de hobo-6d4a2108ab5201e5b712f54fd04966b7dcc9fabc.tar.gz ?

#9

Mis à jour par Benjamin Dauvergne il y a plus d'un an

J'espère surtout virer cette partie des patchs avant de pousser.

#10

Mis à jour par Emmanuel Cazenave il y a environ un an

  • Statut changé de Solution proposée à Solution validée
#11

Mis à jour par Benjamin Dauvergne il y a environ un an

  • Statut changé de Solution validée à Résolu (à déployer)
commit 17c566ede0c432f38a32dc9028a33ad6945b32cc
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue Jan 10 11:29:27 2023 +0100

    dj32: rename staticfiles templatetags lib to static (#67950)

commit a427740907aae0ef8d355105c11e18f51541f2de
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue Jan 10 11:33:48 2023 +0100

    dj32: adapt dependencies on Django-Select2 (#67950)

commit e384709134eeeabdabc80e9070b8045d831249b3
Author: Agate Berriot <aberriot@entrouvert.com>
Date:   Thu Aug 4 15:24:26 2022 +0200

    dj32: enable django 3.2 testing in tox file (#67950)
#12

Mis à jour par Transition automatique il y a environ un an

  • Statut changé de Résolu (à déployer) à Solution déployée
#13

Mis à jour par Transition automatique il y a environ un an

Automatic expiration

Formats disponibles : Atom PDF