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 13 days ago. Updated 13 days ago.

Status:
Nouveau
Priority:
Normal
Assignee:
-
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.2Résolu (à déployer)28 July 2022

Actions

History

#1

Updated by Agate Berriot 13 days 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 13 days 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 8 days ago

Also available in: Atom PDF