profile
viewpoint
Anthony Sottile asottile @pre-commit @pytest-dev @tox-dev

asottile/add-trailing-comma 130

A tool (and pre-commit hook) to automatically add trailing commas to calls and literals.

asottile/all-repos 126

Clone all your repositories and apply sweeping changes.

asottile/blacken-docs 117

Run `black` on python code blocks in documentation files

asottile/dead 90

dead simple python dead code detection

asottile/astpretty 68

Pretty print the output of python stdlib `ast.parse`.

asottile/babi 56

a text editor

asottile/dockerfile 37

Parse a dockerfile into a high-level representation using the official go parser

asottile/azure-pipeline-templates 20

templates for azure pipelines

asottile/cfgv 14

Validate configuration and produce human readable error messages

asottile/covdefaults 13

A coverage plugin to provide sensible default settings

issue commentpre-commit/pre-commit

Unexpected pass with jsonlint

many tools are inefficient / wrong and should be improved instead of enabled

ssbarnea

comment created time in 8 hours

issue closedpre-commit/pre-commit

Unexpected pass with node language

I do have an example where trying to add a node based hook gives some unexpected passing, but only in specific case.

Full example at https://review.rdoproject.org/r/#/c/28371/1/.pre-commit-config.yaml

What happens

pre-commit run jsonlint: correctly identifies broken json pre-commit run -a: incorrectly passes jsonlint

Example hook config

  - repo: https://github.com/ssbarnea/jsonlint
    rev: master
    hooks:
      - id: jsonlint
        name: jsonlint
        entry: jsonlint
        language: node
        files: '^.*\.json$'

I may be missing something but I do not see any good reason why running all hooks may give different results then running the hook individually. Even when all hooks run, I can see that the jsonlint hook effectively run and it was not skipped.

closed time in 9 hours

ssbarnea

issue commentpre-commit/pre-commit

Unexpected pass with node language

jsonlint only takes one argument so it's ignoring all arguments after it

ssbarnea

comment created time in 9 hours

Pull request review commentpre-commit/pre-commit

