Skip to content

Commit a836524

Browse files
authored
Merge pull request #1625 from seleniumbase/special-chars-and-dependencies
Special chars and dependencies
2 parents 32b8ffa + 0284827 commit a836524

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

help_docs/recorder_mode.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ pytest new_test.py --rec -q -s --url=wikipedia.org
2929
>>>>>>>>>>>>>>>>>> PDB set_trace >>>>>>>>>>>>>>>>>
3030

3131
-> import pdb; pdb.set_trace()
32-
> .../YOUR_CURRENT_DIRECTORY/new_test.py(9)
33-
32+
> PATH_TO_YOUR_CURRENT_DIRECTORY/new_test.py(9)
33+
....
3434
5 def test_recording(self):
3535
6 if self.recorder_ext and not self.xvfb:
3636
7 # When you are done recording actions,

requirements.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ chardet==4.0.0;python_version>="3.6" and python_version<"3.7"
3333
chardet==5.0.0;python_version>="3.7"
3434
charset-normalizer==2.0.12;python_version>="3.6" and python_version<"3.7"
3535
charset-normalizer==2.1.1;python_version>="3.7"
36-
urllib3==1.26.13
36+
urllib3==1.26.12;python_version<"3.7"
37+
urllib3==1.26.13;python_version>="3.7"
3738
requests==2.27.1;python_version<"3.6"
3839
requests==2.27.1;python_version>="3.6" and python_version<"3.7"
3940
requests==2.28.1;python_version>="3.7"
@@ -98,7 +99,7 @@ pyreadline==2.1;platform_system=="Windows" and python_version<"3.6"
9899
pyreadline3==3.4.1;platform_system=="Windows" and python_version>="3.6"
99100
pyrepl==0.9.0
100101
tabcompleter==1.0.0
101-
pdbp==1.0.0
102+
pdbp==1.1.0
102103
colorama==0.4.6;python_version<"3.6"
103104
colorama==0.4.5;python_version>="3.6" and python_version<"3.7"
104105
colorama==0.4.6;python_version>="3.7"

seleniumbase/__version__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# seleniumbase package
2-
__version__ = "4.9.2"
2+
__version__ = "4.9.3"

seleniumbase/console_scripts/sb_print.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,17 @@ def invalid_run_command(msg=None):
3333

3434

3535
def sc_ranges():
36-
# Get the ranges of special characters of Chinese, Japanese, and Korean.
36+
# Get the ranges of special double-width characters.
3737
special_char_ranges = [
3838
{"from": ord("\u4e00"), "to": ord("\u9FFF")},
3939
{"from": ord("\u3040"), "to": ord("\u30ff")},
4040
{"from": ord("\uac00"), "to": ord("\ud7a3")},
41+
{"from": ord("\uff01"), "to": ord("\uff60")},
4142
]
4243
return special_char_ranges
4344

4445

45-
def is_cjk(char):
46+
def is_char_wide(char):
4647
# Returns True if the special character is Chinese, Japanese, or Korean.
4748
sc = any(
4849
[range["from"] <= ord(char) <= range["to"] for range in sc_ranges()]
@@ -52,10 +53,10 @@ def is_cjk(char):
5253

5354
def get_width(line):
5455
# Return the true width of the line. Not the same as line length.
55-
# Chinese/Japanese/Korean characters take up double width visually.
56+
# Chinese/Japanese/Korean characters take up two spaces of width.
5657
line_length = len(line)
5758
for char in line:
58-
if is_cjk(char):
59+
if is_char_wide(char):
5960
line_length += 1
6061
return line_length
6162

setup.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@
158158
'chardet==5.0.0;python_version>="3.7"', # Stay in sync with "requests"
159159
'charset-normalizer==2.0.12;python_version>="3.6" and python_version<"3.7"', # noqa: E501
160160
'charset-normalizer==2.1.1;python_version>="3.7"', # Sync "requests"
161-
'urllib3==1.26.13', # Stay in sync with "requests"
161+
'urllib3==1.26.12;python_version<"3.7"',
162+
'urllib3==1.26.13;python_version>="3.7"',
162163
'requests==2.27.1;python_version<"3.7"',
163164
'requests==2.28.1;python_version>="3.7"',
164165
'requests-toolbelt==0.10.1',
@@ -222,7 +223,7 @@
222223
'pyreadline3==3.4.1;platform_system=="Windows" and python_version>="3.6"', # noqa: E501
223224
"pyrepl==0.9.0",
224225
"tabcompleter==1.0.0",
225-
"pdbp==1.0.0",
226+
"pdbp==1.1.0",
226227
'colorama==0.4.6;python_version<"3.6"',
227228
'colorama==0.4.5;python_version>="3.6" and python_version<"3.7"',
228229
'colorama==0.4.6;python_version>="3.7"',

0 commit comments

Comments
 (0)