Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding matches_re validator #552

Merged
merged 20 commits into from Sep 9, 2019
Merged

adding matches_re validator #552

merged 20 commits into from Sep 9, 2019

Conversation

@kurtbrose
Copy link
Contributor

@kurtbrose kurtbrose commented Jul 12, 2019

still needs more work just getting the ball rolling

Pull Request Check List

This is just a reminder about the most common mistakes. Please make sure that you tick all appropriate boxes. But please read our contribution guide at least once, it will save you unnecessary review cycles!

If an item doesn't apply to your pull request, check it anyway to make it apparent that there's nothing to do.

  • [*] Added tests for changed code.
  • New features have been added to our Hypothesis testing strategy.
  • Changes or additions to public APIs are reflected in our type stubs (files ending in .pyi).
    • ...and used in the stub test file tests/typing_example.py.
  • Updated documentation for changed code.
    • New functions/classes have to be added to docs/api.rst by hand.
    • Changes to the signature of @attr.s() have to be added by hand too.
    • Changed/added classes/methods/functions have appropriate versionadded, versionchanged, or deprecated directives.
  • Documentation in .rst files is written using semantic newlines.
  • Changes (and possible deprecations) have news fragments in changelog.d.

If you have any questions to any of the points above, just submit and ask! This checklist is here to help you, not to deter you from contributing!

Copy link
Member

@hynek hynek left a comment

I know you said you're not done yet but here's some feedback so you can avoid detours when you'll find the time.

Also a changelog entry please. :)

src/attr/validators.py Outdated Show resolved Hide resolved
src/attr/validators.py Outdated Show resolved Hide resolved
src/attr/validators.py Outdated Show resolved Hide resolved
tests/test_validators.py Outdated Show resolved Hide resolved
src/attr/validators.py Outdated Show resolved Hide resolved
@kurtbrose
Copy link
Contributor Author

@kurtbrose kurtbrose commented Aug 9, 2019

thanks for the comments, will address soon

sorry for the slowness, I've been a bit hung up on getting the local dev environment set up, I keep running into this:

> py.exe -m pip install -e .
Obtaining file:///C:/Users/Kurt/workspace/attrs
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  Complete output from command C:\Users\Kurt\AppData\Local\Programs\Python\Python37-32\python.exe C:\Users\Kurt\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py get_requires_for_build_wheel C:\Users\Kurt\AppData\Local\Temp\tmp2j45vhxz:
  Traceback (most recent call last):
    File "C:\Users\Kurt\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 207, in <module>
      main()
    File "C:\Users\Kurt\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 197, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "C:\Users\Kurt\AppData\Local\Programs\Python\Python37-32\lib\site-packages\pip\_vendor\pep517\_in_process.py", line 54, in get_requires_for_build_wheel
      return hook(config_settings)
    File "C:\Users\Kurt\AppData\Local\Temp\pip-build-env-m4ck65jz\overlay\Lib\site-packages\setuptools\build_meta.py", line 145, in get_requires_for_build_wheel
      return self._get_build_requires(config_settings, requirements=['wheel'])
    File "C:\Users\Kurt\AppData\Local\Temp\pip-build-env-m4ck65jz\overlay\Lib\site-packages\setuptools\build_meta.py", line 126, in _get_build_requires
      self.run_setup()
    File "C:\Users\Kurt\AppData\Local\Temp\pip-build-env-m4ck65jz\overlay\Lib\site-packages\setuptools\build_meta.py", line 141, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 99, in <module>
      + read("AUTHORS.rst")
  AttributeError: 'NoneType' object has no attribute 'group'

@hynek
Copy link
Member

@hynek hynek commented Aug 9, 2019

I wasn’t aware of that problem until recently. Could you help my understand how it happens in #561?

@hynek
Copy link
Member

@hynek hynek commented Aug 19, 2019

I believe pip install -dev on windows should work now?

@kurtbrose
Copy link
Contributor Author

@kurtbrose kurtbrose commented Aug 21, 2019

yes! worked like a charm after update, thanks!

@kurtbrose
Copy link
Contributor Author

@kurtbrose kurtbrose commented Aug 21, 2019

just an FYI, pre-commit still fails with an SSL failure trying to fetch black from github

Errors:
fatal: unable to access 'https://github.com/ambv/black/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

I've checked the code is flake8 clean, hopefully I'm not missing anything else format wise

@hynek
Copy link
Member

@hynek hynek commented Aug 21, 2019

just an FYI, pre-commit still fails with an SSL failure trying to fetch black from github

Errors:
fatal: unable to access 'https://github.com/ambv/black/': error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version

Hm, that must be some local problem. Under what Python version is your pre-commit running? It must be something ancient, if the ssl is too old to connect to GitHub?! Anthony is AFAIK using Windows too, so that shouldn't be the issue. The tox env uses explicitly 3.7 tho?

(I've took this opportunity to fix black's URL tho)

I've checked the code is flake8 clean, hopefully I'm not missing anything else format wise

You did: https://attrs.visualstudio.com/attrs/_build/results?buildId=231&view=logs&jobId=810e27dd-b084-5a0b-5c49-7fe688ece5ee&taskId=2dbb6c1a-2c14-506e-d517-3d9e1024c6b7&lineStart=39&lineEnd=40&colStart=1&colEnd=1 😇

@hynek
Copy link
Member

@hynek hynek commented Sep 6, 2019

Hey a release is imminent; do you think you can bang it into shape on short notice or do you want to push this to the next release?

@kurtbrose
Copy link
Contributor Author

@kurtbrose kurtbrose commented Sep 7, 2019

let me give it one more push this weekend and see if I can resolve everything -- sorry for being so flakey!

@kurtbrose
Copy link
Contributor Author

@kurtbrose kurtbrose commented Sep 8, 2019

alright I think this is ready to go now ... only thing is I'm not sure about hypothesis or the type testing area

not sure if those apply since this is more of a "leaf" than structural

hynek
hynek approved these changes Sep 9, 2019
Copy link
Member

@hynek hynek left a comment

Thanks!

@hynek hynek merged commit 08b1587 into python-attrs:master Sep 9, 2019
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants