Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CPython's bug in feature that nobody uses

95963a44712b973e2fd7766baa419478?s=47 dv
June 06, 2015

CPython's bug in feature that nobody uses

95963a44712b973e2fd7766baa419478?s=128

dv

June 06, 2015
Tweet

Transcript

  1. CPython's bug in feature that nobody uses Chiu-Hsiang Hsu wdv4758h@gmail.com

  2. nickname : dv (currently) undergraduate student

  3. CPython the de-facto reference Python implementation

  4. tarfile module to r/w tar archives include those using gzip,

    bz2, lzma compression
  5. tarfile module add CLI since Python 3.4

  6. It’s similar to “tar” command in Unix-like system

  7. Comparison tarfile module python -m tarfile -c files.tar files/ python

    -m tarfile -c files.tar.gz files/ python -m tarfile -c files.tar.bz2 files/ python -m tarfile -c files.tar.xz files/ tar command tar cf files.tar files/ tar zcf files.tar.gz files/ tar jcf files.tar.bz2 files/ tar Jcf files.tar.xz files/
  8. tarfile module can choose compression algorithm automatically, but tar command

    can’t
  9. seems a little bit smarter ?

  10. But

  11. It’s broken :(

  12. It won’t use any compression algorithm !!! ? ? ?

  13. None
  14. tarfile.py with bug without bug

  15. tarfile.py with bug without bug

  16. I hate (love) those dot

  17. fix in CPython 3.4.4 and 3.5

  18. fix in CPython 3.4.4 and 3.5 but who cares this

    feature XD ?