PrimeIntellect/SWE-rebench-V2-Filtered-Easy-Verified huggingface dataset:
Repository: influxdata/influxdb-client-go (go)
Issue: Unsynchronized WriteAPIBlocking.Write* functions
`WriteAPIBlocking.WritePoint` and `WriteAPIBlocking.WriteRecord` must ensure synchronized calling of  `write.Service.HandleWrite`

Pull request description: fix: synchronizing access to write service
Closes #208

## Proposed Changes

Synchronizing access to the `write.Service` in the `WriteAPIBlocking.write` function to prevent race conditions.

## Checklist

<!-- Checkboxes below this note can be erased if not applicable to your Pull Request. -->

- [X] CHANGELOG.md updated
- [X] Rebased/mergeable
- [X] A test has been added if appropriate
- [X] Tests pass
- [X] Commit messages are in [semantic format](https://seesparkbox.com/foundry/semantic_commit_messages)


Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6a1e0e3..1c244fc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,6 +3,7 @@
 1. [#206](https://github.com/influxdata/influxdb-client-go/pull/206) Adding TasksAPI for managing tasks and associated logs and runs.
 
 ### Bug fixes
+1. [#209](https://github.com/influxdata/influxdb-client-go/pull/209) Synchronizing access to the write service in WriteAPIBlocking.
 
 ### Documentation
 
diff --git a/api/writeAPIBlocking.go b/api/writeAPIBlocking.go
index f73609b..d50aa48 100644
--- a/api/writeAPIBlocking.go
+++ b/api/writeAPIBlocking.go
@@ -7,6 +7,7 @@ package api
 import (
 	"context"
 	"strings"
+	"sync"
 
 	http2 "github.com/influxdata/influxdb-client-go/v2/api/http"
 	"github.com/influxdata/influxdb-client-go/v2/api/write"
@@ -60,6 +61,7 @@ type WriteAPIBlocking interface {
 type writeAPIBlocking struct {
 	service      *iwrite.Service
 	writeOptions *write.Options
+	lock         sync.Mutex
 }
 
 // NewWriteAPIBlocking creates new WriteAPIBlocking instance for org and bucket with underlying client
@@ -68,6 +70,8 @@ func NewWriteAPIBlocking(org string, bucket string, service http2.Service, write
 }
 
 func (w *writeAPIBlocking) write(ctx context.Context, line string) error {
+	w.lock.Lock()
+	defer w.lock.Unlock()
 	err := w.service.HandleWrite(ctx, iwrite.NewBatch(line, w.writeOptions.RetryInterval()))
 	return err
 }


Test patch:
diff --git a/api/writeAPIBlocking_test.go b/api/writeAPIBlocking_test.go
index fd46a8e..407903b 100644
--- a/api/writeAPIBlocking_test.go
+++ b/api/writeAPIBlocking_test.go
@@ -72,3 +72,30 @@ func TestWriteContextCancel(t *testing.T) {
 	require.Equal(t, context.Canceled, err)
 	assert.Len(t, service.Lines(), 0)
 }
+
+func TestWriteParallel(t *testing.T) {
+	service := test.NewTestService(t, "http://localhost:8888")
+	writeAPI := NewWriteAPIBlocking("my-org", "my-bucket", service, write.DefaultOptions().SetBatchSize(5))
+	lines := genRecords(1000)
+
+	chanLine := make(chan string)
+	var wg sync.WaitGroup
+	for i := 0; i < 10; i++ {
+		wg.Add(1)
+		go func() {
+			for l := range chanLine {
+				err := writeAPI.WriteRecord(context.Background(), l)
+				assert.Nil(t, err)
+			}
+			wg.Done()
+		}()
+	}
+	for _, l := range lines {
+		chanLine <- l
+	}
+	close(chanLine)
+	wg.Wait()
+	assert.Len(t, service.Lines(), len(lines))
+
+	service.Close()
+}
Repository: astanin/python-tabulate (python)
Issue: SEPARATING_LINE does not work with dataclasses
Using tabulate to print a list of dataclasses when one or more rows is SEPARATING_LINE, produces:

```
  File "....\.venv\lib\site-packages\tabulate\__init__.py", line 1451, in <listcomp>
    rows = [[getattr(row, f) for f in field_names] for row in rows ]
AttributeError: 'str' object has no attribute '<the first attribute of dataclass>'
```

Can be assigned to me, I have a fix.
Pull request description: Fix separating line with dataclasses
Closes #267 

Patch:
diff --git a/tabulate/__init__.py b/tabulate/__init__.py
index 11bb865..f95da8e 100644
--- a/tabulate/__init__.py
+++ b/tabulate/__init__.py
@@ -1461,7 +1461,12 @@ def _normalize_tabular_data(tabular_data, headers, showindex="default"):
             field_names = [field.name for field in dataclasses.fields(rows[0])]
             if headers == "keys":
                 headers = field_names
-            rows = [[getattr(row, f) for f in field_names] for row in rows]
+            rows = [
+                [getattr(row, f) for f in field_names]
+                if not _is_separating_line(row)
+                else row
+                for row in rows
+            ]
 
         elif headers == "keys" and len(rows) > 0:
             # keys are column indices


Test patch:
diff --git a/test/test_input.py b/test/test_input.py
index a178bd9..d52f10b 100644
--- a/test/test_input.py
+++ b/test/test_input.py
@@ -1,6 +1,6 @@
 """Test support of the various forms of tabular data."""
 
-from tabulate import tabulate
+from tabulate import tabulate, SEPARATING_LINE
 from common import assert_equal, assert_in, raises, skip
 
 try:
@@ -520,6 +520,28 @@ def test_py37orlater_list_of_dataclasses_headers():
         skip("test_py37orlater_list_of_dataclasses_headers is skipped")
 
 
+def test_py37orlater_list_of_dataclasses_with_separating_line():
+    "Input: a list of dataclasses with a separating line"
+    try:
+        from dataclasses import make_dataclass
+
+        Person = make_dataclass("Person", ["name", "age", "height"])
+        ld = [Person("Alice", 23, 169.5), SEPARATING_LINE, Person("Bob", 27, 175.0)]
+        result = tabulate(ld, headers="keys")
+        expected = "\n".join(
+            [
+                "name      age    height",
+                "------  -----  --------",
+                "Alice      23     169.5",
+                "------  -----  --------",
+                "Bob        27     175",
+            ]
+        )
+        assert_equal(expected, result)
+    except ImportError:
+        skip("test_py37orlater_list_of_dataclasses_keys is skipped")
+
+
 def test_list_bytes():
     "Input: a list of bytes. (issue #192)"
     lb = [["你好".encode("utf-8")], ["你好"]]
Repository: spatie/data-transfer-object (php)
Issue: Setting `#[Strict]` on parent is not applied on children
```php
#[Strict]
abstract class DtoBase {}

final class Dto extends DtoBase {}
```

then `Dto` is not strict because `DataTransferObjectClass::isStrict()` reads attributes only for current instance but not its parents. 

Is it intended or a bug? Thanks!
Pull request description: Read `#[Strict]` also from parent classes
Fixes #238

Patch:
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ad3a13f..76614fb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -2,6 +2,10 @@
 
 All notable changes to `data-transfer-object` will be documented in this file
 
+## Unreleased
+
+- `#[Strict]` is passed down the inheritance chain so children are strict when parent is strict (#239)
+
 ## 3.7.1 - 2021-09-09
 
 - Cast properties with self or parent type (#236)
diff --git a/src/Reflection/DataTransferObjectClass.php b/src/Reflection/DataTransferObjectClass.php
index 7f712ce..1171f1e 100644
--- a/src/Reflection/DataTransferObjectClass.php
+++ b/src/Reflection/DataTransferObjectClass.php
@@ -2,6 +2,7 @@
 
 namespace Spatie\DataTransferObject\Reflection;
 
+use ReflectionAttribute;
 use ReflectionClass;
 use ReflectionProperty;
 use Spatie\DataTransferObject\Attributes\Strict;
@@ -66,6 +67,19 @@ class DataTransferObjectClass
 
     public function isStrict(): bool
     {
-        return $this->isStrict ??= ! empty($this->reflectionClass->getAttributes(Strict::class));
+        if (!isset($this->isStrict)) {
+            $attribute = null;
+
+            $reflectionClass = $this->reflectionClass;
+            while ($attribute === null && $reflectionClass !== false) {
+                $attribute = $reflectionClass->getAttributes(Strict::class)[0] ?? null;
+
+                $reflectionClass = $reflectionClass->getParentClass();
+            }
+
+            $this->isStrict = $attribute !== null;
+        }
+
+        return $this->isStrict;
     }
 }


Test patch:
diff --git a/tests/StrictDtoTest.php b/tests/StrictDtoTest.php
index 3fbd355..7d6d8a6 100644
--- a/tests/StrictDtoTest.php
+++ b/tests/StrictDtoTest.php
@@ -25,6 +25,17 @@ class StrictDtoTest extends TestCase
         $this->expectException(UnknownProperties::class);
 
         $dto = new StrictDto(
+            name:    'name',
+            unknown: 'unknown'
+        );
+    }
+
+    /** @test */
+    public function strict_child_test()
+    {
+        $this->expectException(UnknownProperties::class);
+
+        $dto = new ChildStrictDto(
             name: 'name',
             unknown: 'unknown'
         );
@@ -37,6 +48,9 @@ class StrictDto extends DataTransferObject
     public string $name;
 }
 
+final class ChildStrictDto extends StrictDto {}
+
+
 class NonStrictDto extends DataTransferObject
 {
     public string $name;
Repository: matthewwithanm/python-markdownify (python)
Issue: `<br/>` in inline contexts does not evaluate to a separating space
Currently, `<br/>` in inline contexts (such as headings and table cells) evaluates to an empty string instead of a separating space:

```python
from markdownify import MarkdownConverter

def md(html, **options):
    return MarkdownConverter(heading_style="ATX").convert(html)

print(repr(md('<h1>foo<br />bar</h1>')))
# '# foobar'
#    ^^^^^^

print(repr(md('<td>foo<br />bar</td>')))
# ' foobar |'
#   ^^^^^^
```

In inline contexts, `<br/>` should evaluate to a separating space.
Pull request description: in inline contexts, resolve <br/> to a space instead of an empty string
Fixes #201. In inline contexts, `<br />` now resolves to a space instead of an empty string.

Unit tests were added to include this case.

Patch:
diff --git a/markdownify/__init__.py b/markdownify/__init__.py
index 69ec328..ac34ee5 100644
--- a/markdownify/__init__.py
+++ b/markdownify/__init__.py
@@ -443,7 +443,7 @@ class MarkdownConverter(object):
 
     def convert_br(self, el, text, parent_tags):
         if '_inline' in parent_tags:
-            return ""
+            return ' '
 
         if self.options['newline_style'].lower() == BACKSLASH:
             return '\\\n'


Test patch:
diff --git a/tests/test_conversions.py b/tests/test_conversions.py
index 6939329..0df8f57 100644
--- a/tests/test_conversions.py
+++ b/tests/test_conversions.py
@@ -79,6 +79,8 @@ def test_blockquote_nested():
 def test_br():
     assert md('a<br />b<br />c') == 'a  \nb  \nc'
     assert md('a<br />b<br />c', newline_style=BACKSLASH) == 'a\\\nb\\\nc'
+    assert md('<h1>foo<br />bar</h1>', heading_style=ATX) == '\n\n# foo bar\n\n'
+    assert md('<td>foo<br />bar</td>', heading_style=ATX) == ' foo bar |'
 
 
 def test_code():