Detect rootless mode

 def install_environment(         os.mkdir(directory)  +def _docker_is_rootless() -> bool:  # pragma: win32 no cover+    returncode, stdout, stderr = cmd_output(+        'docker', 'system', 'info',+    )+    for line in stdout.splitlines():+        # rootless docker has "rootless"+        # rootless podman has "rootless: true"+        if line.strip().startswith('rootless'):+            if 'false' not in line:

there's no test for rootless: false so line 90 is never hit -- perhaps simpler would be if line.strip() == 'rootless: true': ...

themr0c

comment created time in 9 hours

issue openedasottile/babi

babi should always open files using UTF-8

especially on windows, this can result in mojibake

ensure that the open calls go through encoding='UTF-8' -- maybe also validate stdin does the same

created time in 17 hours

issue commentPyCQA/pycodestyle

Pycodestyle is not detecting W605 and W503

(also, you should really not ignore W605, it will become a syntax error in a future version of python -- you probably want to r prefix your string -- or use pyupgrade which'll fix it automatically for you)

garawalid

comment created time in a day

issue commentPyCQA/pycodestyle

Pycodestyle is not detecting W605 and W503

you want extend-ignore

garawalid

comment created time in a day

issue closedPyCQA/pycodestyle

Pycodestyle is not detecting W605 and W503

Hi community,

I introduced two wrong rules (W605 & W503) in the example below:

def method_one(self):
    """
    * if :math:`p_i + s_i \geq p_{min} + 2 * s_{min}` -> Warning zone
    * if :math:`p_i + s_i \geq p_{min} + 3 * s_{min}` -> Change detected

    """
    gross_wages = 0
    taxable_interest = 0
    income = (gross_wages
              + taxable_interest)
    return income

When I run flake8 against this code, pycodestyle reports only W605

tox.ini:

[flake8]
$ flake8 example.py 
example.py:3:27: W605 invalid escape sequence '\g'
example.py:4:27: W605 invalid escape sequence '\g'

And when I add an exception for W605 in the tox.ini file. pycodestyle reports W503.

tox.ini:

[flake8]
ignore=W605
$ flake8 example.py 
example.py:10:15: W503 line break before binary operator

Was it supposed to have both W503 and W605 in the first example?

My configuration:

  • Python 3.8.2
  • flake8 3.8.3

closed time in a day

garawalid

issue commentPyCQA/pycodestyle

Pycodestyle is not detecting W605 and W503

W503 is among the disabled by default rules

garawalid

comment created time in a day

GollumEvent

push eventanthonywritescode/thumbnails

Anthony Sottile

commit sha acf66da0e2a7f5c9632f93350f81dcc435453df7

explains #061

view details

push time in a day

push eventanthonywritescode/explains

Anthony Sottile

commit sha e02dbcd769b2347e5b3a7ecd3edc823cc7b8c468

explains #061

view details

push time in a day

push eventanthonywritescode/thumbnails

Anthony Sottile

commit sha a2ee9bc615a319b769102c64a9567601b34759a6

replay 2020-06-29

view details

push time in a day

push eventasottile/babi

Anthony Sottile

commit sha fc21a144aa53df253ab00674c82ea6e202e68831

leverage new regex flags

view details

Anthony Sottile

commit sha f0b2af9a9f82e36cf872a4536a3bd3075c18e8da

Merge pull request #77 from asottile/regex_flags leverage new regex flags

view details

push time in 2 days

delete branch asottile/babi

delete branch : regex_flags

delete time in 2 days

PR merged asottile/babi

leverage new regex flags
+25 -97

0 comment

3 changed files

asottile

pr closed time in 2 days

PR opened asottile/babi

leverage new regex flags
+25 -97

0 comment

3 changed files

pr created time in 2 days

create barnchasottile/babi

branch : regex_flags

created branch time in 2 days

push eventpre-commit/pre-commit-hooks

Jascha Geerds

commit sha 53a05b952c910d53b5e839d4c267d9fc3f352979

Add "pydevd_pycharm" to list of debug statements

view details

Anthony Sottile

commit sha 5372f44b858f6eef834d9632e9960c39c296d448

Merge pull request #502 from jgeerds/feature/catch-pydevd-pycharm-debug-statement debug-statements: Add "pydevd_pycharm" to list of debug statements

view details

push time in 2 days

PR merged pre-commit/pre-commit-hooks

debug-statements: Add "pydevd_pycharm" to list of debug statements

This commit adds support for pydevd_pycharm debug statements in the debug-statements-Hook. I've also sorted the list in alphabetically order as it grows over time (see https://github.com/pre-commit/pre-commit-hooks/commit/43bfa05e8946f394e6967c63cad8875685d4c6b6 for example).

Tested locally on my machine:

❯ pre-commit run debug-statements -a
Debug Statements (Python)................................................Failed
- hook id: debug-statements
- exit code: 1

my_python_file.py:221:12 - pydevd_pycharm imported

+10 -1

0 comment

1 changed file

jgeerds

pr closed time in 2 days

issue commentmicrosoft/vscode-textmate

microbug / edge case in \A / \G replacement code

by the way, it looks like oniguruma will have runtime flags for disabling these anchors in the next version: https://github.com/kkos/oniguruma/issues/198

asottile

comment created time in 2 days

created tagasottile/onigurumacffi

tagv0.0.18

python cffi bindings for the oniguruma regex engine

created time in 2 days

push eventasottile/onigurumacffi

Anthony Sottile

commit sha 06ca54e1f44629996af2d7f916821fa56ad62975

v0.0.18

view details

push time in 2 days

delete branch asottile/onigurumacffi

delete branch : add_z_flag

delete time in 2 days

push eventasottile/onigurumacffi

Anthony Sottile

commit sha 799710e141ff28cf7681873fdc1bc7470a2e3aa7

Add NOT_END_STRING flag

view details

Anthony Sottile

commit sha 7b91c6ea0d83c2304286231a3e1e9a98787d2f76

Merge pull request #24 from asottile/add_z_flag Add NOT_END_STRING flag

view details

push time in 2 days

issue closedkkos/oniguruma

selectively disabling \A and \G

👋 thanks again for the library, really wonderful!

textmate grammars uses oniguruma for pattern matching in expanding text editor grammars, but they are done in a line-by-line fashion.

as such, they impose some "special" interpretation of \A and \G, as far as I can tell this is how they are handled:

  • \A is only honored on the first line when looking at position 0
  • \G is only honored at the first position of a line or on a boundary condition (previous node was a start/end match, and a few other cases)

either way, this requires some special disabling/enabling of these two regex flags

the way vs code currently implements this is to replace \A and \G with \uffff however this is error prone for several reasons:

  • it doesn't properly handle special cases such as [\ABC]
  • it doesn't properly handle negation such as (?!\G)

would it be possible to add flags (similar to the _BOL and _EOL flags) which toggle the behaviours of \A and \G? and/or is there a better way to handle the special constraints of textmate grammars here. (the issue I'm dealing with actually comes from https://github.com/asottile/babi/issues/73)

closed time in 2 days

asottile

issue commentkkos/oniguruma

selectively disabling \A and \G

awesome -- just tried this out -- it works great! thanks again for the responsiveness and this awesome library

asottile

comment created time in 2 days

PR opened asottile/onigurumacffi

Add NOT_END_STRING flag
+10 -1

0 comment

4 changed files

pr created time in 2 days

create barnchasottile/onigurumacffi

branch : add_z_flag

created branch time in 2 days

GollumEvent

release pre-commit/pre-commit

v2.6.0

released time in 2 days

created tagpre-commit/pre-commit

tagv2.6.0

A framework for managing and maintaining multi-language pre-commit hooks.

created time in 2 days

push eventpre-commit/pre-commit

Anthony Sottile

commit sha 6fe1702ee106f4d7f4a8ad73550db2145208ef24

v2.6.0

view details

push time in 2 days

pull request commentpre-commit/action

Allow action user to use custom commit message

hmmm I think I'd rather not make this an option such that it can be kept uniform / searchable -- I'm open to improving the current commit message though (I think it is much too terse)

aaronmak

comment created time in 2 days

push eventdeadsnakes/python3.10-nightly

Serhiy Storchaka

commit sha ba67d7386edf20bcc0f878a518de0894cb574e9f

bpo-41142: Add support of non-ASCII paths for CAB files. (GH-21195) * The path to the CAB file can be non-ASCII. * Paths of added files can be non-ASCII.

view details

Lawrence D'Anna

commit sha 604d95e235d86465b8c17f02095edcaf18464d4c

bpo-41100: fix _decimal for arm64 Mac OS (GH-21228) Patch by Lawrence Danna.

view details

E-Paine

commit sha 3fa4799c3f9d9de7cac30e5db3627e9e125b9ce5

Update FAQ release schedule and estimated users (GH-21180) Update FAQ to include: * The new yearly release schedule from PEP 602 * Estimated users from "tens of thousands" to "millions"

view details

Hai Shi

commit sha 3ddc634cd5469550c0c2dc5a6051a70739995699

bpo-40275: Use new test.support helper submodules in tests (GH-21219)

view details

Hai Shi

commit sha 0c4f0f3b29d84063700217dcf90ad6860ed71c70

bpo-40275: Use new test.support helper submodules in tests (GH-21169)

view details

Rémi Lapeyre

commit sha bd4a3f21454a6012f4353e2255837561fc9f0e6a

bpo-39314: Closes parenthesis when autocompleting for functions that take no arguments (GH-20562)

view details

Stefan Krah

commit sha 1648c99932f39f1c60972bb114e6a7bd65523818

bpo-41161 Add news entry for libmpdec-2.5.0 (GH-21243)

view details

Anthony Sottile

commit sha 3ff991c0dcaf8378639638976622460705ce8198

Merge remote-tracking branch 'origin/upstream' into ubuntu/xenial

view details

Anthony Sottile

commit sha 810f8c707797d46fbc167377d3bf83e6a81c2851

Finish changelog (2020-07-01)

view details

Anthony Sottile

commit sha 0efd4fa2b2d717fc231d5007d02d36f85ca28573

revert 8bea91b5e9ea07ca93958

view details

push time in 2 days

push eventdeadsnakes/python3.10-nightly

Anthony Sottile

commit sha 446015e9c060288abcf11060c06cef2d72fb06a7

revert 8bea91b5e9ea07ca93958

view details

push time in 2 days

issue commentPyCQA/pyflakes

Possible false negatives being thrown in F541 for Django urls.py

I cannot reproduce, please include the actual code causing your problem:

$ ~/opt/venv/bin/pyflakes
VAR_X = VAR_Y = 1
fr"^{VAR_X}/some-url/{VAR_Y}/$"
$
chocoelho

comment created time in 2 days

created tagchriskuehl/identify

tagv1.4.21

File identification library for Python

created time in 3 days

push eventchriskuehl/identify

Anthony Sottile

commit sha 0f22757bf6b40ad9d8317621f3399c4ab179ce98

v1.4.21

view details

push time in 3 days

push eventchriskuehl/identify

David Arnold

commit sha 215e8ad08357e1e4af50e3dc6a7df9430e13b840

Add mdx extension https://github.com/mdx-js/mdx

view details

Anthony Sottile

commit sha c0d84f6d21bc8491ba9f27ee5266d7bdfce677b9

Merge pull request #112 from blaggacao/patch-1 Add mdx extension

view details

push time in 3 days

PR merged chriskuehl/identify

Add mdx extension

https://github.com/mdx-js/mdx

+1 -0

0 comment

1 changed file

blaggacao

pr closed time in 3 days

issue commentpytest-dev/pytest

Investigate how we can warn of/prevent redefinition of built-ins

no need to do any special setup for it, just add it to the list of flake8 plugins in .pre-commit-config.yaml

gnikonorov

comment created time in 3 days

issue commentpytest-dev/pytest

Investigate how we can warn of/prevent redefinition of built-ins

we're already using a lot of one-person software so I highly doubt it

gnikonorov

comment created time in 3 days

issue commentpytest-dev/pytest

Investigate how we can warn of/prevent redefinition of built-ins

flake8-builtins is probably the easiest way to do this

gnikonorov

comment created time in 3 days

IssuesEvent

issue commentkkos/oniguruma

selectively disabling \A and \G

🤦 I forgot about \z (it seems it is already toggled by NOTEOL -- but that also toggles $ and \Z which is undesirable)

asottile

comment created time in 3 days

created tagasottile/onigurumacffi

tagv0.0.17

python cffi bindings for the oniguruma regex engine

created time in 3 days

push eventasottile/onigurumacffi

Anthony Sottile

commit sha 8d5cb667a1e5ff72acd0a5c0327853b627b159c0

v0.0.17

view details

push time in 3 days

delete branch asottile/onigurumacffi

delete branch : runtime_search_flags

delete time in 3 days

push eventasottile/onigurumacffi

Anthony Sottile

commit sha 5b118b5c3f27f9d86a3297f5a7a2719e9c968016

add support for runtime search flags

view details

Anthony Sottile

commit sha 86b250e11d617f491edce961f9ba7d6d7d565cb9

Merge pull request #23 from asottile/runtime_search_flags add support for runtime search flags

view details

push time in 3 days

push eventasottile/onigurumacffi

Anthony Sottile

commit sha 5b118b5c3f27f9d86a3297f5a7a2719e9c968016

add support for runtime search flags

view details

push time in 3 days

push eventasottile/onigurumacffi

Anthony Sottile

commit sha d1766c10bebf103a4436cf0294672986b43f7bab

add support for runtime search flags

view details

push time in 3 days

issue closedkkos/oniguruma

selectively disabling \A and \G

👋 thanks again for the library, really wonderful!

textmate grammars uses oniguruma for pattern matching in expanding text editor grammars, but they are done in a line-by-line fashion.

as such, they impose some "special" interpretation of \A and \G, as far as I can tell this is how they are handled:

  • \A is only honored on the first line when looking at position 0
  • \G is only honored at the first position of a line or on a boundary condition (previous node was a start/end match, and a few other cases)

either way, this requires some special disabling/enabling of these two regex flags

the way vs code currently implements this is to replace \A and \G with \uffff however this is error prone for several reasons:

  • it doesn't properly handle special cases such as [\ABC]
  • it doesn't properly handle negation such as (?!\G)

would it be possible to add flags (similar to the _BOL and _EOL flags) which toggle the behaviours of \A and \G? and/or is there a better way to handle the special constraints of textmate grammars here. (the issue I'm dealing with actually comes from https://github.com/asottile/babi/issues/73)

closed time in 3 days

asottile

issue commentkkos/oniguruma

selectively disabling \A and \G

thanks for this feature by the way, super awesome!

asottile

comment created time in 3 days

push eventasottile/onigurumacffi

Anthony Sottile

commit sha 6ce96658181a4cd97c176357832199d58d3262e6

add support for runtime search flags

view details

push time in 3 days

issue commentkkos/oniguruma

selectively disabling \A and \G

oh actually I'm just confused! this works exactly how I want -- sorry for the runaround!

>>> import onigurumacffi
>>> reg = onigurumacffi.compile(r'(?!\G)')
>>> reg.match('foo')
>>> reg.match('foo',  flags=onigurumacffi.OnigSearchOption.NOT_BEGIN_POSITION)
<onigurumacffi._Match span=(0, 0) match=''>
asottile

comment created time in 3 days

issue commentpre-commit/pre-commit

Understanding how to run commit-msg hook

you definitely don't want always_run: true by the way

cristian05

comment created time in 3 days

issue commentpre-commit/pre-commit

Understanding how to run commit-msg hook

in python you read files with the open function

cristian05

comment created time in 3 days

issue commentpre-commit/pre-commit

Understanding how to run commit-msg hook

is this unclear?

commit-msg hooks will be passed a single filename -- this file contains the current contents of the commit message

cristian05

comment created time in 3 days

push eventdeadsnakes/python3.9-nightly

Miss Islington (bot)

commit sha d1e05e78a3995fd7e5a79c5c6e4c8160aa48af22

bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) Fix also a resource warning when store counts and module info. (cherry picked from commit 04cdeb7a5617c48102f45b965e683b12cdf934f8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

view details

Miss Islington (bot)

commit sha 119de0eba839993cf6a909dba5d60202ad5566d6

bpo-40874 Update the required libmpdec version for the decimal module (GH-21202) (cherry picked from commit 8bea91b5e9ea07ca93958e131b436024f0b1b1cf) Authored-by: Stefan Krah <skrah@bytereef.org>

view details

Inada Naoki

commit sha 02134dae448c7885c9c07adfc6970f878db33372

bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205)

view details

Miss Islington (bot)

commit sha 9e36b6e6c8fc8925c6a5e7b57aff527bc4b862a8

bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) (cherry picked from commit 7f569c9bc0079906012b3034d30fe8abc742e7fc) Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>

view details

Miss Islington (bot)

commit sha a3f2a58ef8b901e501bdc16d95d797ca8c6ca651

Update libmpdec license dates (GH-21216) (cherry picked from commit a3ad95dd2176b529fb6a9f763955b5cc1b499dbb) Authored-by: Stefan Krah <skrah@bytereef.org>

view details

Lysandros Nikolaou

commit sha 990efe0fff749773887a50cb1ecb2c5d09263cf8

[3.9] bpo-41084: Fix test_fstring failure when using the old parser (GH-21212)

view details

Miss Islington (bot)

commit sha 9a646aa82dfa62d70ca2a99ada901ee6cf9f82bd

bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) The __hash__() methods of classes IPv4Interface and IPv6Interface had issue of generating constant hash values of 32 and 128 respectively causing hash collisions. The fix uses the hash() function to generate hash values for the objects instead of XOR operation (cherry picked from commit b30ee26e366bf509b7538d79bfec6c6d38d53f28) Co-authored-by: Ravi Teja P <rvteja92@gmail.com>

view details

Miss Islington (bot)

commit sha 01638ce51a63afe5af3f778e7403702703bb41b9

bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214) (cherry picked from commit 2515a28230b1a011205f30263da6b01c6bd167a3) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

