push eventanthonywritescode/aoc2019
commit sha 7d3e0d918144d6cb94b7a232e10146d9a13d17a0
Fix tiny bug in day 14 part 2
commit sha ba008a778f140ff4296521597e1efc0c8efd5497
Implement day 14 in python0 This works in the following versions that I tried: - 0.9.1 - 1.0.1 - (1.1 doesn't work due to `open()` being broken) - 1.4 - 1.6 - 2.0 - 2.7 - 3.5 - 3.6 - 3.7 - 3.8 - 3.9
push time in 6 hours
push eventanthonywritescode/aoc2019
commit sha 3916431f19ec2c02298a88770be0cdbe2cee064c
I did ruby today, yikes
push time in 8 hours
push eventanthonywritescode/aoc2019
commit sha 08db9a27ae2326b6fb5fcc7ed0950f2f53306e33
day 14 part 1
commit sha 2a44a4efb6d0b2cb14c76a2e21eeb4a4798efcfa
day 14 part 2
push time in 8 hours
push eventasottile/babi
commit sha c1c6f2fe27490b677e3b9625eb8d570db307808b
# squash me
push time in 11 hours
push eventanthonywritescode/aoc2019
commit sha fe4eca2c552c281e8a43b3db60ff7f7f19ddec25
also set up ruby in CI
push time in 12 hours
push eventanthonywritescode/aoc2019
commit sha 3a8d27da53c287892eeff651f34cfcb83cfe53a4
Make day 9 part 2 more easy to copy and paste
commit sha 72067800bf82d27186005b4bf890cb24a418d573
day 13 part 1
commit sha 3f8e3dd7882075a287f3a342c5f18cbc549183e4
day 13 part 2
commit sha 855e78cb2d1ecbc05ecea50167c48fef8a273197
day 13 part 1 in ruby
commit sha 50011d5fa2ba5862978446de9e62abdf1db5ee05
Implement day 13 part 2 in ruby
push time in 12 hours
issue commentpsf/black
pre-commit fails when setting up the black environment.
yes, you can even combine the two as pre-commit install --install-hooks
we're fixing the root cause in setuptools-scm though so that workaround shouldn't be necessary indefinitely
comment created time in 18 hours
issue commentpypa/setuptools_scm
yeah you can probably narrow it to a 2-repository reproduction: set GIT_INDEX to an unrelated git repo and attempt to install repo 2
comment created time in 18 hours
issue commentpsf/black
pre-commit fails when setting up the black environment.
A workaround is to call pre-commit install-hooks manually once outside of git commit (pre-commit will reuse that cache)
comment created time in 18 hours
issue commentpypa/setuptools_scm
nah it's very much not that -- I triaged it above, this is the environment variables that git puts into the environment interfering with whatever git commands setuptools-scm is running
for instance if you take the above reproduction and instead call the script directly it works fine:
$ diff -u t.sh.old t.sh
--- t.sh.old 2019-12-13 13:20:06.431135823 -0800
+++ t.sh 2019-12-13 13:20:09.219017427 -0800
@@ -16,5 +16,4 @@
"$PWD/venv/bin/pip" install "$PWD/black"
EOF
chmod +x "$PWD/y/.git/modules/z/hooks/pre-commit"
-cd y/z
-git commit -m "test"
+"$PWD/y/.git/modules/z/hooks/pre-commit"
comment created time in 18 hours
pull request commentpython/mypy
Fix mypy pretty output within a pty
deleted the test, seems weird to not have a regression test for this fix but that's not my call!
comment created time in 18 hours
push eventasottile/mypy
commit sha 9dccccaf68924a89f5d01d2a76a671a5dc7f3918
Fix mypy pretty output within a pty
commit sha 86498c0b7b7a83bb854e76a11dbf2e521c398e59
git rm mypy/test/testutil.py
push time in 18 hours
issue commentpre-commit/pre-commit
errr actually you're looking for language: pygrep -- here's some examples: https://github.com/pre-commit/pygrep-hooks
comment created time in 19 hours
issue closedpre-commit/pre-commit
I'm looking for a hook that disallows arbitrary strings ("NOCOMMIT" or "TODO") for instance, where if a file has that string in it, the hook fails and does not allow for a commit.
closed time in 19 hours
ahonneckeissue commentpre-commit/pre-commit
pre-commit has a "language" which makes it easy to configure hooks like this: language: fail
comment created time in 19 hours
PR opened python/mypy
Resolves #8144
here's the same script that was used in the reproduction for #8144:
$ python3 ../wut/t.py mypy --pretty ../wut/t.py
../wut/t.py:6: error: Incompatible types in assignment (expression has type
"str", variable has type "int")
x: int = 'nope'
^
Found 1 error in 1 file (checked 1 source file)
pr created time in 19 hours
issue openedpython/mypy
mypy produces mangled output when run with a pty
version information:
$ mypy --version
mypy 0.750
$ python3 --version --version
Python 3.6.8 (default, Oct 7 2019, 12:59:55)
[GCC 8.3.0]
test pty script:
import errno
import os
import subprocess
import sys
x: int = 'nope'
class Pty(object):
def __init__(self):
self.r = self.w = None
def __enter__(self):
self.r, self.w = os.openpty()
return self
def close_w(self):
if self.w is not None:
os.close(self.w)
self.w = None
def close_r(self):
assert self.r is not None
os.close(self.r)
self.r = None
def __exit__(self, exc_type, exc_value, traceback):
self.close_w()
self.close_r()
def cmd_output_p(*cmd, **kwargs):
with open(os.devnull) as devnull, Pty() as pty:
kwargs = {'stdin': devnull, 'stdout': pty.w, 'stderr': pty.w}
proc = subprocess.Popen(cmd, **kwargs)
pty.close_w()
buf = b''
while True:
try:
bts = os.read(pty.r, 4096)
except OSError as e:
if e.errno == errno.EIO:
bts = b''
else:
raise
else:
buf += bts
if not bts:
break
return proc.wait(), buf, None
_, buf, _ = cmd_output_p(*sys.argv[1:])
sys.stdout.buffer.write(buf)
Output:
$ python3 t.py mypy --pretty t.py
t.py:6: error:
Incompatible
types
in
assignment
(expression
has
type
"str",
variable
has
type
"int")
x: int = 'nope'
^
Found 1 error in 1 file (checked 1 source file)
the output is colored (as expected) but has strange line breaks, almost like there's some wrapping logic that assumes the terminal is zero width or something (?)

Interestingly, the output appears correct when not using --pretty:
$ python3 t.py mypy t.py
t.py:6: error: Incompatible types in assignment (expression has type "str", variable has type "int")
Found 1 error in 1 file (checked 1 source file)
going a bit further, here's some info that potentially confirms my suspicion:
$ python3 t.py python3 -c 'import shutil; print(shutil.get_terminal_size())'
os.terminal_size(columns=0, lines=0)
created time in 19 hours
issue commentpsf/black
pre-commit fails when setting up the black environment.
I've created https://github.com/pypa/setuptools_scm/issues/381 to track this
comment created time in 20 hours
issue openedpypa/setuptools_scm
this issue is oddly specific but I here's the reproduction:
#!/usr/bin/env bash
set -euxo pipefail
rm -rf y z home black venv
git clone https://github.com/psf/black
export PRE_COMMIT_HOME="$PWD/home"
git init y
git init z
git -C z commit --allow-empty -m 'commit!'
git -C y submodule add "$PWD/z"
cat > "$PWD/y/.git/modules/z/hooks/pre-commit" <<EOF
#!/usr/bin/env bash
virtualenv "$PWD/venv"
"$PWD/venv/bin/pip" install "$PWD/black"
EOF
chmod +x "$PWD/y/.git/modules/z/hooks/pre-commit"
cd y/z
git commit -m "test"
this currently ends as:
$ bash t.sh
+ rm -rf y z home black venv
+ git clone https://github.com/psf/black
Cloning into 'black'...
remote: Enumerating objects: 14, done.
remote: Counting objects: 100% (14/14), done.
remote: Compressing objects: 100% (13/13), done.
remote: Total 3284 (delta 7), reused 2 (delta 1), pack-reused 3270
Receiving objects: 100% (3284/3284), 3.72 MiB | 2.15 MiB/s, done.
Resolving deltas: 100% (2223/2223), done.
+ export PRE_COMMIT_HOME=/tmp/z/home
+ PRE_COMMIT_HOME=/tmp/z/home
+ git init y
Initialized empty Git repository in /tmp/z/y/.git/
+ git init z
Initialized empty Git repository in /tmp/z/z/.git/
+ git -C z commit --allow-empty -m 'commit!'
[master (root-commit) 4f0b4dc] commit!
+ git -C y submodule add /tmp/z/z
Cloning into '/tmp/z/y/z'...
done.
+ cat
+ chmod +x /tmp/z/y/.git/modules/z/hooks/pre-commit
+ cd y/z
+ git commit -m test
Using real prefix '/usr'
Path not in prefix '/home/asottile/opt/venv/include/python3.6m' '/usr'
New python executable in /tmp/z/venv/bin/python3
Also creating executable in /tmp/z/venv/bin/python
Installing setuptools, pip, wheel...
done.
Processing /tmp/z/black
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing wheel metadata ... error
ERROR: Command errored out with exit status 1:
command: /tmp/z/venv/bin/python3 /tmp/z/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp33fojq8s
cwd: /tmp/pip-req-build-6b2fw0yg
Complete output (36 lines):
Traceback (most recent call last):
File "/tmp/z/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
main()
File "/tmp/z/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/tmp/z/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-ydhjt6g5/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 156, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-ydhjt6g5/overlay/lib/python3.6/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 97, in <module>
"blackd=blackd:patched_main [d]",
File "/tmp/pip-build-env-ydhjt6g5/overlay/lib/python3.6/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/usr/lib/python3.6/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/tmp/pip-build-env-ydhjt6g5/overlay/lib/python3.6/site-packages/setuptools/dist.py", line 448, in __init__
k: v for k, v in attrs.items()
File "/usr/lib/python3.6/distutils/dist.py", line 281, in __init__
self.finalize_options()
File "/tmp/pip-build-env-ydhjt6g5/overlay/lib/python3.6/site-packages/setuptools/dist.py", line 740, in finalize_options
ep.load()(self)
File "/tmp/pip-build-env-ydhjt6g5/overlay/lib/python3.6/site-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/tmp/pip-build-env-ydhjt6g5/overlay/lib/python3.6/site-packages/setuptools_scm/integration.py", line 17, in version_keyword
dist.metadata.version = get_version(**value)
File "/tmp/pip-build-env-ydhjt6g5/overlay/lib/python3.6/site-packages/setuptools_scm/__init__.py", line 150, in get_version
parsed_version = _do_parse(config)
File "/tmp/pip-build-env-ydhjt6g5/overlay/lib/python3.6/site-packages/setuptools_scm/__init__.py", line 113, in _do_parse
"use git+https://github.com/user/proj.git#egg=proj" % config.absolute_root
LookupError: setuptools-scm was unable to detect version for '/tmp/pip-req-build-6b2fw0yg'.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
----------------------------------------
ERROR: Command errored out with exit status 1: /tmp/z/venv/bin/python3 /tmp/z/venv/lib/python3.6/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmp33fojq8s Check the logs for full command output.
guess at a fix
I don't know much about setuptools-scm, but I suspect a patch with functionality similar to this would fix the problem
Original issue: https://github.com/psf/black/issues/1180
created time in 20 hours
issue commentpsf/black
pre-commit fails when setting up the black environment.
and here is a minimal reproduction not involving pre-commit:
#!/usr/bin/env bash
set -euxo pipefail
rm -rf y z home black venv
git clone https://github.com/psf/black
export PRE_COMMIT_HOME="$PWD/home"
git init y
git init z
git -C z commit --allow-empty -m 'commit!'
git -C y submodule add "$PWD/z"
cat > "$PWD/y/.git/modules/z/hooks/pre-commit" <<EOF
#!/usr/bin/env bash
virtualenv "$PWD/venv"
"$PWD/venv/bin/pip" install "$PWD/black"
EOF
chmod +x "$PWD/y/.git/modules/z/hooks/pre-commit"
cd y/z
git commit -m "test"
comment created time in 20 hours
issue commentpsf/black
pre-commit fails when setting up the black environment.
that's very helpful! it also crashes for me inside of a submodule
here's a more minimal reproduction:
#!/usr/bin/env bash
set -euxo pipefail
rm -rf y z home
export PRE_COMMIT_HOME="$PWD/home"
git init y
git init z
git -C z commit --allow-empty -m 'commit!'
git -C y submodule add "$PWD/z"
cat > "$PWD/y/z/.pre-commit-config.yaml" <<EOF
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
EOF
cd y/z
pre-commit install
git commit -m "test"
comment created time in 21 hours
push eventpre-commit/pre-commit.github.io
commit sha f11f77ff101e25cb390619537f93fc0ceb167943
Deployed 839 to Github Pages
push time in a day
issue commentasottile/blacken-docs
compatibility with jupyter-sphinx
ah I think you need
rf'^(?P<indent> *)\.\. (jupyter-execute::|(code|code-block|sourcecode|ipython):: {PY_LANGS})\n'
comment created time in a day
issue commentasottile/blacken-docs
compatibility with jupyter-sphinx
can you show your patch? maybe I can help :)
comment created time in a day
push eventpre-commit/pre-commit.github.io
commit sha f5eaa27c4bcad3cf014299ffc737bea4838c0b19
Add markdownlint-cli
commit sha a487a70e014b46ee95b0bb72f44e4b743075c562
Merge pull request #276 from scop/markdownlint-cli Add markdownlint-cli
push time in a day
PR merged pre-commit/pre-commit.github.io
pr closed time in a day
issue commentasottile/blacken-docs
compatibility with jupyter-sphinx
I believe (?) it would be extending this line to also match jupyter-execute: https://github.com/asottile/blacken-docs/blob/109732aa39a1cafd631e5015b395fac02eb16ee0/blacken_docs.py#L25
comment created time in a day
issue closedpre-commit/pre-commit
Fails to install black with setuptools-scm error
foo@foo-VirtualBox:~/root/microservices/billing$ pre-commit install
pre-commit installed at /home/foo/root/.git/modules/microservices/billing/hooks/pre-commit
foo@foo-VirtualBox:~/root/microservices/billing$ git status
On branch dev
Your branch is up to date with 'origin/dev'.
Changes to be committed:
(use "git reset HEAD <file>..." to unstage)
new file: a.py
foo@foo-VirtualBox:~/root/microservices/billing$ git commit -m "foo"
[INFO] Installing environment for https://github.com/psf/black.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
An unexpected error has occurred: CalledProcessError: Command: ('/home/foo/.cache/pre-commit/repox7sb94wd/py_env-python3.7/bin/python3.7', '/home/foo/.cache/pre-commit/repox7sb94wd/py_env-python3.7/bin/pip', 'install', '.')
Return code: 1
Expected return code: 0
Output:
Processing /home/foo/.cache/pre-commit/repox7sb94wd
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'done'
Preparing wheel metadata: started
Preparing wheel metadata: finished with status 'error'
Errors:
ERROR: Command errored out with exit status 1:
command: /home/foo/.cache/pre-commit/repox7sb94wd/py_env-python3.7/bin/python3.7 /home/foo/.cache/pre-commit/repox7sb94wd/py_env-python3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpq2o70erc
cwd: /tmp/pip-req-build-sy15f1qc
Complete output (36 lines):
Traceback (most recent call last):
File "/home/foo/.cache/pre-commit/repox7sb94wd/py_env-python3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 257, in <module>
main()
File "/home/foo/.cache/pre-commit/repox7sb94wd/py_env-python3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 240, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
File "/home/foo/.cache/pre-commit/repox7sb94wd/py_env-python3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py", line 110, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
File "/tmp/pip-build-env-ewlgs0nn/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 156, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-ewlgs0nn/overlay/lib/python3.7/site-packages/setuptools/build_meta.py", line 142, in run_setup
exec(compile(code, __file__, 'exec'), locals())
File "setup.py", line 65, in <module>
"blackd=blackd:patched_main [d]",
File "/tmp/pip-build-env-ewlgs0nn/overlay/lib/python3.7/site-packages/setuptools/__init__.py", line 145, in setup
return distutils.core.setup(**attrs)
File "/home/linuxbrew/.linuxbrew/Cellar/python/3.7.5/lib/python3.7/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/tmp/pip-build-env-ewlgs0nn/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 448, in __init__
k: v for k, v in attrs.items()
File "/home/linuxbrew/.linuxbrew/Cellar/python/3.7.5/lib/python3.7/distutils/dist.py", line 292, in __init__
self.finalize_options()
File "/tmp/pip-build-env-ewlgs0nn/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 740, in finalize_options
ep.load()(self)
File "/tmp/pip-build-env-ewlgs0nn/overlay/lib/python3.7/site-packages/setuptools/dist.py", line 747, in _finalize_setup_keywords
ep.load()(self, ep.name, value)
File "/tmp/pip-build-env-ewlgs0nn/overlay/lib/python3.7/site-packages/setuptools_scm/integration.py", line 17, in version_keyword
dist.metadata.version = get_version(**value)
File "/tmp/pip-build-env-ewlgs0nn/overlay/lib/python3.7/site-packages/setuptools_scm/__init__.py", line 150, in get_version
parsed_version = _do_parse(config)
File "/tmp/pip-build-env-ewlgs0nn/overlay/lib/python3.7/site-packages/setuptools_scm/__init__.py", line 113, in _do_parse
"use git+https://github.com/user/proj.git#egg=proj" % config.absolute_root
LookupError: setuptools-scm was unable to detect version for '/tmp/pip-req-build-sy15f1qc'.
Make sure you're either building from a fully intact git repository or PyPI tarballs. Most other sources (such as GitHub's tarballs, a git checkout without the .git folder) don't contain the necessary metadata and will not work.
For example, if you're using pip, instead of https://github.com/user/proj/archive/master.zip use git+https://github.com/user/proj.git#egg=proj
----------------------------------------
ERROR: Command errored out with exit status 1: /home/foo/.cache/pre-commit/repox7sb94wd/py_env-python3.7/bin/python3.7 /home/foo/.cache/pre-commit/repox7sb94wd/py_env-python3.7/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py prepare_metadata_for_build_wheel /tmp/tmpq2o70erc Check the logs for full command output.
Check the log at /home/foo/.cache/pre-commit/pre-commit.log
foo@foo-VirtualBox:~/root/microservices/billing$ cat .pre-commit-config.yaml
repos:
- repo: https://github.com/psf/black
rev: stable
hooks:
- id: black
language_version: python3.7
foo@foo-VirtualBox:~/root/microservices/billing$
closed time in a day
Siecjeissue commentpre-commit/pre-commit
Fails to install black with setuptools-scm error
can you provide more information here: https://github.com/psf/black/issues/1180
I haven't been able to reproduce at all, if you could get a reproduction using docker that would be great
comment created time in a day
push eventasottile/babi
commit sha 27baa3b170c8a88310696fe85bd64eb413d35cb6
WIP: find-replace
commit sha 8e96d40ecc611c735f4f65cfe3072f7f4a8ca92e
failing test
push time in 2 days
push eventasottile/babi
commit sha 65cae5493d4de5c079dbab8335d594b9eff8b261
WIP: find-replace
push time in 2 days
created tagpre-commit/mirrors-jshint
Mirror of jshint package for pre-commit.
created time in 2 days
push eventpre-commit/mirrors-jshint
commit sha b650718b42c4715a2cc7d718a7142bf9d21ee98d
Mirror: 2.11.0-rc1
push time in 2 days
pull request commentpytest-dev/pytest
Make 'S' and 'F' aliases to 's' and 'f' respectively
1c020c3d32ebf0cd008271462b6bbc12a77db2d9 appears to be the commit which added fF and sS -- from that it looks like maybe something to do with skipped / failed tests which weren't failing as a result of calling the test function? unclear :S
comment created time in 2 days
issue commentpytest-dev/pytest
pytest version 5.2.4 hanged with param --disable-warnings
can you provide the test code which is failing?
comment created time in 2 days
push eventanthonywritescode/thumbnails
commit sha 5b34b678ba7db6d67c0f352c4b0bca10c8d265a5
aoc 2019 day 11
push time in 2 days
push eventanthonywritescode/aoc2019
commit sha 3ae1fb66a25b3b1afd99d978da7701f1fa3a9de8
day 12 part 1
commit sha 72d3df3db1add8d34d8bdcd7191889219b89a098
day 12 part 2
commit sha 1fd1d9e851b3d16ce32f655c4e5bb5184e355d08
implement day 12 part 1 in kotlin
commit sha 20fec917e48d96d7ed1e9afbc1296a3d37ad6868
Implement day 12 part 2 in kotlin
push time in 2 days
Pull request review commentpytest-dev/pytest
class MockConfig: nodes.Node(name="test", config=ms, session=ms, nodeid="None") assert w[0].lineno == inspect.currentframe().f_lineno - 1 assert w[0].filename == __file__++[email protected]("default")[email protected]("config_mode", ["ini", "cmdline"])+def test_noprintlogs_is_deprecated_ini(testdir, config_mode):+ if config_mode == "ini":+ args = ()+ testdir.makeini(+ """+ [pytest]+ log_print=False+ """+ )+ else:+ assert config_mode == "cmdline"+ args = ("--no-print-logs",)
I meant for a helper for the bottom half and don't use parametrize or an if statement
comment created time in 3 days
issue commentasottile/pip-custom-platform
Non-Intel breakages on openSUSE in test_platform_linux[case7]
First off, I understand we appear to have gotten off on the wrong foot, please do not take my comments personally and I hope that we can work amicably now and in the future.
if you consult the README it gives an explanation of the goal this tool targets, handling architecture is not one of them since that's already solved by the vanilla tools
I do not have access to non-x86_64 and therefore it is prohibitively difficult for me to test against and downright frustrating to attempt to write code targetting it. I am not gifted with a rack of arm / Z / ppc / etc. hosts which I can use to test. And unless they're exposing actual bugs in the implementation it's not worth the greenhouse gasses, effort, or even the discussion.
I closed this issue because I don't care about the outcome of it, I have no intention myself to work on it and it doesn't affect the correctness of the tool. And that the goal of the tool is to handle the ambiguity of linux_x86_64 (even though it may work fine on other architectures / platforms)
If you can point out where this is a valid problem I'll reopen, but an exotic architecture test failure (in which the actual functionality probably actually works just fine) is not a helpful issue. I'd be especially amenable if you lead with a useful patch / etc. to help work towards it. I'm constantly bombarded with packagers which don't put in basic effort to try and solve problems themselves / improve the ecosystem :( Please understand this is free software and apologies if this looks personal
comment created time in 3 days
issue commentpytest-dev/pytest
An ergonomics suggestion - accept format strings as `ids` in mark.parametrize()
plus it would potentially break this which works today:
CASES = (1, 23, 2, 4)
@pytest.mark.parametrize('x', CASES, ids=string.ascii_letters[:len(CASES)])
def test(x):
pass
$ pytest t.py -v
============================= test session starts ==============================
platform linux -- Python 3.6.8, pytest-5.3.1, py-1.8.0, pluggy-0.13.1 -- /tmp/x/venv/bin/python3
cachedir: .pytest_cache
rootdir: /tmp/x
collected 4 items
t.py::test[a] PASSED [ 25%]
t.py::test[b] PASSED [ 50%]
t.py::test[c] PASSED [ 75%]
t.py::test[d] PASSED [100%]
============================== 4 passed in 0.01s ===============================
comment created time in 3 days
issue commentpytest-dev/pytest
An ergonomics suggestion - accept format strings as `ids` in mark.parametrize()
oh I see what you're proposing -- I'm still -1 on what you're proposing, the type for the ids function is already complicated enough to understand as it is -- plus you can accomplish this by passing the .format function directly
while it would be possible, it would increase the complexity of parametrize further than it already is and (imo) with not much benefit.
open to hear what the other maintainers say but my leaning is that implementing and explaining this nuance of ids in docs would be pretty difficult and the small benefit in this one case would not out weigh the maintenance
comment created time in 3 days
push eventpytest-dev/pytest
commit sha 071106042289e67341e5435e456780fe72854809
Change 4639 from feature to improvement An improvement seems more adequate here.
commit sha b29ae03cb6c369f69b86da1505e73e7dbe56b9d0
Merge pull request #6329 from nicoddemus/4639-improv Change 4639 from feature to improvement
push time in 3 days
PR merged pytest-dev/pytest
An improvement seems more adequate here.
pr closed time in 3 days
issue commentpytest-dev/pytest
An ergonomics suggestion - accept format strings as `ids` in mark.parametrize()
I believe you're looking for idfn http://doc.pytest.org/en/latest/example/parametrize.html#different-options-for-test-ids
comment created time in 3 days
issue openedasottile/pyupgrade
metaclass extending object takes two passes to resolve
minor thing, would be a useful improvement:
class C(six.with_metaclass(abc.ABCMeta, object)): pass
created time in 3 days
issue commentasottile/pip-custom-platform
afaik it works all the way back to pip 1.4 (2013)
comment created time in 3 days
issue commentasottile/pip-custom-platform
upper bounding the version is not a maintainable approach to python packaging so I won't do that (usually a new release works just fine)
this appears to be the main function movement, would you like to take a stab at a patch?
comment created time in 3 days
issue commentasottile/pip-custom-platform
Non-Intel breakages on openSUSE in test_platform_linux[case7]
that said, if you want this, send a patch and I'll consider it
comment created time in 3 days
issue closedasottile/pip-custom-platform
Non-Intel breakages on openSUSE in test_platform_linux[case7]
Packaged at https://build.opensuse.org/package/show/home:jayvdb:py-new/python-pip-custom-platform
There are a lot of failures in test_platform_linux due to different arch, e.g. on ppc
[ 119s] __________________________ test_platform_linux[case7] __________________________
[ 119s]
[ 119s] mock_distro = <MagicMock name='distro' id='140736209194344'>
[ 119s] mock_platform = <MagicMock name='platform' id='140736209215048'>
[ 119s] case = SystemTestCase(docker_image='base/archlinux', mock_id='arch', mock_version='', expected_platform_name='linux_x86_64', setup_script=('pacman -Syy >&2', 'pacman -S --noconfirm python python-pip >&2'))
[ 119s]
[ 119s] @pytest.mark.parametrize('case', SYSTEM_TESTCASES)
[ 119s] @mock.patch('pip_custom_platform.default_platform.platform')
[ 119s] @mock.patch('pip_custom_platform.default_platform.distro')
[ 119s] def test_platform_linux(mock_distro, mock_platform, case):
[ 119s] mock_distro.id.return_value = case.mock_id
[ 119s] mock_distro.version.return_value = case.mock_version
[ 119s] mock_platform.system.return_value = 'Linux'
[ 119s] mock_platform.machine.return_value = 'x86_64'
[ 119s] > assert default_platform_name() == case.expected_platform_name
[ 119s] E AssertionError: assert 'linux_ppc64le' == 'linux_x86_64'
[ 119s] E - linux_ppc64le
[ 119s] E + linux_x86_64
On s390x
[ 66s] E AssertionError: assert 'linux_s390x' == 'linux_x86_64'
[ 66s] E - linux_s390x
[ 66s] E + linux_x86_64
I expect this only needs a minor fix in the tests, or even skip it on non-Intel platforms if that case is intel specific.
fwiw, pymonkey is passing all tests on all openSUSE current platforms (except armv7l not yet built) https://build.opensuse.org/package/show/home:jayvdb:py-new/python-pymonkey
closed time in 3 days
jayvdbissue commentasottile/pip-custom-platform
Non-Intel breakages on openSUSE in test_platform_linux[case7]
yeah there's no intention to test on anything other than x86_64 -- it does work on other platforms (and macos even and probably windows) but it's not worth the effort to test there
comment created time in 3 days
Pull request review commentpytest-dev/pytest
class MockConfig: nodes.Node(name="test", config=ms, session=ms, nodeid="None") assert w[0].lineno == inspect.currentframe().f_lineno - 1 assert w[0].filename == __file__++[email protected]("default")[email protected]("config_mode", ["ini", "cmdline"])+def test_noprintlogs_is_deprecated_ini(testdir, config_mode):+ if config_mode == "ini":+ args = ()+ testdir.makeini(+ """+ [pytest]+ log_print=False+ """+ )+ else:+ assert config_mode == "cmdline"+ args = ("--no-print-logs",)
I'd rather see the assertion as a helper function than a stringly typed if statement -- no need for duplication and it's very clear the execution path
comment created time in 3 days
push eventanthonywritescode/thumbnails
commit sha 991be87b823fce7286f84b44989cfeb7306b1000
aoc 2019 day 10
push time in 3 days
issue commentasottile/pyupgrade
Remove parentheses from @functools.lru_cache() when upgrading to Python 3.8
sound fine! I don't expect any to be mocking lru_cache so this should be mostly good -- it will require a --py38-plus option but that's no big deal
comment created time in 3 days
Pull request review commentpytest-dev/pytest
class MockConfig: nodes.Node(name="test", config=ms, session=ms, nodeid="None") assert w[0].lineno == inspect.currentframe().f_lineno - 1 assert w[0].filename == __file__++[email protected]("default")[email protected]("config_mode", ["ini", "cmdline"])+def test_noprintlogs_is_deprecated_ini(testdir, config_mode):+ if config_mode == "ini":+ args = ()+ testdir.makeini(+ """+ [pytest]+ log_print=False+ """+ )+ else:+ assert config_mode == "cmdline"+ args = ("--no-print-logs",)
I tend to try and avoid logic in tests, I'd probably write this as two separate tests instead of this
tests should be as simple as possible for the programmer to read
here's a blog post I often link on this subject (a little more severe of a case there, but still the same sentiment): https://testing.googleblog.com/2014/07/testing-on-toilet-dont-put-logic-in.html
comment created time in 3 days
push eventanthonywritescode/aoc2019
commit sha aba638d2286a3b7070054318a64c79f4e2cb040e
Implement day 11 part 1 in swift
commit sha 98df31d13b33d6110e40f70de71d3bad345509a0
implement day 11 part 2 in swift
push time in 3 days
push eventanthonywritescode/aoc2019
commit sha f36598118af7962cd33f5eb52162afbb6fd27813
day 11 part1
commit sha 96a647eeed625d6c921f1114c3cba340fdca2e0d
day 11 part 2
commit sha 526cc216a2df4cb03ac750ee940c9ac5a67ca532
A working day 9 part 2 in sqlite
push time in 3 days
push eventanthonywritescode/aoc2019
commit sha 7559e551eb3b7d352f706e9400cbc772d4f3e3e7
slightly improve sqlite day 9 part 1
commit sha 66f624e2d52ec1fc13fcc2681bf3e3f02b4dad8c
slightly faster sqlite part 1
push time in 3 days
pull request commentpytest-dev/pytest
looks like your branch is accidentally based on master but targetting features -- could you rebase on top of features?
should be able to
git rebase -i upstream/features
and then remove any commits which aren't yours
(let me know and I can do this for you and push to your branch)
comment created time in 3 days
issue commentpytest-dev/pytest
Allow pytest.raises to accept sequence of str/Pattern for match argument
imo there should be one obvious way to do it, having both apis seems not great (when .match(...) already does what you're looking for)
comment created time in 3 days
push eventanthonywritescode/aoc2019
commit sha d6eb848a409266f244e759bf8161131e8da94199
Add quick disassembler for intcode
push time in 4 days
issue commentekalinin/nodeenv
`nodeenv --prebuilt` on musl libc produces non-working binaries
woohoo, upstream added musl binaries, I'll take a stab at making this work :)
comment created time in 4 days
push eventlyft/cruise-control
commit sha 039f107a7a5d1782250b462f0fc75cbb6cf458e3
Bump up Kafka version to 2.0.0 (#282) * Bump up kafka and kafka-clients dependency to 2.0.0 * Remove dependency on li-apache-kafka-clients * Rebase code to work with kafka 2.0.0.
commit sha e0766edfbebb26a347fd864d4778b7e85a44a693
Add partition incoming message rate to partition_load endpoint (#281)
commit sha c2713010aa060209665208c82512168ba2688fdb
Enable state endpoint queries to specify substates to be queried. (#284)
commit sha e40a8918fe3e7be2416012131ae4c648f5a82910
Minor servlet code refactoring. (#287)
commit sha 5907135a667837e191c79f26e80e99d0fa6f7bfc
Refactor Metrics Reporter test harness. (#290)
commit sha 09d519a32d91a40fb6268e2309bb446da02c1c48
Make kafka_cluster_state report offline replicas. (#289)
commit sha 3790fb3c39c3c419209fac70bbf9a582e55aa84f
Fix state endpoint response with substates. (#291)
commit sha 9dcd6828cf3008edc2ac9129b9a381cc6309e65b
Add min_valid_partition_ratio parameter to partition_load endpoint (#294)
commit sha 96ea3a5d2e500affae633b16446377f4d035be9d
Update README to add artifact information (#296)
commit sha d6ae3e2b401188e61502d22a933adefa68de4b9a
Remove invalid parameter for add_broker endpoint (#297)
commit sha 6ac91cb734962879072bdd0732ab905b409ba048
Fix action acceptance of swap and leadership movements in topic replica distribution goal. (#298)
commit sha f4697e4c90e27d554aded2712c2d087438579183
Fix minor typo in cruisecontrol.properties. (#300)
commit sha f0142d76b05ca56c80213802c7f12c0a0194bf11
Add sensors to track the session lifetime and request execution time (#295)
commit sha 17f7196fdd2608ca09d9f6dd40c54336de191a72
Update README with CricleCi build status. (#306)
commit sha 670bc64c5a8e96c0b2adeb7ebdd22134fb4219e8
Fix acceptance of window with zero valid entity as valid window in MetricSampleAggregator (#307)
commit sha 17c4642531a2c8f7e6a5f9e545eabdb48991a345
Add several configs to KafkaCruiseControlConfig. (#299)
commit sha c0145e11fff0310e658f07874342d3591223738e
Correctly display cluster load after rebalance (#312)
commit sha 135c5a3def3ca2b1f51afef7b19a4d863bde1067
Improve the log produced in metric sampling (#301)
commit sha 20dd57427ca9f42365a41a9f238eff6cfa46ea1f
Minor fix in JavaDoc format. (#316)
commit sha 40c43df82e440e1b6e2edc6d8fc592c16637fa84
Add skip_hard_goal_check parameter to add_broker, remove_broker, and rebalance endpoints (#305)
push time in 4 days
pull request commentPyCQA/pyflakes
namespace pyflakes's node monkeypatches
but basically, two plugins are monkeypatching .parent in different ways causing a conflict
comment created time in 4 days
pull request commentPyCQA/pyflakes
namespace pyflakes's node monkeypatches
ah you don't even have bandit, it must be one of click-best-practices, click-launch-uses-literal, click-option-check, or flake8-flask
I can't find the source for click-launch-uses-literal or click-option-check but suspect those two (the others look fine)
comment created time in 4 days
pull request commentPyCQA/pyflakes
namespace pyflakes's node monkeypatches
It has not yet -- if you upgrade the other conflicting package (I believe it was bandit?) it should resolve
comment created time in 4 days
Pull request review commentYelp/ephemeral-port-reserve
+include LICENSE+include README.md+recursive-include tests *.py
I don't believe I have insulted intelligence anywhere? If I have please point it out and I will correct it
comment created time in 4 days
push eventanthonywritescode/aoc2019
commit sha 835ea21b2f28f01388676dd05fd07ac30dee3c44
simplify sort logic
commit sha 2f2325f10c6e3350fbf8cd7c9190e53eda5602e4
Simplify sort logic
push time in 4 days
issue commentpre-commit/pre-commit
Binding pre-commit-config.yaml package versions to repo package.json?
I misunderstood the script as running pip install --upgrade inside the pre-commit envs and after a second read noticed it was a different pip and deleted the comment, it's still using private implementation detail so I would suggest you don't do that. the "public"ish interfaces are in pre_commit.clientlib only
comment created time in 4 days
push eventanthonywritescode/aoc2019
commit sha 569464c6d493c80f124f8b5624307741d44e6cd9
day 10 part 2 in powershell
push time in 4 days
push eventasottile/ephemeral-port-reserve
commit sha cc62b91d35bbc93f720d5e7109aa7bb7fcf4c899
Use setuptools declarative metadata
push time in 4 days
issue commentpre-commit/pre-commit
Binding pre-commit-config.yaml package versions to repo package.json?
that script is terrifying, the environments inside the pre-commit cache are intended to be implementation detail and immutable -- please don;t do that you're asking for all sorts of trouble
comment created time in 4 days
pull request commentDRMacIver/hecate
@jayvdb if you're packaging this you probably want https://github.com/asottile/hecate/commit/bbec887f69f7cba9369051941fdbd8b48902ac14 as well
comment created time in 4 days
issue closedpre-commit/pre-commit
Use defaults to avoid repeated hook id/name/entry
In my continued quest to single-source the versions of linters and formatters between pre-commit and my Python virtual environment (see #1233 and https://github.com/pre-commit/pre-commit/issues/945#issuecomment-563978549), I tried repository local hooks as suggested by #945. It works well, but I ended up with a config like:
- repo: local
hooks:
- id: black
name: black
entry: black
language: system
types: [python]
- id: flake8
name: flake8
entry: flake8
language: system
types: [python]
- id: pydocstyle
name: pydocstyle
entry: pydocstyle
language: system
types: [python]
The repetition of id, name, and entry bugs me. 😉
Could name and entry default to the value of id?
closed time in 4 days
bhrutledgeissue commentpre-commit/pre-commit
Use defaults to avoid repeated hook id/name/entry
repo: local and language: system both are escape hatches and not the supported golden path to use tools
the metadata for repo: local is the full .pre-commit-hooks.yaml and is meant to be very explicit
so no, I won't do this -- but thank you for the issue!
If you want a supported configuration, use this with no repetition:
repos:
- repo: https://github.com/psf/black
rev: 19.10b0
hooks:
- id: black
- repo: https://gitlab.com/pycqa/flake8
rev: 3.7.9
hooks:
- id: flake8
- repo: https://github.com/pycqa/pydocstyle
rev: 5.0.1
hooks:
- id: pydocstyle
comment created time in 4 days
PR opened Yelp/ephemeral-port-reserve
Resolves #10 Obsoletes #9
pr created time in 4 days
create barnchasottile/ephemeral-port-reserve
created branch time in 4 days
Pull request review commentYelp/ephemeral-port-reserve
+include LICENSE+include README.md+recursive-include tests *.py
none of my projects are missing LICENSE in sdist, you're just confused how setuptools works -- here's my oldest uploaded and still maintained package:
$ tar --list -f all_repos_depends-0.0.1.tar.gz | grep LICENSE
all_repos_depends-0.0.1/LICENSE
and it has NO MANIFEST.in so please stop pushing this junk file on maintainers <3
comment created time in 4 days
push eventanthonywritescode/aoc2019
commit sha 2c8085e8073ac9189eb485d4241a0c69551068ac
Implement day 10 part 1 in powershell
push time in 4 days
push eventanthonywritescode/aoc2019
commit sha ceef04cc2240bce7933f127602be11fd71658123
gcd is always positive, thanks Katethra!
push time in 4 days
push eventanthonywritescode/aoc2019
commit sha af78a236e8cefcd97317d37adcf18b0ba5843109
day 10 part 1
commit sha b4299bab5bc1ece53e196cea02c7339909324cc0
day 10 part 2 in python
push time in 4 days
push eventanthonywritescode/aoc2019
commit sha 889ec0dd20f4c0f815279063c20ed8f00230e6b6
Implement day 9 part 1 in sqlite
push time in 4 days
push eventpre-commit/action
commit sha bb2f451c85ca766a474ee0358609da3245a9406c
fix security nag
commit sha 14f08406dfbbe34836ec032fb0f10c1004fb0091
Merge pull request #2 from pre-commit/security_update fix security nag
push time in 5 days
PR merged pre-commit/action
https://github.com/advisories/GHSA-h9rv-jmmf-4pgx
not sure the right way to resolve this, I tried clicking the github button to autoresolve and it did nothing, so I rm package-lock.json && npm install'd
pr closed time in 5 days
PR opened pre-commit/action
https://github.com/advisories/GHSA-h9rv-jmmf-4pgx
not sure the right way to resolve this, I tried clicking the github button to autoresolve and it did nothing, so I rm package-lock.json && npm install'd
pr created time in 5 days
push eventanthonywritescode/thumbnails
commit sha 9eb62efb5360302b75623bbc493ef7f259d80c29
aoc 2019 day 6
commit sha 88e7e843f04bae7dbe90c23b76b1c8e95020cd9b
aoc 2019 day 7
commit sha a1f822ecaa8c32cd092ac5043547a43f5acaf91c
replay 2019-12-07
commit sha 484d617a45f0a4aad6404721ecb2e4ffdff84d5c
aoc 2019 day 8
commit sha bedc51aa80436980ef73c1388d663ac23f43cd60
aoc 2019 day 9
push time in 5 days
push eventasottile/babi
commit sha 991b8213c3f9ad5b696e1f6b890d2e01700ac2fc
WIP: find-replace
push time in 5 days
issue closedasottile/pyupgrade
Fix collection literals and comprehensions like `flake-comprehensions`
flake8-comprehensions is a lovely plugin to warn about inefficient creation of and operations on collections - and each of the warnings suggests a simple rewrite rule to resolve them.
I'm not sure if this is really in scope for pyupgrade, but it's similar enough to the existing literals/comprehensions functionality that I thought it was worth suggesting.
closed time in 5 days
Zac-HDissue commentasottile/pyupgrade
Fix collection literals and comprehensions like `flake-comprehensions`
This is a dupe of #31 and out of scope I'm afraid
dict(**...) might in the future be rewritten to {**...} but generically rewriting dict(...) isn't quite in the spirit
comment created time in 5 days
push eventanthonywritescode/twitch-chat-bot
commit sha 5617e3f6c9e644314e77fe47afb3e4ef087bed93
zero pad minutes in irc output
push time in 5 days
push eventanthonywritescode/aoc2019
commit sha 9c5cfadc86d12ef77aa27d32096ca9f26378816d
Implement day 9 part 1 in nim
commit sha cd56b232b6f900ecb8177ba26e73e02edc06c800
Implement part 2 in nim
push time in 5 days
push eventanthonywritescode/aoc2019
commit sha 10469cfa929048b8f8433e79c698360df2f27f06
day 9 part 1
commit sha 28cd5e7b4b337a8a98802c9ea14529b4fb583586
day 9 part 2
push time in 5 days
Pull request review commentYelp/ephemeral-port-reserve
+include LICENSE+include README.md+recursive-include tests *.py
I hope you understand where I'm coming from -- I don't want to add this junk file to our repository that we don't use and you don't need. Our tags are correct and it works fine to use the github tgz.
venv-update frequently breaks with the latest pip (kinda by design, it has to monkeypatch pip to work) -- I wouldn't be surprised if it's currently broken and would appreciate attempts to fix it. In the past we've flipped between marking "latest pip" as expected failure in .travis.yml -- I happen to know there's some pretty big refactors happening in pip right now (that are about to break a bunch more things like last time)
this package (ephemeral-port-reserve) has been pretty stable and hasn't seen updates in quite some time -- (after all, it's dead simple and really doesn't need any maintenance), I don't think it would be much of a maintenance concern
comment created time in 5 days