Project

General

Profile

Development #8854

Implémenter payzen

Added by Benjamin Dauvergne almost 9 years ago. Updated over 8 years ago.

Status:
Fermé
Priority:
Normal
Target version:
Start date:
03 November 2015
Due date:
% Done:

100%

Estimated time:
Patch proposed:
Yes
Planning:

Files

Associated revisions

Revision 8c0def0c (diff)
Added by Benjamin Dauvergne almost 9 years ago

implement payzen backend by inheriting systempayv2 (fixes #8854)

History

#2

Updated by Serghei Mihai almost 9 years ago

On pourra vérifier avec l'instance de Fondettes

#3

Updated by Serghei Mihai almost 9 years ago

Modifs mineures du patch.
Sinon en testant sur le Payzen de Fondettes ça fonctionne

#4

Updated by Benjamin Dauvergne almost 9 years ago

Le deepcopy était important, pourquoi l'as-tu enlevé ? (dict.copy() ne crée un clone du dict pas de son contenu, si dans le contenu il y a des choses qui sont mutables alors la modification va modifier le parent (ici le paramétrage de systempay)).

#5

Updated by Serghei Mihai almost 9 years ago

Le deepcopy provoque l'erreur:

/usr/lib/python2.7/copy.pyc in deepcopy(x, memo, _nil)
    161     copier = _deepcopy_dispatch.get(cls)
    162     if copier:
--> 163         y = copier(x, memo)
    164     else:
    165         try:

/usr/lib/python2.7/copy.pyc in _deepcopy_dict(x, memo)
    255     memo[id(x)] = y
    256     for key, value in x.iteritems():
--> 257         y[deepcopy(key, memo)] = deepcopy(value, memo)
    258     return y
    259 d[dict] = _deepcopy_dict

/usr/lib/python2.7/copy.pyc in deepcopy(x, memo, _nil)
    161     copier = _deepcopy_dispatch.get(cls)
    162     if copier:
--> 163         y = copier(x, memo)
    164     else:
    165         try:

/usr/lib/python2.7/copy.pyc in _deepcopy_list(x, memo)
    228     memo[id(x)] = y
    229     for a in x:
--> 230         y.append(deepcopy(a, memo))
    231     return y
    232 d[list] = _deepcopy_list

/usr/lib/python2.7/copy.pyc in deepcopy(x, memo, _nil)
    161     copier = _deepcopy_dispatch.get(cls)
    162     if copier:
--> 163         y = copier(x, memo)
    164     else:
    165         try:

/usr/lib/python2.7/copy.pyc in _deepcopy_dict(x, memo)
    255     memo[id(x)] = y
    256     for key, value in x.iteritems():
--> 257         y[deepcopy(key, memo)] = deepcopy(value, memo)
    258     return y
    259 d[dict] = _deepcopy_dict

/usr/lib/python2.7/copy.pyc in deepcopy(x, memo, _nil)
    188                             raise Error(
    189                                 "un(deep)copyable object of type %s" % cls)
--> 190                 y = _reconstruct(x, rv, 1, memo)
    191 
    192     memo[d] = y

/usr/lib/python2.7/copy.pyc in _reconstruct(x, info, deep, memo)
    327     if deep:
    328         args = deepcopy(args, memo)
--> 329     y = callable(*args)
    330     memo[id(x)] = y
    331 

/home/serghei/sandbox/venvs/combo/lib/python2.7/copy_reg.pyc in __newobj__(cls, *args)
     91 
     92 def __newobj__(cls, *args):
---> 93     return cls.__new__(cls, *args)
     94 
     95 def _slotnames(cls):

TypeError: object.__new__(method_descriptor) is not safe, use method_descriptor.__new__()

#6

Updated by Benjamin Dauvergne almost 9 years ago

Ok deepcopy n'aime pas copier des méthodes, je les ai converti en lambda, tu peux intégrer ce patch au tien puis pousser.

#7

Updated by Serghei Mihai almost 9 years ago

  • Status changed from En cours to Résolu (à déployer)

Fait et testé en local

commit 8c0def0c29fcbb1096924b7d225f55bca32cc317
Author: Benjamin Dauvergne <bdauvergne@entrouvert.com>
Date:   Tue Nov 3 23:16:40 2015 +0100

    implement payzen backend by inheriting systempayv2 (fixes #8854)

#8

Updated by Benjamin Dauvergne almost 9 years ago

  • % Done changed from 0 to 100
#9

Updated by Benjamin Dauvergne over 8 years ago

  • Target version set to 1.3
#10

Updated by Benjamin Dauvergne over 8 years ago

  • Status changed from Résolu (à déployer) to Fermé

Also available in: Atom PDF