Skip to content

Commit 6538ba5

Browse files
committed
Changes for Python 3.13 on ST 4201+
1 parent 08a1d69 commit 6538ba5

8 files changed

Lines changed: 98 additions & 114 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
tags:
66
- 'st3-*'
7+
- 'st4-*'
78

89
jobs:
910

.prospector.yml

Lines changed: 0 additions & 18 deletions
This file was deleted.

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.13

CHANGES.md

Lines changed: 89 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -1,200 +1,204 @@
11
# ExportHtml
22

3+
## 2.19.0
4+
5+
- **NEW**: Updates to support Python 3.13 on ST 4201+.
6+
37
## 2.18.1
48

5-
- **FIX**: Require the typing dependency for Python 3.3.
9+
- **FIX**: Require the typing dependency for Python 3.3.
610

711
## 2.18.0
812

9-
- **NEW**: New colorblind filters.
10-
- **CHORE**: Updates to support newer dependencies.
11-
- **FIX**: Remove unnecessary dependencies.
12-
- **FIX**: Fix typo in settings configuration.
13+
- **NEW**: New colorblind filters.
14+
- **CHORE**: Updates to support newer dependencies.
15+
- **FIX**: Remove unnecessary dependencies.
16+
- **FIX**: Fix typo in settings configuration.
1317

1418
## 2.17.4
1519

16-
- **FIX**: Fix `jinja2` import error.
20+
- **FIX**: Fix `jinja2` import error.
1721

1822
## 2.17.3
1923

20-
- **FIX**: Fix a scheme loading related issue.
21-
- **FIX**: Ensure ExportHTML will work with Package Control 4.0 (compatibility issues with latest `mdpopups` needed for
22-
Package Control 4.0).
24+
- **FIX**: Fix a scheme loading related issue.
25+
- **FIX**: Ensure ExportHTML will work with Package Control 4.0 (compatibility issues with latest `mdpopups` needed
26+
for Package Control 4.0).
2327

2428
## 2.17.2
2529

26-
- **FIX**: Fix a regression where custom defined schemes are not used.
30+
- **FIX**: Fix a regression where custom defined schemes are not used.
2731

2832
## 2.17.1
2933

30-
- **FIX**: Fix issues with Sublime 4095 `auto` light/dark color scheme option (legacy converter).
31-
- **FIX**: Reduce dependencies by relying on the `coloraide` in `mdpopups`.
32-
- **FIX**: Fix some color filter cases.
34+
- **FIX**: Fix issues with Sublime 4095 `auto` light/dark color scheme option (legacy converter).
35+
- **FIX**: Reduce dependencies by relying on the `coloraide` in `mdpopups`.
36+
- **FIX**: Fix some color filter cases.
3337

3438
## 2.17.0
3539

36-
- **NEW**: Drop BBCode support.
37-
- **NEW**: Use recent Sublime API commands, such as `view.style()` and `view.style_for_scope()` instead of old legacy
38-
method.
39-
- **NEW**: Use `coloraide` dependency for color handling.
40-
- **FIX**: Recent changes should allow `min-contrast` usage in themes to work.
41-
- **FIX**: Recent changes should allow for handling invalid color in color schemes better.
42-
- **FIX**: Recent changes should fix some issues with hashed schemes.
40+
- **NEW**: Drop BBCode support.
41+
- **NEW**: Use recent Sublime API commands, such as `view.style()` and `view.style_for_scope()` instead of old legacy
42+
method.
43+
- **NEW**: Use `coloraide` dependency for color handling.
44+
- **FIX**: Recent changes should allow `min-contrast` usage in themes to work.
45+
- **FIX**: Recent changes should allow for handling invalid color in color schemes better.
46+
- **FIX**: Recent changes should fix some issues with hashed schemes.
4347

4448
## 2.16.1
4549

46-
- **FIX**: Fix issue with quick start doc not showing images proper.
50+
- **FIX**: Fix issue with quick start doc not showing images proper.
4751

4852
## 2.16.0
4953

50-
- **NEW**: Add `glow` and `underline` support in Sublime syntax color schemes.
54+
- **NEW**: Add `glow` and `underline` support in Sublime syntax color schemes.
5155

