duplicity-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Duplicity-tracker] [patch #6596] re-organize backend module structure


From: Peter Schuller
Subject: [Duplicity-tracker] [patch #6596] re-organize backend module structure
Date: Sat, 02 Aug 2008 12:03:20 +0000
User-agent: Opera/9.51 (X11; FreeBSD 7.0-RELEASE-p1 amd64; U; en)

URL:
  <http://savannah.nongnu.org/patch/?6596>

                 Summary: re-organize backend module structure
                 Project: duplicity
            Submitted by: scode
            Submitted on: Saturday 08/02/2008 at 12:03
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any

    _______________________________________________________

Details:

Okay, so here's the initial re-organization as discussed on the mailing
list.

First off, note that the "hsi" and "webdav" backends have not been tested
because (1) I still do not even know what hsi is, and Google is not helpful,
and (2) the webdav sandbox account did not seem up now and I don't have
another one handy.

Hopefully someone else can come along and confirm that they still work. The
most likely problems would be accidentally dropping an 'import' that is needed
(I did not want to cut'n'paste the long list of imported modules all over the
place where not needed, so I have tried to selectively import only that which
is needed for each backend).

With regards to changes:

The module for backend X is now in duplicity.backends.Xbackend. It is not in
duplicity.backends.X, because that opens us up to name conflicts (e.g. 'boto')
until we can depend on Python 2.5 and do absolute imports.

The indendation has been changed to be more PEP-8 compliant. I have been
careful here, but since indentation is significant these things could
potentially have adverse effects (code block not running, or running when it
should not).

I have defined some additional exceptions, and converted a few error cases
into exception raises instead of direct FatalError loggings. Slight exception
handling was added in the top-level script to handle this.

I did run through the unit tests, but cannot claim they all work completely
because I don't have a working setup where they ever completely 100%
successfully. I have however compared to running them without this patch.

Some other minor changes have been made while I was at it (such as
capitalizing class names in the backends), but in particular various tweaks to
module imports were made.

I ran into several circular module dependency issues. I am not certain why
they began triggering where they didn't before (I did not notice them until I
ran the unit tests and had made a number of minor tweaks to module
importation), but I had to insert two or three hacks where imports were
deferred until a method call.

I think the proper long-term fix is to avoid the circular dependencies by
re-factoring rather than do various tricks to avoid the consequences (i.e.,
importation issues).





    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Saturday 08/02/2008 at 12:03  Name: duplicity_backreorg.patch  Size:
73kB   By: scode
reorganize backend module structure
<http://savannah.nongnu.org/patch/download.php?file_id=16228>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6596>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]