Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@legalsylvain
Copy link
Contributor

@legalsylvain legalsylvain commented Oct 12, 2025

Hi. First, thanks for this great tool I began to use some weeks ago.

About that fix:
click-odoo is using runpy.run_path(path_name, ...) function. path_name can be a file, but can be also a folder, in the case we want to import a syst.path entry, containing a __main__.py file.

this patch allow such call.

Ref : https://docs.python.org/3/library/runpy.html#runpy.run_path

Hi. this is a quite trivial patch. This is the first time I contribute on click-odoo, let me know if extra things are required.

@codecov-commenter
Copy link

codecov-commenter commented Oct 12, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.48%. Comparing base (0c6d8f4) to head (ea50a10).
⚠️ Report is 37 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #73      +/-   ##
==========================================
+ Coverage   86.34%   86.48%   +0.14%     
==========================================
  Files           7        7              
  Lines         205      222      +17     
  Branches       31       31              
==========================================
+ Hits          177      192      +15     
- Misses         20       22       +2     
  Partials        8        8              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@legalsylvain legalsylvain changed the title [IMP] Allow to execute a valid sys.path entry. [FIX] Allow to execute a valid sys.path entry. Oct 12, 2025
@legalsylvain legalsylvain marked this pull request as ready for review October 12, 2025 22:03
@legalsylvain legalsylvain force-pushed the IMP-allow-import-package branch from ea50a10 to 87ba722 Compare October 12, 2025 22:06
click-odoo is using runpy.run_path(path_name, ...) function.
path_name can be a file, but can be also a folder, in the case we want to import a syst.path entry, containing a __main__.py file.
this patch allow such call.
@legalsylvain legalsylvain force-pushed the IMP-allow-import-package branch from 87ba722 to 67fbfbd Compare October 12, 2025 22:10
Co-authored-by: Stéphane Bidoul <[email protected]>
@sbidoul
Copy link
Member

sbidoul commented Oct 13, 2025

Thanks!

@sbidoul sbidoul merged commit d387d5d into acsone:master Oct 13, 2025
1 check 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

Development

Successfully merging this pull request may close these issues.

3 participants