Skip to content
Snippets Groups Projects
  1. Nov 04, 2019
  2. Nov 01, 2019
  3. Nov 02, 2019
  4. Nov 04, 2019
  5. Nov 02, 2019
    • Gregory Szorc's avatar
      py3: define and use json.loads polyfill · 579672b347d2
      Gregory Szorc authored
      Python 3.5's json.loads() requires a str. Only Python 3.6+
      supports passing a bytes or bytearray.
      
      This commit implements a json.loads() polyfill on Python 3.5
      so that we can use bytes. The added function to detect encodings
      comes verbatim from Python 3.7.
      579672b347d2
    • Gregory Szorc's avatar
      contrib: require Python 3.6 for byteify-strings.py · bb509f39d387
      Gregory Szorc authored
      This script makes use of `token.COMMENT`, which apparently
      isn't present until Python 3.6. So make the script and its
      test conditional on Python 3.6.
      bb509f39d387
    • Gregory Szorc's avatar
      demandimportpy3: only use lazy extension loader on Python 3.6+ · 2d31ef3fb494
      Gregory Szorc authored
      There was an inline comment denoting a bug in the lazy extension
      loader on Python 3.5 which prevents it from working there. But the
      code was not conditional on the Python version.
      
      The result of this was a myriad of failures on Python 3.5 due to
      getattr() and friends not working on lazy extension modules.
      
      By making extension modules non-lazy on Python 3.5, we reduce the
      number of test failures from 48 to 22 on that Python version.
      2d31ef3fb494
    • Gregory Szorc's avatar
      ui: flush before prompting for input with readline · aaa046919043
      Gregory Szorc authored
      I was using `hg absorb` with Python 3 and noticed that the
      prompt was appearing without any output about what would be
      done. After I answered the prompt, the output was printed
      to stdout.
      
      This appears to be a buffering difference between Python 2
      and Python 3.
      
      To work around it, this commit adds an explicit flush() before
      calling the raw input function when readline is used.
      aaa046919043
    • Martin von Zweigbergk's avatar
      histedit: restore hex nodeids to be 12 digits long · b27cf9f52194
      Martin von Zweigbergk authored
      I accidentally switched from 12 digits to 40 digits while making the
      code py3-compatible. Thanks to Yuya for noticing.
      
      Differential Revision: https://phab.mercurial-scm.org/D7200
      b27cf9f52194
  6. Oct 29, 2019
  7. Nov 01, 2019
  8. Oct 31, 2019
  9. Nov 01, 2019
Loading