Skip to content

Update 3.5 references to 3.6#1444

Merged
tvst merged 11 commits intostreamlit:developfrom
randyzwitch:update_py36
May 15, 2020
Merged

Update 3.5 references to 3.6#1444
tvst merged 11 commits intostreamlit:developfrom
randyzwitch:update_py36

Conversation

@randyzwitch
Copy link
Copy Markdown
Contributor

Per our Slack discussion yesterday, there are some places where Python 3.5 references remain. I changed these references here.

Note that some of the references conditionally test for 3.6 and above (such as the Black formatter CI code), so that code could be simplified to remove the conditional test since it will evaluate true from now on

@randyzwitch randyzwitch requested a review from a team as a code owner May 12, 2020 16:01
@randyzwitch
Copy link
Copy Markdown
Contributor Author

Looks like I don't have the CircleCI required flags set right...is this a GitHub repo level setting?

@jrhone
Copy link
Copy Markdown
Contributor

jrhone commented May 12, 2020

scripts/run_bare_integration_tests.py needs to be updated

@jrhone
Copy link
Copy Markdown
Contributor

jrhone commented May 12, 2020

Do a search for py35, there are a few files with comments about py35 compatibility that could be updated.

@randyzwitch
Copy link
Copy Markdown
Contributor Author

Good point, I only searched for 3.5

@jrhone
Copy link
Copy Markdown
Contributor

jrhone commented May 12, 2020

Looks like I don't have the CircleCI required flags set right...is this a GitHub repo level setting?

Yes I believe there's something in the settings to update @tvst

@randyzwitch
Copy link
Copy Markdown
Contributor Author

Do a search for py35, there are a few files with comments about py35 compatibility that could be updated.

@jrhone some of these remaining changes are bigger questions to answer around removing the Python 2 and Python 3.5 shims. In run_bare_integration_tests.py, removing the shim assumes we've got good enough testing around async, and in [config_test.py, credentials_test.py, file_util_test.py], the shims are part of the codebase.

@randyzwitch
Copy link
Copy Markdown
Contributor Author

Keeping scope of this PR as-is, issues from additional files in #1444 (comment) will be addressed in separate PR in the future

Copy link
Copy Markdown
Contributor

@jrhone jrhone left a comment

Choose a reason for hiding this comment

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

Ok, I guess the only thing remaining then is to confirm the python 3.6.x version of the image we want to use

      - image: circleci/python:3.6.9

I'm not sure I fully understand your comment below. Perhaps post about it in eng?

Ok. I was thinking that because it would be a patch release, there wouldn't be any syntax changes, so I put 3.6.9 to test against the most recent that people could be using. Guess that's a philosophical question of the intent for our CI.

@randyzwitch
Copy link
Copy Markdown
Contributor Author

Ok. I was thinking that because it would be a patch release, there wouldn't be any syntax changes, so I put 3.6.9 to test against the most recent that people could be using. Guess that's a philosophical question of the intent for our CI.

My point is that between 3.6.0 and 3.6.9, there should only have been bug fixes, no syntax changes under semver standards. So whether we use 3.6.0, 3.6.9 or anything in between shouldn't make any syntax errors arrive.

I chose 3.6.9, because to me, that's the one most likely to still be installed (since downloads from python.org would be for the newest patch release, conda install python=3.6 would install the newest patch, etc.). So that's my philosophical distinction...we can assume that no syntax changes have been made and use the most recent 3.6.x release, or we can guarantee that we won't be testing against any syntax changes by using 3.6.0 (because they wouldn't have occurred yet).

Doesn't matter to me either way, just explaining why I chose the highest instead of the lowest.

@randyzwitch
Copy link
Copy Markdown
Contributor Author

3.6.1 is failing in different ways on different runs:

Run 1:

tests/streamlit/caching_test.py::CacheTest::test_no_max_size *** Error in `/home/circleci/repo/venv/bin/python': double free or corruption (!prev): 0x000000000098f860 ***

Run 2:

tests/streamlit/Server_test.py::ServerTest::test_cache_clearing /bin/bash: line 6:  7769 Aborted                 (core dumped) PYTHONPATH=. pytest -v --junitxml=test-reports/pytest/junit.xml -l --cov=/home/circleci/repo/lib/tests --cov=/home/circleci/repo/lib/streamlit --cov-report=term-missing tests/ /home/circleci/repo/lib/tests /home/circleci/repo/lib/streamlit

Not sure what the next move is here. On the one hand, I can definitely be doing something wrong for the CircleCI configuration file. There also could be something wrong with the Docker container. Or the worst, we don't actually pass on 3.6. @jrhone any suggestions what to try here?

@jrhone
Copy link
Copy Markdown
Contributor

jrhone commented May 15, 2020

Python 3.6.0, 3.6.1, 3.6.2, 3.6.3, 3.6.4

  • Fail

Python 3.6.5, 3.6.10

  • Integration tests: python /home/circleci/repo/e2e/scripts/st_magic.py fails
Traceback (most recent call last):
  File "e2e/scripts/st_magic.py", line 116, in <module>
    async_loop.run_until_complete(async_with())
  File "/Users/jonathanrhone1/miniconda3/envs/sc36/lib/python3.6/asyncio/base_events.py", line 488, in run_until_complete
    return future.result()
  File "e2e/scripts/st_magic.py", line 105, in async_with
    @contextlib.asynccontextmanager
AttributeError: module 'contextlib' has no attribute 'asynccontextmanager'

https://docs.python.org/3/library/contextlib.html#contextlib.asynccontextmanager
New in version 3.7

@tvst tvst merged commit bc7b751 into streamlit:develop May 15, 2020
tconkling added a commit that referenced this pull request May 18, 2020
* develop:
  Keras model hash func (#1450)
  Add support for st.echo("below") to print echoed text below the Streamlit output (#1452)
  Update 3.5 references to 3.6 (#1444)
  PyTorch model hash func (#1445)
  Fix link for pipenv in Getting Started (#1455)
  TextArea and TextInput max_chars (#1423)
  Fix multiselect docstring example (#1442)
  Configuring ReadtheDocs (#1435)
  Fix "strip()" bug when internal IP is None (#1434)
@randyzwitch randyzwitch deleted the update_py36 branch May 26, 2020 17:12
tconkling added a commit to tconkling/streamlit that referenced this pull request May 26, 2020
* feature/plugins: (26 commits)
  revert accidentally-committed datframe serialization breakage
  Example PyPI package (streamlit#1462)
  If it is a windows machine, check if terminal is latest version that supports emojis (streamlit#1490)
  Remove Python 2 check in 'hello' df demo (streamlit#1486)
  Update README (streamlit#1493)
  Fix broken link by removing unnecessary 'd' (streamlit#1492)
  Update doc references for RTD (streamlit#1485)
  Remove excess parenthesis from selectbox example (streamlit#1488)
  Upgrade patch versions (streamlit#1463)
  Update date_input to accept a range for a ranged datepicker (streamlit#1483)
  radio docstring consistency in format_func param (streamlit#1480)
  Hash func for Tensorflow saved model (streamlit#1468)
  Figure out which env we are in for RTD (streamlit#1473)
  Fix component examples
  Version 0.60.0 (streamlit#1460)
  Remove extra start_time parameter (streamlit#1470)
  Fix spelling mistake in hello demo (streamlit#1469)
  Keras model hash func (streamlit#1450)
  Add support for st.echo("below") to print echoed text below the Streamlit output (streamlit#1452)
  Update 3.5 references to 3.6 (streamlit#1444)
  ...
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