pulumi/sdk/python/lib/pulumi
Paul C. Roberts 278a8994e5
Sets the `main` project setting to the cwd for inline programs (#14709)
<!--- 
Thanks so much for your contribution! If this is your first time
contributing, please ensure that you have read the
[CONTRIBUTING](https://github.com/pulumi/pulumi/blob/master/CONTRIBUTING.md)
documentation.
-->

# Description

<!--- Please include a summary of the change and which issue is fixed.
Please also include relevant motivation and context. -->
Currently if no project settings are provided this is the default value
for `main`, but if the caller providers a project_settings object
without this set it will cause a module load issue if the inline program
depends on other local python files. The current work-around is to put
all the code in one file or set `work_dir`.

Fixes #7960

## Checklist

- [X] I have run `make tidy` to update any new dependencies
- [X] I have run `make lint` to verify my code passes the lint check
  - [ ] I have formatted my code using `gofumpt`

<!--- Please provide details if the checkbox below is to be left
unchecked. -->
- [X] I have added tests that prove my fix is effective or that my
feature works
<!--- 
User-facing changes require a CHANGELOG entry.
-->
- [X] I have run `make changelog` and committed the
`changelog/pending/<file>` documenting my change
<!--
If the change(s) in this PR is a modification of an existing call to the
Pulumi Cloud,
then the service should honor older versions of the CLI where this
change would not exist.
You must then bump the API version in
/pkg/backend/httpstate/client/api.go, as well as add
it to the service.
-->
- [ ] Yes, there are changes in this PR that warrants bumping the Pulumi
Cloud API version
<!-- @Pulumi employees: If yes, you must submit corresponding changes in
the service repo. -->

Co-authored-by: Paul Roberts <proberts@pulumi.com>
2023-12-01 23:05:08 +00:00
..
automation Sets the `main` project setting to the cwd for inline programs (#14709) 2023-12-01 23:05:08 +00:00
dynamic Replace dict with typing.Dict in type annotation (#14579) 2023-11-15 18:04:32 +00:00
policy Make getOrganization total, default to 'organization' 2022-09-22 11:06:51 -07:00
provider Fix protobuf checksum code and regenerate 2022-11-04 09:57:05 +00:00
runtime [sdk/python] Adds a default exception when dependency cycles are created (#14597) 2023-11-21 16:26:02 +00:00
__init__.py sdk/py/StackReference: Add get_output_details 2023-02-03 16:58:35 -08:00
_types.py Fix protobuf checksum code and regenerate 2022-11-04 09:57:05 +00:00
_utils.py fix(sdk/python): Makes SETTINGS attributes context-aware (#10402) 2022-08-23 13:45:37 -04:00
asset.py Reformat python 2023-02-01 09:45:06 +00:00
config.py [sdk/python] Add `default` arg to `Config.get_secret` (#12279) 2023-10-02 13:43:48 +00:00
errors.py Python Dynamic Providers (#2900) 2019-07-19 10:18:25 -07:00
invoke.py [codegen/python] Implement deep merge on resource and invoke options, matching other SDKs (#9856) 2022-06-14 16:52:24 -07:00
log.py Use black code formatter for the python sdk (#8919) 2022-02-04 01:16:16 +01:00
metadata.py Make getOrganization total, default to 'organization' 2022-09-22 11:06:51 -07:00
output.py Make `Output.from_input` recurse into tuples. 2023-07-27 10:13:40 +01:00
py.typed Add py.typed to Python package for PEP 561 compliance (#3704) 2020-01-17 15:01:36 -08:00
resource.py [sdk/python] Fix typo in error message (#14073) 2023-10-02 14:40:01 +00:00
stack_reference.py sdk/py/StackReference: Add get_output_details 2023-02-03 16:58:35 -08:00
urn.py Use black code formatter for the python sdk (#8919) 2022-02-04 01:16:16 +01:00