view details

Inada Naoki

commit sha 2ea6a9928e4fa135888cc8f4733c28d93e642301

bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227)

view details

Anthony Sottile

commit sha a2f1f8e206d9f22f45025e4ed6a25a591d15f4f6

Merge remote-tracking branch 'origin/upstream' into ubuntu/focal

view details

Anthony Sottile

commit sha 02f0a04e0c1c0d7c41f4eed1343e2af520ca0b7f

Finish changelog (2020-06-30)

view details

Anthony Sottile

commit sha bb860d468e4d0ae9a9dfcbd77efb095353623bac

revert 119de0eba839993cf6a909dba5d60202ad5566d6

view details

push time in 3 days

push eventdeadsnakes/python3.9-nightly

Miss Islington (bot)

commit sha d1e05e78a3995fd7e5a79c5c6e4c8160aa48af22

bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) Fix also a resource warning when store counts and module info. (cherry picked from commit 04cdeb7a5617c48102f45b965e683b12cdf934f8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

view details

Miss Islington (bot)

commit sha 119de0eba839993cf6a909dba5d60202ad5566d6

bpo-40874 Update the required libmpdec version for the decimal module (GH-21202) (cherry picked from commit 8bea91b5e9ea07ca93958e131b436024f0b1b1cf) Authored-by: Stefan Krah <skrah@bytereef.org>

view details

Inada Naoki

commit sha 02134dae448c7885c9c07adfc6970f878db33372

bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205)

