internlm/SWE-Fixer-Train-110K huggingface dataset:
Repository: streamlit/streamlit

Issue:
URL markup does not get generated as a link
# Summary
URLs used to generate an anchor tag automatically in markup. Now it does not


# Steps to reproduce
Code snippet:

```
st.write(f"""
        As always, thank you to [all our contributors](https://github.com/streamlit/streamlit/graphs/contributors) who help make Streamlit awesome!

        ---

        ### Connect With Us

        - We can be found at https://streamlit.io and https://twitter.com/streamlit
        - Come by
        [the forums](https://discuss.streamlit.io/c/official-announcements/6) if you'd like to ask questions,
        post awesome apps, or just say hi!
    """)
```

## Expected behavior:
[0.73](https://share.streamlit.io/streamlit/release-demos/0.73/0.73/streamlit_app.py)
![image](https://user-images.githubusercontent.com/24946400/103850694-fb278900-5075-11eb-8052-1d8fa9a639a7.png)


## Actual behavior:
[0.74](https://share.streamlit.io/streamlit/release-demos/0.74/0.74/streamlit_app.py)
![image](https://user-images.githubusercontent.com/24946400/103850623-b8fe4780-5075-11eb-9592-689366dcd06c.png)


## Is this a regression?
Yes as of 0.74



Discussion:

Resolving patch:
diff --git a/lib/setup.py b/lib/setup.py
--- a/lib/setup.py
+++ b/lib/setup.py
@@ -13,7 +13,7 @@
     )
     sys.exit(exit_msg)
 
-VERSION = "0.74.0"  # PEP-440
+VERSION = "0.74.1"  # PEP-440
 
 NAME = "streamlit"
 


Test patch:
Repository: streamlit/streamlit

Issue:
st.expander cuts off sliders
# Summary

Expander in sidebar cuts off sliders and potentially other stuff

# Steps to reproduce
Run the following code
```
import streamlit as st

sidebar_expander = st.sidebar.beta_expander("Bad sliders underneath!")
with sidebar_expander:
    st.slider("Bad layout slider 1", 0, 100, value=0)
    st.slider("Bad layout slider 2", 0, 100, value=(0,100))

st.sidebar.slider("Good layout slider")
```
## Expected behavior:

Sliders appear nicely under the expander

## Actual behavior:

Sliders ends are cut off under the expander (see picture)

![image](https://user-images.githubusercontent.com/62385461/96776145-e4638580-13e8-11eb-9eaf-692c45541cf1.png)


## Is this a regression?

No

# Debug info

- Streamlit version:  0.69.1
- Python version: 3.8.2
- Using PipEnv
- OS version: Windows 10
- Browser version: Firefox and Chrome, recent versions

# Additional information

May also happen in containers outside of sidebar? Have not checked it though..


Discussion:
A temporary workaround is to add columns, like

```
import streamlit as st

sidebar_expander = st.sidebar.beta_expander("Slim sliders underneath!")
with sidebar_expander:
   _, slider_col, _ = st.beta_columns([0.02, 0.96, 0.02])
   with slider_col:
        st.slider("Slimmer slider", 0, 100, value=0)
        st.slider("Slimmer slider2", 0, 100, value=(0,100))

st.sidebar.slider("Standard layout slider")

```
Note; this is also broken outside of sliders, too -- see https://share.streamlit.io/akrolsmir/streamlit-snippet/main?snippet_id=bR3TezG6
Ken McGrady commented: In searching for tasks, this looks related. [https://github.com/streamlit/streamlit/issues/2437|https://github.com/streamlit/streamlit/issues/2437|smart-link] 

Might want to check and maybe close when this is solved.
Hm, from staring at the images for 5 minutes, it feels as though sliders (and also button highlights in #2437 ) are actually exceeding the bounds of the div; it's been okay in the past since there's nothing on that side anyways, but now Expanders bound the excess, so it's a lot more noticeable.

![image](https://user-images.githubusercontent.com/856034/105062670-d99ca900-5a48-11eb-80a1-b752805fecea.png)

Two possible approaches:
1. Force sliders (and button outlines, etc) to stay within the parent container by eg adding some more margin to those elements
2. Allow elements to bleed outside expanders

Approach 2 is less work, if there indeed exists a CSS property that allows for it. Let's start looking there.

... Yeah, it's probably just `overflow: visible`. Cool.

Resolving patch:
diff --git a/e2e/scripts/st_expander.py b/e2e/scripts/st_expander.py
--- a/e2e/scripts/st_expander.py
+++ b/e2e/scripts/st_expander.py
@@ -19,6 +19,8 @@
 
 expander = st.beta_expander("Collapse me!", expanded=True)
 expander.write("I can collapse")
+expander.slider("I don't get cut off")
+expander.button("I'm also not cut off (while focused)")
 
 collapsed = st.beta_expander("Expand me!")
 collapsed.write("I am already collapsed")


Test patch:
Repository: streamlit/streamlit

Issue:
Ctrl /cmd + c triggers clear cache
# Summary
If you try to copy text from an app it'll trigger the clear cache modal. It's fine when you copy text from an input field.

This is very likely a regression introduced on 12/28, likely from #2525


Discussion:

Resolving patch:
diff --git a/e2e/scripts/app_hotkeys.py b/e2e/scripts/app_hotkeys.py
new file mode 100644
--- /dev/null
+++ b/e2e/scripts/app_hotkeys.py
@@ -0,0 +1,17 @@
+# Copyright 2018-2021 Streamlit Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import streamlit as st
+
+st.text_input("text_input")


Test patch:
Repository: streamlit/streamlit

Issue:
Color picker was not fully removed out of beta
Feedback after product review of #2625 

- `**st.beta_color_picker` still exists in the wheel file,** and when I use it I get a message saying it will be removed on Jan 28 2021. Were we supposed to remove beta_color_picker for this release? (Depends on which stage of the beta we're in)

See notion for images/more details: https://www.notion.so/streamlit/0-76-Candidate-5c0ba34f05384adaa487fddf6d132d08 


Discussion:

Resolving patch:
diff --git a/lib/streamlit/__init__.py b/lib/streamlit/__init__.py
--- a/lib/streamlit/__init__.py
+++ b/lib/streamlit/__init__.py
@@ -197,8 +197,6 @@ def wrapped(*args, **kwargs):
     return wrapped
 
 
-beta_set_page_config = _beta_warning(set_page_config, "2021-01-06")
-beta_color_picker = _beta_warning(_main.color_picker, "January 28, 2021")
 beta_container = _main.beta_container  # noqa: E221
 beta_expander = _main.beta_expander  # noqa: E221
 beta_columns = _main.beta_columns  # noqa: E221


Test patch:
Repository: streamlit/streamlit

Issue:
Dark theme does not properly adjust markdown tables
### Summary

When I load the latest streamlit in darkmode I cannot see anything in my markdown tables because the text color is changed but not the background color.

### Steps to reproduce

Code snippet:

```
md = """
| Label     | Info        |
| -------- | --------- |
| Row       | Data      |
"""
st.markdown(md)
```

**Expected behavior:**

I would expect if the text color get changed to white in the table, the background color should get changed to something dark

**Actual behavior:**

Both the text color and background are white so nothing can be seen.

### Is this a regression?

no, consequence of new theme

### Debug info

- Streamlit version: 0.79.0
- Python version: 3.7.9
- pip
- OS version: MacOS Catalina 10.15.7
- Browser version: Chrome 89.0.4389.90

### Additional information

I'm not sure why markdown tables have different background style but they seem to; perhaps other ui elements would be affected as well.



Discussion:
Thanks for reporting this @nickjm! I think we probably left in a styling override from before the theming feature was released that sets the background color to white (since at the time it was the one supported background color).

I'll see if I can get a fix out in version 0.80, but at the latest it'll be fixed in 0.81.

Resolving patch:
diff --git a/e2e/scripts/st_markdown.py b/e2e/scripts/st_markdown.py
--- a/e2e/scripts/st_markdown.py
+++ b/e2e/scripts/st_markdown.py
@@ -35,3 +35,11 @@
 $$
 """
 )
+
+st.markdown(
+    """
+| Col1      | Col2        |
+| --------- | ----------- |
+| Some      | Data        |
+"""
+)


Test patch:
Repository: streamlit/streamlit

Issue:
Missing "import urllib" in "streamlit hello" mapping/dataframe demo code
The mapping and dataframe demo (`streamlit hello`, select mapping option on left hand size, have "show code" checked) seems to be missing "import urllib" in the code section below the live demo;

The code uses `except urllib.error.URLError as e:` but urllib is never imported; copying and pasting the code into an app does show the import error.

Tested on streamlit 0.78.0, python 3.8.

EDIT 1: make it clearer
EDIT 2: Just realized the same thing happens for the Dataframe demo, edited.


Discussion:
Thanks @BrunoGomesCoelho for reporting this. Should be an easy fix. I put it in `good first issue` if anyone wants to pick it up!
Hey, @kmcgrady and @BrunoGomesCoelho, I'd be interested in looking into this issue if you don't mind!
Fantastic @brendalf You got it!

Resolving patch:
diff --git a/lib/streamlit/hello/demos.py b/lib/streamlit/hello/demos.py
--- a/lib/streamlit/hello/demos.py
+++ b/lib/streamlit/hello/demos.py
@@ -12,8 +12,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-import urllib.error
-
 
 def intro():
     import streamlit as st
@@ -53,6 +51,8 @@ def mapping_demo():
     import pandas as pd
     import pydeck as pdk
 
+    from urllib.error import URLError
+
     @st.cache
     def from_data_file(filename):
         url = (
@@ -115,7 +115,7 @@ def from_data_file(filename):
             ))
         else:
             st.error("Please choose at least one layer above.")
-    except urllib.error.URLError as e:
+    except URLError as e:
         st.error("""
             **This demo requires internet access.**
 
@@ -221,6 +221,8 @@ def data_frame_demo():
     import pandas as pd
     import altair as alt
 
+    from urllib.error import URLError
+
     @st.cache
     def get_UN_data():
         AWS_BUCKET_URL = "https://streamlit-demo-data.s3-us-west-2.amazonaws.com"
@@ -253,7 +255,7 @@ def get_UN_data():
                 )
             )
             st.altair_chart(chart, use_container_width=True)
-    except urllib.error.URLError as e:
+    except URLError as e:
         st.error(
             """
             **This demo requires internet access.**


Test patch:
Repository: streamlit/streamlit

Issue:
Make PyArrow a dependency and remove warning about PyArrow + Python 3.9 
# Summary

PyArrow recently released version 3.0, which supports Python 3.9.

So we should remove the warning below and make arrow a dependency.

![image](https://user-images.githubusercontent.com/690814/105930326-51954100-5ffe-11eb-846c-6896d045693c.png)


Discussion:
See also https://github.com/streamlit/streamlit/issues/2001

Resolving patch:
diff --git a/lib/streamlit/components/v1/components.py b/lib/streamlit/components/v1/components.py
--- a/lib/streamlit/components/v1/components.py
+++ b/lib/streamlit/components/v1/components.py
@@ -116,29 +116,14 @@ def create_instance(
             import pyarrow
             from streamlit.components.v1 import component_arrow
         except ImportError:
-            import sys
-
-            if sys.version_info >= (3, 9):
-                raise StreamlitAPIException(
-                    """To use Custom Components in Streamlit, you need to install
-PyArrow. Unfortunately, PyArrow does not yet support Python 3.9.
-
-You can either switch to Python 3.8 with an environment manager like PyEnv, or stay on 3.9 by
-[installing Streamlit with conda](https://discuss.streamlit.io/t/note-installation-issues-with-python-3-9-and-streamlit/6946):
-
-`conda install -c conda-forge streamlit`
-
-"""
-                )
-            else:
-                raise StreamlitAPIException(
-                    """To use Custom Components in Streamlit, you need to install
+            raise StreamlitAPIException(
+                """To use Custom Components in Streamlit, you need to install
 PyArrow. To do so locally:
 
 `pip install pyarrow`
 
 And if you're using Streamlit Sharing, add "pyarrow" to your requirements.txt."""
-                )
+            )
 
         # In addition to the custom kwargs passed to the component, we also
         # send the special 'default' and 'key' params to the component


Test patch:
Repository: streamlit/streamlit

Issue:
Vertically stack columns when viewport is below 640px
### Problem

Let's look at the [NYC Uber ridesharing Ridesharing Data app](https://share.streamlit.io/streamlit/demo-uber-nyc-pickups/)

On larger viewports, for e.g. iPad Pro viewport (1366 x 1024), all the columns are rendered correctly with the relative proportions that a developer had intended 

<img width="991" alt="Screen Shot 2021-07-22 at 7 35 59 AM" src="https://user-images.githubusercontent.com/1134064/126686069-30382127-995a-4031-ae6f-43ac077028ce.png">

However, the same app, when viewed on a smaller viewport, for e.g. iPhone 8 (375 x 667) does not line up columns properly. As we can see below, even though the columns for Newark, LGA and JFK were originally intended to be the same proportion (and hence size), but because of our current rendering logic they end up having either half or full column width, which makes for an inconsistent experience.

<img width="409" alt="Screen Shot 2021-07-22 at 7 36 21 AM" src="https://user-images.githubusercontent.com/1134064/126686282-3feba646-c678-4b41-baff-9f0f4a179f97.png">


### Solution

We want a clean solution for smaller viewports:

- For viewports ≥ 640px width, continue to use existing logic
- For viewports < 640, stack columns vertically irrespective of their width

### Additional context

- https://github.com/streamlit/streamlit/issues/2052
- https://github.com/streamlit/streamlit/pull/2065

cc: @tvst 



Discussion:
I sometimes use [`beta_columns`](https://docs.streamlit.io/en/stable/api.html#streamlit.beta_columns) in the sidebar, which is always < 640px in width, and I wouldn't want it to wrap there. If wrapping logic is added, I think there should be an argument to enable/disable the behaviour.

Resolving patch:
diff --git a/e2e/scripts/st_beta_columns_layout.py b/e2e/scripts/st_beta_columns_layout.py
new file mode 100644
--- /dev/null
+++ b/e2e/scripts/st_beta_columns_layout.py
@@ -0,0 +1,21 @@
+# Copyright 2018-2021 Streamlit Inc.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import streamlit as st
+
+c1, c2, c3 = st.beta_columns(3)
+
+c1.write("Foo")
+c2.write("Bar")
+c3.write("Baz")


Test patch:
Repository: streamlit/streamlit

Issue:
Auto-reload doesn't work with subdirs
### Summary

Auto-reload doesn’t work if both the app file and a secondary module are in the same subdir. While this doesn't affect app behavior, it's a pretty critical bug because you need to manually restart Streamlit all the time in this configuration.


### Steps to reproduce

Create a project dir like this:

    .
    |- subdir
       |- streamlit_app.py  # this imports secondary
       |- secondary.py

And then run:

    streamlit run subdir/streamlit_app.py

This will run the app but it won’t show a reload prompt when secondary.py changes. Instead, you need to manually rerun the Streamlit app. See also this [discussion on Slack](https://streamlit.slack.com/archives/C019AE89C2C/p1627346650027100). (Btw if streamlit_app.py is in root and only secondary.py is in subdir, this works).


### Debug info

- Streamlit version: 0.87
- Python version: 3.8
- Pipenv
- OS version: MacOS
- Browser version: Chrome




Discussion:

Resolving patch:
diff --git a/lib/streamlit/watcher/local_sources_watcher.py b/lib/streamlit/watcher/local_sources_watcher.py
--- a/lib/streamlit/watcher/local_sources_watcher.py
+++ b/lib/streamlit/watcher/local_sources_watcher.py
@@ -183,7 +183,9 @@ def get_module_paths(module: types.ModuleType) -> t.Set[str]:
         except Exception as e:
             LOGGER.warning(f"Examining the path of {module.__name__} raised: {e}")
 
-        all_paths.update([str(p) for p in potential_paths if _is_valid_path(p)])
+        all_paths.update(
+            [os.path.abspath(str(p)) for p in potential_paths if _is_valid_path(p)]
+        )
     return all_paths
 
 


Test patch:
diff --git a/lib/tests/streamlit/watcher/local_sources_watcher_test.py b/lib/tests/streamlit/watcher/local_sources_watcher_test.py
--- a/lib/tests/streamlit/watcher/local_sources_watcher_test.py
+++ b/lib/tests/streamlit/watcher/local_sources_watcher_test.py
@@ -14,7 +14,7 @@
 
 """streamlit.LocalSourcesWatcher unit test."""
 
-from unittest.mock import patch
+from unittest.mock import MagicMock, patch
 import os
 import sys
 import unittest
@@ -282,5 +282,13 @@ def test_namespace_package_unloaded(self, fob, _):
         del sys.modules["tests.streamlit.watcher.test_data.namespace_package"]
 
 
+def test_get_module_paths_outputs_abs_paths():
+    mock_module = MagicMock()
+    mock_module.__file__ = os.path.relpath(DUMMY_MODULE_1_FILE)
+
+    module_paths = local_sources_watcher.get_module_paths(mock_module)
+    assert module_paths == {DUMMY_MODULE_1_FILE}
+
+
 def sort_args_list(args_list):
     return sorted(args_list, key=lambda args: args[0])
Repository: streamlit/streamlit

Issue:
Fix wrong Streamlit static app for st.caption() doc
**Link to doc page in question (if any):**

[[click here]](https://docs.streamlit.io/library/api-reference/text/st.caption)

**Name of the Streamlit feature whose docs need improvement:**
`st.caption()`

**What you think the docs should say:**
The Streamlit static app below should show how `st.caption()` works - it currently shows how `st.title()` work

<img src="https://user-images.githubusercontent.com/7164864/137554438-77380317-1267-4840-9521-36f86e32b456.png" width="300px">

➡️  Code is [here](https://github.com/streamlit/streamlit/blob/267bf98d9a8f8d94cf6d3e9f0ea8866233d4836e/lib/streamlit/elements/markdown.py#L221) but I have no idea how to replace that URL with a correct one


Discussion:

Resolving patch:
diff --git a/lib/streamlit/elements/markdown.py b/lib/streamlit/elements/markdown.py
--- a/lib/streamlit/elements/markdown.py
+++ b/lib/streamlit/elements/markdown.py
@@ -218,8 +218,8 @@ def caption(self, body):
         >>> st.caption('This is a string that explains something above.')
 
         .. output::
-           https://static.streamlit.io/0.25.0-2JkNY/index.html?id=SFcBGANWd8kWXF28XnaEZj
-           height: 100px
+           https://static.streamlit.io/1.1.0-eQCi/index.html?id=SVQb16b2UDZX4W8VLkEJLJ
+           height: 175px
 
         """
         caption_proto = MarkdownProto()


Test patch:
Repository: streamlit/streamlit

Issue:
Slider value and description text overlap for slider in sidebar with long description
### Summary

If you use a slider in the sidebar with a long description text, the slider value and the description text overlap. See screenshot:

![sidebar_slider_streamlit_0_88_0](https://user-images.githubusercontent.com/14080364/133406203-2f6ea22c-ff6b-411c-b31f-0470fdf80192.png)


### Steps to reproduce

Code snippet:

```python
import streamlit as st

topn_ranking = st.sidebar.slider(
    "Select the maximum amount of words for classification (higher value adds additional less frequent words to results)",
    10,
    1000,
    (100),
)
```

**Expected behavior:**

To have non-overlapping slider value and description text.

For example, this is how it should look like (with Streamlit version 0.78.0):
![sidebar_slider_streamlit_0_78_0](https://user-images.githubusercontent.com/14080364/133406411-60679061-0bee-491a-b949-9abcac40237a.png)

**Actual behavior:**

When I start the example of the code snippet, the current value and the description text of the slider overlap.

### Is this a regression?

Yes, it was looking good with Streamlit 0.78.0.  My tests showed, that it changed in version 0.83.0.

### Debug info

- Streamlit version: 0.88.0
- Python version: 3.8.10
- Using poetry with pyenv
- OS version: Ubuntu 20.04
- Browser version: Google Chrome 93.0.4577.63



Discussion:
Hello, I am new to the project but would like to take this on, if possible.
Hey @HenryRocha We'd be down for a fix to this. Let me know if you need anything else!

Resolving patch:
diff --git a/e2e/scripts/st_slider.py b/e2e/scripts/st_slider.py
--- a/e2e/scripts/st_slider.py
+++ b/e2e/scripts/st_slider.py
@@ -20,19 +20,28 @@
 w2 = st.slider("Label 2", 0.0, 100.0, (25.0, 75.0), 0.5)
 st.write("Value 2:", w2)
 
+w3 = st.slider(
+    "Label 3 - This is a very very very very very very very very very very very very very very very very very very very very long label",
+    0.0,
+    100.0,
+    (25.0, 75.0),
+    0.5,
+)
+st.write("Value 3:", w3)
+
 if st._is_running_with_streamlit:
 
     def on_change():
         st.session_state.slider_changed = True
 
     st.slider(
-        "Label 3",
+        "Label 4",
         min_value=0,
         max_value=100,
         value=25,
         step=1,
-        key="slider3",
+        key="slider4",
         on_change=on_change,
     )
-    st.write("Value 3:", st.session_state.slider3)
+    st.write("Value 4:", st.session_state.slider4)
     st.write("Slider changed:", "slider_changed" in st.session_state)


Test patch:
Repository: streamlit/streamlit

Issue:
Slider value visually overlaps with the edge of the sidebar
# Summary

The value label collides with the edges of the sidebar. It should change alignment when it gets close to the edges. 

# Steps to reproduce

```py
min_weight = st.sidebar.slider("Minimum weight", 2500, 6500)
```

## Expected behavior:

The value label should not collide with the edges. 

## Actual behavior:

<img width="382" alt="Screen Shot 2020-09-30 at 22 42 44" src="https://user-images.githubusercontent.com/589034/94772484-97067200-036e-11eb-9f82-10453aa7452e.png">


## Is this a regression?

no

# Debug info

- Streamlit version: 0.65.2
- Browser version: Chrome



Discussion:
Agreed. To see this really happen, do a slider from 1,000,000 to 10,000,000, step = 1,000,000. The numbers are truncated at the start of the slider.
Yup, I can repro! I imagine this is a bit tricky as we have to override the behavior of our slider, but maybe one of our resident CSS wizards has a better sense of how we could fix this.

Resolving patch:
diff --git a/e2e/scripts/st_slider.py b/e2e/scripts/st_slider.py
--- a/e2e/scripts/st_slider.py
+++ b/e2e/scripts/st_slider.py
@@ -14,6 +14,13 @@
 
 import streamlit as st
 
+s1 = st.sidebar.slider("Label A", 0, 12345678, 12345678)
+st.sidebar.write("Value A:", s1)
+
+with st.sidebar.expander("Expander"):
+    s2 = st.slider("Label B", 10000, 25000, 10000)
+    st.write("Value B:", s2)
+
 w1 = st.slider("Label 1", 0, 100, 25, 1)
 st.write("Value 1:", w1)
 


Test patch: