Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove use of section property from Package #81

Merged
merged 1 commit into from
Jun 26, 2019

Conversation

tonyskapunk
Copy link
Contributor

  • Remove the use of Package.section for the use of Version.section

Fix: #80


apt 1.9 is in experimental, likely will be included in buster coming release:

$ for c in experimental buster u19.04 u18.04 u16.04; do
    echo ${c} ===
    docker exec ${c} \
        python3 -c \
            'import apt; ac=apt.Cache(); print(ac["python3-apt"].candidate.version)';
done
=== experimental ===
1.9.0
=== buster ===
1.8.4
=== u19.04 ===
1.8.4
=== u18.04 ===
1.6.4
=== u16.04 ===
1.1.0~beta1ubuntu0.16.04.5

Here testing with the current code that uses Package.section showing that will fail in 1.9

$ for c in experimental buster u19.04 u18.04 u16.04; do
    echo === ${c} ===
    docker exec ${c} \
    python3 -c \
        'import apt; ac=apt.Cache(); print(ac["python3-apt"].section)'
done
=== experimental ===
Traceback (most recent call last):
  File "<string>", line 1, in <module>
AttributeError: 'Package' object has no attribute 'section'
=== buster ===
python
=== u19.04 ===
python
=== u18.04 ===
python
=== u16.04 ===
python

Here using Version.section instead (note that candidates produces a Version object):

$ for c in experimental buster u19.04 u18.04 u16.04; do
    echo === ${c} ===
    docker exec ${c} \
        python3 -c \
            'import apt; ac=apt.Cache(); print(ac["python3-apt"].candidate.section)'; done
=== experimental ===
python
=== buster ===
python
=== u19.04 ===
python
=== u18.04 ===
python
=== u16.04 ===
python

@tonyskapunk
Copy link
Contributor Author

Merging this one

@tonyskapunk tonyskapunk merged commit 2778368 into rackerlabs:development Jun 26, 2019
@tonyskapunk tonyskapunk deleted the i18_section branch June 26, 2019 19:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant