Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#33639 - [autojump] --purge not working with python 3

Attached to Project: Community Packages
Opened by Kevin Streit (streit) - Wednesday, 30 January 2013, 14:43 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Tuesday, 14 May 2013, 00:09 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jaroslav Lichtblau (Dragonlord)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
In line 156 of /usr/bin/autojump, the map that is traversed is modified while traversing it.
This was fine in Python 2.X since it implicitly copied the keylist before traversal to allow for "concurrent" modifications.
Python 3 no longer does this...

Moving the entry deletion out of this loop into a separate loop traversing the removed list fixes the problem.
(Alternatively you can explicitly copy the key list before traversal, but I guess that would be more compute intensive...)

I am no Python expert and thus did not check the remainder of the script if everything works with Python 3.
Might be worth checking though.

Additional info:
* package version(s)
* config and/or log files etc.

Steps to reproduce:
> j --purge
(Reproduction requires a database with at least one entry to purge; i.e., a directory in the index that does no longer exist)
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Tuesday, 14 May 2013, 00:09 GMT
Reason for closing:  Fixed

Loading...