Project

General

Profile

Development #67950

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

fonctionner avec django 3.2

Added by Agate Berriot 6 months ago. Updated 8 days ago.

Status:
Solution déployée
Priority:
Normal
Target version:
-
Start date:
04 August 2022
Due date:
% Done:

0%

Estimated time:
Patch proposed:
Yes
Planning:
No
Tags:


Files


Related issues

Blocked by Hobo - Development #67760: fonctionner avec django 3.2Solution déployée28 July 2022

Actions
Blocked by BiJoe - Development #68312: Tests qui crashent en local en cherchant une base au nom de l'utilisateur linuxSolution déployée22 August 2022

Actions

Associated revisions

Revision e3847091 (diff)
Added by Agate Berriot 9 days ago

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

Revision a4277409 (diff)
Added by Benjamin Dauvergne 9 days ago

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

Revision 17c566ed (diff)
Added by Benjamin Dauvergne 9 days ago

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

History

#1

Updated by Agate Berriot 6 months ago

  • Tags set to django32
  • Assignee deleted (Agate Berriot)

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).

#3

Updated by Agate Berriot 6 months ago

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

Updated by Agate Berriot 6 months ago

#5

Updated by Agate Berriot 6 months ago

  • Blocked by Development #68312: Tests qui crashent en local en cherchant une base au nom de l'utilisateur linux added
#6

Updated by Benjamin Dauvergne about 1 month ago

  • Assignee set to Benjamin Dauvergne
#8

Updated by Thomas Noël 29 days ago

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

Updated by Benjamin Dauvergne 29 days ago

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

#10

Updated by Emmanuel Cazenave 10 days ago

  • Status changed from Solution proposée to Solution validée
#11

Updated by Benjamin Dauvergne 9 days ago

  • Status changed from Solution validée to 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

Updated by Transition automatique 8 days ago

  • Status changed from Résolu (à déployer) to Solution déployée

Also available in: Atom PDF