Skip to content

Conversation

@vdonato
Copy link
Collaborator

@vdonato vdonato commented May 8, 2021

This makes some things harder to write, but it's necessary because
otherwise, config options that are accessed on file import may ignore
options set via flag or environment variable (as those haven't been parsed
yet). Thankfully, there are only two places where code had to be reworked,
and both of these changes were relatively straightforward.

To prevent this from accidentally happening in the future, we added an
assertion in conftest.py that explodes if config options have been
populated after importing streamlit.

Closes #2257
Closes #2989
Closes #2990

@vdonato vdonato marked this pull request as ready for review May 8, 2021 01:10
@vdonato vdonato requested a review from a team May 8, 2021 01:10
Copy link
Collaborator

@kantuni kantuni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

This makes some things harder to write, but it's necessary because
otherwise, config options that are accessed on file import may ignore
options set via flag or environment variable (as those haven't been parsed
yet). Thankfully, there are only two places where code had to be reworked,
and both of these changes were relatively straightforward.

To prevent this from accidentally happening in the future, we added an
assertion in conftest.py that explodes if config options have been
populated after importing streamlit.

Closes streamlit#2257
Closes streamlit#2989
Closes streamlit#2990
@vdonato vdonato force-pushed the stop-needlessly-requesting-restart branch from 3287da9 to 40dacdb Compare May 12, 2021 19:45
@vdonato vdonato merged commit 8f5ea06 into streamlit:develop May 12, 2021
@vdonato vdonato deleted the stop-needlessly-requesting-restart branch May 12, 2021 20:02
tconkling added a commit to tconkling/streamlit that referenced this pull request May 17, 2021
* develop:
  Remove tag from PR template (streamlit#3284)
  Add test req version bound for TF to fix tests (streamlit#3266)
  Add support for toml syntax highlighting in code blocks (streamlit#3140)
  Don't allow config.get_option to be called on file import (streamlit#3235)
  pin click to < 8.0 (streamlit#3256)
  Random cleanup: docstrings + type-safety (streamlit#3252)
  "setWidgetValue" -> "commitWidgetValue" (streamlit#3253)
tconkling added a commit that referenced this pull request May 18, 2021
* develop: (75 commits)
  Remove tag from PR template (#3284)
  Add test req version bound for TF to fix tests (#3266)
  pin click to < 8.0 (#3256)
  Up version to 0.82.0
  Update change log
  Add support for toml syntax highlighting in code blocks (#3140)
  Don't allow config.get_option to be called on file import (#3235)
  pin click to < 8.0 (#3256)
  Random cleanup: docstrings + type-safety (#3252)
  "setWidgetValue" -> "commitWidgetValue" (#3253)
  Fix inactive DatePicker if the date value is 10 years earlier (#3241)
  Upgrade trim to 0.0.3 or later (#3250)
  Manually name all snapshots and generate missing ones (#3205)
  Fix Video Recorded modal dialog width (#3226)
  Bump handlebars from 4.7.6 to 4.7.7 in /frontend (#3238)
  Bump hosted-git-info from 2.8.8 to 2.8.9 in /frontend (#3234)
  Bump lodash from 4.17.20 to 4.17.21 in /frontend (#3233)
  Bump ua-parser-js from 0.7.23 to 0.7.28 in /frontend (#3231)
  Update FAQs with supported browsers (#3225)
  Update copyright date (#3228)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants