Comments (5)
I am on the fence for this one...
Right now validate-pyproject
validates the pyproject.toml
file itself, in a standalone matter... It does not matter if the user runs the validator from the project directory. If the file does not change, it will keep being valid or invalid, which is consistent and good.
Adding a feature like this means that we validate pyproject.toml
+ the environment in which it is contained. This is a change in behaviour and the same file can be considered valid and invalid in 2 moments of time, even if the file itself does not change, which is conceptually weird...
from validate-pyproject.
We could, potentially, achieve something with warnings and having a CLI flag to transform warnings in errors, but the warnings
module in Python is very limited...
warnings.catch_warnings()
is not really thread-safe, there is no way of removing warnings added by warnings.simplefilter
without doing a full warnings.resetwarnings
(these 2 functions are probably not very thread-safe)...
from validate-pyproject.
I agree, that this feels strange from the aspect of validating two different things out of the developer perspective. Out of the users perspective on the other hand it feels strange, that these things are separated.
Sorry, I do not understand why thread safety is a concern here. Is the validation process multi-threaded?
from validate-pyproject.
Sorry, I do not understand why thread safety is a concern here. Is the validation process multi-threaded?
@marscher, validate-pyproject
is a library, this means that it can be used in a code that uses multiple threads.
from validate-pyproject.
That's a valid point. Although I think it is unlikely that developers will fiddle around with the environment during execution the validation. But it can happen of course. Then it'd be super hard to detect or work around this circumstance.
If this causes too much of an headache, I'd be fine with closing my request.
from validate-pyproject.
Related Issues (20)
- Support for SchemaStore HOT 21
- JSON Schema string is inconsistent (no trailing #) HOT 3
- Speed up `--store` support HOT 11
- [FR] Add the ability to load schemas that can be referenced in other schemas HOT 3
- [FR] Relax validation of `py-modules`
- schema-store: Failing on valid hatch toml HOT 5
- [FR] Allow `--tool` to overwrite? OR option to disable all plugins loaded by entry-points?
- Bug? `tool.poetry.packages[0]` must not contain {'to'} properties HOT 4
- feature request: strict pep440 check
- Request: traversing into `enum` for failure message
- Missing SSL context when downloading classifiers.
- `NOTICE.txt` should be listed under `license_files`
- pipx run validate-pyproject --help HOT 3
- License Validation uses older standard HOT 2
- Report likely mistakes as warnings HOT 3
- vendoring of fastjsonschema HOT 2
- `tool.setuptools.packages` should allow `*-stub` name.
- CLI hangs when no arguments provided HOT 1
- Crash on first commit when adding a pre-commit hook HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from validate-pyproject.