Giter Club home page Giter Club logo

Comments (9)

jku avatar jku commented on June 26, 2024 1

Oh yeah, if it's every file then this is a Windows thing: their filesystem does not have executable flag -- so in WSL every file (on a windows filesystem) is marked executable.

That said, this should be worked around in ruff already...
astral-sh/ruff#5445

from python-tuf.

h4l0gen avatar h4l0gen commented on June 26, 2024 1

@jku still same error :)

Okay i got the issue.

from python-tuf.

jku avatar jku commented on June 26, 2024 1

I would usually rather avoid the failure than document it... often documenting workarounds is pointless since people won't find the documentation when they hit the issue.

The thing is, I am using the python-tuf directory in WSL from the Windows host, which leads to a weird problem, and hence the WSL check is not passing

looking at the sources that shouldn't affect things: https://github.com/TheLarkInn/is-wsl/blob/main/src/lib.rs, quite strange.

Anyway, no need to spend a lot of time on this. If you'd like to document a workaround and have found a reasonable place to do it, a PR is welcome. Thanks for testing

from python-tuf.

jku avatar jku commented on June 26, 2024

examples/manual_repo/basic_repo.py:1:1: EXE002 The file is executable but no shebang is present

that is a little strange -- the file is not executable in git (you could argue it could as well be but currently it isn't).

from python-tuf.

h4l0gen avatar h4l0gen commented on June 26, 2024

Yes, am reading official ruff page, found that my python version is 3.10, but after upgrading it to 3.11, as per ruff, it still shows error.
@jku this shows shebang error to these many files (i.e. executable)

lint: recreate env because python changed version_info=[3, 10, 12, 'final', 0]->[3, 11, 0, 'candidate', 1] | executable='/usr/bin/python3.10'->'/usr/bin/python3.11'
lint: remove tox env folder /mnt/c/Users/ks391/OneDrive/Desktop/open_source/TUF_WEBSITE/simple_envelope/python-tuf/.tox/lint
lint: install_deps> python3 -m pip install -e . -r /mnt/c/Users/ks391/OneDrive/Desktop/open_source/TUF_WEBSITE/simple_envelope/python-tuf/requirements/lint.txt
lint: commands[0]> ruff check tuf examples tests verify_release
examples/manual_repo/basic_repo.py:1:1: EXE002 The file is executable but no shebang is present
examples/manual_repo/hashed_bin_delegation.py:1:1: EXE002 The file is executable but no shebang is present
examples/manual_repo/succinct_hash_bin_delegations.py:1:1: EXE002 The file is executable but no shebang is present
examples/repository/_simplerepo.py:1:1: EXE002 The file is executable but no shebang is present
examples/uploader/_localrepo.py:1:1: EXE002 The file is executable but no shebang is present
tests/__init__.py:1:1: EXE002 The file is executable but no shebang is present
tests/generated_data/__init__.py:1:1: EXE002 The file is executable but no shebang is present
tests/generated_data/generate_md.py:1:1: EXE002 The file is executable but no shebang is present
tests/repository_simulator.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_api.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_examples.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_fetcher_ng.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_metadata_eq_.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_metadata_generation.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_metadata_serialization.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_trusted_metadata_set.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_updater_consistent_snapshot.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_updater_delegation_graphs.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_updater_fetch_target.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_updater_key_rotations.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_updater_ng.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_updater_top_level_update.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_updater_validation.py:1:1: EXE002 The file is executable but no shebang is present
tests/test_utils.py:1:1: EXE002 The file is executable but no shebang is present
tests/utils.py:1:1: EXE002 The file is executable but no shebang is present
tuf/__init__.py:1:1: EXE002 The file is executable but no shebang is present
tuf/api/__init__.py:1:1: EXE002 The file is executable but no shebang is present
tuf/api/_payload.py:1:1: EXE002 The file is executable but no shebang is present
tuf/api/dsse.py:1:1: EXE002 The file is executable but no shebang is present
tuf/api/exceptions.py:1:1: EXE002 The file is executable but no shebang is present
tuf/api/metadata.py:1:1: EXE002 The file is executable but no shebang is present
tuf/api/serialization/__init__.py:1:1: EXE002 The file is executable but no shebang is present
tuf/api/serialization/json.py:1:1: EXE002 The file is executable but no shebang is present
tuf/ngclient/__init__.py:1:1: EXE002 The file is executable but no shebang is present
tuf/ngclient/_internal/__init__.py:1:1: EXE002 The file is executable but no shebang is present
tuf/ngclient/_internal/requests_fetcher.py:1:1: EXE002 The file is executable but no shebang is present
tuf/ngclient/_internal/trusted_metadata_set.py:1:1: EXE002 The file is executable but no shebang is present
tuf/ngclient/config.py:1:1: EXE002 The file is executable but no shebang is present
tuf/ngclient/fetcher.py:1:1: EXE002 The file is executable but no shebang is present
tuf/ngclient/updater.py:1:1: EXE002 The file is executable but no shebang is present
tuf/repository/__init__.py:1:1: EXE002 The file is executable but no shebang is present
tuf/repository/_repository.py:1:1: EXE002 The file is executable but no shebang is present
Found 42 errors.
lint: exit 1 (0.49 seconds) /mnt/c/Users/ks391/OneDrive/Desktop/open_source/TUF_WEBSITE/simple_envelope/python-tuf> ruff check tuf examples tests verify_release pid=14022
lint: FAIL ✖ in 3 minutes 55.46 seconds

from python-tuf.

h4l0gen avatar h4l0gen commented on June 26, 2024

Oh great, then IMO we should document it here with possible solution (I will check if i can found something) So that we don't need to worry about it anymore. WYT? @jku

from python-tuf.

jku avatar jku commented on June 26, 2024

I think we don't quite understand why you are seeing the issue:

  • based on the linked ruff issue, ruff should be skipping EXE001 and EXE002 on WSL
  • yet somehow you get EXE002 errors when on WSL

from python-tuf.

jku avatar jku commented on June 26, 2024

Wild guess: this is because we run ruff inside tox, and somehow this makes the wsl check confused.

If you're interested, you could test installing ruff outside tox and seeing if the issue still appears:

pip install ruff==0.4.4
ruff check tuf examples tests verify_release

from python-tuf.

h4l0gen avatar h4l0gen commented on June 26, 2024

The thing is, I am using the python-tuf directory in WSL from the Windows host, which leads to a weird problem, and hence the WSL check is not passing. I tried running it by creating the python-tuf directory directly in the WSL environment, and it shows no errors.

This really annoying 😓, ruff should only check that from where directory got access. More or less that's ruff cons. IMO we should really document it with note for WSL users. WDYT? @jku

from python-tuf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.