view details

Miss Islington (bot)

commit sha 9e36b6e6c8fc8925c6a5e7b57aff527bc4b862a8

bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) (cherry picked from commit 7f569c9bc0079906012b3034d30fe8abc742e7fc) Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>

view details

Miss Islington (bot)

commit sha a3f2a58ef8b901e501bdc16d95d797ca8c6ca651

Update libmpdec license dates (GH-21216) (cherry picked from commit a3ad95dd2176b529fb6a9f763955b5cc1b499dbb) Authored-by: Stefan Krah <skrah@bytereef.org>

view details

Lysandros Nikolaou

commit sha 990efe0fff749773887a50cb1ecb2c5d09263cf8

[3.9] bpo-41084: Fix test_fstring failure when using the old parser (GH-21212)

view details

Miss Islington (bot)

commit sha 9a646aa82dfa62d70ca2a99ada901ee6cf9f82bd

bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) The __hash__() methods of classes IPv4Interface and IPv6Interface had issue of generating constant hash values of 32 and 128 respectively causing hash collisions. The fix uses the hash() function to generate hash values for the objects instead of XOR operation (cherry picked from commit b30ee26e366bf509b7538d79bfec6c6d38d53f28) Co-authored-by: Ravi Teja P <rvteja92@gmail.com>

view details

Miss Islington (bot)

commit sha 01638ce51a63afe5af3f778e7403702703bb41b9

bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214) (cherry picked from commit 2515a28230b1a011205f30263da6b01c6bd167a3) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

view details

Inada Naoki

commit sha 2ea6a9928e4fa135888cc8f4733c28d93e642301

bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227)

view details

Anthony Sottile

commit sha 61ed2c02bc942af5f5a43750f9ce23277ac2a137

Merge remote-tracking branch 'origin/upstream' into ubuntu/bionic

view details

Anthony Sottile

commit sha 2ea13193c8537ad861c89a12eb5fd542f797b6b5

Finish changelog (2020-06-30)

view details

Anthony Sottile

commit sha a9ec8d26061d9456bc99f4a0dcf38c5890573b58

revert 119de0eba839993cf6a909dba5d60202ad5566d6

view details

push time in 3 days

push eventdeadsnakes/python3.9-nightly

Miss Islington (bot)

commit sha d1e05e78a3995fd7e5a79c5c6e4c8160aa48af22

bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) Fix also a resource warning when store counts and module info. (cherry picked from commit 04cdeb7a5617c48102f45b965e683b12cdf934f8) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

view details

Miss Islington (bot)

commit sha 119de0eba839993cf6a909dba5d60202ad5566d6

bpo-40874 Update the required libmpdec version for the decimal module (GH-21202) (cherry picked from commit 8bea91b5e9ea07ca93958e131b436024f0b1b1cf) Authored-by: Stefan Krah <skrah@bytereef.org>

view details

Inada Naoki

commit sha 02134dae448c7885c9c07adfc6970f878db33372

bpo-41123: Doc: PyLong_FromUnicode will be removed in 3.10 (GH-21205)

view details

Miss Islington (bot)

commit sha 9e36b6e6c8fc8925c6a5e7b57aff527bc4b862a8

bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998) (cherry picked from commit 7f569c9bc0079906012b3034d30fe8abc742e7fc) Co-authored-by: Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి) <thatiparthysreenivas@gmail.com>

view details

Miss Islington (bot)

commit sha a3f2a58ef8b901e501bdc16d95d797ca8c6ca651

Update libmpdec license dates (GH-21216) (cherry picked from commit a3ad95dd2176b529fb6a9f763955b5cc1b499dbb) Authored-by: Stefan Krah <skrah@bytereef.org>

view details

Lysandros Nikolaou

commit sha 990efe0fff749773887a50cb1ecb2c5d09263cf8

[3.9] bpo-41084: Fix test_fstring failure when using the old parser (GH-21212)

view details

Miss Islington (bot)

commit sha 9a646aa82dfa62d70ca2a99ada901ee6cf9f82bd

bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) The __hash__() methods of classes IPv4Interface and IPv6Interface had issue of generating constant hash values of 32 and 128 respectively causing hash collisions. The fix uses the hash() function to generate hash values for the objects instead of XOR operation (cherry picked from commit b30ee26e366bf509b7538d79bfec6c6d38d53f28) Co-authored-by: Ravi Teja P <rvteja92@gmail.com>

view details

Miss Islington (bot)

commit sha 01638ce51a63afe5af3f778e7403702703bb41b9

bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214) (cherry picked from commit 2515a28230b1a011205f30263da6b01c6bd167a3) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

view details

Inada Naoki

commit sha 2ea6a9928e4fa135888cc8f4733c28d93e642301

bpo-41123: Remove PyUnicode_AsUnicodeCopy in 3.10 (GH-21227)

view details

Anthony Sottile

commit sha 1594f0a503faa91a28f6233e60a9f92c1c0e6ed1

Merge remote-tracking branch 'origin/upstream' into ubuntu/xenial

view details

Anthony Sottile

commit sha fda13374641b78e878066c511067a09eba0210ad

Finish changelog (2020-06-30)

view details

Anthony Sottile

commit sha 38626662096a68ae1b054de3467e176927362c27

revert 119de0eba839993cf6a909dba5d60202ad5566d6

view details

push time in 3 days

push eventdeadsnakes/python3.10-nightly

Serhiy Storchaka

commit sha 04cdeb7a5617c48102f45b965e683b12cdf934f8

bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) Fix also a resource warning when store counts and module info.

view details

Stefan Krah

commit sha 8bea91b5e9ea07ca93958e131b436024f0b1b1cf

bpo-40874 Update the required libmpdec version for the decimal module (GH-21202)

view details

Inada Naoki

commit sha d9f2a13106254c53550583adca70aeb3979f2993

bpo-41123: Remove PyUnicode_GetMax() (GH-21192)

view details

Inada Naoki

commit sha e4f1fe6edb216e04da03ae80b462ca273f00255b

bpo-41123: Remove PyLong_FromUnicode() (GH-21204)

view details

Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)

commit sha 7f569c9bc0079906012b3034d30fe8abc742e7fc

bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)

view details

Stefan Krah

commit sha a3ad95dd2176b529fb6a9f763955b5cc1b499dbb

Update libmpdec license dates (GH-21216)

view details

Ravi Teja P

commit sha b30ee26e366bf509b7538d79bfec6c6d38d53f28

bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) The __hash__() methods of classes IPv4Interface and IPv6Interface had issue of generating constant hash values of 32 and 128 respectively causing hash collisions. The fix uses the hash() function to generate hash values for the objects instead of XOR operation

view details

Jeong Ukjae

commit sha 5b96370030707b68e8a5b787e933654297ddbc98

Fix typo in Object/listobject.c (GH-21079)

view details

Serhiy Storchaka

commit sha e67f7db3c34f70536f36c56bb82e33c3512a53a3

bpo-37999: Simplify the conversion code for %c, %d, %x, etc. (GH-20437) Since PyLong_AsLong() no longer use __int__, explicit call of PyNumber_Index() before it is no longer needed.

view details

Jason R. Coombs

commit sha 2fb5f038f2a2e91a7293d62dfd5601e6eb500c55

bpo-40924: Ensure importlib.resources.path returns an extant path (GH-20857)

view details

Victor Stinner

commit sha dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0

