Page MenuHomeSoftware Heritage

from_disk: Fix ImportError with dulwich >= 0.20
ClosedPublic

Authored by anlambert on Jun 2 2020, 2:12 PM.

Details

Summary

EmptyFileException has been moved to dulwich.objects in 0.20 release.
(see https://github.com/dulwich/dulwich/commit/24986435b81e39ab596be1e3afba418cc20444b2)

Diff Detail

Repository
rDLDG Git loader
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D3206 (id=11376)

Rebasing onto b5467f9c3f...

Current branch diff-target is up to date.
Changes applied before test
commit 95d8a538727471745b0c7297392245004cea14b2
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Jun 2 14:10:56 2020 +0200

    from_disk: Fix ImportError with dulwich >= 0.20
    
    See https://github.com/dulwich/dulwich/commit/24986435b81e39ab596be1e3afba418cc20444b2

See https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/16/ for more details.

douardda added a subscriber: douardda.

ok but why move the import statement in the method?

This revision is now accepted and ready to land.Jun 2 2020, 2:36 PM

ok but why move the import statement in the method?

I thought it was forbidden by flake8 to mix try/except and import statements outside functions but I was wrong.
I will update before landing this.

Update: Move statements back to top of file

Build is green

Patch application report for D3206 (id=11380)

Rebasing onto b5467f9c3f...

Current branch diff-target is up to date.
Changes applied before test
commit b5bad864cd0e59f4239babf315b8a773f1f682a6
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Jun 2 14:10:56 2020 +0200

    from_disk: Fix ImportError with dulwich >= 0.20
    
    See https://github.com/dulwich/dulwich/commit/24986435b81e39ab596be1e3afba418cc20444b2

See https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/17/ for more details.

Build is green

Patch application report for D3206 (id=11381)

Rebasing onto b5467f9c3f...

Current branch diff-target is up to date.
Changes applied before test
commit 7323aec4f84d36a8ca4788ee569cf13c403d2cca
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Jun 2 14:10:56 2020 +0200

    from_disk: Fix ImportError with dulwich >= 0.20
    
    See https://github.com/dulwich/dulwich/commit/24986435b81e39ab596be1e3afba418cc20444b2

See https://jenkins.softwareheritage.org/job/DLDG/job/tests-on-diff/18/ for more details.