<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/python-coveragepy-git.git/coverage/files.py, branch 6.3.1</title>
<subtitle>github.com: nedbat/coveragepy.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/'/>
<entry>
<title>refactor: we no longer need to protect against UnicodeError, it was only on 3.6</title>
<updated>2022-01-03T16:36:26+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2022-01-03T16:36:26+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=16fd431b079a024750e1b2a4b693a5b80dcf1900'/>
<id>16fd431b079a024750e1b2a4b693a5b80dcf1900</id>
<content type='text'>
This was the failure it was protecting against on Python 3.6:

```
  ___________________________ ProcessTest.test_lang_c ____________________________
  [gw0] linux -- Python 3.6.15 /home/runner/work/coveragepy/coveragepy/.tox/py36/bin/python

  self = &lt;tests.test_process.ProcessTest object at 0x7fe57e63b198&gt;

      @pytest.mark.skipif(env.PYPY, reason="PyPy is unreliable with this test")
      # Jython as of 2.7.1rc3 won't compile a filename that isn't utf-8.
      @pytest.mark.skipif(env.JYTHON, reason="Jython can't handle this test")
      def test_lang_c(self):
          # LANG=C forces getfilesystemencoding on Linux to 'ascii', which causes
          # failures with non-ascii file names. We don't want to make a real file
          # with strange characters, though, because that gets the test runners
          # tangled up.  This will isolate the concerns to the coverage.py code.
          # https://github.com/nedbat/coveragepy/issues/533
          self.make_file("weird_file.py", r"""
              globs = {}
              code = "a = 1\nb = 2\n"
              exec(compile(code, "wut\xe9\xea\xeb\xec\x01\x02.py", 'exec'), globs)
              print(globs['a'])
              print(globs['b'])
              """)
          self.set_environ("LANG", "C")
          out = self.run_command("coverage run weird_file.py")
  &gt;       assert out == "1\n2\n"
  E       assert 'Traceback (m...ion by zero\n' == '1\n2\n'
  E         - 1
  E         - 2
  E         + Traceback (most recent call last):
  E         +   File "/home/runner/work/coveragepy/coveragepy/coverage/files.py", line 149, in abs_file
  E         +     path = os.path.realpath(path)
  E         +   File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/posixpath.py", line 395, in realpath
  E         +     path, ok = _joinrealpath(filename[:0], filename, {})
  E         +   File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/posixpath.py", line 429, in _joinrealpath
  E         +     if not islink(newpath):
  E         +   File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/posixpath.py", line 171, in islink
  E         +     st = os.lstat(path)
  E         + UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-6: ordinal not in range(128)
```
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was the failure it was protecting against on Python 3.6:

