Skip to content

Commit 926b9ce

Browse files
authored
BUG: use uuid4 instead of md5 for fake column in cross merge (#48029)
* BUG: use usedforsecurity for md5 in cross merge * BUG: use usedforsecurity for md5 in cross merge * Use uuid
1 parent 7c99031 commit 926b9ce

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Diff for: doc/source/whatsnew/v1.5.0.rst

+1
Original file line numberDiff line numberDiff line change
@@ -1095,6 +1095,7 @@ Reshaping
10951095
- Bug in :func:`concat` not sorting the column names when ``None`` is included (:issue:`47331`)
10961096
- Bug in :func:`concat` with identical key leads to error when indexing :class:`MultiIndex` (:issue:`46519`)
10971097
- Bug in :func:`pivot_table` raising ``TypeError`` when ``dropna=True`` and aggregation column has extension array dtype (:issue:`47477`)
1098+
- Bug in :func:`merge` raising error for ``how="cross"`` when using ``FIPS`` mode in ssl library (:issue:`48024`)
10981099
- Bug in :meth:`DataFrame.join` with a list when using suffixes to join DataFrames with duplicate column names (:issue:`46396`)
10991100
- Bug in :meth:`DataFrame.pivot_table` with ``sort=False`` results in sorted index (:issue:`17041`)
11001101
- Bug in :meth:`concat` when ``axis=1`` and ``sort=False`` where the resulting Index was a :class:`Int64Index` instead of a :class:`RangeIndex` (:issue:`46675`)

Diff for: pandas/core/reshape/merge.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
import copy
77
import datetime
88
from functools import partial
9-
import hashlib
109
import string
1110
from typing import (
1211
TYPE_CHECKING,
1312
Hashable,
1413
cast,
1514
)
15+
import uuid
1616
import warnings
1717

1818
import numpy as np
@@ -1311,7 +1311,7 @@ def _create_cross_configuration(
13111311
DataFrames with cross_col, the merge operation set to inner and the column
13121312
to join over.
13131313
"""
1314-
cross_col = f"_cross_{hashlib.md5().hexdigest()}"
1314+
cross_col = f"_cross_{uuid.uuid4()}"
13151315
how = "inner"
13161316
return (
13171317
left.assign(**{cross_col: 1}),

0 commit comments

Comments
 (0)