bpo-23427: Add sys.orig_argv attribute (GH-20729) Add sys.orig_argv attribute: the list of the original command line arguments passed to the Python executable. Rename also PyConfig._orig_argv to PyConfig.orig_argv and document it.

view details

Serhiy Storchaka

commit sha 2515a28230b1a011205f30263da6b01c6bd167a3

bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214)

view details

Inada Naoki

commit sha b3332660adb02babb7e66e45310c66dc9a9a94da

bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209)

view details

Serhiy Storchaka

commit sha 349f76c6aace5a4a2b57f6b442a532faf0027d6b

bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (GH-21223)

view details

Inada Naoki

commit sha 038dd0f79dc89566b01ba66a5a018266b2917a19

bpo-36346: Raise DeprecationWarning when creating legacy Unicode (GH-20933)

view details

Serhiy Storchaka

commit sha 694d31e714074176f0c324f95948b75dc768c091

bpo-41158: IDLE: rewrite the code for handling file encoding (GH-21215)

view details

Anthony Sottile

commit sha 9d8445525882a6a877a5448d900c2b1b8fdea1fa

Merge remote-tracking branch 'origin/upstream' into ubuntu/xenial

view details

Anthony Sottile

commit sha 8194094c9b44c4436cf3f59e1579b95afbfb1c07

Finish changelog (2020-06-30)

view details

push time in 3 days

push eventdeadsnakes/python3.10-nightly

Serhiy Storchaka

commit sha 04cdeb7a5617c48102f45b965e683b12cdf934f8

bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) Fix also a resource warning when store counts and module info.

view details

Stefan Krah

commit sha 8bea91b5e9ea07ca93958e131b436024f0b1b1cf

bpo-40874 Update the required libmpdec version for the decimal module (GH-21202)

view details

Inada Naoki

commit sha d9f2a13106254c53550583adca70aeb3979f2993

bpo-41123: Remove PyUnicode_GetMax() (GH-21192)

view details

Inada Naoki

commit sha e4f1fe6edb216e04da03ae80b462ca273f00255b

bpo-41123: Remove PyLong_FromUnicode() (GH-21204)

view details

Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)

commit sha 7f569c9bc0079906012b3034d30fe8abc742e7fc

bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)

view details

Stefan Krah

commit sha a3ad95dd2176b529fb6a9f763955b5cc1b499dbb

Update libmpdec license dates (GH-21216)

view details

Ravi Teja P

commit sha b30ee26e366bf509b7538d79bfec6c6d38d53f28

bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) The __hash__() methods of classes IPv4Interface and IPv6Interface had issue of generating constant hash values of 32 and 128 respectively causing hash collisions. The fix uses the hash() function to generate hash values for the objects instead of XOR operation

view details

Jeong Ukjae

commit sha 5b96370030707b68e8a5b787e933654297ddbc98

Fix typo in Object/listobject.c (GH-21079)

view details

Serhiy Storchaka

commit sha e67f7db3c34f70536f36c56bb82e33c3512a53a3

bpo-37999: Simplify the conversion code for %c, %d, %x, etc. (GH-20437) Since PyLong_AsLong() no longer use __int__, explicit call of PyNumber_Index() before it is no longer needed.

view details

Jason R. Coombs

commit sha 2fb5f038f2a2e91a7293d62dfd5601e6eb500c55

bpo-40924: Ensure importlib.resources.path returns an extant path (GH-20857)

view details

Victor Stinner

commit sha dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0

bpo-23427: Add sys.orig_argv attribute (GH-20729) Add sys.orig_argv attribute: the list of the original command line arguments passed to the Python executable. Rename also PyConfig._orig_argv to PyConfig.orig_argv and document it.

view details

Serhiy Storchaka

commit sha 2515a28230b1a011205f30263da6b01c6bd167a3

bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214)

view details

Inada Naoki

commit sha b3332660adb02babb7e66e45310c66dc9a9a94da

bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209)

view details

Serhiy Storchaka

commit sha 349f76c6aace5a4a2b57f6b442a532faf0027d6b

bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (GH-21223)

view details

Inada Naoki

commit sha 038dd0f79dc89566b01ba66a5a018266b2917a19

bpo-36346: Raise DeprecationWarning when creating legacy Unicode (GH-20933)

view details

Serhiy Storchaka

commit sha 694d31e714074176f0c324f95948b75dc768c091

bpo-41158: IDLE: rewrite the code for handling file encoding (GH-21215)

view details

Anthony Sottile

commit sha 22c376bf338b58910456f4c242e8d54600f24be7

Merge remote-tracking branch 'origin/upstream' into ubuntu/bionic

view details

Anthony Sottile

commit sha b23f1aff9538c8d37d737e09b09af9b21d81cc06

Finish changelog (2020-06-30)

view details

Anthony Sottile

commit sha 6076c5ed24ff7e41c4ddd273b8355df7807419f9

revert 8bea91b5e9ea07ca93958

view details

push time in 3 days

push eventdeadsnakes/python3.10-nightly

Serhiy Storchaka

commit sha 04cdeb7a5617c48102f45b965e683b12cdf934f8

bpo-41138: Fix trace CLI for non-UTF-8 files. (GH-21177) Fix also a resource warning when store counts and module info.

view details

Stefan Krah

commit sha 8bea91b5e9ea07ca93958e131b436024f0b1b1cf

bpo-40874 Update the required libmpdec version for the decimal module (GH-21202)

view details

Inada Naoki

commit sha d9f2a13106254c53550583adca70aeb3979f2993

bpo-41123: Remove PyUnicode_GetMax() (GH-21192)

view details

Inada Naoki

commit sha e4f1fe6edb216e04da03ae80b462ca273f00255b

bpo-41123: Remove PyLong_FromUnicode() (GH-21204)

view details

Srinivas Reddy Thatiparthy (శ్రీనివాస్ రెడ్డి తాటిపర్తి)

