Importing `cElementTree` has been deprecated since Python 3.3 -
importing `ElementTree` automatically uses the fastest
implementation available - and is finally removed in Python 3.9.
Importing cElementTree directly (not as part of xml) is an even
older relic, it's for Ye Time Before ElementTree Was Added To
Python and it was instead an external module...which was before
Python 2.5.
We still need to work with Python 2.7 for now, so we use a try/
except to handle both 2.7 and 3.9 cases. Also, let's not repeat
this import 12 times in one file for some reason.
Signed-off-by: Adam Williamson <awilliam@redhat.com>
- remove requirement on pyxml package
- use list comprehensions in some places
- fix 'rebuildpac' command to not show raw xml
- fix updatepacmetafromspec to cope with subpackages during parsing
- make all subcommands functions -- so they can be used from outside (they
still print directly their output; they could become iterators later)
- deprecate 'init' subcommand
- 0.5
status:
- use new file metadata which provides checksum, size and mtime
- don't list unmodified files
- fix some conditions where status was too stupid so far
update:
- much faster now, since only new or changed files are downloaded
- print revision number
checkout:
- mark project directory as such (to be used later)
diff:
- faster, since 'status' is faster
- work against local copy
checkin:
- update package metadata from specfile
- fix argument handling
add:
- ignore .osc and other files
other changes:
- sanitize argument handling, so most commands can work with
arbitrary files/directories as arguments (work is always done per package)
- add history command (doesn't seem to be working yet)
- on first usage, ask for username password on first usage,
and store them in .oscrc (.netrc can still be used)
- add setup.py
- add osc-wrapper.py as a wrapper script, so the module can be used when
installed in the system as well as in the uninstalled source directory