5256
## 2.15.1
5357

54-
- **FIX**: ST4 now handles `HSL` properly, remove workaround for build 4069.
55-
- **FIX**: `+`/`-` have to be followed by spaces in `saturation`, `lightness`, and `alpha` or they should be treated as
56-
part of the number following them. `*` does not need a space.
57-
- **FIX**: Add support for `deg` unit type for the hue channel with `HSL` and `HWB`.
58-
- **FIX**: Sublime will ignore the unit types `rad`, `grad`, and `turn` for `HSL` and `HWB`, but add support for them in
59-
case Sublime ever does.
58+
- **FIX**: ST4 now handles `HSL` properly, remove workaround for build 4069.
59+
- **FIX**: `+`/`-` have to be followed by spaces in `saturation`, `lightness`, and `alpha` or they should be treated as
60+
part of the number following them. `*` does not need a space.
61+
- **FIX**: Add support for `deg` unit type for the hue channel with `HSL` and `HWB`.
62+
- **FIX**: Sublime will ignore the unit types `rad`, `grad`, and `turn` for `HSL` and `HWB`, but add support for them in
63+
case Sublime ever does.
6064

6165
## 2.15.0
6266

63-
- **NEW**: Support `lightness()` and `saturation()` in color mod functions.
64-
- **NEW**: Properly support `alpha(+value)`, `alpha(-value)`, `alpha(*value)`, and `alpha(value)`.
65-
- **NEW**: Suppport `foreground_adjust`.
67+
- **NEW**: Support `lightness()` and `saturation()` in color mod functions.
68+
- **NEW**: Properly support `alpha(+value)`, `alpha(-value)`, `alpha(*value)`, and `alpha(value)`.
69+
- **NEW**: Suppport `foreground_adjust`.
6670

6771
## 2.14.4
6872

69-
- **FIX**: Fix references to internal color schemes in settings. Color schemes wouldn't load proper as the color scheme
70-
names were wrong.
73+
- **FIX**: Fix references to internal color schemes in settings. Color schemes wouldn't load proper as the color scheme
74+
names were wrong.
7175

7276
## 2.14.3
7377

74-
- **FIX**: Mimic Sublime in regards to hue blending.
78+
- **FIX**: Mimic Sublime in regards to hue blending.
7579

7680
## 2.14.2
7781

78-
- **FIX**: Fix `HWB` exception.
82+
- **FIX**: Fix `HWB` exception.
7983

8084
## 2.14.1
8185

82-
- **FIX**: Fix some regressions in regard to blending colors.
83-
- **FIX**: Fix issue where `HWB` blending was used when it shouldn't be.
86+
- **FIX**: Fix some regressions in regard to blending colors.
87+
- **FIX**: Fix issue where `HWB` blending was used when it shouldn't be.
8488

8589
## 2.14.0
8690

87-
- **NEW**: Respect `no_bold` and `no_italic` options in `font_options`.
88-
- **NEW**: Default themes converted to `sublime-color-scheme` format.
89-
- **NEW**: Handle blending in `HSL` and `HWB` color space.
90-
- **FIX**: Improved color blending.
91+
- **NEW**: Respect `no_bold` and `no_italic` options in `font_options`.
92+
- **NEW**: Default themes converted to `sublime-color-scheme` format.
93+
- **NEW**: Handle blending in `HSL` and `HWB` color space.
94+
- **FIX**: Improved color blending.
9195

9296
## 2.13.0
9397

94-
- **NEW**: Add support for `hwb()` and `alpha()`/`a()`.
95-
- **FIX**: Handle `hsl()` in `blend()`.
98+
- **NEW**: Add support for `hwb()` and `alpha()`/`a()`.
99+
- **FIX**: Handle `hsl()` in `blend()`.
96100

97101
## 2.12.1
98102

99-
- **FIX**: Allow `-` in variables names. Write color translations to main scheme object and ensure filtering is done after color translations.
103+
- **FIX**: Allow `-` in variables names. Write color translations to main scheme object and ensure filtering is done after color translations.
100104

101105
## 2.12.0
102106