commit sha 7f569c9bc0079906012b3034d30fe8abc742e7fc

bpo-41048: mimetypes should read the rule file using UTF-8, not the locale encoding (GH-20998)

view details

Stefan Krah

commit sha a3ad95dd2176b529fb6a9f763955b5cc1b499dbb

Update libmpdec license dates (GH-21216)

view details

Ravi Teja P

commit sha b30ee26e366bf509b7538d79bfec6c6d38d53f28

bpo-41004: Resolve hash collisions for IPv4Interface and IPv6Interface (GH-21033) The __hash__() methods of classes IPv4Interface and IPv6Interface had issue of generating constant hash values of 32 and 128 respectively causing hash collisions. The fix uses the hash() function to generate hash values for the objects instead of XOR operation

view details

Jeong Ukjae

commit sha 5b96370030707b68e8a5b787e933654297ddbc98

Fix typo in Object/listobject.c (GH-21079)

view details

Serhiy Storchaka

commit sha e67f7db3c34f70536f36c56bb82e33c3512a53a3

bpo-37999: Simplify the conversion code for %c, %d, %x, etc. (GH-20437) Since PyLong_AsLong() no longer use __int__, explicit call of PyNumber_Index() before it is no longer needed.

view details

Jason R. Coombs

commit sha 2fb5f038f2a2e91a7293d62dfd5601e6eb500c55

bpo-40924: Ensure importlib.resources.path returns an extant path (GH-20857)

view details

Victor Stinner

commit sha dd8a93e23b5c4f9290e1cea6183d97eb9b5e61c0

bpo-23427: Add sys.orig_argv attribute (GH-20729) Add sys.orig_argv attribute: the list of the original command line arguments passed to the Python executable. Rename also PyConfig._orig_argv to PyConfig.orig_argv and document it.

view details

Serhiy Storchaka

commit sha 2515a28230b1a011205f30263da6b01c6bd167a3

bpo-41152: IDLE: always use UTF-8 for standard IO streams (GH-21214)

view details

Inada Naoki

commit sha b3332660adb02babb7e66e45310c66dc9a9a94da

bpo-41123: Remove PyUnicode_AsUnicodeCopy (GH-21209)

view details

Serhiy Storchaka

commit sha 349f76c6aace5a4a2b57f6b442a532faf0027d6b

bpo-36346: Prepare for removing the legacy Unicode C API (AC only). (GH-21223)

view details

Inada Naoki

commit sha 038dd0f79dc89566b01ba66a5a018266b2917a19

bpo-36346: Raise DeprecationWarning when creating legacy Unicode (GH-20933)

view details

Serhiy Storchaka

commit sha 694d31e714074176f0c324f95948b75dc768c091

bpo-41158: IDLE: rewrite the code for handling file encoding (GH-21215)

view details

Anthony Sottile

commit sha 340b0899845b16dddf3ce163915657553132f93e

Merge remote-tracking branch 'origin/upstream' into ubuntu/focal

view details

Anthony Sottile

commit sha f2a08b31ef092075bf1c7e0581991aaefc940696

Finish changelog (2020-06-30)

view details

Anthony Sottile

commit sha 64e04f9f5d5cd787153aba9c92c22e3998b15233

revert 8bea91b5e9ea07ca93958

view details

push time in 3 days

issue commentpytest-dev/pytest

Advice request: monkeypatch vs mock.patch

I believe there's no official recommendation because it's really about opinions and trade offs -- for instance I will never use monkeypatch because I've been burned by it's unknown scope duration (sometimes leaking to places I don't expect) whereas the context manager form of unittest.mock is explicit on what it affects. my con above about MagicMock is it's all too easy to leak those into apis that should TypeError / AttributeError but magically succeed (specs can help with this for the most part though). The design of MagicMock's assertions is also problematic (a typo'd assert_whatever can lead to a test silently succeeding!)

dimaqq

comment created time in 3 days

issue commentkkos/oniguruma

selectively disabling \A and \G

hmm ok I can accept that, though it seems to work for other anchors:

>>> reg = onigurumacffi.compile('(?!^)')
>>> reg.match('foo')
>>> 

fwiw, here's the real world example for that: https://github.com/textmate/html.tmbundle/blob/0c3d5ee54de3a993f747f54186b73a4d2d3c44a2/Syntaxes/HTML.plist#L138

asottile

comment created time in 3 days

GollumEvent

issue commentPyCQA/pycodestyle

W292: error message gets shown three times

interesting, this appears to be due to an edgecase in the tokenizer with comments:

$ python3 -m tokenize ../g.py 
0,0-0,0:            ENCODING       'utf-8'        
1,0-1,1:            NUMBER         '1'            
1,1-1,2:            NEWLINE        ''             
2,0-2,0:            ENDMARKER      ''             
$ python3 -m tokenize ../f.py 
0,0-0,0:            ENCODING       'utf-8'        
1,0-1,2:            COMMENT        '#a'           
1,2-1,2:            NL             ''             
1,2-1,3:            NEWLINE        ''             
2,0-2,0:            ENDMARKER      ''             
jugmac00

comment created time in 3 days

issue closedPyCQA/pycodestyle

E265: does not raise for `#: comment`

#: does not raise E265

a = print  #: neither raises E265

Flake8 version 3.15.1

pycodestyle --version
2.6.0

closed time in 3 days

jugmac00

issue commentPyCQA/pycodestyle

E265: does not raise for `#: comment`

this is intentional, #: comments are used for sphinx documentation

https://github.com/PyCQA/pycodestyle/blob/6a56d22bfa7502ea1b391a6266cbd8d2963a3a1e/pycodestyle.py#L1066

jugmac00

comment created time in 3 days

delete branch asottile/coveragepy

delete branch : no_skip_covered

delete time in 4 days

GollumEvent

issue commentkkos/oniguruma

selectively disabling \A and \G