```
  ___________________________ ProcessTest.test_lang_c ____________________________
  [gw0] linux -- Python 3.6.15 /home/runner/work/coveragepy/coveragepy/.tox/py36/bin/python

  self = &lt;tests.test_process.ProcessTest object at 0x7fe57e63b198&gt;

      @pytest.mark.skipif(env.PYPY, reason="PyPy is unreliable with this test")
      # Jython as of 2.7.1rc3 won't compile a filename that isn't utf-8.
      @pytest.mark.skipif(env.JYTHON, reason="Jython can't handle this test")
      def test_lang_c(self):
          # LANG=C forces getfilesystemencoding on Linux to 'ascii', which causes
          # failures with non-ascii file names. We don't want to make a real file
          # with strange characters, though, because that gets the test runners
          # tangled up.  This will isolate the concerns to the coverage.py code.
          # https://github.com/nedbat/coveragepy/issues/533
          self.make_file("weird_file.py", r"""
              globs = {}
              code = "a = 1\nb = 2\n"
              exec(compile(code, "wut\xe9\xea\xeb\xec\x01\x02.py", 'exec'), globs)
              print(globs['a'])
              print(globs['b'])
              """)
          self.set_environ("LANG", "C")
          out = self.run_command("coverage run weird_file.py")
  &gt;       assert out == "1\n2\n"
  E       assert 'Traceback (m...ion by zero\n' == '1\n2\n'
  E         - 1
  E         - 2
  E         + Traceback (most recent call last):
  E         +   File "/home/runner/work/coveragepy/coveragepy/coverage/files.py", line 149, in abs_file
  E         +     path = os.path.realpath(path)
  E         +   File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/posixpath.py", line 395, in realpath
  E         +     path, ok = _joinrealpath(filename[:0], filename, {})
  E         +   File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/posixpath.py", line 429, in _joinrealpath
  E         +     if not islink(newpath):
  E         +   File "/opt/hostedtoolcache/Python/3.6.15/x64/lib/python3.6/posixpath.py", line 171, in islink
  E         +     st = os.lstat(path)
  E         + UnicodeEncodeError: 'ascii' codec can't encode characters in position 3-6: ordinal not in range(128)
```
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: super-nit-picky tweaks from mypy</title>
<updated>2021-11-21T14:36:12+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-11-21T14:36:12+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=8643f41bfe1fe7ab19184f30130ff1f95140eceb'/>
<id>8643f41bfe1fe7ab19184f30130ff1f95140eceb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: specialize exceptions</title>
<updated>2021-11-14T16:41:23+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-11-14T00:23:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=1c29ef3e4b871508bb2defd6b47b9a745547b626'/>
<id>1c29ef3e4b871508bb2defd6b47b9a745547b626</id>
<content type='text'>
CoverageException is fine as a base class, but not good to use for
raising (and catching sometimes).  Introduce specialized exceptions that
allow third-party tools to integrate better.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
CoverageException is fine as a base class, but not good to use for
raising (and catching sometimes).  Introduce specialized exceptions that
allow third-party tools to integrate better.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: remapping paths during combining needs to follow relative_files=True. #1147</title>
<updated>2021-11-06T22:06:44+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-11-06T21:29:09+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=1a616da57258bb3a1d6a0fbd05adfcb76155c49c'/>
<id>1a616da57258bb3a1d6a0fbd05adfcb76155c49c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: give a default value to the name argument for Matchers. #1273</title>
<updated>2021-11-06T00:01:28+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-11-05T23:58:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=e3e637c97365ceae4ee959bc4a0571c85f38355d'/>
<id>e3e637c97365ceae4ee959bc4a0571c85f38355d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: use human sorting on human-readable things</title>
<updated>2021-10-12T12:46:25+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-10-12T12:46:25+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=0eaeb99f2de1330a562752d30d02d1898f681cf8'/>
<id>0eaeb99f2de1330a562752d30d02d1898f681cf8</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>style: the name of the matchers don't need quotes in the reprs</title>
<updated>2021-10-10T22:43:32+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-10-10T22:43:32+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=27db7b4e9eb4a7f8115af207a21374fdd2e6d8c7'/>
<id>27db7b4e9eb4a7f8115af207a21374fdd2e6d8c7</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>test: canonicalize this bit of debug output</title>
<updated>2021-10-08T13:42:43+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-10-08T11:38:38+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=6217af70939d939b6abfc4abfe32a03bc47da967'/>
<id>6217af70939d939b6abfc4abfe32a03bc47da967</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>fix: generate flat file names differently</title>
<updated>2021-07-15T13:36:35+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-07-15T13:36:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=4d05ddeeded7f3f594c0614630f467e1bf3fa629'/>
<id>4d05ddeeded7f3f594c0614630f467e1bf3fa629</id>
<content type='text'>
Fixes a few unusual issues with reports:

- #580: HTML report generation fails on too long path
- #584: File collisions in coverage report html
- #1167: Remove leading underscore in coverage html
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes a few unusual issues with reports:

- #580: HTML report generation fails on too long path
- #584: File collisions in coverage report html
- #1167: Remove leading underscore in coverage html
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: remove a now no-op function</title>
<updated>2021-05-02T11:38:20+00:00</updated>
<author>
<name>Ned Batchelder</name>
<email>ned@nedbatchelder.com</email>
</author>
<published>2021-05-02T11:10:06+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/python-coveragepy-git.git/commit/?id=a6f634a773545b4934e4bab3910f6a6da3bc58d1'/>
<id>a6f634a773545b4934e4bab3910f6a6da3bc58d1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