103-
- **NEW**: Better tab conversion algorithm. Converts tabs to spaces based on tab stops (though it doesn't account for character width).
104-
- **NEW**: Using `disable_nbsp` will insert real tabs or spaces.
105-
- **NEW**: Settings are gathered from the view under conversion, not the global preferences.
106-
- **NEW**: Default provided print setups now disables `nbsp` by default to use the exact whitespace in a file.
107-
- **FIX**: Font in HTML not being displayed correctly.
107+
- **NEW**: Better tab conversion algorithm. Converts tabs to spaces based on tab stops (though it doesn't account for character width).
108+
- **NEW**: Using `disable_nbsp` will insert real tabs or spaces.
109+
- **NEW**: Settings are gathered from the view under conversion, not the global preferences.
110+
- **NEW**: Default provided print setups now disables `nbsp` by default to use the exact whitespace in a file.
111+
- **FIX**: Font in HTML not being displayed correctly.
108112

109113
## 2.11.0
110114

111-
- **NEW**: Add support for `.hidden-color-scheme`.
112-
- **FIX**: Update dependencies.
115+
- **NEW**: Add support for `.hidden-color-scheme`.
116+
- **FIX**: Update dependencies.
113117

114118
## 2.10.2
115119

116-
- **FIX**: Create fallback file read for resource race condition.
120+
- **FIX**: Create fallback file read for resource race condition.
117121

118122
## 2.10.1
119123

120-
- **FIX**: Parse legacy `foregroundSelection` properly.
124+
- **FIX**: Parse legacy `foregroundSelection` properly.
121125

122126
## 2.10.0
123127

124-
- **NEW**: Add support `.sublime-color-scheme` hashed syntax highlighting.
125-
- **FIX**: `.sublime-color-scheme` merge logic.
128+
- **NEW**: Add support `.sublime-color-scheme` hashed syntax highlighting.
129+
- **FIX**: `.sublime-color-scheme` merge logic.
126130

127131
## 2.9.1
128132

129-
- **FIX**: Parse color scheme with unexpected extension correctly.
133+
- **FIX**: Parse color scheme with unexpected extension correctly.
130134

131135
## 2.9.0
132136

133-
- **NEW**: Add support for rendering output without tables (Default CSS did change, so if overriding it, you may need to update).
134-
- **FIX**: Support for irregular `.sublime-color-scheme` values.
137+
- **NEW**: Add support for rendering output without tables (Default CSS did change, so if overriding it, you may need to update).
138+
- **FIX**: Support for irregular `.sublime-color-scheme` values.
135139

136140
## 2.8.0
137141

138-
- **NEW**: Add support for per scope selection foreground.
139-
- **FIX**: Some general color scheme parsing and tweaking issues.
142+
- **NEW**: Add support for per scope selection foreground.
143+
- **FIX**: Some general color scheme parsing and tweaking issues.
140144

141145
## 2.7.0
142146

143-
- **NEW**: Add support for `.sublime-color-scheme` files.
144-
- **NEW**: Drop option to include scheme in output.
147+
- **NEW**: Add support for `.sublime-color-scheme` files.
148+
- **NEW**: Drop option to include scheme in output.
145149

146150
## 2.6.0
147151

148-
- **NEW**: Upgrade theme_tweaker and rgba lib which adds the ability to adjust contrast.
149-
- **FIX**: Don't include document build folder.
152+
- **NEW**: Upgrade theme_tweaker and rgba lib which adds the ability to adjust contrast.
153+
- **FIX**: Don't include document build folder.
150154

151155
## 2.5.0
152156

153-
- **NEW**: Add document and settings to the command palette.
154-
- **FIX**: Quick start image links.
157+
- **NEW**: Add document and settings to the command palette.
158+
- **FIX**: Quick start image links.
155159

156160
## 2.4.1
157161

158-
- **FIX**: Hopefully more reliable browser opening (#47).
162+
- **FIX**: Hopefully more reliable browser opening (#47).
159163

160164
## 2.4.0
161165

162-
- **NEW**: Limit popups to 3124+.
163-
- **FIX**: Better scope matching.
166+
- **NEW**: Limit popups to 3124+.
167+
- **FIX**: Better scope matching.
164168

165169
## 2.3.1
166170

167-
- **FIX**: Skip processing popupCss and phantomCss.
171+
- **FIX**: Skip processing popupCss and phantomCss.
168172

169173
## 2.3.0
170174

171-
- **NEW**: Handle X11 named colors in color schemes (#44).
172-
- **NEW**: By default, don't include color scheme plist in output (to reduce size of output).
173-
- **NEW**: Quickstart guide available in menu.
174-
- **NEW**: Links to repo issues and documentation available in menu.
175+
- **NEW**: Handle X11 named colors in color schemes (#44).
176+
- **NEW**: By default, don't include color scheme plist in output (to reduce size of output).
177+
- **NEW**: Quickstart guide available in menu.
178+
- **NEW**: Links to repo issues and documentation available in menu.
175179

176180
## 2.2.2
177181

178-
- **FIX**: Fix changelog links
182+
- **FIX**: Fix changelog links
179183

180184
## 2.2.1
181185

182-
- **Fix**: Fix incorrect changelog title (#43).
186+
- **Fix**: Fix incorrect changelog title (#43).
183187

184188
## 2.2.0
185189

186-
- **NEW**: Add `disable_nbsp` option.
187-
- **Fix**: JS not loading into HTML.
190+
- **NEW**: Add `disable_nbsp` option.
191+
- **Fix**: JS not loading into HTML.
188192

189193
## 2.1.0
190194

191-
- **NEW**: New dependencies.
192-
- **NEW**: Added changelog and support info command in menu.
193-
- **NEW**: CSS template is now handled by Jinja2.
194-
- **NEW**: Add `export_css` setting to specify custom CSS.
195+
- **NEW**: New dependencies.
196+
- **NEW**: Added changelog and support info command in menu.
197+
- **NEW**: CSS template is now handled by Jinja2.
198+
- **NEW**: Add `export_css` setting to specify custom CSS.
195199

196200
## 2.0.0
197201

198-
- **NEW**: Arbitrary jump to 2.0.0 version number
199-
- **NEW**: Upgrade color libs
200-
- **NEW**: Get current scheme from view settings instead of global
202+
- **NEW**: Arbitrary jump to 2.0.0 version number
203+
- **NEW**: Upgrade color libs
204+
- **NEW**: Get current scheme from view settings instead of global

dependencies.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
{
22
"*": {
33
">=3124": [
4-
"mdpopups",
5-
"typing"
4+
"mdpopups"
65
]
76
}
87
}

lib/color_scheme_matcher.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
from mdpopups.st_colormod import Color
3333
from os import path
3434
from collections import namedtuple
35-
from plistlib import readPlistFromBytes
35+
import plistlib
3636

3737
NEW_SCHEMES = int(sublime.version()) >= 3150
3838
FONT_STYLE = "font_style" if int(sublime.version()) >= 3151 else "fontStyle"
@@ -112,7 +112,7 @@ def __init__(self, scheme_file, color_filter=None):
112112
with open(packages_path(self.color_scheme), 'rb') as f:
113113
content = f.read()
114114
self.legacy = True
115-
self.convert_format(readPlistFromBytes(XML_COMMENT_RE.sub(b'', content)))
115+
self.convert_format(plistlib.loads(XML_COMMENT_RE.sub(b'', content)))
116116
self.overrides = []
117117
if NEW_SCHEMES:
118118
self.merge_overrides()

messages/recent.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# ExportHtml 2.18.0
1+
# ExportHtml
22

33
New release!
44

@@ -7,9 +7,6 @@ for more info about the release.
77

88
A restart of Sublime Text is most likely needed.
99

10-
## 2.18.0
10+
## 2.19.0
1111

12-
- **NEW**: New colorblind filters.
13-
- **CHORE**: Updates to support newer dependencies.
14-
- **FIX**: Remove unnecessary dependencies.
15-
- **FIX**: Fix typo in settings configuration.
12+
- **NEW**: Updates to support Python 3.13 on ST 4201+.

support.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import webbrowser
66
import re
77

8-
__version__ = "2.18.1"
8+
__version__ = "2.19.0"
99
__pc_name__ = 'ExportHtml'
1010

1111
CSS = '''

0 commit comments

Comments
 (0)