awesome! thank you for working on this! I started playing with the implementation on master, and for the most part it seems to work how I would expect: https://github.com/asottile/onigurumacffi/pull/23

one issue I ran into is I think this shouldn't match, but seems to currently:

# pattern
(?!\G)
# flags
ONIG_OPTION_NOT_BEGIN_POSITION
# string (doesn't matter)
foo
# method
match

for example using my python code:

>>> import onigurumacffi
>>> reg = onigurumacffi.compile(r'(?!\G)')
>>> reg.match('foo', flags=onigurumacffi.OnigSearchOption.NOT_BEGIN_POSITION)
<onigurumacffi._Match span=(0, 0) match=''>
asottile

comment created time in 4 days

create barnchasottile/onigurumacffi

branch : runtime_search_flags

created branch time in 4 days

GollumEvent
GollumEvent
GollumEvent

push eventanthonywritescode/twitch-chat-bot

Anthony Sottile

commit sha a056e8304332035ac3033baf052f94b74778aa24

link the babi video in the editor command

view details

push time in 4 days

push eventasottile/personal-puppet

Anthony Sottile

commit sha 4c4d45c484e1f007a28d0d3e23bae6e5684cca92

Add libtool for building oniguruma

view details

push time in 4 days

GollumEvent

delete branch asottile/babi

delete branch : fix_background_on_close

delete time in 4 days

push eventasottile/babi

Anthony Sottile

commit sha bd60977438e8dac2f8c6335ad8f51ecf56014ba5

fix race condition with ^Z on close

view details

Anthony Sottile

commit sha 973b4c3cf84a3b44a737ec42190aeca179762ef4

Merge pull request #76 from asottile/fix_background_on_close fix race condition with ^Z on close

view details

push time in 4 days

PR merged asottile/babi

fix race condition with ^Z on close

resolves #75

+6 -0

0 comment

1 changed file

asottile

pr closed time in 4 days

issue closedasottile/babi

race in background / close

sometimes when closing and backgrounding at nearly the same time, it can cause babi to break the terminal

here's an example of what happens in that case:

closed time in 4 days

asottile

PR opened asottile/babi

fix race condition with ^Z on close

resolves #75

+6 -0

0 comment

1 changed file

pr created time in 4 days

create barnchasottile/babi

branch : fix_background_on_close

created branch time in 4 days

push eventanthonywritescode/thumbnails

Anthony Sottile

commit sha 91e23192973bd7727f4de8aecf512a60348e7291

explains #060

view details

push time in 4 days

GollumEvent

push eventanthonywritescode/explains

Anthony Sottile

commit sha 70d50634604528f30c261f577d554b8408b8b5bd

Update README.md

view details

push time in 4 days

issue commentpre-commit/pre-commit

Activate virtualenv in hook template

please read through the linked issues in the issue I linked you, I promise this is a duplicate. you're asking for special behaviour only for language: system hooks which is not going to happen

In this scenario pre-commit run would not locate hooks in the virtual environment, while git commit (with my change) would.

yes, that's exactly the difference in behaviour that I do not want

I struggle to imagine a user invoking pre-commit in a virtualenv and relying on that virtualenv not being on PATH. But then again, https://xkcd.com/1172/ ;-)

ok well you're not thinking too hard about this then :) -- the most common install layout for pre-commit on macos is to install pre-commit via brew. pre-commit installed via brew puts a virtualenv into /usr/local/.... activating this virtualenv would deactivate the user's virtualenv.

my setup is the same actually, though I install into ~/opt/venv and symlink into ~/bin.

pre-commit explicitly does not get involved with PATH manipulation because it encourages non-reproducible environment setups.

It does not work for tox/nox.

sure it does, I've seen quite a few people use tox -e foo as a hook


please trust that I've already put a lot of thought into this

cjolowicz

comment created time in 4 days

pull request commentpython/cpython

bpo-40874 Update the required libmpdec version for the decimal module

this breaks the packaging for ubuntu on all release versions -- is there a reason for this?

skrah

comment created time in 4 days

created tagdeadsnakes/python3.7

tagdebian/3.7.8-1+xenial1

created time in 5 days

push eventdeadsnakes/python3.7

Anthony Sottile

commit sha c2293fa88f7f9f8adccf7a150ce57730f7aacb43

Imported Upstream version 3.7.8

view details

Anthony Sottile

commit sha a36f3217a19df0f2c2ef40fbbfefa7b798ca4e8c

Merge branch 'upstream' into ubuntu/xenial

view details

Anthony Sottile

commit sha aa0b4e0ac7ddcc3c2b996fb0113b1aefa12a99d8

Refresh patches.

view details

Anthony Sottile

commit sha bc4ea12f64906d247fe16508f17e0964cfce46ec

Update SVER to 3.7.8

view details

Anthony Sottile

commit sha b815919ef83275dbb930824c0c9ef9c4b0db6113

Finish changelog for 3.7.8-1+xenial1

view details

push time in 5 days

created tagdeadsnakes/python3.7

tagdebian/3.7.8-1+bionic1

created time in 5 days

push eventdeadsnakes/python3.7

Anthony Sottile

commit sha c2293fa88f7f9f8adccf7a150ce57730f7aacb43

Imported Upstream version 3.7.8

view details

Anthony Sottile

commit sha 0278271b46b8c35516ec1138c7aa06cdf3d34287

Merge branch 'upstream' into ubuntu/bionic

view details

Anthony Sottile

commit sha 697e403e031a83763dc2a8d1f2b141b020a6927d

Refresh patches.

view details

Anthony Sottile

commit sha d93bf53f3032de425bd7d0ccae4c227faa52e65c

Update SVER to 3.7.8

view details

Anthony Sottile

commit sha 7cd0fcd82e4b5ecfd0f1da1d2cd958d30c0ca9b2

Finish changelog for 3.7.8-1+bionic1

view details

push time in 5 days

more