instance_id stringlengths 10 57 | file_changes listlengths 1 15 | repo stringlengths 7 53 | base_commit stringlengths 40 40 | problem_statement stringlengths 11 52.5k | patch stringlengths 251 7.06M |
|---|---|---|---|---|---|
geopandas__geopandas-2698 | [
{
"changes": {
"added_entities": [
"geopandas/_vectorized.py:minimum_bounding_circle"
],
"added_modules": [
"geopandas/_vectorized.py:minimum_bounding_circle"
],
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_vectorized.py"
},... | geopandas/geopandas | 037c4283052b06c534d0989462d91514a4b6df3d | CI/COMPAT: TestExplore.test_vmin_vmax failing with latest folium
Failure with latest folium (not yet on main, only on PR with more recent build (https://github.com/geopandas/geopandas/actions/runs/3822563025/jobs/6502838246), so I suspect it the latest commit in folium, potentially https://github.com/python-visualizati... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index d0235b8e..8bd3c4e0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
## Development version
+New features and improvements:
+
+- Added ``minimum_bounding_circle()`` method from shapely to GeoSeries/GeoDataframe (#2621).
+
Deprecations and compatibility no... |
geopandas__geopandas-2775 | [
{
"changes": {
"added_entities": [
"geopandas/geodataframe.py:GeoDataFrame.copy"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
}
] | geopandas/geopandas | 2c61e9e2e8a1cf9cc2ed93ab265b773d60b85f95 | BUG: copy of empty GeoDataFrame becomes Pandas DataFrame
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [x] (optional) I have confirmed this bug exists on the main branch of geopandas.
---
#### Code Sample, a... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e39da0a7..f6ac18b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -35,6 +35,8 @@ Bug fixes:
- Fix `to_parquet`/`to_feather` to use correct WKB flavor for 3D geometries (#2654)
- Fix `read_file` to avoid reading all file bytes prior to calling Fiona or
Pyogrio if prov... |
geopandas__geopandas-2786 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.argmin",
"geopandas/array.py:GeometryArray.argmax"
],
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray._values_for_argsort"
],
"edited_modules": [
... | geopandas/geopandas | 026d428ca0a804db24deb357e284744a4278bcee | ENH: implement `GeoSeries.sort_values` based on Hilbert and/or Morton distance
#### Is your feature request related to a problem?
We can implement `GeoSeries.sort_values` utilising Hilbert and/or Morton distance we have just merged in dask-geopandas. That would mirror [what PostGIS does](https://blog.crunchydata.com... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2950b2a0..3c288652 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,8 @@ New features and improvements:
of the GeoParquet specification (geoparquet.org) (#2663).
- New ``hilbert_distance()`` method that calculates the distance along a Hilbert curve
for each g... |
geopandas__geopandas-2817 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame._constructor_from_mgr"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
... | geopandas/geopandas | ecd21ca2c231b09d6a044e5a831c15dc1c4bc420 | ENH: Allow autolim keyword argument in plots
#### Is your feature request related to a problem?
I use geopandas to reproject global (e.g. Natural Earth) data and plot it for small regions. This causes axes limits to update to encompass the global (and often badly distorted) data
```python
import geopandas
# o... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7316809e..b184818b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -68,6 +68,7 @@ files based on a bounding box, and write out a bounding box column to parquet fi
will silence the warning about mismachted indices. (#3212)
- `GeoSeries.set_crs` can now be used to remove... |
geopandas__geopandas-2835 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/arrow.py:_create_metadata"
],
"edited_modules": [
"geopandas/io/arrow.py:_create_metadata"
]
},
"file": "geopandas/io/arrow.py"
}
] | geopandas/geopandas | d1f4dff8a9d22ad7e4b003e1dac516f00bbf8450 | BUG: to_parquet doesn't set correct geometry_type in GeoParquet metadata for 3D geometries
The geometry_type should be "POINT Z" and not just "POINT":
```
In [12]: df = geopandas.GeoDataFrame({'col': [1, 2, 3]}, geometry=geopandas.points_from_xy([1, 2, 3], [2, 3, 4], [1, 1, 1]))
In [13]: df
Out[13]:
col ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f1c5409b..0da3ab12 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -101,6 +101,7 @@ Bug fixes:
- Fix regression preventing reading from file paths containing hashes in `read_file`
with the fiona engine (#3280). An analgous fix for pyogrio is included in
pyogrio 0.8.... |
geopandas__geopandas-2839 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"benchmarks/sindex.py:BenchQuery.time_query_bulk"
],
"edited_modules": [
"benchmarks/sindex.py:BenchQuery"
]
},
"file": "benchmarks/sindex.py"
},
{
"changes": {
... | geopandas/geopandas | 56187fc7dad114509cba380df47df45b10b1ea84 | ENH: Improves Examples in Gallery to Better Explain Plotting Coordinates With Background Maps
#### Is your feature request related to a problem?
The example "[Creating a GeoDataFrame from a DataFrame with coordinates](https://geopandas.org/en/stable/gallery/create_geopandas_from_pandas.html)" in the examples gallery... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index f755ca98..f6ac18b0 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,11 +13,16 @@ New features and improvements:
the distance along the Hilbert curve (#2070).
- Added ``minimum_bounding_circle()`` method from shapely to GeoSeries/GeoDataframe (#2621).
- Support spec... |
geopandas__geopandas-2850 | [
{
"changes": {
"added_entities": [
"geopandas/io/file.py:_check_metadata_supported"
],
"added_modules": [
"geopandas/io/file.py:_check_metadata_supported"
],
"edited_entities": [
"geopandas/io/file.py:_to_file",
"geopandas/io/file.py:_to_file_fiona",... | geopandas/geopandas | ac87e9ebb3b8e7e3eb4632d64cc3c5a930625dbb | ENH: Write vector files with metadata (tagging)
It would be very useful to be able to tag certain metadata (ex: `version=1.3.0`) in the vector files. Something along the lines of how `rasterio` allows tagging rasters with dictionaries.
https://rasterio.readthedocs.io/en/latest/topics/tags.html
Currently you can a... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ed259f6d..4391142c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -69,6 +69,7 @@ files based on a bounding box, and write out a bounding box column to parquet fi
- `GeoSeries.set_crs` can now be used to remove CRS information by passing
`crs=None, allow_override=True`... |
geopandas__geopandas-2858 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geoseries.py:GeoSeries.__init__"
],
"edited_modules": [
"geopandas/geoseries.py:GeoSeries"
]
},
"file": "geopandas/geoseries.py"
},
{
"changes": {
... | geopandas/geopandas | ff00480544a080e0d33e22a004f9c3099cf8296c | BUG: `GeoSeries` constructor will change the CRS of inputting data
- [ ] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [x] (optional) I have confirmed this bug exists on the main branch of geopandas.
---
**Note**: P... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0da3ab12..2aff602e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -98,6 +98,7 @@ Bug fixes:
geometry column (#2933).
- Fix bug in `GeoDataFrame` constructor where if `geometry` is given a named
`GeoSeries` the name was not used as the active geometry column name (#... |
geopandas__geopandas-2903 | [
{
"changes": {
"added_entities": [
"geopandas/_vectorized.py:concave_hull"
],
"added_modules": [
"geopandas/_vectorized.py:concave_hull"
],
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_vectorized.py"
},
{
"changes": {
... | geopandas/geopandas | 3a45af899717de473da023070fab1e4719de7890 | ENH: GeoPandas with concave hull computation from AlphaShape
#### Is your feature request related to a problem?
I wish I could use GeoPandas to do concave hull computation.
#### Describe the solution you'd like
The package [AlphaShape](https://alphashape.readthedocs.io/en/latest/alphashape.html) (e.g. via cond... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e301b30a..e712a808 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,7 +4,8 @@
New methods:
-- Added ``offset_curve`` method from shapely to GeoSeries/GeoDataframe.
+- Added ``concave_hull`` method from shapely to GeoSeries/GeoDataframe. (#2903)
+- Added ``offset_cur... |
geopandas__geopandas-2919 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/file.py:_read_file"
],
"edited_modules": [
"geopandas/io/file.py:_read_file"
]
},
"file": "geopandas/io/file.py"
}
] | geopandas/geopandas | 979730b6fa1fa9a5f8102b6dcb99ec78a627954b | REG: URL reading limited to HTTP urls
Hi!
I think there is a regression in 0.13.1. Opening files through a non-HTTP url fails. Specifically, I have a program where local files are referred with "file:///path/to/geojson" URLs.
MWE:
```python3
from pathlib import Path
import geopandas as gpd
from urllib.reque... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 16258cd4..6f1f8492 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,11 +7,19 @@ New features and improvements:
Bug fixes:
+
+## Version 0.13.2 (Jun 6, 2023)
+
+Bug fix:
+
+- Fix a regression in reading from local file URIs (``file://..``) using
+ ``geopandas.read_f... |
geopandas__geopandas-2933 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.merge",
"geopandas/geodataframe.py:GeoDataFrame.convert_dtypes"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]... | geopandas/geopandas | 6c1f8bf01c470f02ead8c1504f09364c0af9e84f | BUG: GeoDataFrame.merge incorrectly returning dataframe when geometry columns are present.
Originally discussed in #2931,
A merge which retains geometry columns, but loses the active geometry column (as in the below) should return a geodataframe to follow consistent downcasting rules with the same case with `loc`/`... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 815ddac1..53d92f5b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -9,6 +9,12 @@ Notes on dependencies:
rtree package has also been removed. (#3035)
+Bug fixes:
+- Fix `GeoDataFrame.merge()` incorrectly returning a `DataFrame` instead of a
+ `GeoDataFrame` when th... |
geopandas__geopandas-2959 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__setitem__",
"geopandas/geodataframe.py:GeoDataFrame.apply"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
... | geopandas/geopandas | 35463adda663dfa57c9809865ebbb15448823278 | BUG/DISCUSSION: GeometryTypeError: Unknown geometry type: 'featurecollection'
When applying some (nested) functions to a geodataframe, using the `gdf.apply(lambda r: f(r, arg1, ...), axis=1)` approach, that return different type geometries than the ones in the source dataframe, you get errors that are often quite crypt... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8bf10b95..14041dff 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -16,9 +16,12 @@ New features and improvements:
- Added ``exclusive`` parameter to ``sjoin_nearest`` method for Shapely >= 2.0 (#2877)
Bug fixes:
+- Fix ambiguous error when GeoDataFrame is initialised w... |
geopandas__geopandas-3062 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/io/file.py:_import_pyogrio",
"geopandas/io/file.py:_read_file_pyogrio"
],
"edited_modules": [
"geopandas/io/file.py:_import_pyogrio",
"geopandas/io/file.py:... | geopandas/geopandas | 1cf255b800af6d79e10cb214dad0c21a86ed1996 | ENH: Implement `mask` argument for `read_file` with pyogrio backend
#### Is your feature request related to a problem?
I wish I could use geopandas to open a file using the pyogrio backend using a mask to filter the incoming data.
#### Describe the solution you'd like
Currently, the `read_file` method raises a... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 9405275e..71c888cc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -42,6 +42,9 @@ Potentially breaking changes:
now returns a Pandas DataFrame instead of a GeoDataFrame with an empty
``geometry`` column.
+API changes:
+- Added support for ``mask`` keyword for pyogr... |
geopandas__geopandas-3101 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray._from_sequence_of_strings"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopandas/array.py"
}
] | geopandas/geopandas | 35bbfe262fa98a14fbb9d4e90c470edd86a576d0 | ENH: Add _from_sequence_of_strings for GeometryArray
#### Describe the solution you'd like
Currently passing `dtype={"geometry": "geometry"}` to e.g. `read_csv` fails:
```
import geopandas as gpd
gpd.read_file(gpd.datasets.get_path('nybb')).to_crs("epsg:4326").to_csv("/tmp/boros.csv", index=False)
pd.read_csv("/... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 67abca51..e34c157b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,6 +20,8 @@ New features and improvements:
output (#3087).
- `make_valid` option in `overlay` now uses the `make_valid` method instead of
`buffer(0)` (#3113).
+- Passing `"geometry"` as `dtype` to... |
geopandas__geopandas-3110 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.force_2d",
"geopandas/array.py:GeometryArray.force_3d",
"geopandas/array.py:GeometryArray.contains_properly"
],
"added_modules": null,
"edited_entities": [
"geopandas/array.py:from_wkb",
... | geopandas/geopandas | 54744af1716d27c865d55be64ced9e5b1a1d0e28 | ENH: Add on_invalid parameter to from_wkb
WKB geometries may contain invalid geometries that cannot be properly extracted, which by default raises exceptions. This can prevent reading geometries from a file (e.g., [#2791]) which are not under control of the user and easily fixed.
We can expose the [`on_invalid` pa... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index e34c157b..b0b406dc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,12 +12,16 @@ New methods:
- Added `count_coordinates` method from shapely to GeoSeries/GeoDataframe (#3026).
- Added `minimum_clearance` method from shapely to GeoSeries/GeoDataframe (#2989).
- Added... |
geopandas__geopandas-3113 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.transform"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopandas/array.py"
},
{
"changes": {
... | geopandas/geopandas | 0754cc3a5087b8feeec114fec4b0f58d8766fd11 | Remove usage of buffer(0) as trick to make geometries valid
In our overlay code we have some places where we ensure geometries are valid. In the first place the input geometries, but for difference and intersection also the resulting geometries.
Historically we have been doing that with the `buffer(0)` trick, but in... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0f30f398..a0a14713 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,11 +12,14 @@ New methods:
- Added `count_coordinates` method from shapely to GeoSeries/GeoDataframe (#3026).
- Added `minimum_clearance` method from shapely to GeoSeries/GeoDataframe (#2989).
- Added... |
geopandas__geopandas-3148 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray._reduce"
],
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopandas/array.py"
},
{
"changes": {
"a... | geopandas/geopandas | fed9e57a0033dee6c18ce9da40dcd49e1211f876 | BUG: InvalidVersion error when writing a file on disk with engine=fiona
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
Issue alrerady reported in [esri forum](https://community.esri.com/t5/arcgis-pro-questions/arcgispro-... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 2151b6f0..9d3e00f2 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,6 +10,6 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: "v0.0.27... |
geopandas__geopandas-3167 | [
{
"changes": {
"added_entities": [
"geopandas/_compat.py:requires_pyproj"
],
"added_modules": [
"geopandas/_compat.py:requires_pyproj"
],
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_compat.py"
},
{
"changes": {
... | geopandas/geopandas | 9bd64e2b10797f1d265bf6427d33d877c822a90a | BUG: `to_postgis()` not compatible with psycopg v3
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [x] (optional) I have confirmed this bug exists on the main branch of geopandas.
---
#### Problem description
... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index b0a18651..ab8cbb04 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -78,6 +78,8 @@ Deprecations and compatibility notes:
- Removed deprecated GeoSeries/ GeoDataFrame methods `__xor__`, `__or__`, `__and__` and
`__sub__`. Instead use methods `symmetric_difference`, `... |
geopandas__geopandas-3203 | [
{
"changes": {
"added_entities": [
"geopandas/_compat.py:requires_pyproj"
],
"added_modules": [
"geopandas/_compat.py:requires_pyproj"
],
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_compat.py"
},
{
"changes": {
... | geopandas/geopandas | 3151ef4045d269fcd294798a92f2f0cc4e10d494 | Make pyproj an optional dependency (still required for CRS)
Similarly as we did for fiona, we could make `pyproj` a "soft" dependency: required if you want your GeoDataFrame to have a `.crs` defined, but making it possible to run geopandas without pyproj installed (currently you would get an import error, as we import ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5b30d562..b0a18651 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -11,9 +11,13 @@ Notes on dependencies:
API changes:
- `unary_union` is now deprecated and replaced by the `union_all` method (#3007).
+- The `sjoin` method will now preserve the name of the index of the... |
geopandas__geopandas-3214 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.line_merge"
],
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray.take"
],
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file":... | geopandas/geopandas | 912f1cd85c747f4be68123852566a0917fcd3c4f | ENH: Line_merge
#### Is your feature request related to a problem?
I would like to merge multilinestrings into linestrings, that is using line_merge from GEOS.
#### Describe the solution you'd like
Line_merge is implemented in pygeos and shapely, but not in GeoPandas
#### API breaking implications
None
... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index ab8cbb04..7393cf5a 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -17,6 +17,7 @@ API changes:
New methods:
+- Added `line_merge` method from shapely to GeoSeries/GeoDataframe (#3214).
- Added `set_precision` and `get_precision` methods from shapely to GeoSeries/GeoD... |
geopandas__geopandas-3224 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/__init__.py"
},
{
"changes": {
"added_entities": [
"geopandas/io/file.py:_list_layers"
],
"added_modules": [
... | geopandas/geopandas | 80528432efa97e809e5dd646010e1deba3f21fff | ENH: Function to show layers in a particular file
As far as I can tell, the only way to see the layers in a particular file is to read the file first, e.g.
```python
import geopandas as gpd
# read the GeoPackage file
gdf = gpd.read_file('your_geopackage_file.gpkg')
# list the layer names
layer_names = list(... | diff --git a/doc/source/community/ecosystem.md b/doc/source/community/ecosystem.md
index 1ff83cdb..0065aa2f 100644
--- a/doc/source/community/ecosystem.md
+++ b/doc/source/community/ecosystem.md
@@ -229,6 +229,14 @@ distribution of observations by color in a given map. These distributional
visualizations for map class... |
geopandas__geopandas-3226 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geos... | geopandas/geopandas | 514f975298b940fca1a39917ff35aa12b149a1e7 | ENH: parity between GeoDataFrame.to_json and GeoSeries.to_json
> Hey, guys @jdmcbr @martinfleis , just bringing to your attention that while you fixed this issue for GeoDataFrame, id field is still obligatory for GeoSeries, there is no option to remove it. You might want to add it for GeoSeries as well.
>
> My versio... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 929e5aff..328d660d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,6 +48,8 @@ New features and improvements:
the specified columns (#3101).
- Added support to ``read_file`` for the ``mask`` keyword for the pyogrio engine (#3062).
- Added support to ``read_file`` f... |
geopandas__geopandas-3233 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.intersection_all"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"geopandas/array.py:GeometryArray"
]
},
"file": "geopandas/array.py"
},
{
"changes": {... | geopandas/geopandas | d6459fc18259a45d9f16c3c6d72921758419ceae | ENH: preserve relative order in `clip`
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed this bug exists on the main branch of geopandas.
---
I wasn't sure if this behavior is inten... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 124ed9a9..79bca301 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -21,6 +21,7 @@ API changes:
New methods:
+- Added `intersection_all` method from shapely to GeoSeries/GeoDataframe (#3228).
- Added `line_merge` method from shapely to GeoSeries/GeoDataframe (#3214).
... |
geopandas__geopandas-3237 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geod... | geopandas/geopandas | 1bfa879f4feaa0c540341fec40a7bb59f7b4cb84 | Name of a GeoSeries lost when assigned as geometry in GeoDataFrame constructor
If I have a named GeoSeries and assign it as a geometry when creating a GeoDataFrame, that name is lost and I get back default 'geometry'.
I thought there was an issue on this but I haven't found one so opening this one instead.
```py... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 254db876..387c3020 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -48,10 +48,17 @@ New features and improvements:
the specified columns (#3101).
- Added support to ``read_file`` for the ``mask`` keyword for the pyogrio engine (#3062).
- Added support to ``read_file``... |
geopandas__geopandas-3240 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/tools/sjoin.py:_geom_predicate_query",
"geopandas/tools/sjoin.py:_adjust_indexers"
],
"edited_modules": [
"geopandas/tools/sjoin.py:_geom_predicate_query",
... | geopandas/geopandas | e5ef54c86cf10dd6f09b6eccea55fb3cc3038e3b | REGR: incorrect order of left sjoin with within predicate
I think that #2353 has caused a regression when doing left join with within predicate:
```py
pts = gpd.GeoDataFrame(geometry=gpd.points_from_xy(*np.random.rand(2, 10)))
polys = gpd.GeoDataFrame({"id":[1, 2, 3, 4]}, geometry=[
box(0, 0, .5, .5),
bo... | diff --git a/geopandas/tools/sjoin.py b/geopandas/tools/sjoin.py
index 9ac00d7f..20bbbc7f 100644
--- a/geopandas/tools/sjoin.py
+++ b/geopandas/tools/sjoin.py
@@ -196,6 +196,9 @@ def _geom_predicate_query(left_df, right_df, predicate, distance):
# within is implemented as the inverse of contains
# fli... |
geopandas__geopandas-3261 | [
{
"changes": {
"added_entities": [
"geopandas/array.py:GeometryArray.is_valid_reason"
],
"added_modules": null,
"edited_entities": [
"geopandas/array.py:GeometryArray.delaunay_triangles"
],
"edited_modules": [
"geopandas/array.py:GeometryArray"
]... | geopandas/geopandas | bb1418380780e5d74fb1a269e8d69dc9e7102bd7 | ENH: explore(): skip if fields/index are Timestamp
#### Is your feature request related to a problem?
Running `gdf.explore` and getting `TypeError: Object of type Timestamp is not JSON serializable` when a dataframe has a dtype datetime64
#### Describe the solution you'd like
Raise a warning and have output be... | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index cf293cb5..caaebe88 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -10,6 +10,6 @@ repos:
- id: black
language_version: python3
- repo: https://github.com/astral-sh/ruff-pre-commit
- rev: "v0.1.13... |
geopandas__geopandas-3271 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/base.py:_delegate_geo_method",
"geopandas/base.py:GeoPandasBase.delaunay_triangles",
"geopandas/base.py:GeoPandasBase.offset_curve",
"geopandas/base.py:GeoPandasBase.se... | geopandas/geopandas | ed4fe4ed11a980f1be61b253743270ecf9173f14 | API: Series alignment for non binary op methods
We have a few geo methods which take an additional arraylike input as a parameter; `interpolate`, `offset_curve` and `voronoi_polygons`, but we don't have a consistent way of dealing with alignment between `self.geometry` and the passed arraylike when it is a Series.
>... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8021faad..2f725460 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,8 @@ API changes:
- The `sjoin` method will now preserve the name of the index of the right
GeoDataFrame, if it has one, instead of always using `"index_right"` as the
name for the resultin... |
geopandas__geopandas-3317 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/explore.py:_explore"
],
"edited_modules": [
"geopandas/explore.py:_explore"
]
},
"file": "geopandas/explore.py"
},
{
"changes": {
"added_entitie... | geopandas/geopandas | 9758644fcb77571d2f0ad670088ea004a6b345b0 | BUG: explore() with all-empty geometries
All empty points:
```python
import geopandas
from shapely import Point
gdf = geopandas.GeoDataFrame(geometry=[Point(), Point()])
gdf.explore()
```
gives
```
File [~/conda/envs/geopandas-workshop/lib/python3.12/site-packages/geopandas/geodataframe.py:2205](http://l... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index d725c97c..7316809e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -36,6 +36,9 @@ New methods:
- Added `polygonize` method exposing both `polygonize` and `polygonize_full` from
shapely to GeoSeries/GeoDataframe (#2963).
- Added `is_valid_reason` method from shapely to... |
geopandas__geopandas-3363 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/base.py:_delegate_geo_method"
],
"edited_modules": [
"geopandas/base.py:_delegate_geo_method"
]
},
"file": "geopandas/base.py"
}
] | geopandas/geopandas | 7d460d9efff57720c970fd6a040914286846c589 | BUG: Cannot buffer with pd.Series as distance after 1.0.0 update
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed this bug exists on the main branch of geopandas.
---
#### Code Sam... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index a77546dc..3473b8df 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,7 @@
Bug fixes:
+- Fix a regression preventing a Series as an argument for geometric methods (#3363)
- Support a named datetime index in `explore()` (#3360).
## Version 1.0.0 (June 24, 2024... |
geopandas__geopandas-3368 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geodataframe.py:GeoDataFrame.__finalize__"
],
"edited_modules": [
"geopandas/geodataframe.py:GeoDataFrame"
]
},
"file": "geopandas/geodataframe.py"
}
] | geopandas/geopandas | 9f0b928f03bc7a92412b1b93d1ff36f578e30bba | BUG: "ValueError: The truth value of an array with more than one element is ambiguous" when using groupby.agg() in "geometry" column.
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed thi... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 7a983fa3..51217980 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,11 @@
# Changelog
+## Version 1.0.2 (???)
+
+Bug fixes:
+
+- Properly support named aggregations over a geometry column in `GroupBy.agg` (#3368).
+
## Version 1.0.1 (July 2, 2024)
Bug fixes:
... |
geopandas__geopandas-3383 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "doc/source/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geoseri... | geopandas/geopandas | 2d2d94b1a67e0f1cff7bcd9d2bf4f603c936d027 | BUG: Creating geoseries from series fails if CRS is passed in
```python
import pandas as pd
import geopandas as gpd
ser = gpd.GeoSeries.from_xy([0,1], [1,2], crs="EPSG:4326")
ser2 = pd.Series(ser)
assert ser2.array.crs == "EPSG:4326"
gpd.GeoSeries(ser2, crs="EPSG:4326")
Traceback (most recent call last):
Fi... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 51217980..89da9029 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,13 @@
Bug fixes:
- Properly support named aggregations over a geometry column in `GroupBy.agg` (#3368).
+- Fix regression where constructing a GeoSeries from a pd.Series with GeometryDtype value... |
geopandas__geopandas-3415 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/explore.py:_explore"
],
"edited_modules": [
"geopandas/explore.py:_explore"
]
},
"file": "geopandas/explore.py"
},
{
"changes": {
"added_entitie... | geopandas/geopandas | 54c6c2ac0a6ee93f8340457215506d44b489ccec | ENH: check for minimum version of folium
I've found that we require some recent version of folium with `explore`. I haven't yet checked which is needed but 0.8.3 that comes pre-installed in Google Colab is too old and raises an error. We should capture that and raise an informative error, instead of existing coming fro... | diff --git a/geopandas/explore.py b/geopandas/explore.py
index 652dd6dd..ae2bd038 100644
--- a/geopandas/explore.py
+++ b/geopandas/explore.py
@@ -204,6 +204,13 @@ def _explore(
highlight_kwds : dict (default {})
Style to be passed to folium highlight_function. Uses the same keywords
as ``style_k... |
geopandas__geopandas-3438 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/plotting.py:plot_dataframe"
],
"edited_modules": [
"geopandas/plotting.py:plot_dataframe"
]
},
"file": "geopandas/plotting.py"
}
] | geopandas/geopandas | 2276f624cf0ab85a43df17fb3f21058ca08d1123 | BUG: Inconsistent behavior in plot_dataframe when using aspect=None with missing_kwds
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed this bug exists on the main branch of geopandas.
... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 730ce887..100c14f3 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,32 +2,16 @@
## Version 1.1.0
-Notes on dependencies:
-
-- GeoPandas 1.1 now requires Python 3.10 or greater and pandas 2.0, numpy 1.24, pyproj 3.5,
- are now the minimum required version for these ... |
geopandas__geopandas-3471 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "geopandas/_compat.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"geopandas/geoda... | geopandas/geopandas | b96d3e05238c615d87bd9042b057e4b08d030313 | BUG: sample_points is biased and multimodal
- [x] I have checked that this issue has not already been reported.
- [x] I have confirmed this bug exists on the latest version of geopandas.
- [ ] (optional) I have confirmed this bug exists on the main branch of geopandas.
---
#### Code Sample, a copy-pastable ... | diff --git a/CHANGELOG.md b/CHANGELOG.md
index 1f3c9d8a..730ce887 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -18,6 +18,7 @@ New features and improvements:
Bug fixes:
- Fix an issue that showed numpy dtypes in bbox in `to_geo_dict` and `__geo_interface__`. (#3436)
+- Fix an issue in `sample_points` that could o... |
geopandas__geopandas-656 | [
{
"changes": {
"added_entities": [
"geopandas/plotting.py:deprecated",
"geopandas/plotting.py:_plot_polygon_collection",
"geopandas/plotting.py:_plot_linestring_collection",
"geopandas/plotting.py:_plot_point_collection"
],
"added_modules": [
"geopandas/... | geopandas/geopandas | f70a66918df086bd0fca37f03e160224f400fe14 | geopandas.plotting.plot_point_collection
geopandas.plotting.plot_point_collection(ax, shapely.geometry.Point(1,2))
x = geoms.x.values
y = geoms.y.values
, line 193, in plot_point_collection
x = geoms.x.values
AttributeError: 'float' object has no attribute 'values'
geopandas.plotting.plot_point_collection... | diff --git a/geopandas/plotting.py b/geopandas/plotting.py
index f915a569..6b0b096d 100644
--- a/geopandas/plotting.py
+++ b/geopandas/plotting.py
@@ -6,6 +6,21 @@ import pandas as pd
import geopandas
+def deprecated(new):
+ """Helper to provide deprecation warning."""
+
+ def old(*args, **kwargs):
+ ... |
geopandas__xyzservices-27 | [
{
"changes": {
"added_entities": [
"xyzservices/lib.py:TileProvider.requires_token"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"xyzservices/lib.py:TileProvider"
]
},
"file": "xyzservices/lib.py"
}
] | geopandas/xyzservices | e8646ae1d765f751dc599ed45f166b73af670519 | Add method to check if token is required
Some providers require an access token to get the tiles. It could be handy to have a method in `TileProvider` checking this requirement and returning boolean. Now you have to check if the `accessToken` key is present. Something like
```python
>>> xyz.MapBox.requires_token()... | diff --git a/provider_sources/xyzservices-providers.json b/provider_sources/xyzservices-providers.json
index ab1e15b..c3abecb 100644
--- a/provider_sources/xyzservices-providers.json
+++ b/provider_sources/xyzservices-providers.json
@@ -13,10 +13,11 @@
"name": "OpenStreetMap.Mapnik"
},
"s... |
geopandas__xyzservices-76 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "xyzservices/_version.py"
},
{
"changes": {
"added_entities": [
"xyzservices/lib.py:Bunch.filter"
],
"added_modules": null,
... | geopandas/xyzservices | 566ac84c4b9fe66d36523e74b39b64133766a048 | Add `search` or `filter` method
We have over 200 providers at this moment and it may be helpful to have a function that is able to filter providers based on some criteria. I would imagine keywords (e.g. I want all `HERE` maps) or specs (only those that do not need a token).
API-wise, maybe something like:
```py
... | diff --git a/doc/source/api.rst b/doc/source/api.rst
index d2581f2..66b5f52 100644
--- a/doc/source/api.rst
+++ b/doc/source/api.rst
@@ -14,7 +14,7 @@ Python API
.. autoclass:: Bunch
:exclude-members: clear, copy, fromkeys, get, items, keys, pop, popitem, setdefault, update, values
- :members: flatten
+ :mem... |
geopython__pygeoapi-1923 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pygeoapi/provider/csv_.py:CSVProvider._load"
],
"edited_modules": [
"pygeoapi/provider/csv_.py:CSVProvider"
]
},
"file": "pygeoapi/provider/csv_.py"
},
{
"chang... | geopython/pygeoapi | fb390984a8c6f1cd5d169e4a0d37eb4c0e6f857d | Should the CSV provider not skip invalid coordinates, and instead return nil geometries?
**Is your feature request related to a problem? Please describe.**
In #967, the CSV provider was changed to skip rows with invalid geometries. This means that pygeoapi filters out data with unknown (or typo'd) geometries.
At the t... | diff --git a/docs/source/data-publishing/ogcapi-maps.rst b/docs/source/data-publishing/ogcapi-maps.rst
index 62c7d89..679e445 100644
--- a/docs/source/data-publishing/ogcapi-maps.rst
+++ b/docs/source/data-publishing/ogcapi-maps.rst
@@ -73,6 +73,26 @@ Projections are supported through EPSG codes (`options.projection`):... |
geopython__pygeoapi-282 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pygeoapi/api.py:to_json"
],
"edited_modules": [
"pygeoapi/api.py:to_json"
]
},
"file": "pygeoapi/api.py"
},
{
"changes": {
"added_entities": [
"py... | geopython/pygeoapi | c8d0f1b5128d13306bf2db147faaea120a53ae16 | implement env variables inside PYGEOAPI_CONFIG file
**Is your feature request related to a problem? Please describe.**
devop systems (docker, k8) use enviroment variable to set parameters like database connections of set passwords inside containers.
For example running pygeopai in openshift and we want to conne... | diff --git a/pygeoapi/api.py b/pygeoapi/api.py
index 250e21e..1915472 100644
--- a/pygeoapi/api.py
+++ b/pygeoapi/api.py
@@ -997,7 +997,7 @@ def to_json(dict_):
:returns: JSON string representation
"""
- return json.dumps(dict_, default=json_serial)
+ return json.dumps(dict_)
def _render_j2_templ... |
geopython__pygeoapi-671 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"pygeoapi/api.py:validate_datetime"
],
"edited_modules": [
"pygeoapi/api.py:validate_datetime"
]
},
"file": "pygeoapi/api.py"
}
] | geopython/pygeoapi | 43b6165fa92a1932489166c030186954ea465ad4 | Temporal range is preventing /items query for a "greater" range
**Is your feature request related to a problem? Please describe.**
We have a yaml configuration of a collection with a `temporal` definition like the following:
```
temporal:
begin: 2020-02-01T00:00:00Z
... | diff --git a/pygeoapi/api.py b/pygeoapi/api.py
index 8c83dfe..84552b1 100644
--- a/pygeoapi/api.py
+++ b/pygeoapi/api.py
@@ -2587,10 +2587,10 @@ def validate_datetime(resource_def, datetime_=None):
datetime_end = datetime_end.replace(tzinfo=pytz.UTC)
datetime_invalid = any([
- ... |
geospace-code__pymap3d-66 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"src/pymap3d/lox.py:departure"
],
"edited_modules": [
"src/pymap3d/lox.py:departure"
]
},
"file": "src/pymap3d/lox.py"
}
] | geospace-code/pymap3d | a2e91517fa455ef04d46794f65eba4f76d62493c | loxodrome_inverse returns (circumference / 2 - actual distance) when lat1 == lat2 and lon1< lon2
`loxodrome_inverse()` returns (circumference / 2 - actual distance) when lat1 == lat2 and lon1< lon2.
It is clear from the following calculation results:
```python console
>>> from pymap3d.lox import loxodrome_inverse
... | diff --git a/src/pymap3d/lox.py b/src/pymap3d/lox.py
index 4b205ee..26b220d 100644
--- a/src/pymap3d/lox.py
+++ b/src/pymap3d/lox.py
@@ -118,7 +118,7 @@ def loxodrome_inverse(
-------
lox_s : float
- distance along loxodrome
+ distance along loxodrome (meters)
az12 : float
azimut... |
geowurster__tinymr-17 | [
{
"changes": {
"added_entities": null,
"added_modules": [
"tinymr/_mrtools.py:ReduceJobConf"
],
"edited_entities": null,
"edited_modules": [
"tinymr/_mrtools.py:ReduceJob"
]
},
"file": "tinymr/_mrtools.py"
},
{
"changes": {
"added_entitie... | geowurster/tinymr | 5dbf46845a8caba995916f76d1e681860f1e198f | ReduceJob().chunksize is populated with reduce_jobs | diff --git a/.travis.yml b/.travis.yml
index 8813f7b..04f68af 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,6 +15,7 @@ python:
- pypy3
install:
+ - pip install pip setuptools --upgrade
- pip install -e .\[dev\]
script:
diff --git a/tinymr/_mrtools.py b/tinymr/_mrtools.py
index 1a200db..ce3f9ef 100644
-... |
gerbenoostra__poetry-plugin-mono-repo-deps-24 | [
{
"changes": {
"added_entities": [
"poetry_plugin_mono_repo_deps/plugin.py:MonoRepoDepsPlugin.update_pyproject_toml",
"poetry_plugin_mono_repo_deps/plugin.py:MonoRepoDepsPlugin.restore_pyproject_toml",
"poetry_plugin_mono_repo_deps/plugin.py:MonoRepoDepsPlugin.handle_terminate",
... | gerbenoostra/poetry-plugin-mono-repo-deps | bcd0b0c26cb6ea2501dde162495799a40f80d44f | Missing changes in the pyproject.toml file
Hi,
I have been trying to use your extension, which should - on paper - solve my issue of multiple inter-related packages being developed in a mono-repo.
However, I was unable to publish to PyPi.
My pyproject.toml file contains the following:
```
[tool.poetry]
na... | diff --git a/poetry_plugin_mono_repo_deps/plugin.py b/poetry_plugin_mono_repo_deps/plugin.py
index 7c2665c..153cf13 100644
--- a/poetry_plugin_mono_repo_deps/plugin.py
+++ b/poetry_plugin_mono_repo_deps/plugin.py
@@ -5,7 +5,8 @@ from dataclasses import dataclass
from typing import Any, Dict, List, TypeVar, cast
fro... |
gerbenoostra__poetry-plugin-mono-repo-deps-6 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"poetry_plugin_mono_repo_deps/plugin.py:MonoRepoDepsPlugin.__init__",
"poetry_plugin_mono_repo_deps/plugin.py:MonoRepoDepsPlugin.activate",
"poetry_plugin_mono_repo_deps/plugin.py:MonoRep... | gerbenoostra/poetry-plugin-mono-repo-deps | 95c9458a38fca9f4bfb9dc49f5cc14b15c970840 | Poetry command fails to run from folders without a pyproject.toml (inc poetry init and poetry --version)
Hello,
Very much appreciating this plugin, although we have found an issue with it.
With the plugin installed, the following commands fail, if run from a folder without a pyproject.toml file:
poetry --versi... | diff --git a/README.md b/README.md
index 9ed309e..c7ffa47 100644
--- a/README.md
+++ b/README.md
@@ -112,7 +112,7 @@ enabled = true
commands = ["build", "export"]
constraint = "~="
source_types = ["file", "directory"]
-only_develop = false
+only_develop = False
```
Possible alternative values can be found in the... |
gerva__tower-companion-28 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"lib/api.py:APIv1.__init__",
"lib/api.py:APIv1._authentication",
"lib/api.py:APIv1._verify_ssl"
],
"edited_modules": [
"lib/api.py:APIv1"
]
},
"file": "l... | gerva/tower-companion | 5c373dd2992d4404e9a0e5fc0c5195f58c7ddb7a | When no configuration file is set, `kick` raises a ConfigError
we should intercept the ConfigError and explain what's wrong with the configuration, instead of just printing the full stack trace | diff --git a/lib/api.py b/lib/api.py
index 6d76e18..a131931 100644
--- a/lib/api.py
+++ b/lib/api.py
@@ -8,6 +8,7 @@ import json
import requests
import lib.validate as validate
from lib.adhoc import AdHocError
+from lib.configuration import ConfigError
class APIError(Exception):
@@ -27,7 +28,13 @@ class APIv1(o... |
getlogbook__logbook-176 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"logbook/compat.py:LoggingCompatRecord._format_message",
"logbook/compat.py:RedirectLoggingHandler.convert_record"
],
"edited_modules": [
"logbook/compat.py:LoggingCompatRecor... | getlogbook/logbook | f4d4d9309d0a0ce097cfa52f0f3dad6280d7f2e3 | Exception in LoggingCompatRecord for mapping keys
Example:
```
logger = logging.getLogger("test")
logger.setLevel("DEBUG")
logger.addHandler(RedirectLoggingHandler())
with logbook.StderrHandler():
logger.debug("test map %(name)s", {"name": "mapname"})
# raise exception in LoggingCompatRecord:
... | diff --git a/logbook/compat.py b/logbook/compat.py
index c3896db..b65ac00 100644
--- a/logbook/compat.py
+++ b/logbook/compat.py
@@ -9,12 +9,13 @@
:copyright: (c) 2010 by Armin Ronacher, Georg Brandl.
:license: BSD, see LICENSE for more details.
"""
-import sys
+import collections
import logging
+import sys... |
getlogbook__logbook-183 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"logbook/handlers.py:MailHandler.__init__",
"logbook/handlers.py:MailHandler.get_connection",
"logbook/handlers.py:GMailHandler.__init__"
],
"edited_modules": [
"logbo... | getlogbook/logbook | 1d999a784d0d8f5f7423f25c684cc1100843ccc5 | SMTP Handler STARTTLS
Due to the lack of documentation on this handler it took a little digging to work out how to get it to work...
One thing that confused me was the "secure" argument. Python SMTPLib starttls() accepts two optional values: a keyfile and certfile - but these are only required for *checking* the ide... | diff --git a/logbook/handlers.py b/logbook/handlers.py
index 82e518f..5f66978 100644
--- a/logbook/handlers.py
+++ b/logbook/handlers.py
@@ -20,6 +20,7 @@ try:
except ImportError:
from sha import new as sha1
import traceback
+import collections
from datetime import datetime, timedelta
from collections import d... |
getlogbook__logbook-195 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"logbook/utils.py:_SlowContextNotifier.__init__",
"logbook/utils.py:_SlowContextNotifier._notifier",
"logbook/utils.py:logged_if_slow"
],
"edited_modules": [
"logbook/... | getlogbook/logbook | bb0f4fbeec318a140780b1ac8781599474cf2666 | logged_if_slow API
I think the logged_if_slow API is a bit awkard. I think we should change it for v1.0.
Current API:
```
def logged_if_slow(message, threshold=1, func=logbook_debug, args=None, kwargs=None)
```
Problems:
- Always uses default logger
- Have to pass log function, why not a level?
- args and k... | diff --git a/logbook/utils.py b/logbook/utils.py
index 5416c52..7851f48 100644
--- a/logbook/utils.py
+++ b/logbook/utils.py
@@ -3,17 +3,14 @@ import functools
import sys
import threading
-from .base import Logger
+from .base import Logger, DEBUG
from .helpers import string_types
-from logbook import debug as logb... |
getlogbook__logbook-242 | [
{
"changes": {
"added_entities": [
"logbook/handlers.py:SyslogHandler.wrap_segments",
"logbook/handlers.py:SyslogHandler.unix_envelope",
"logbook/handlers.py:SyslogHandler.net_envelope"
],
"added_modules": null,
"edited_entities": [
"logbook/handlers.py:Sy... | getlogbook/logbook | 7d97a72a848c176108845eda44503a688e0e5042 | Should use newline character, not null, for TCP record terminator
As per https://github.com/getlogbook/logbook/blob/master/logbook/handlers.py#L1430, Logbook marks the end of SyslogHandler records with a null character.
I don't know whether this is correct when sending to a socket, but as far as I can tell, the corr... | diff --git a/CHANGES b/CHANGES
index 7530095..1eb202f 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,12 @@
Logbook Changelog
=================
+Not yet released
+
+- Use correct record delimiters (null for UNIX, newline for network) in SyslogHandler (thanks Jonathan Kamens)
+- Try to reconnect to SyslogHandler TCP s... |
getnikola__nikola-3624 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nikola/utils.py:nikola_find_formatter_class"
],
"edited_modules": [
"nikola/utils.py:nikola_find_formatter_class"
]
},
"file": "nikola/utils.py"
}
] | getnikola/nikola | 6226861f5f5fd33f6c49b2d15a518e439c23ea05 | Cannot build, AttributeError error
<!--
Before creating an issue:
* make sure you are using an up-to-date version of Nikola
* search for existing issues that might be related
Make sure to:
* provide information about your environment (below)
* include all the output you get, and any other information related to... | diff --git a/AUTHORS.txt b/AUTHORS.txt
index 68a925bf0..efdcdf1b5 100644
--- a/AUTHORS.txt
+++ b/AUTHORS.txt
@@ -117,6 +117,7 @@
* `Roman Faizullin <https://github.com/faizrr>`_
* `Roman Imankulov <https://github.com/imankulov>`_
* `Santiago Pestarini <https://github.com/quijot>`_
+* `Santiago Fraire Willemoes <http... |
getnikola__nikola-3804 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"nikola/plugins/command/auto/__init__.py:base_path_from_siteuri"
],
"edited_modules": [
"nikola/plugins/command/auto/__init__.py:base_path_from_siteuri"
]
},
"file": "ni... | getnikola/nikola | 1da7205273ca17c800d99e7ca3c49bec046b96ce | Build-in `nikola serve` development server could support non-root sites better.
<!--
Before creating an issue:
* make sure you are using an up-to-date version of Nikola
* search for existing issues that might be related
Make sure to:
* provide information about your environment (below)
* include all the output ... | diff --git a/CHANGES.txt b/CHANGES.txt
index 0f04b5644..91a21b7a8 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -12,6 +12,7 @@ Bugfixes
* Restore `annotation_helper.tmpl` with dummy content - fix themes still mentioning it
(Issue #3764, #3773)
* Fix compatibility with watchdog 4 (Issue #3766)
+* `nikola serve` now... |
getsentry__responses-176 | [
{
"changes": {
"added_entities": [
"responses.py:_has_unicode",
"responses.py:_clean_unicode"
],
"added_modules": [
"responses.py:_has_unicode",
"responses.py:_clean_unicode"
],
"edited_entities": [
"responses.py:BaseResponse._url_matches_str... | getsentry/responses | 92b2d4597e03c8dee096329fca2ed7f28c8fefa5 | Issues with Unicode in path
I saw that you fixed #153 by handling Unicode characters in the querystring, but there still appear to be issues when said Unicode characters are in the URL path itself. If you pass a mock URL with a Unicode character in it to Responses and then request the same URL via Requests, you get a c... | diff --git a/responses.py b/responses.py
index c2a3280..1c48310 100644
--- a/responses.py
+++ b/responses.py
@@ -23,8 +23,9 @@ except ImportError:
if six.PY2:
from urlparse import urlparse, parse_qsl, urlsplit, urlunsplit
+ from urllib import quote
else:
- from urllib.parse import urlparse, parse_qsl, ur... |
getsentry__responses-235 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses.py:CallbackResponse.get_response"
],
"edited_modules": [
"responses.py:CallbackResponse"
]
},
"file": "responses.py"
}
] | getsentry/responses | f89de1bfa616655d6b5fa0e0d5836113357ed986 | callback results are not unpacked prior to checking for exception bodies
This means the way to mock an error for a callback differs from the way to mock andd error for standard use. Presumably this is not desired - it is not documented at any rate. | diff --git a/responses.py b/responses.py
index 134939a..90bde93 100644
--- a/responses.py
+++ b/responses.py
@@ -390,6 +390,9 @@ class CallbackResponse(BaseResponse):
raise result
status, r_headers, body = result
+ if isinstance(body, Exception):
+ raise body
+
body = ... |
getsentry__responses-291 | [
{
"changes": {
"added_entities": [
"responses.py:OriginalResponseShim.__init__",
"responses.py:OriginalResponseShim.isclosed"
],
"added_modules": [
"responses.py:OriginalResponseShim"
],
"edited_entities": [
"responses.py:Response.get_response",
... | getsentry/responses | 567c69e11332e1e2bcabe347f6cd9376765944b9 | responses 0.10.8 introduces an implicit dependency on urllib3>=1.23
responses 0.10.8 introduces these blocks:
https://github.com/getsentry/responses/blob/2d5d9f5ec33f168f097bb92f99243f18f264184c/responses.py#L382-L386
The `msg` param was not introduced until urllib3 1.23.
`requests` itself permits any `urllib3>... | diff --git a/responses.py b/responses.py
index 6148f1d..47c81cf 100644
--- a/responses.py
+++ b/responses.py
@@ -375,21 +375,12 @@ class Response(BaseResponse):
headers = self.get_headers()
status = self.status
body = _handle_body(self.body)
-
- # The requests library's cookie handling... |
getsentry__responses-298 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses.py:RequestsMock.add_passthru",
"responses.py:RequestsMock._on_request"
],
"edited_modules": [
"responses.py:RequestsMock"
]
},
"file": "responses.py"
... | getsentry/responses | 8b0b9c1883c1242246af3dd535df79bfb071732a | ability to pass a regex to add_passthru
e.g:
`responses.add_passthru(re.compile(r'http(s?):\/\/(\w+)(:*)(\d*)\/api\/v1\/activities\/'))`
so that calls to any domain[:port] with this request path may call the upstream server. | diff --git a/README.rst b/README.rst
index 6ba7643..94c27b3 100644
--- a/README.rst
+++ b/README.rst
@@ -352,7 +352,7 @@ Passing thru real requests
--------------------------
In some cases you may wish to allow for certain requests to pass thru responses
-and hit a real server. This can be done with the 'passthru' ... |
getsentry__responses-301 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses.py:RequestsMock.add_passthru",
"responses.py:RequestsMock._on_request"
],
"edited_modules": [
"responses.py:RequestsMock"
]
},
"file": "responses.py"
... | getsentry/responses | db6d81d58e243ae90caf87c43c639eb8002d42a4 | Feature Request: Return requested params in responses.calls[].request
Similar to as discussed in #148 , when using the params parameter in requests, I need to set `match_querystring=False` to ignore the query string:
```
responses.add(
method=responses.GET,
url="http://example.com?hello=world,
json={... | diff --git a/README.rst b/README.rst
index 94c27b3..1ea3d36 100644
--- a/README.rst
+++ b/README.rst
@@ -239,6 +239,25 @@ a callback function to give a slightly different result, you can use ``functools
)
+You can see params passed in the original ``request`` in ``responses.calls[].request.params``:
+
... |
getsentry__responses-302 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses.py:RequestsMock._on_request"
],
"edited_modules": [
"responses.py:RequestsMock"
]
},
"file": "responses.py"
}
] | getsentry/responses | 72a60d9be44a46ac2cda442a8105c3c4f9e86458 | RequestsMock._on_request misses calls if callback raises BaseException
In case a `BaseException` (or a subclass) is raised in the `get_response()` method of a match object (e.g. in a callback) the call accounting isn't updated for that call.
This then leads to test failures due to `Not all requests have been execute... | diff --git a/responses.py b/responses.py
index 3f32125..df42ef5 100644
--- a/responses.py
+++ b/responses.py
@@ -652,7 +652,7 @@ class RequestsMock(object):
try:
response = adapter.build_response(request, match.get_response(request))
- except Exception as response:
+ except BaseExc... |
getsentry__responses-370 | [
{
"changes": {
"added_entities": [
"responses/__init__.py:Response.__repr__",
"responses/__init__.py:RequestsMock.registered"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"responses/__init__.py:Response",
"responses/__init__... | getsentry/responses | 52e74849f5be36d08cac723217b60cc19421f4f6 | Facilitate how to view the registered responses for debugging purposes
<!--
Please provide some context on what problem you are trying to solve and how this feature is going to help.
-->
Hi maintainers! This is my first issue and intent to help here 😄
## Motivation
When writing my tests and debugging them, s... | diff --git a/README.rst b/README.rst
index 1bfa062..20f5f27 100644
--- a/README.rst
+++ b/README.rst
@@ -475,9 +475,9 @@ Regex can be used like:
Viewing/Modifying registered responses
--------------------------------------
-Registered responses are available as a private attribute of the RequestMock
+Registered res... |
getsentry__responses-409 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:RequestsMock._on_request"
],
"edited_modules": [
"responses/__init__.py:RequestsMock"
]
},
"file": "responses/__init__.py"
}
] | getsentry/responses | 3100f2d38fc2574ac9c2a0a81c6bdbd6bc5463ea | Passthrough Responses should appear in CallList
<!--
Please provide some context on what problem you are trying to solve and how this feature is going to help.
-->
Currently, Passthrough responses do not appear in the `CallList` after termination of the test. A successful match does also not increase the call coun... | diff --git a/responses/__init__.py b/responses/__init__.py
index 130f8c0..43474ff 100644
--- a/responses/__init__.py
+++ b/responses/__init__.py
@@ -760,18 +760,22 @@ class RequestsMock(object):
if match.passthrough:
logger.info("request.passthrough-response", extra={"url": request.url})
- ... |
getsentry__responses-420 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:BaseResponse.__init__",
"responses/__init__.py:RequestsMock.add_callback"
],
"edited_modules": [
"responses/__init__.py:BaseResponse",
"response... | getsentry/responses | 3e029949c8f3c1b3b2b48f9e437fedd7cf27746d | Allow to specify stream=True for callback responses
According to https://github.com/getsentry/responses/blob/master/responses.py#L355 default stream value for callback responses is False.
Also there is no way to override this value using public method add_callback https://github.com/getsentry/responses/blob/master/res... | diff --git a/CHANGES b/CHANGES
index 60a0617..3505ba9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,11 +3,11 @@
* Fixed regression with `stream` parameter deprecation, requests.session() and cookie handling.
* Replaced adhoc URL parsing with `urllib.parse`.
+* Added ``match`` parameter to ``add_callback`` method
* Adde... |
getsentry__responses-433 | [
{
"changes": {
"added_entities": [
"responses/__init__.py:OriginalResponseShim.close"
],
"added_modules": null,
"edited_entities": [
"responses/__init__.py:BaseResponse.__init__",
"responses/__init__.py:RequestsMock.add_callback"
],
"edited_modules": [... | getsentry/responses | 3e029949c8f3c1b3b2b48f9e437fedd7cf27746d | AttributeError when urllib3 throws an IncompleteRead
**TL;DR:** There is a flag in `urllib3.HTTPResponse` that checks if the "Content-Length" header of a HTTP request matches its body size. If this flag is set, the error raised by a mismatch between the two causes an AttributeError in responses (see further below for d... | diff --git a/CHANGES b/CHANGES
index 60a0617..3505ba9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,11 +3,11 @@
* Fixed regression with `stream` parameter deprecation, requests.session() and cookie handling.
* Replaced adhoc URL parsing with `urllib.parse`.
+* Added ``match`` parameter to ``add_callback`` method
* Adde... |
getsentry__responses-435 | [
{
"changes": {
"added_entities": [
"responses/__init__.py:OriginalResponseShim.close"
],
"added_modules": null,
"edited_entities": [
"responses/__init__.py:_cookies_from_headers"
],
"edited_modules": [
"responses/__init__.py:_cookies_from_headers",
... | getsentry/responses | 28432250fb767050888c69ec6f7a528ad83166d1 | _cookies_from_headers breaks on Python 2 if python-future is installed
(I have also reported this at PythonCharmers/python-future#564)
If [python-future](https://github.com/PythonCharmers/python-future) is installed, the `test_cookies_from_headers` test fails on Python 2 with the following error:
```
test_response... | diff --git a/mypy.ini b/mypy.ini
index 8e109ff..ee614e0 100644
--- a/mypy.ini
+++ b/mypy.ini
@@ -35,3 +35,8 @@ ignore_missing_imports=True
disallow_untyped_defs=False
disallow_untyped_calls=False
disallow_any_decorated=False
+
+[mypy-responses.test_matchers]
+disallow_untyped_defs=False
+disallow_untyped_calls=False... |
getsentry__responses-444 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/matchers.py:multipart_matcher"
],
"edited_modules": [
"responses/matchers.py:multipart_matcher"
]
},
"file": "responses/matchers.py"
}
] | getsentry/responses | 6d9b36f2b6d28d2ad84511ca2a76f131089f3110 | multipart_matcher doesn't work with non-UTF-8 bytes
### Environment
`responses==0.16.0`, `python==3.8.12`
### Steps to Reproduce
```python
import requests
import responses
from responses.matchers import multipart_matcher
non_utf_bytes = b'\xacHello World!'
def post_non_utf_bytes():
requests.post(... | diff --git a/CHANGES b/CHANGES
index fa4aeb5..6085c46 100644
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,7 @@
* Fixed issue when `passthru_prefixes` persisted across tests.
Now `add_passthru` is valid only within a context manager or for a single function and
cleared on exit
+* Added support for non-UTF-8 bytes in `r... |
getsentry__responses-455 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/registries.py:FirstMatchRegistry.find"
],
"edited_modules": [
"responses/registries.py:FirstMatchRegistry"
]
},
"file": "responses/registries.py"
}
] | getsentry/responses | 3dccae85b0c7d830c8aa247dd063799808ebd576 | Requesting a URL, then changing the response will return the old response
The documentation states:
> You can also add multiple responses for the same url: ....
However, this is not true if you interleave adding and requesting responses:
```py
>>> import responses
>>> import requests
>>>
>>> responses.start()... | diff --git a/CHANGES b/CHANGES
index a90606b..200fc1b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,17 +1,19 @@
0.17.0
------
-* This release is the last one to support Python 2.7.
+* This release is the last to support Python 2.7.
* Fixed issue when `response.iter_content` when `chunk_size=None` entered infinite loop
... |
getsentry__responses-476 | [
{
"changes": {
"added_entities": [
"responses/__init__.py:RequestsMock.get_registry"
],
"added_modules": null,
"edited_entities": [
"responses/__init__.py:RequestsMock._get_registry"
],
"edited_modules": [
"responses/__init__.py:RequestsMock"
]
... | getsentry/responses | 9e17e897592360c0e358e8a8d3cbd087ef644f0f | CustomRegistry - improve reset() availability
Hi all,
Thanks again for the CustomRegistry-implementation! It makes it for us at Moto much easier to have fine-grained control over the matching order/priority.
One painpoint I ran into, when converting everything to work with 0.1.7.0, was the `reset`-api. We have a ... | diff --git a/CHANGES b/CHANGES
index 2c926ba..66c1659 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
0.19.0
------
+* Expose `get_registry()` method of `RequestsMock` object. Replaces internal `_get_registry()`.
* Added support for `async/await` functions.
0.18.0
diff --git a/README.rst b/README.rst
index d... |
getsentry__responses-480 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/registries.py:FirstMatchRegistry.add"
],
"edited_modules": [
"responses/registries.py:FirstMatchRegistry"
]
},
"file": "responses/registries.py"
}
] | getsentry/responses | eb62b46e1a8ed2fd4c4ce51fcafbcdd6f0120d25 | Reusing Response objects leads to unexpected test failures in responses 0.17.0
We had some tests start failing when we upgraded from responses 0.16.0 to 0.17.0. They were to do with testing retry.
### Steps to Reproduce
I have found this demonstrates the error:
``` python
import responses
import requests
... | diff --git a/responses/registries.py b/responses/registries.py
index 22f7951..5a0be34 100644
--- a/responses/registries.py
+++ b/responses/registries.py
@@ -1,3 +1,4 @@
+import copy
from typing import (
TYPE_CHECKING,
List,
@@ -47,6 +48,11 @@ class FirstMatchRegistry(object):
return found_match, mat... |
getsentry__responses-485 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/matchers.py:query_param_matcher"
],
"edited_modules": [
"responses/matchers.py:query_param_matcher"
]
},
"file": "responses/matchers.py"
}
] | getsentry/responses | ee46f922e4271b583c5415ae29d77f563a66e751 | Integer request query parameters fail to match
### Steps to Reproduce
1. implement a test with `matchers.query_param_matcher` using integers
```python
@responses.activate
def test_bad_matcher():
expected_query_params = {"number": 5}
responses.add(
responses.GET,
"/fake",
match... | diff --git a/CHANGES b/CHANGES
index 66c1659..8a4d3df 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
------
* Expose `get_registry()` method of `RequestsMock` object. Replaces internal `_get_registry()`.
+* `query_param_matcher` can now accept dictionaries with `int` and `float` values.
* Added support for `as... |
getsentry__responses-498 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/matchers.py:query_param_matcher"
],
"edited_modules": [
"responses/matchers.py:query_param_matcher"
]
},
"file": "responses/matchers.py"
}
] | getsentry/responses | 4c4b46be0c425656017c1774495c9426ed3b5ba2 | Partial query_param_matcher
Currently it seems that the query_param_matcher, matcher, only performs a match when **ALL** query parameters are matched.
Is it possible to add an option to the function to allow for `loose` (probably a much better word for that) matching, where a match against any of the query parameter... | diff --git a/CHANGES b/CHANGES
index 50f37ba..f498e82 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@
See `responses.registries.OrderedRegistry`.
* Expose `get_registry()` method of `RequestsMock` object. Replaces internal `_get_registry()`.
* `query_param_matcher` can now accept dictionaries with `int` and `fl... |
getsentry__responses-507 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:_get_url_and_path",
"responses/__init__.py:BaseResponse.__init__",
"responses/__init__.py:BaseResponse._should_match_querystring",
"responses/__init__.py:Re... | getsentry/responses | a35896e9a1690730524c68d689ff1fde269d797a | Path segment parameters not handled correctly
URL matching does not respect path segment parameters in the last path segment. This is probably caused by using `urlparse` instead of `urlsplit` in [_get_url_and_path](https://github.com/getsentry/responses/blob/a35896e9a1690730524c68d689ff1fde269d797a/responses/__init__.p... | diff --git a/CHANGES b/CHANGES
index 6f3cc30..39b71e6 100644
--- a/CHANGES
+++ b/CHANGES
@@ -10,7 +10,11 @@
* Add support for the `loose` version of `query_param_matcher` via named argument `strict_match`.
* Added support for `async/await` functions.
* `response_callback` is no longer executed on exceptions raised b... |
getsentry__responses-508 | [
{
"changes": {
"added_entities": [
"responses/__init__.py:RequestsMock.delete",
"responses/__init__.py:RequestsMock.get",
"responses/__init__.py:RequestsMock.head",
"responses/__init__.py:RequestsMock.options",
"responses/__init__.py:RequestsMock.patch",
"re... | getsentry/responses | a35896e9a1690730524c68d689ff1fde269d797a | Add shortcuts for each HTTP verb
When using a pytest fixture like this:
```py
@pytest.fixture
def mocked_responses():
with responses.RequestsMock() as rsps:
yield rsps
```
In my tests, I have to import `responses` to add mocks:
```py
import responses
def test_server(mocked_responses):
... | diff --git a/CHANGES b/CHANGES
index 6f3cc30..e901fd2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -3,6 +3,9 @@
* Added a registry that provides more strict ordering based on the invocation index.
See `responses.registries.OrderedRegistry`.
+* Added shortcuts for each request method: delete, get, head, options, patch, p... |
getsentry__responses-529 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:FalseBool.__bool__",
"responses/__init__.py:urlencoded_params_matcher",
"responses/__init__.py:json_params_matcher",
"responses/__init__.py:_has_unicode",
... | getsentry/responses | 7842ec3d907f5fd05387c97d16a51aaddccfd455 | `assert_call_count` should be able to check urls without matching querystring
When adding an url in `responses`, querystring is not matched by default:
```python
@responses.activate
def test_my_test():
responses.add(responses.GET, "http://www.example.com")
# Both these requests will be captured
requ... | diff --git a/CHANGES b/CHANGES
index fc3be1c..e916719 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,7 +1,10 @@
0.21.0
------
+* Add `threading.Lock()` to allow `responses` working with `threading` module.
* Removed internal `_cookies_from_headers` function
+* Now `add`, `upsert`, `replace` methods return registered res... |
getsentry__responses-531 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:get_wrapped",
"responses/__init__.py:RequestsMock.activate"
],
"edited_modules": [
"responses/__init__.py:get_wrapped",
"responses/__init__.py:R... | getsentry/responses | bf30737282793b9290c1f064c85db5769d2d4ccf | Allow applying @responses.activate to a class
Right now I have to apply the decorator to every method I want to mock responses in; I'd prefer to apply the decorator only to the `TestCase` declaration as my `TestCase` does http in every test method. This would keep requests consistent with the mock.patch behaviour.
E.g... | diff --git a/CHANGES b/CHANGES
index e916719..2a0cda2 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,8 @@
* Removed internal `_cookies_from_headers` function
* Now `add`, `upsert`, `replace` methods return registered response.
`remove` method returns list of removed responses.
+* Added strict version of decorator. ... |
getsentry__responses-558 | [
{
"changes": {
"added_entities": [
"responses/__init__.py:PassthroughResponse.__init__"
],
"added_modules": null,
"edited_entities": [
"responses/__init__.py:BaseResponse.__init__"
],
"edited_modules": [
"responses/__init__.py:BaseResponse",
"r... | getsentry/responses | 3d83a88382bf5cedefbbab3986bbfeeb07883fac | Feature request: allow configuration of passthrough during BaseResponse construction
### Use case
I'm working on a Python test suite that returns mock data for HTTP GET requests, and it has an 'online' mode during which no mocking of requests occurs.
I'd like to migrate the test suite to use `responses`, and woul... | diff --git a/CHANGES b/CHANGES
index fbf8ddb..bcd26b5 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,8 @@
+0.22.0
+------
+
+* Add `passthrough` argument to `BaseResponse` object. See #557
+
0.21.0
------
diff --git a/README.rst b/README.rst
index cd06dba..357bd76 100644
--- a/README.rst
+++ b/README.rst
@@ -1172,14... |
getsentry__responses-564 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:get_wrapped"
],
"edited_modules": [
"responses/__init__.py:get_wrapped"
]
},
"file": "responses/__init__.py"
}
] | getsentry/responses | b12933515a59e07652039b0481ec4cf278a58727 | Setting registry in activate sets the default mock's registry for other users of activate
If the registry parameter is ever used in `activate`, it will "poison" the default registry for other tests. This is illustrated by the below reproducer:
```py
import responses, responses.registries
@responses.activate(regi... | diff --git a/CHANGES b/CHANGES
index bcd26b5..d088093 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
------
* Add `passthrough` argument to `BaseResponse` object. See #557
+* Fix `registries` leak. See #563
0.21.0
------
diff --git a/responses/__init__.py b/responses/__init__.py
index 30b9597..1a6bd2e 10064... |
getsentry__responses-569 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/matchers.py:json_params_matcher"
],
"edited_modules": [
"responses/matchers.py:json_params_matcher"
]
},
"file": "responses/matchers.py"
}
] | getsentry/responses | d49f82958887b0f55479714319df22a47c4fd3bc | json_params_matcher does not support general JSONs (e.g. lists of dicts)
### Describe the bug
The implementation of `json_params_matcher` does not support arbitrarily nested JSON objects, such as lists of dicts.
It says so in the signature:
`def json_params_matcher(params: Optional[Dict[str, Any]]) -> Callable... | diff --git a/CHANGES b/CHANGES
index b4f4f93..a66f591 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@
* Add `passthrough` argument to `BaseResponse` object. See #557
* Fix `registries` leak. See #563
* Add support for the `loose` version of `json_params_matcher` via named argument `strict_match`. See #551
+* Add ... |
getsentry__responses-581 | [
{
"changes": {
"added_entities": [
"responses/__init__.py:RequestsMock._add_from_file"
],
"added_modules": null,
"edited_entities": [
"responses/__init__.py:CallList.__getitem__",
"responses/__init__.py:RequestsMock._on_request"
],
"edited_modules": [
... | getsentry/responses | f431d49021252657e55253c18f0f8493c61e6ae6 | Add expected response from a file
In your [introductory blog post](http://cramer.io/2014/05/20/mocking-requests-with-responses/) you have the last example with a lot of such calls:
```
responses.add(
responses.GET, 'http://jenkins.example.com/job/server/2/logText/progressiveHtml/?start=0',
matc... | diff --git a/CHANGES b/CHANGES
index 2675334..662cfc3 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,14 +1,19 @@
0.22.0
------
+* Update `requests` dependency to the version of 2.22.0 or higher. See #584.
* [BETA] Added possibility to record responses to TOML files via `@_recorder.record(file_path="out.toml")` decorator... |
getsentry__responses-614 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:Response.get_response"
],
"edited_modules": [
"responses/__init__.py:Response"
]
},
"file": "responses/__init__.py"
}
] | getsentry/responses | b30c13fe1c9a2e60e7e2de7a92322b4d4ad57562 | Exception variable does not include request object
### Describe the bug
When handling an exception in the requests library, the exception variable stores the `request` object, which can be very helpful in grabbing details about the failed request:
```
try:
requests.get(<URL>)
return "Request succeeded"... | diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 13e14df..f8566ec 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -20,7 +20,7 @@ jobs:
- run: |
pip install wheel
python setup.py bdist_wheel sdist --formats=gztar
- - uses: action... |
getsentry__responses-622 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:RequestsMock.__exit__"
],
"edited_modules": [
"responses/__init__.py:RequestsMock"
]
},
"file": "responses/__init__.py"
}
] | getsentry/responses | faf6dd9afa209e9b3c6b8254ed853ff4067519a1 | Reset not triggered when assert_all_requests_are_fired raises using decorator
### Describe the bug
I am not sure if `@responses.activate(assert_all_requests_are_fired=True)` is used normally but I found it easy to use for pytest tests. However, I found a problem using it this way:
See example. The second function h... | diff --git a/CHANGES b/CHANGES
index 5542677..325a044 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@
* Fix type annotations of `CallList`. See #593
* Replaced toml with tomli and tomli-w.
* `request` object is attached to any custom exception provided as `Response` `body` argument. See #588
+* Fixed mocked respo... |
getsentry__responses-643 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:RequestsMock.start"
],
"edited_modules": [
"responses/__init__.py:RequestsMock"
]
},
"file": "responses/__init__.py"
}
] | getsentry/responses | c5d193ff007f3c8b45c24c9883777ef2d747876e | _on_request raises a type error if arguments are explicitly passed to `send` method through an adapter
### Describe the bug
If you implement a custom adapter which explicitly passes the arguments expected by [HTTPAdapter.send](https://github.com/psf/requests/blob/v2.31.0/requests/adapters.py#L435) responses raises a `... | diff --git a/CHANGES b/CHANGES
index f6a8d12..abc559b 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
------
* Updated dependency to urllib3>=2 and requests>=2.30.0. See #635
+* Fixed issue when custom adapters were sending only positional args. See #642
0.23.1
diff --git a/responses/__init__.py b/responses... |
getsentry__responses-671 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:CallList.add",
"responses/__init__.py:_ensure_url_default_path",
"responses/__init__.py:BaseResponse.__init__",
"responses/__init__.py:BaseResponse._url_mat... | getsentry/responses | cf05e411f51bc67028f0af52dc44dcfa103f59fa | RecursionError with passthru and _real_send override
### Describe the bug
When using the `responses._real_send = self.r_mock.unbound_on_send()` solution described [here](https://github.com/getmoto/moto/issues/6417), I am getting a recursion error.
### Additional context
This issue replaces [this one](https://g... | diff --git a/CHANGES b/CHANGES
index 59a5925..2bb4095 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
0.24.0
------
+* Added `real_adapter_send` parameter to `RequestsMock` that will allow users to set
+ through which function they would like to send real requests
* Added support for re.Pattern based header ma... |
getsentry__responses-673 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:BaseResponse.get_headers"
],
"edited_modules": [
"responses/__init__.py:BaseResponse"
]
},
"file": "responses/__init__.py"
}
] | getsentry/responses | 9c0d1ac3d72f2e2a79798b9e9239688bc77c243b | Setting explicit Content-Type header in addition to json body results in comma-delimited Content-Type
### Describe the bug
When passing a JSON payload to a response object as `json=...`, the content-type is automatically set to `application/json`.
Attempting to set Content-Type explicitly results in a malformed heade... | diff --git a/CHANGES b/CHANGES
index 2bb4095..9e70130 100644
--- a/CHANGES
+++ b/CHANGES
@@ -5,6 +5,7 @@
through which function they would like to send real requests
* Added support for re.Pattern based header matching.
* Added support for gzipped response bodies to `json_params_matcher`.
+* Fix `Content-Type` hea... |
getsentry__responses-717 | [
{
"changes": {
"added_entities": [
"responses/matchers.py:body_matcher"
],
"added_modules": [
"responses/matchers.py:body_matcher"
],
"edited_entities": null,
"edited_modules": null
},
"file": "responses/matchers.py"
}
] | getsentry/responses | 83f2e287768de4bdd37ec1c144f56aafe38e29de | Add capability for matching non json request bodies
At work I use responses for mocking api responses for the applications I develop. One of the APIs my application is interacting with does not take input in json format.
A call to this api looks like this
'''Curl api.company.com/v1/id --data '12345' '''
I would like... | diff --git a/responses/matchers.py b/responses/matchers.py
index c9f7a63..79148e8 100644
--- a/responses/matchers.py
+++ b/responses/matchers.py
@@ -31,6 +31,21 @@ def _filter_dict_recursively(
return filtered_dict
+def body_matcher(params: str, *, allow_blank: bool = False) -> Callable[..., Any]:
+ def mat... |
getsentry__responses-720 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"responses/__init__.py:RequestsMock.add",
"responses/__init__.py:RequestsMock._add_from_file",
"responses/__init__.py:RequestsMock._on_request"
],
"edited_modules": [
... | getsentry/responses | 83f2e287768de4bdd37ec1c144f56aafe38e29de | Cannot record header to file
### Describe the bug
When recording a request that contains a location header, that header is not there anymore, when replaying that request.
### Additional context
It seems the code in [_add_from_file()](https://github.com/getsentry/responses/blob/83f2e287768de4bdd37ec1c144f56aafe38e29d... | diff --git a/CHANGES b/CHANGES
index 7c49851..0679c1c 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@
------
* Mulligan on 0.25.1 to run release pipeline correctly.
+* Added `matchers.body_matcher` for matching string request bodies. See #717
0.25.1
------
diff --git a/responses/__init__.py b/responses/__ini... |
getsentry__responses-736 | [
{
"changes": {
"added_entities": [
"responses/__init__.py:RequestsMock._read_filelike_body"
],
"added_modules": null,
"edited_entities": [
"responses/__init__.py:RequestsMock._on_request"
],
"edited_modules": [
"responses/__init__.py:RequestsMock"
... | getsentry/responses | b68e51388e08399a8828633910eac49d6fd35e2b | Cannot match request with `data=filehandle`
### Describe the bug
When mocking responses to a request where an open filehandle is passed as the `data` argument to the request function/method, the prepared request passed to the matcher has its `body` attribute set to the filehandle rather than to the filehandle's conte... | diff --git a/responses/__init__.py b/responses/__init__.py
index 097e61e..fb37516 100644
--- a/responses/__init__.py
+++ b/responses/__init__.py
@@ -1054,6 +1054,22 @@ class RequestsMock:
params[key] = values
return params
+ def _read_filelike_body(
+ self, body: Union[str, bytes, Buff... |
getsentry__sentry-python-1053 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"scripts/build_awslambda_layer.py:PackageBuilder.create_init_serverless_sdk_package"
],
"edited_modules": [
"scripts/build_awslambda_layer.py:PackageBuilder"
]
},
"file"... | getsentry/sentry-python | b530b6f89ba9c13a9f65a0fa3f151ed42c9befe0 | Consider logging hierarchy for ignore_logger
Ref: https://docs.sentry.io/platforms/python/logging/#ignoring-a-logger
I'm trying to ignore a spammy module (in this case "ddtrace.writer"). While setting up my Sentry integration, I decided that I don't care about any error log from the entire module and so I called `ig... | diff --git a/linter-requirements.txt b/linter-requirements.txt
index 3accdd5e..08b47958 100644
--- a/linter-requirements.txt
+++ b/linter-requirements.txt
@@ -1,6 +1,6 @@
black==20.8b1
-flake8==3.8.4
+flake8==3.9.0
flake8-import-order==0.18.1
mypy==0.782
-flake8-bugbear==21.3.1
+flake8-bugbear==21.3.2
pep8-naming==... |
getsentry__sentry-python-1533 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "sentry_sdk/integrations/__init__.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"... | getsentry/sentry-python | fa4f5b03c2d686e1dfb40543d0d099e5391850a9 | Auto-enable Starlette and FastAPI integrations
### Problem Statement
Right now the users have to set the integrations by themselves. Better would be auto enabling it like Django.
### Solution Brainstorm
Detect starlette and fastfapi python modules and if present enable the integrations. See other integration h... | diff --git a/sentry_sdk/integrations/__init__.py b/sentry_sdk/integrations/__init__.py
index 68445d34..8d327415 100644
--- a/sentry_sdk/integrations/__init__.py
+++ b/sentry_sdk/integrations/__init__.py
@@ -54,6 +54,8 @@ def _generate_default_integrations_iterator(integrations, auto_enabling_integrat
_AUTO_ENABLING_IN... |
getsentry__sentry-python-1558 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/integrations/aiohttp.py:AioHttpIntegration.setup_once"
],
"edited_modules": [
"sentry_sdk/integrations/aiohttp.py:AioHttpIntegration"
]
},
"file": "sentry_sd... | getsentry/sentry-python | 7a7f6d90b8e9b62dc85c8f84203427e90de5b45c | Transaction source custom semantics not correct
We should get rid of `unknown` as a source completely since this is never supposed to be set by an SDK, only by relay as an inference in absence of other sources.
Also default to `custom` as the default in `start_transaction` / set transaction name helpers, and make sure ... | diff --git a/sentry_sdk/integrations/aiohttp.py b/sentry_sdk/integrations/aiohttp.py
index 9f4a823b..f0779017 100644
--- a/sentry_sdk/integrations/aiohttp.py
+++ b/sentry_sdk/integrations/aiohttp.py
@@ -9,7 +9,7 @@ from sentry_sdk.integrations._wsgi_common import (
_filter_headers,
request_body_within_bounds,... |
getsentry__sentry-python-1589 | [
{
"changes": {
"added_entities": [
"sentry_sdk/hub.py:Hub.trace_propagation_meta"
],
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"sentry_sdk/hub.py:Hub"
]
},
"file": "sentry_sdk/hub.py"
},
{
"changes": {
"added_ent... | getsentry/sentry-python | f932402f3db76740552817500b4a743690d9ffe2 | Populate and propagate dynamic sampling context when Python is head of trace
### Problem Statement
Many server side rendering applications start traces on the server, not on the client. So the head SDK is more often then not a a server side one, not a frontend SDK as we assumed.
This means that server side applicat... | diff --git a/sentry_sdk/hub.py b/sentry_sdk/hub.py
index 3fd084ba..33870e2d 100644
--- a/sentry_sdk/hub.py
+++ b/sentry_sdk/hub.py
@@ -717,6 +717,19 @@ class Hub(with_metaclass(HubMeta)): # type: ignore
for header in span.iter_headers():
yield header
+ def trace_propagation_meta(self, span=N... |
getsentry__sentry-python-1746 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/consts.py:ClientConstructor.__init__"
],
"edited_modules": [
"sentry_sdk/consts.py:ClientConstructor"
]
},
"file": "sentry_sdk/consts.py"
},
{
"chang... | getsentry/sentry-python | 442e71ce975fc211b4351f29a8a3d9adabfb579d | Support for Proxy Authentication
Hi there! Thanks for all you do with Sentry -- it adds incredible value to our team.
I have a question about support for HTTP proxy authentication in `sentry_sdk`.
**TL;DR:** Is proxy authentication supported? If not, can it be? Without support for proxy auth, we can't use Sentry ... | diff --git a/sentry_sdk/consts.py b/sentry_sdk/consts.py
index d07bec23..3393f491 100644
--- a/sentry_sdk/consts.py
+++ b/sentry_sdk/consts.py
@@ -81,6 +81,7 @@ class ClientConstructor(object):
auto_session_tracking=True, # type: bool
send_client_reports=True, # type: bool
_experiments={}, ... |
getsentry__sentry-python-1840 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "sentry_sdk/_types.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/clie... | getsentry/sentry-python | 43ca99169728553e6f47102da3c83d4cf302e97c | Add beforeSendTransaction
## Problem Statement
Similar to `beforeSend`, we will add `beforeSendTransaction` to allow people to strip Pii or drop transactions before they are sent to Sentry.
## Solution Brainstorm
See https://github.com/getsentry/sentry-javascript/pull/6121
| diff --git a/codecov.yml b/codecov.yml
index 1989f1cd..1811996a 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -7,3 +7,6 @@ coverage:
python:
target: 90%
comment: false
+ignore:
+ - "tests"
+ - "sentry_sdk/_types.py"
diff --git a/sentry_sdk/_types.py b/sentry_sdk/_types.py
index 3c985f21..70641929 100... |
getsentry__sentry-python-1900 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/client.py:_get_options"
],
"edited_modules": [
"sentry_sdk/client.py:_get_options"
]
},
"file": "sentry_sdk/client.py"
},
{
"changes": {
"added... | getsentry/sentry-python | ba1286eadc6f152bfdc0f2b2ed415705284e2db8 | Add enableTracing option
A new simplified options for configuring to turn tracing & performance on should be added to all SDKs. For each SDK the default sample rate should be agreed upon.
Docs do not need to be updated yet, nor the onboarding wizard. This can wait until the top level options are added to a number o... | diff --git a/sentry_sdk/client.py b/sentry_sdk/client.py
index 24a8b3c2..0ea23650 100644
--- a/sentry_sdk/client.py
+++ b/sentry_sdk/client.py
@@ -98,6 +98,9 @@ def _get_options(*args, **kwargs):
rv["project_root"] = project_root
+ if rv["enable_tracing"] is True and rv["traces_sample_rate"] is None:
+ ... |
getsentry__sentry-python-1916 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/consts.py:ClientConstructor.__init__"
],
"edited_modules": [
"sentry_sdk/consts.py:ClientConstructor"
]
},
"file": "sentry_sdk/consts.py"
},
{
"chang... | getsentry/sentry-python | 5306eabd394079cdff04cd34e64cf2141b53b5a6 | Add `trace_propagation_targets` option.
### Problem Statement
Add an option `trace_propagation_targets` that defines to what targets the trace headers (`sentry-trace` and `baggage`) are added in outgoing HTTP requests.
Similar to the same feature in JS: https://docs.sentry.io/platforms/node/guides/serverless-cloud... | diff --git a/sentry_sdk/consts.py b/sentry_sdk/consts.py
index d5c9b19a..5dad0af5 100644
--- a/sentry_sdk/consts.py
+++ b/sentry_sdk/consts.py
@@ -42,6 +42,8 @@ if MYPY:
DEFAULT_QUEUE_SIZE = 100
DEFAULT_MAX_BREADCRUMBS = 100
+MATCH_ALL = r".*"
+
class INSTRUMENTER:
SENTRY = "sentry"
@@ -123,6 +125,9 @@ clas... |
getsentry__sentry-python-1960 | [
{
"changes": {
"added_entities": [
"sentry_sdk/client.py:_Client._setup_instrumentation"
],
"added_modules": null,
"edited_entities": [
"sentry_sdk/client.py:_Client._init_impl"
],
"edited_modules": [
"sentry_sdk/client.py:_Client"
]
},
"... | getsentry/sentry-python | 8642de059703e270252e8fd9049ba1d663751353 | Central place to configure custom instrumentation
### Problem Statement
Having to put decorators all over the code base to monitor their performance can be cumbersome.
A single place to set up custom instrumentation would be nice.
### Solution Brainstorm
Have a list of functions that can be passed to "sentry... | diff --git a/sentry_sdk/client.py b/sentry_sdk/client.py
index efa62fdd..e246f053 100644
--- a/sentry_sdk/client.py
+++ b/sentry_sdk/client.py
@@ -1,3 +1,4 @@
+from importlib import import_module
import os
import uuid
import random
@@ -17,6 +18,7 @@ from sentry_sdk.utils import (
logger,
)
from sentry_sdk.ser... |
getsentry__sentry-python-2009 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/client.py:_Client.capture_event"
],
"edited_modules": [
"sentry_sdk/client.py:_Client"
]
},
"file": "sentry_sdk/client.py"
}
] | getsentry/sentry-python | 5f2c34e651c89d7e72b0d1b719ee4aeeb63ec7a3 | Use `/envelope` endpoint for all events when performance is enabled
(do not use `/store` for those events)
Also make sure the dynamic sampling context is also sent with all event going to `/envelope` | diff --git a/sentry_sdk/client.py b/sentry_sdk/client.py
index 2e73f60c..52c6184e 100644
--- a/sentry_sdk/client.py
+++ b/sentry_sdk/client.py
@@ -18,7 +18,7 @@ from sentry_sdk.utils import (
logger,
)
from sentry_sdk.serializer import serialize
-from sentry_sdk.tracing import trace
+from sentry_sdk.tracing impo... |
getsentry__sentry-python-2020 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/utils.py:serialize_frame"
],
"edited_modules": [
"sentry_sdk/utils.py:serialize_frame"
]
},
"file": "sentry_sdk/utils.py"
}
] | getsentry/sentry-python | eb5ee4acf1556a9973ef1fe7d0ae63bab150059d | Add `include_source_context` option
### Problem Statement
Some users do not like the source context to be there and want to disable it.
### Solution Brainstorm
For this we need to add a SDK option `include_source_context` that defaults to `True`.
If set to false, the source context should not be included.
... | diff --git a/sentry_sdk/utils.py b/sentry_sdk/utils.py
index e1a0273e..fc9ec194 100644
--- a/sentry_sdk/utils.py
+++ b/sentry_sdk/utils.py
@@ -594,8 +594,10 @@ def filename_for_module(module, abs_path):
return abs_path
-def serialize_frame(frame, tb_lineno=None, include_local_variables=True):
- # type: ... |
getsentry__sentry-python-2080 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/integrations/threading.py:ThreadingIntegration.setup_once",
"sentry_sdk/integrations/threading.py:_wrap_run"
],
"edited_modules": [
"sentry_sdk/integrations/thread... | getsentry/sentry-python | 81afcea403c0ac148d631164de29ed80d6a64840 | Threading integration breaks OpenCensus' threading integration
### How do you use Sentry?
Sentry Saas (sentry.io)
### Version
1.21.1
### Steps to Reproduce
1. Enable threading Sentry integration (it seems to be enabled by default)
2. Enable [threading OpenCensus integration](https://pypi.org/project/ope... | diff --git a/sentry_sdk/integrations/threading.py b/sentry_sdk/integrations/threading.py
index 18973161..499cf85e 100644
--- a/sentry_sdk/integrations/threading.py
+++ b/sentry_sdk/integrations/threading.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
import sys
+from functools import wraps
from threadin... |
getsentry__sentry-python-2113 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": [
"sentry_sdk/consts.py:SPANDATA"
]
},
"file": "sentry_sdk/consts.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
... | getsentry/sentry-python | 4f1f782fbedc9adcf1dfcd2092bb328443f09e8c | `http.response.status_code` normalization for Metrics & Alerts
Background:
http.status is set in different places in different SDKs which creates some problems in processing for metrics extraction and then
https://www.notion.so/sentry/Expand-Metrics-for-Alerts-cdfa32d7624e498b8246c3f131f753f1#17480955e2fb4407b619b9... | diff --git a/sentry_sdk/consts.py b/sentry_sdk/consts.py
index 524d8e05..0fc94686 100644
--- a/sentry_sdk/consts.py
+++ b/sentry_sdk/consts.py
@@ -101,6 +101,12 @@ class SPANDATA:
Example: GET
"""
+ HTTP_STATUS_CODE = "http.response.status_code"
+ """
+ The HTTP status code as an integer.
+ Exam... |
getsentry__sentry-python-2148 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": null,
"edited_modules": null
},
"file": "docs/conf.py"
},
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/integrations... | getsentry/sentry-python | 2882ee800533b52f264cd49ff603537e217c05c6 | Support urllib3 2.0.0
### Problem Statement
see if we need any changes and how the openssl support matrix works across runtimes (AWS lambdas etc)
https://urllib3.readthedocs.io/en/latest/v2-migration-guide.html | diff --git a/docs/conf.py b/docs/conf.py
index 340f9e17..0f206a4b 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -11,6 +11,7 @@ import sphinx.builders.latex
import sphinx.builders.texinfo
import sphinx.builders.text
import sphinx.ext.autodoc
+import urllib3.exceptions
typing.TYPE_CHECKING = True
diff --git a/s... |
getsentry__sentry-python-2176 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/_compat.py:check_thread_support"
],
"edited_modules": [
"sentry_sdk/_compat.py:check_thread_support"
]
},
"file": "sentry_sdk/_compat.py"
},
{
"chang... | getsentry/sentry-python | c26f35a248bb2400f547f1d0ecb957b961f35563 | Continue trace from ENV vars
It should be able to continue a trace with trace information that was given to the python process over environment variables.
See this RFC for the spec: https://github.com/getsentry/rfcs/blob/main/text/0071-continue-trace-over-process-boundaries.md | diff --git a/Makefile b/Makefile
index a4d07279..2011b1b6 100644
--- a/Makefile
+++ b/Makefile
@@ -51,7 +51,7 @@ lint: .venv
apidocs: .venv
@$(VENV_PATH)/bin/pip install --editable .
@$(VENV_PATH)/bin/pip install -U -r ./docs-requirements.txt
- @$(VENV_PATH)/bin/sphinx-build -W -b html docs/ docs/_build
+ @$(VENV_... |
getsentry__sentry-python-2239 | [
{
"changes": {
"added_entities": null,
"added_modules": null,
"edited_entities": [
"sentry_sdk/tracing_utils.py:Baggage.populate_from_transaction"
],
"edited_modules": [
"sentry_sdk/tracing_utils.py:Baggage"
]
},
"file": "sentry_sdk/tracing_utils.py"
... | getsentry/sentry-python | 5704f1241005f51d10ea7fb947be026cb2c563e0 | Add Sampling Decision to Trace Envelope Header
## Description
See project description: https://github.com/getsentry/team-sdks/issues/8
| diff --git a/sentry_sdk/tracing_utils.py b/sentry_sdk/tracing_utils.py
index 762dca17..eb0d0e78 100644
--- a/sentry_sdk/tracing_utils.py
+++ b/sentry_sdk/tracing_utils.py
@@ -330,6 +330,9 @@ class Baggage(object):
if transaction.sample_rate is not None:
sentry_items["sample_rate"] = str(transactio... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.